| 1 | /* |
| 2 | * SPDX-License-Identifier: MIT |
| 3 | * |
| 4 | * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation |
| 5 | */ |
| 6 | |
| 7 | #ifndef BABELTRACE2_PLUGIN_PLUGIN_DEV_H |
| 8 | #define BABELTRACE2_PLUGIN_PLUGIN_DEV_H |
| 9 | |
| 10 | #ifndef __BT_IN_BABELTRACE_H |
| 11 | # error "Please include <babeltrace2/babeltrace.h> instead." |
| 12 | #endif |
| 13 | |
| 14 | #include <stdint.h> |
| 15 | |
| 16 | #include <babeltrace2/graph/component-class-dev.h> |
| 17 | #include <babeltrace2/graph/message-iterator-class.h> |
| 18 | #include <babeltrace2/types.h> |
| 19 | |
| 20 | /* |
| 21 | * _BT_HIDDEN: set the hidden attribute for internal functions |
| 22 | * On Windows, symbols are local unless explicitly exported, |
| 23 | * see https://gcc.gnu.org/wiki/Visibility |
| 24 | */ |
| 25 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 26 | #define _BT_HIDDEN |
| 27 | #else |
| 28 | #define _BT_HIDDEN __attribute__((visibility("hidden"))) |
| 29 | #endif |
| 30 | |
| 31 | #ifdef __cplusplus |
| 32 | extern "C" { |
| 33 | #endif |
| 34 | |
| 35 | /*! |
| 36 | @defgroup api-plugin-dev Plugin development |
| 37 | |
| 38 | @brief |
| 39 | Shared object plugin development. |
| 40 | |
| 41 | This module offers macros to create a \bt_name shared object plugin. |
| 42 | |
| 43 | Behind the scenes, the <code>BT_PLUGIN_*()</code> macros of this module |
| 44 | create and fill global tables which are located in sections of the |
| 45 | shared object with specific names. The \ref api-plugin functions can |
| 46 | load the resulting shared object file and create corresponding |
| 47 | \bt_plugin objects. |
| 48 | |
| 49 | See \ref guide-comp-link-plugin-so. |
| 50 | |
| 51 | <h1>Plugin definition C file structure</h1> |
| 52 | |
| 53 | The structure of a \bt_name plugin definition C file is as such: |
| 54 | |
| 55 | <ol> |
| 56 | <li> |
| 57 | Start with |
| 58 | |
| 59 | @code |
| 60 | BT_PLUGIN_MODULE(); |
| 61 | @endcode |
| 62 | </li> |
| 63 | |
| 64 | <li> |
| 65 | Define a \bt_name plugin with BT_PLUGIN() if the plugin's name is a |
| 66 | valid C identifier, or with BT_PLUGIN_WITH_ID() otherwise. |
| 67 | |
| 68 | See \ref api-plugin-dev-custom-plugin-id "Custom plugin ID" to |
| 69 | learn more about plugin IDs. |
| 70 | |
| 71 | @note |
| 72 | When you use BT_PLUGIN(), the plugin's ID is <code>auto</code>. |
| 73 | </li> |
| 74 | |
| 75 | <li> |
| 76 | \bt_dt_opt Use any of the following macros (or their |
| 77 | <code>*_WITH_ID()</code> counterpart) \em once to set the properties |
| 78 | of the plugin: |
| 79 | |
| 80 | - BT_PLUGIN_AUTHOR() |
| 81 | - BT_PLUGIN_DESCRIPTION() |
| 82 | - BT_PLUGIN_LICENSE() |
| 83 | - BT_PLUGIN_VERSION() |
| 84 | </li> |
| 85 | |
| 86 | <li> |
| 87 | \bt_dt_opt Use any of the following macros (or their |
| 88 | <code>*_WITH_ID()</code> counterpart) \em once to set the |
| 89 | initialization and finalization functions of the plugin: |
| 90 | |
| 91 | - BT_PLUGIN_INITIALIZE_FUNC() |
| 92 | - BT_PLUGIN_FINALIZE_FUNC() |
| 93 | |
| 94 | A plugin's initialization function is executed when the shared |
| 95 | object is loaded (see \ref api-plugin). |
| 96 | |
| 97 | A plugin's finalization function is executed when the \bt_plugin |
| 98 | object is destroyed, if the initialization function (if any) |
| 99 | succeeded. |
| 100 | </li> |
| 101 | |
| 102 | <li> |
| 103 | Use any of the following macros (or their <code>*_WITH_ID()</code> |
| 104 | counterpart) to add a component class to the plugin: |
| 105 | |
| 106 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS() |
| 107 | - BT_PLUGIN_FILTER_COMPONENT_CLASS() |
| 108 | - BT_PLUGIN_SINK_COMPONENT_CLASS() |
| 109 | </li> |
| 110 | |
| 111 | <li> |
| 112 | \bt_dt_opt Depending on the type of the component class of step 5, |
| 113 | use any of the following macros (or their <code>*_WITH_ID()</code> |
| 114 | counterpart) |
| 115 | \em once to set its properties: |
| 116 | |
| 117 | <dl> |
| 118 | <dt>\bt_c_src_comp_cls</dt> |
| 119 | <dd> |
| 120 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION() |
| 121 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP() |
| 122 | </dd> |
| 123 | |
| 124 | <dt>\bt_c_flt_comp_cls</dt> |
| 125 | <dd> |
| 126 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION() |
| 127 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP() |
| 128 | </dd> |
| 129 | |
| 130 | <dt>\bt_c_sink_comp_cls</dt> |
| 131 | <dd> |
| 132 | - BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION() |
| 133 | - BT_PLUGIN_SINK_COMPONENT_CLASS_HELP() |
| 134 | </dd> |
| 135 | </dl> |
| 136 | </li> |
| 137 | |
| 138 | <li> |
| 139 | \bt_dt_opt Depending on the type of the component class of step 5, |
| 140 | use any of the following macros (or their <code>*_WITH_ID()</code> |
| 141 | counterpart) to set its optional methods: |
| 142 | |
| 143 | <dl> |
| 144 | <dt>Source component class</dt> |
| 145 | <dd> |
| 146 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD() |
| 147 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD() |
| 148 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD() |
| 149 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD() |
| 150 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD() |
| 151 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD() |
| 152 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD() |
| 153 | </dd> |
| 154 | |
| 155 | <dt>Filter component class</dt> |
| 156 | <dd> |
| 157 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD() |
| 158 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD() |
| 159 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD() |
| 160 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD() |
| 161 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD() |
| 162 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD() |
| 163 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD() |
| 164 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD() |
| 165 | </dd> |
| 166 | |
| 167 | <dt>Sink component class</dt> |
| 168 | <dd> |
| 169 | - BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD() |
| 170 | - BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD() |
| 171 | - BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD() |
| 172 | - BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD() |
| 173 | - BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD() |
| 174 | - BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD() |
| 175 | </dd> |
| 176 | </dl> |
| 177 | </li> |
| 178 | </ol> |
| 179 | |
| 180 | You can repeat steps 5 to 7 to add more than one component class to a |
| 181 | given plugin. |
| 182 | |
| 183 | See \ref example-simple-plugin-def-file for a concrete example of how |
| 184 | to use the macros of this module. |
| 185 | |
| 186 | <h1>\anchor api-plugin-dev-custom-plugin-id Custom plugin ID</h1> |
| 187 | |
| 188 | The BT_PLUGIN() macro defines a plugin with a specific name and the |
| 189 | ID <code>auto</code>. |
| 190 | |
| 191 | All the <code>BT_PLUGIN_*()</code> macros which do not end with |
| 192 | <code>_WITH_ID</code> refer to the <code>auto</code> plugin. |
| 193 | |
| 194 | There are two situations which demand that you use a custom plugin ID: |
| 195 | |
| 196 | - You want more than one plugin contained in your shared object file. |
| 197 | |
| 198 | Although the \bt_name project does not recommend this, it is possible. |
| 199 | This is why bt_plugin_find_all_from_file() returns a \bt_plugin_set |
| 200 | instead of a single \bt_plugin. |
| 201 | |
| 202 | In this case, each plugin of the shared object needs its own, unique |
| 203 | ID. |
| 204 | |
| 205 | - You want to give the plugin a name which is not a valid C identifier. |
| 206 | |
| 207 | The BT_PLUGIN() macro accepts a C identifier as the plugin name, while |
| 208 | the BT_PLUGIN_WITH_ID() accepts a C identifier for the ID and a C |
| 209 | string for the name. |
| 210 | |
| 211 | To define a plugin with a specific ID, use BT_PLUGIN_WITH_ID(), for |
| 212 | example: |
| 213 | |
| 214 | @code |
| 215 | BT_PLUGIN_WITH_ID(my_plugin_id, "my-plugin-name"); |
| 216 | @endcode |
| 217 | |
| 218 | Then, use the <code>BT_PLUGIN_*_WITH_ID()</code> macros to refer to |
| 219 | this specific plugin, for example: |
| 220 | |
| 221 | @code |
| 222 | BT_PLUGIN_AUTHOR_WITH_ID(my_plugin_id, "Patrick Bouchard"); |
| 223 | @endcode |
| 224 | |
| 225 | @note |
| 226 | @parblock |
| 227 | You can still use the <code>auto</code> ID with BT_PLUGIN_WITH_ID() |
| 228 | to use the simpler macros afterwards while still giving the plugin a |
| 229 | name which is not a valid C identifier, for example: |
| 230 | |
| 231 | @code |
| 232 | BT_PLUGIN_WITH_ID(auto, "my-plugin-name"); |
| 233 | BT_PLUGIN_AUTHOR("Patrick Bouchard"); |
| 234 | @endcode |
| 235 | @endparblock |
| 236 | |
| 237 | <h1>Custom component class ID</h1> |
| 238 | |
| 239 | The BT_PLUGIN_SOURCE_COMPONENT_CLASS(), |
| 240 | BT_PLUGIN_FILTER_COMPONENT_CLASS(), and |
| 241 | BT_PLUGIN_SINK_COMPONENT_CLASS() add a component class with a specific |
| 242 | name to the plugin having the ID <code>auto</code>. |
| 243 | |
| 244 | The name you pass to those macros must be a valid C identifier and it |
| 245 | also serves as the component class's ID within the <code>auto</code> |
| 246 | plugin. |
| 247 | |
| 248 | There are two situations which demand that you use a custom component |
| 249 | class ID: |
| 250 | |
| 251 | - You want to add the component class to a specific plugin (other than |
| 252 | <code>auto</code>, if you have more than one). |
| 253 | |
| 254 | - You want to give the component class a name which is not a valid C |
| 255 | identifier. |
| 256 | |
| 257 | The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros accept a |
| 258 | C identifier for the component class ID and a string for its name. |
| 259 | |
| 260 | For a given plugin and for a given component class type, all component |
| 261 | class IDs must be unique. |
| 262 | |
| 263 | To add a component class having a specific ID to a plugin, |
| 264 | use the BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(), |
| 265 | BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(), and |
| 266 | BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() macros, for example: |
| 267 | |
| 268 | @code |
| 269 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(my_plugin_id, my_comp_class_id, |
| 270 | "my-source", my_source_iter_next); |
| 271 | @endcode |
| 272 | |
| 273 | @note |
| 274 | @parblock |
| 275 | The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros |
| 276 | specify the ID of the plugin to which to add the component class. |
| 277 | |
| 278 | If you use the BT_PLUGIN() macro to define your plugin, then its |
| 279 | ID is <code>auto</code>: |
| 280 | |
| 281 | @code |
| 282 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, my_comp_class_id, |
| 283 | "my-source", my_source_iter_next); |
| 284 | @endcode |
| 285 | @endparblock |
| 286 | |
| 287 | Then, use the <code>BT_PLUGIN_*_COMPONENT_CLASS_*_WITH_ID()</code> |
| 288 | macros to refer to this specific component class, for example: |
| 289 | |
| 290 | @code |
| 291 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(my_plugin_id, |
| 292 | my_comp_class_id, my_source_finalize); |
| 293 | @endcode |
| 294 | */ |
| 295 | |
| 296 | /*! @{ */ |
| 297 | |
| 298 | /*! |
| 299 | @name Type |
| 300 | @{ |
| 301 | |
| 302 | @typedef struct bt_self_plugin bt_self_plugin; |
| 303 | |
| 304 | @brief |
| 305 | Self plugin. |
| 306 | |
| 307 | @} |
| 308 | */ |
| 309 | |
| 310 | /*! |
| 311 | @name Plugin module |
| 312 | @{ |
| 313 | */ |
| 314 | |
| 315 | /*! |
| 316 | @brief |
| 317 | Defines a plugin module. |
| 318 | |
| 319 | In a plugin define C file, you must use this macro before you use any |
| 320 | other <code>BT_PLUGIN*()</code> macro. |
| 321 | */ |
| 322 | #define BT_PLUGIN_MODULE() \ |
| 323 | static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \ |
| 324 | _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \ |
| 325 | _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \ |
| 326 | \ |
| 327 | static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \ |
| 328 | _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \ |
| 329 | _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \ |
| 330 | \ |
| 331 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \ |
| 332 | _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \ |
| 333 | _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \ |
| 334 | \ |
| 335 | static struct __bt_plugin_component_class_descriptor_attribute const * const __bt_plugin_component_class_descriptor_attribute_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \ |
| 336 | _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor_attribute const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \ |
| 337 | _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor_attribute const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \ |
| 338 | \ |
| 339 | struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \ |
| 340 | { \ |
| 341 | return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \ |
| 342 | } \ |
| 343 | struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \ |
| 344 | { \ |
| 345 | return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \ |
| 346 | } \ |
| 347 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \ |
| 348 | { \ |
| 349 | return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \ |
| 350 | } \ |
| 351 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \ |
| 352 | { \ |
| 353 | return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \ |
| 354 | } \ |
| 355 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \ |
| 356 | { \ |
| 357 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \ |
| 358 | } \ |
| 359 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \ |
| 360 | { \ |
| 361 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \ |
| 362 | } \ |
| 363 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \ |
| 364 | { \ |
| 365 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \ |
| 366 | } \ |
| 367 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \ |
| 368 | { \ |
| 369 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \ |
| 370 | } |
| 371 | |
| 372 | /*! @} */ |
| 373 | |
| 374 | /*! |
| 375 | @name Plugin definition |
| 376 | @{ |
| 377 | */ |
| 378 | |
| 379 | /*! |
| 380 | @brief |
| 381 | Defines a plugin named \bt_p{_name} and having the ID \bt_p{_id}. |
| 382 | |
| 383 | @param[in] _id |
| 384 | @parblock |
| 385 | C identifier. |
| 386 | |
| 387 | Plugin's ID, unique amongst all the plugin IDs of the same shared |
| 388 | object. |
| 389 | @endparblock |
| 390 | @param[in] _name |
| 391 | @parblock |
| 392 | <code>const char *</code> |
| 393 | |
| 394 | Plugin's name. |
| 395 | @endparblock |
| 396 | |
| 397 | @bt_pre_not_null{_name} |
| 398 | */ |
| 399 | #define BT_PLUGIN_WITH_ID(_id, _name) \ |
| 400 | struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \ |
| 401 | .name = _name, \ |
| 402 | }; \ |
| 403 | static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id |
| 404 | |
| 405 | /*! |
| 406 | @brief |
| 407 | Alias of BT_PLUGIN_WITH_ID() with the \bt_p{_id} parameter set to |
| 408 | <code>auto</code>. |
| 409 | */ |
| 410 | #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name) |
| 411 | |
| 412 | /*! @} */ |
| 413 | |
| 414 | /*! |
| 415 | @name Plugin properties |
| 416 | @{ |
| 417 | */ |
| 418 | |
| 419 | /*! |
| 420 | @brief |
| 421 | Sets the description of the plugin having the ID \bt_p{_id} to |
| 422 | \bt_p{_description}. |
| 423 | |
| 424 | See the \ref api-comp-cls-prop-descr "description" property. |
| 425 | |
| 426 | @param[in] _id |
| 427 | @parblock |
| 428 | C identifier. |
| 429 | |
| 430 | ID of the plugin of which to set the description. |
| 431 | @endparblock |
| 432 | @param[in] _description |
| 433 | @parblock |
| 434 | <code>const char *</code> |
| 435 | |
| 436 | Plugin's description. |
| 437 | @endparblock |
| 438 | |
| 439 | @bt_pre_not_null{_description} |
| 440 | */ |
| 441 | #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _description) \ |
| 442 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _description) |
| 443 | |
| 444 | /*! |
| 445 | @brief |
| 446 | Alias of BT_PLUGIN_DESCRIPTION_WITH_ID() with the \bt_p{_id} |
| 447 | parameter set to <code>auto</code>. |
| 448 | */ |
| 449 | #define BT_PLUGIN_DESCRIPTION(_description) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _description) |
| 450 | |
| 451 | /*! |
| 452 | @brief |
| 453 | Sets the name(s) of the author(s) of the plugin having the ID |
| 454 | \bt_p{_id} to \bt_p{_author}. |
| 455 | |
| 456 | See the \ref api-plugin-prop-author "author name(s)" property. |
| 457 | |
| 458 | @param[in] _id |
| 459 | @parblock |
| 460 | C identifier. |
| 461 | |
| 462 | ID of the plugin of which to set the author(s). |
| 463 | @endparblock |
| 464 | @param[in] _author |
| 465 | @parblock |
| 466 | <code>const char *</code> |
| 467 | |
| 468 | Plugin's author(s). |
| 469 | @endparblock |
| 470 | |
| 471 | @bt_pre_not_null{_author} |
| 472 | */ |
| 473 | #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _author) \ |
| 474 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _author) |
| 475 | |
| 476 | /*! |
| 477 | @brief |
| 478 | Alias of BT_PLUGIN_AUTHOR_WITH_ID() with the \bt_p{_id} |
| 479 | parameter set to <code>auto</code>. |
| 480 | */ |
| 481 | #define BT_PLUGIN_AUTHOR(_author) BT_PLUGIN_AUTHOR_WITH_ID(auto, _author) |
| 482 | |
| 483 | /*! |
| 484 | @brief |
| 485 | Sets the license (name or full) of the plugin having the ID |
| 486 | \bt_p{_id} to \bt_p{_license}. |
| 487 | |
| 488 | See the \ref api-plugin-prop-license "license" property. |
| 489 | |
| 490 | @param[in] _id |
| 491 | @parblock |
| 492 | C identifier. |
| 493 | |
| 494 | ID of the plugin of which to set the license. |
| 495 | @endparblock |
| 496 | @param[in] _license |
| 497 | @parblock |
| 498 | <code>const char *</code> |
| 499 | |
| 500 | Plugin's license. |
| 501 | @endparblock |
| 502 | |
| 503 | @bt_pre_not_null{_license} |
| 504 | */ |
| 505 | #define BT_PLUGIN_LICENSE_WITH_ID(_id, _license) \ |
| 506 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _license) |
| 507 | |
| 508 | /*! |
| 509 | @brief |
| 510 | Alias of BT_PLUGIN_LICENSE_WITH_ID() with the \bt_p{_id} |
| 511 | parameter set to <code>auto</code>. |
| 512 | */ |
| 513 | #define BT_PLUGIN_LICENSE(_license) BT_PLUGIN_LICENSE_WITH_ID(auto, _license) |
| 514 | |
| 515 | /*! |
| 516 | @brief |
| 517 | Sets the version of the plugin having the ID \bt_p{_id} to |
| 518 | \bt_p{_version}. |
| 519 | |
| 520 | See the \ref api-plugin-prop-version "version" property. |
| 521 | |
| 522 | @param[in] _id |
| 523 | @parblock |
| 524 | C identifier. |
| 525 | |
| 526 | ID of the plugin of which to set the version. |
| 527 | @endparblock |
| 528 | @param[in] _major |
| 529 | @parblock |
| 530 | <code>unsigned int</code> |
| 531 | |
| 532 | Plugin's major version. |
| 533 | @endparblock |
| 534 | @param[in] _minor |
| 535 | @parblock |
| 536 | <code>unsigned int</code> |
| 537 | |
| 538 | Plugin's minor version. |
| 539 | @endparblock |
| 540 | @param[in] _patch |
| 541 | @parblock |
| 542 | <code>unsigned int</code> |
| 543 | |
| 544 | Plugin's patch version. |
| 545 | @endparblock |
| 546 | @param[in] _extra |
| 547 | @parblock |
| 548 | <code>const char *</code> |
| 549 | |
| 550 | Plugin's version's extra information. |
| 551 | |
| 552 | Can be \c NULL if the plugin's version has no extra information. |
| 553 | @endparblock |
| 554 | */ |
| 555 | #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \ |
| 556 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra)) |
| 557 | |
| 558 | /*! |
| 559 | @brief |
| 560 | Alias of BT_PLUGIN_VERSION_WITH_ID() with the \bt_p{_id} |
| 561 | parameter set to <code>auto</code>. |
| 562 | */ |
| 563 | #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra) |
| 564 | |
| 565 | /*! @} */ |
| 566 | |
| 567 | /*! |
| 568 | @name Plugin functions |
| 569 | @{ |
| 570 | */ |
| 571 | |
| 572 | /*! |
| 573 | @brief |
| 574 | Status codes for #bt_plugin_initialize_func. |
| 575 | */ |
| 576 | typedef enum bt_plugin_initialize_func_status { |
| 577 | /*! |
| 578 | @brief |
| 579 | Success. |
| 580 | */ |
| 581 | BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK = __BT_FUNC_STATUS_OK, |
| 582 | |
| 583 | /*! |
| 584 | @brief |
| 585 | Out of memory. |
| 586 | */ |
| 587 | BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR, |
| 588 | |
| 589 | /*! |
| 590 | @brief |
| 591 | Error. |
| 592 | */ |
| 593 | BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR = __BT_FUNC_STATUS_ERROR, |
| 594 | } bt_plugin_initialize_func_status; |
| 595 | |
| 596 | /*! |
| 597 | @brief |
| 598 | User plugin initialization function. |
| 599 | |
| 600 | @param[in] self_plugin |
| 601 | @parblock |
| 602 | Plugin instance. |
| 603 | |
| 604 | This parameter is a private view of the \bt_plugin object for |
| 605 | this function. |
| 606 | |
| 607 | As of \bt_name_version_min_maj, there's no self plugin API. |
| 608 | @endparblock |
| 609 | |
| 610 | @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK |
| 611 | Success. |
| 612 | @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR |
| 613 | Out of memory. |
| 614 | @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR |
| 615 | Error. |
| 616 | |
| 617 | @bt_pre_not_null{self_plugin} |
| 618 | */ |
| 619 | typedef bt_plugin_initialize_func_status (*bt_plugin_initialize_func)( |
| 620 | bt_self_plugin *self_plugin); |
| 621 | |
| 622 | /*! |
| 623 | @brief |
| 624 | Sets the initialization function of the plugin having the ID |
| 625 | \bt_p{_id} to \bt_p{_func}. |
| 626 | |
| 627 | @param[in] _id |
| 628 | @parblock |
| 629 | C identifier. |
| 630 | |
| 631 | ID of the plugin of which to set the initialization function. |
| 632 | @endparblock |
| 633 | @param[in] _func |
| 634 | @parblock |
| 635 | #bt_plugin_initialize_func |
| 636 | |
| 637 | Plugin's initialization function. |
| 638 | @endparblock |
| 639 | |
| 640 | @bt_pre_not_null{_func} |
| 641 | */ |
| 642 | #define BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(_id, _func) \ |
| 643 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _func) |
| 644 | |
| 645 | /*! |
| 646 | @brief |
| 647 | Alias of BT_PLUGIN_INITIALIZE_FUNC_WITH_ID() with the \bt_p{_id} |
| 648 | parameter set to <code>auto</code>. |
| 649 | */ |
| 650 | #define BT_PLUGIN_INITIALIZE_FUNC(_func) BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(auto, _func) |
| 651 | |
| 652 | /*! |
| 653 | @brief |
| 654 | User plugin finalization function. |
| 655 | */ |
| 656 | typedef void (*bt_plugin_finalize_func)(void); |
| 657 | |
| 658 | /*! |
| 659 | @brief |
| 660 | Sets the finalization function of the plugin having the ID |
| 661 | \bt_p{_id} to \bt_p{_func}. |
| 662 | |
| 663 | @param[in] _id |
| 664 | @parblock |
| 665 | C identifier. |
| 666 | |
| 667 | ID of the plugin of which to set the finalization function. |
| 668 | @endparblock |
| 669 | @param[in] _func |
| 670 | @parblock |
| 671 | #bt_plugin_finalize_func |
| 672 | |
| 673 | Plugin's finalization function. |
| 674 | @endparblock |
| 675 | |
| 676 | @bt_pre_not_null{_func} |
| 677 | */ |
| 678 | #define BT_PLUGIN_FINALIZE_FUNC_WITH_ID(_id, _func) \ |
| 679 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _func) |
| 680 | |
| 681 | /*! |
| 682 | @brief |
| 683 | Alias of BT_PLUGIN_FINALIZE_FUNC_WITH_ID() with the \bt_p{_id} |
| 684 | parameter set to <code>auto</code>. |
| 685 | */ |
| 686 | #define BT_PLUGIN_FINALIZE_FUNC(_func) BT_PLUGIN_FINALIZE_FUNC_WITH_ID(auto, _func) |
| 687 | |
| 688 | /*! @} */ |
| 689 | |
| 690 | /*! |
| 691 | @name Component class adding |
| 692 | @{ |
| 693 | */ |
| 694 | |
| 695 | /*! |
| 696 | @brief |
| 697 | Adds a \bt_src_comp_cls named \bt_p{_name}, having the ID |
| 698 | \bt_p{_component_class_id} and the message iterator class's "next" |
| 699 | method \bt_p{_message_iterator_class_next_method}, to the plugin |
| 700 | having the ID \bt_p{_plugin_id}. |
| 701 | |
| 702 | @param[in] _plugin_id |
| 703 | @parblock |
| 704 | C identifier. |
| 705 | |
| 706 | ID of the plugin to which to add the source component class. |
| 707 | @endparblock |
| 708 | @param[in] _component_class_id |
| 709 | @parblock |
| 710 | C identifier. |
| 711 | |
| 712 | Source component class's ID, unique amongst all the source component |
| 713 | class IDs of the same plugin. |
| 714 | @endparblock |
| 715 | @param[in] _name |
| 716 | @parblock |
| 717 | <code>const char *</code> |
| 718 | |
| 719 | Source component class's name, unique amongst all the source |
| 720 | component class names of the same plugin. |
| 721 | @endparblock |
| 722 | @param[in] _message_iterator_class_next_method |
| 723 | @parblock |
| 724 | #bt_message_iterator_class_next_method |
| 725 | |
| 726 | Source component class's message iterator class's "next" method. |
| 727 | @endparblock |
| 728 | |
| 729 | @bt_pre_not_null{_name} |
| 730 | @bt_pre_not_null{_message_iterator_class_next_method} |
| 731 | */ |
| 732 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \ |
| 733 | static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id = { \ |
| 734 | .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \ |
| 735 | .name = _name, \ |
| 736 | .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \ |
| 737 | .methods = { .source = { .msg_iter_next = _message_iterator_class_next_method } }, \ |
| 738 | }; \ |
| 739 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id |
| 740 | |
| 741 | /*! |
| 742 | @brief |
| 743 | Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID() with the |
| 744 | \bt_p{_plugin_id} parameter set to <code>auto</code>, the |
| 745 | \bt_p{_component_class_id} parameter set to \bt_p{_name}, and |
| 746 | the \bt_p{_name} parameter set to a string version of \bt_p{_name}. |
| 747 | |
| 748 | @param[in] _name |
| 749 | @parblock |
| 750 | C identifier |
| 751 | |
| 752 | Passed as both the \bt_p{_component_class_id} and the |
| 753 | \bt_p{_name} (once converted to a string) parameters of |
| 754 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(). |
| 755 | @endparblock |
| 756 | */ |
| 757 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \ |
| 758 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method) |
| 759 | |
| 760 | /*! |
| 761 | @brief |
| 762 | Adds a \bt_flt_comp_cls named \bt_p{_name}, having the ID |
| 763 | \bt_p{_component_class_id} and the message iterator class's "next" |
| 764 | method \bt_p{_message_iterator_class_next_method}, to the plugin |
| 765 | having the ID \bt_p{_plugin_id}. |
| 766 | |
| 767 | @param[in] _plugin_id |
| 768 | @parblock |
| 769 | C identifier. |
| 770 | |
| 771 | ID of the plugin to which to add the filter component class. |
| 772 | @endparblock |
| 773 | @param[in] _component_class_id |
| 774 | @parblock |
| 775 | C identifier. |
| 776 | |
| 777 | Filter component class's ID, unique amongst all the filter component |
| 778 | class IDs of the same plugin. |
| 779 | @endparblock |
| 780 | @param[in] _name |
| 781 | @parblock |
| 782 | <code>const char *</code> |
| 783 | |
| 784 | Filter component class's name, unique amongst all the filter |
| 785 | component class names of the same plugin. |
| 786 | @endparblock |
| 787 | @param[in] _message_iterator_class_next_method |
| 788 | @parblock |
| 789 | #bt_message_iterator_class_next_method |
| 790 | |
| 791 | Filter component class's message iterator class's "next" method. |
| 792 | @endparblock |
| 793 | |
| 794 | @bt_pre_not_null{_name} |
| 795 | @bt_pre_not_null{_message_iterator_class_next_method} |
| 796 | */ |
| 797 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \ |
| 798 | static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id = { \ |
| 799 | .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \ |
| 800 | .name = _name, \ |
| 801 | .type = BT_COMPONENT_CLASS_TYPE_FILTER, \ |
| 802 | .methods = { .filter = { .msg_iter_next = _message_iterator_class_next_method } }, \ |
| 803 | }; \ |
| 804 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id |
| 805 | |
| 806 | /*! |
| 807 | @brief |
| 808 | Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID() with the |
| 809 | \bt_p{_plugin_id} parameter set to <code>auto</code>, the |
| 810 | \bt_p{_component_class_id} parameter set to \bt_p{_name}, and |
| 811 | the \bt_p{_name} parameter set to a string version of \bt_p{_name}. |
| 812 | |
| 813 | @param[in] _name |
| 814 | @parblock |
| 815 | C identifier |
| 816 | |
| 817 | Passed as both the \bt_p{_component_class_id} and the |
| 818 | \bt_p{_name} (once converted to a string) parameters of |
| 819 | BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(). |
| 820 | @endparblock |
| 821 | */ |
| 822 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \ |
| 823 | BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method) |
| 824 | |
| 825 | /*! |
| 826 | @brief |
| 827 | Adds a \bt_sink_comp_cls named \bt_p{_name}, having the ID |
| 828 | \bt_p{_component_class_id} and the consuming method |
| 829 | \bt_p{_consume_method}, to the plugin |
| 830 | having the ID \bt_p{_plugin_id}. |
| 831 | |
| 832 | @param[in] _plugin_id |
| 833 | @parblock |
| 834 | C identifier. |
| 835 | |
| 836 | ID of the plugin to which to add the sink component class. |
| 837 | @endparblock |
| 838 | @param[in] _component_class_id |
| 839 | @parblock |
| 840 | C identifier. |
| 841 | |
| 842 | Sink component class's ID, unique amongst all the sink component |
| 843 | class IDs of the same plugin. |
| 844 | @endparblock |
| 845 | @param[in] _name |
| 846 | @parblock |
| 847 | <code>const char *</code> |
| 848 | |
| 849 | Sink component class's name, unique amongst all the sink |
| 850 | component class names of the same plugin. |
| 851 | @endparblock |
| 852 | @param[in] _consume_method |
| 853 | @parblock |
| 854 | #bt_component_class_sink_consume_method |
| 855 | |
| 856 | Sink component class's message iterator class's "next" method. |
| 857 | @endparblock |
| 858 | |
| 859 | @bt_pre_not_null{_name} |
| 860 | @bt_pre_not_null{_consume_method} |
| 861 | */ |
| 862 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _consume_method) \ |
| 863 | static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id = { \ |
| 864 | .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \ |
| 865 | .name = _name, \ |
| 866 | .type = BT_COMPONENT_CLASS_TYPE_SINK, \ |
| 867 | .methods = { .sink = { .consume = _consume_method } }, \ |
| 868 | }; \ |
| 869 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id |
| 870 | |
| 871 | /*! |
| 872 | @brief |
| 873 | Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() with the |
| 874 | \bt_p{_plugin_id} parameter set to <code>auto</code>, the |
| 875 | \bt_p{_component_class_id} parameter set to \bt_p{_name}, and |
| 876 | the \bt_p{_name} parameter set to a string version of \bt_p{_name}. |
| 877 | |
| 878 | @param[in] _name |
| 879 | @parblock |
| 880 | C identifier |
| 881 | |
| 882 | Passed as both the \bt_p{_component_class_id} and the |
| 883 | \bt_p{_name} (once converted to a string) parameters of |
| 884 | BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(). |
| 885 | @endparblock |
| 886 | */ |
| 887 | #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \ |
| 888 | BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method) |
| 889 | |
| 890 | /*! @} */ |
| 891 | |
| 892 | /*! |
| 893 | @name Source component class properties |
| 894 | @{ |
| 895 | */ |
| 896 | |
| 897 | /*! |
| 898 | @brief |
| 899 | Sets the description of the \bt_src_comp_cls having the ID |
| 900 | \bt_p{_component_class_id} in the plugin having the ID |
| 901 | \bt_p{_plugin_id} to \bt_p{_description}. |
| 902 | |
| 903 | See the \ref api-comp-cls-prop-descr "description" property. |
| 904 | |
| 905 | @param[in] _plugin_id |
| 906 | @parblock |
| 907 | C identifier. |
| 908 | |
| 909 | ID of the plugin which contains the source component class of which |
| 910 | to set the description. |
| 911 | @endparblock |
| 912 | @param[in] _component_class_id |
| 913 | @parblock |
| 914 | C identifier. |
| 915 | |
| 916 | ID of the source component class, within the plugin having the ID |
| 917 | \bt_p{_plugin_id}, of which to set the description to |
| 918 | \bt_p{_description}. |
| 919 | @endparblock |
| 920 | @param[in] _description |
| 921 | @parblock |
| 922 | <code>const char *</code> |
| 923 | |
| 924 | Source component class's description. |
| 925 | @endparblock |
| 926 | |
| 927 | @bt_pre_not_null{_description} |
| 928 | */ |
| 929 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \ |
| 930 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, source, _description) |
| 931 | |
| 932 | /*! |
| 933 | @brief |
| 934 | Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with |
| 935 | the \bt_p{_plugin_id} parameter set to <code>auto</code> and the |
| 936 | \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 937 | */ |
| 938 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _description) \ |
| 939 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description) |
| 940 | |
| 941 | /*! |
| 942 | @brief |
| 943 | Sets the help text of the \bt_src_comp_cls having the ID |
| 944 | \bt_p{_component_class_id} in the plugin having the ID |
| 945 | \bt_p{_plugin_id} to \bt_p{_help_text}. |
| 946 | |
| 947 | See the \ref api-comp-cls-prop-help "help text" property. |
| 948 | |
| 949 | @param[in] _plugin_id |
| 950 | @parblock |
| 951 | C identifier. |
| 952 | |
| 953 | ID of the plugin which contains the source component class of which |
| 954 | to set the help text. |
| 955 | @endparblock |
| 956 | @param[in] _component_class_id |
| 957 | @parblock |
| 958 | C identifier. |
| 959 | |
| 960 | ID of the source component class, within the plugin having the ID |
| 961 | \bt_p{_plugin_id}, of which to set the help text to |
| 962 | \bt_p{_help_text}. |
| 963 | @endparblock |
| 964 | @param[in] _help_text |
| 965 | @parblock |
| 966 | <code>const char *</code> |
| 967 | |
| 968 | Source component class's help text. |
| 969 | @endparblock |
| 970 | |
| 971 | @bt_pre_not_null{_help_text} |
| 972 | */ |
| 973 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \ |
| 974 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, source, _help_text) |
| 975 | |
| 976 | /*! |
| 977 | @brief |
| 978 | Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID() with the |
| 979 | \bt_p{_plugin_id} parameter set to <code>auto</code> and the |
| 980 | \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 981 | */ |
| 982 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _help_text) \ |
| 983 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text) |
| 984 | |
| 985 | /*! @} */ |
| 986 | |
| 987 | /*! |
| 988 | @name Filter component class properties |
| 989 | @{ |
| 990 | */ |
| 991 | |
| 992 | /*! |
| 993 | @brief |
| 994 | Sets the description of the \bt_flt_comp_cls having the ID |
| 995 | \bt_p{_component_class_id} in the plugin having the ID |
| 996 | \bt_p{_plugin_id} to \bt_p{_description}. |
| 997 | |
| 998 | See the \ref api-comp-cls-prop-descr "description" property. |
| 999 | |
| 1000 | @param[in] _plugin_id |
| 1001 | @parblock |
| 1002 | C identifier. |
| 1003 | |
| 1004 | ID of the plugin which contains the filter component class of which |
| 1005 | to set the description. |
| 1006 | @endparblock |
| 1007 | @param[in] _component_class_id |
| 1008 | @parblock |
| 1009 | C identifier. |
| 1010 | |
| 1011 | ID of the filter component class, within the plugin having the ID |
| 1012 | \bt_p{_plugin_id}, of which to set the description to |
| 1013 | \bt_p{_description}. |
| 1014 | @endparblock |
| 1015 | @param[in] _description |
| 1016 | @parblock |
| 1017 | <code>const char *</code> |
| 1018 | |
| 1019 | Filter component class's description. |
| 1020 | @endparblock |
| 1021 | |
| 1022 | @bt_pre_not_null{_description} |
| 1023 | */ |
| 1024 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \ |
| 1025 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, filter, _description) |
| 1026 | |
| 1027 | /*! |
| 1028 | @brief |
| 1029 | Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with |
| 1030 | the \bt_p{_plugin_id} parameter set to <code>auto</code> and the |
| 1031 | \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1032 | */ |
| 1033 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _description) \ |
| 1034 | BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description) |
| 1035 | |
| 1036 | /*! |
| 1037 | @brief |
| 1038 | Sets the help text of the \bt_flt_comp_cls having the ID |
| 1039 | \bt_p{_component_class_id} in the plugin having the ID |
| 1040 | \bt_p{_plugin_id} to \bt_p{_help_text}. |
| 1041 | |
| 1042 | See the \ref api-comp-cls-prop-help "help text" property. |
| 1043 | |
| 1044 | @param[in] _plugin_id |
| 1045 | @parblock |
| 1046 | C identifier. |
| 1047 | |
| 1048 | ID of the plugin which contains the filter component class of which |
| 1049 | to set the help text. |
| 1050 | @endparblock |
| 1051 | @param[in] _component_class_id |
| 1052 | @parblock |
| 1053 | C identifier. |
| 1054 | |
| 1055 | ID of the filter component class, within the plugin having the ID |
| 1056 | \bt_p{_plugin_id}, of which to set the help text to |
| 1057 | \bt_p{_help_text}. |
| 1058 | @endparblock |
| 1059 | @param[in] _help_text |
| 1060 | @parblock |
| 1061 | <code>const char *</code> |
| 1062 | |
| 1063 | Filter component class's help text. |
| 1064 | @endparblock |
| 1065 | |
| 1066 | @bt_pre_not_null{_help_text} |
| 1067 | */ |
| 1068 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \ |
| 1069 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, filter, _help_text) |
| 1070 | |
| 1071 | /*! |
| 1072 | @brief |
| 1073 | Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID() with the |
| 1074 | \bt_p{_plugin_id} parameter set to <code>auto</code> and the |
| 1075 | \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1076 | */ |
| 1077 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _help_text) \ |
| 1078 | BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text) |
| 1079 | |
| 1080 | /*! @} */ |
| 1081 | |
| 1082 | /*! |
| 1083 | @name Sink component class properties |
| 1084 | @{ |
| 1085 | */ |
| 1086 | |
| 1087 | /*! |
| 1088 | @brief |
| 1089 | Sets the description of the \bt_sink_comp_cls having the ID |
| 1090 | \bt_p{_component_class_id} in the plugin having the ID |
| 1091 | \bt_p{_plugin_id} to \bt_p{_description}. |
| 1092 | |
| 1093 | See the \ref api-comp-cls-prop-descr "description" property. |
| 1094 | |
| 1095 | @param[in] _plugin_id |
| 1096 | @parblock |
| 1097 | C identifier. |
| 1098 | |
| 1099 | ID of the plugin which contains the sink component class of which |
| 1100 | to set the description. |
| 1101 | @endparblock |
| 1102 | @param[in] _component_class_id |
| 1103 | @parblock |
| 1104 | C identifier. |
| 1105 | |
| 1106 | ID of the sink component class, within the plugin having the ID |
| 1107 | \bt_p{_plugin_id}, of which to set the description to |
| 1108 | \bt_p{_description}. |
| 1109 | @endparblock |
| 1110 | @param[in] _description |
| 1111 | @parblock |
| 1112 | <code>const char *</code> |
| 1113 | |
| 1114 | Sink component class's description. |
| 1115 | @endparblock |
| 1116 | |
| 1117 | @bt_pre_not_null{_description} |
| 1118 | */ |
| 1119 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \ |
| 1120 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, sink, _description) |
| 1121 | |
| 1122 | /*! |
| 1123 | @brief |
| 1124 | Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with |
| 1125 | the \bt_p{_plugin_id} parameter set to <code>auto</code> and the |
| 1126 | \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1127 | */ |
| 1128 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _description) \ |
| 1129 | BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description) |
| 1130 | |
| 1131 | /*! |
| 1132 | @brief |
| 1133 | Sets the help text of the \bt_sink_comp_cls having the ID |
| 1134 | \bt_p{_component_class_id} in the plugin having the ID |
| 1135 | \bt_p{_plugin_id} to \bt_p{_help_text}. |
| 1136 | |
| 1137 | See the \ref api-comp-cls-prop-help "help text" property. |
| 1138 | |
| 1139 | @param[in] _plugin_id |
| 1140 | @parblock |
| 1141 | C identifier. |
| 1142 | |
| 1143 | ID of the plugin which contains the sink component class of which |
| 1144 | to set the help text. |
| 1145 | @endparblock |
| 1146 | @param[in] _component_class_id |
| 1147 | @parblock |
| 1148 | C identifier. |
| 1149 | |
| 1150 | ID of the sink component class, within the plugin having the ID |
| 1151 | \bt_p{_plugin_id}, of which to set the help text to |
| 1152 | \bt_p{_help_text}. |
| 1153 | @endparblock |
| 1154 | @param[in] _help_text |
| 1155 | @parblock |
| 1156 | <code>const char *</code> |
| 1157 | |
| 1158 | Sink component class's help text. |
| 1159 | @endparblock |
| 1160 | |
| 1161 | @bt_pre_not_null{_help_text} |
| 1162 | */ |
| 1163 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \ |
| 1164 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, sink, _help_text) |
| 1165 | |
| 1166 | /*! |
| 1167 | @brief |
| 1168 | Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID() with |
| 1169 | the \bt_p{_plugin_id} parameter set to <code>auto</code> and the |
| 1170 | \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1171 | */ |
| 1172 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _help_text) \ |
| 1173 | BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text) |
| 1174 | |
| 1175 | /*! @} */ |
| 1176 | |
| 1177 | /*! |
| 1178 | @name Source component class methods |
| 1179 | @{ |
| 1180 | */ |
| 1181 | |
| 1182 | /*! |
| 1183 | @brief |
| 1184 | Sets the finalization method of the \bt_src_comp_cls having the ID |
| 1185 | \bt_p{_component_class_id} in the plugin having the ID |
| 1186 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 1187 | |
| 1188 | See the \ref api-comp-cls-dev-meth-fini "finalize" method. |
| 1189 | |
| 1190 | @param[in] _plugin_id |
| 1191 | @parblock |
| 1192 | C identifier. |
| 1193 | |
| 1194 | ID of the plugin which contains the source component class of which |
| 1195 | to set the finalization method. |
| 1196 | @endparblock |
| 1197 | @param[in] _component_class_id |
| 1198 | @parblock |
| 1199 | C identifier. |
| 1200 | |
| 1201 | ID of the source component class, within the plugin having the ID |
| 1202 | \bt_p{_plugin_id}, of which to set the finalization method to |
| 1203 | \bt_p{_method}. |
| 1204 | @endparblock |
| 1205 | @param[in] _method |
| 1206 | @parblock |
| 1207 | #bt_component_class_source_finalize_method |
| 1208 | |
| 1209 | Source component class's finalization method. |
| 1210 | @endparblock |
| 1211 | |
| 1212 | @bt_pre_not_null{_method} |
| 1213 | */ |
| 1214 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1215 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _plugin_id, _component_class_id, source, _method) |
| 1216 | |
| 1217 | /*! |
| 1218 | @brief |
| 1219 | Alias of |
| 1220 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID() |
| 1221 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1222 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1223 | */ |
| 1224 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \ |
| 1225 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method) |
| 1226 | |
| 1227 | /*! |
| 1228 | @brief |
| 1229 | Sets the \"get supported \bt_mip versions\" method of the |
| 1230 | \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the |
| 1231 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. |
| 1232 | |
| 1233 | See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions" |
| 1234 | method. |
| 1235 | |
| 1236 | @param[in] _plugin_id |
| 1237 | @parblock |
| 1238 | C identifier. |
| 1239 | |
| 1240 | ID of the plugin which contains the source component class of which |
| 1241 | to set the "get supported MIP versions" method. |
| 1242 | @endparblock |
| 1243 | @param[in] _component_class_id |
| 1244 | @parblock |
| 1245 | C identifier. |
| 1246 | |
| 1247 | ID of the source component class, within the plugin having the ID |
| 1248 | \bt_p{_plugin_id}, of which to set the "get supported MIP versions" |
| 1249 | method to \bt_p{_method}. |
| 1250 | @endparblock |
| 1251 | @param[in] _method |
| 1252 | @parblock |
| 1253 | #bt_component_class_source_get_supported_mip_versions_method |
| 1254 | |
| 1255 | Source component class's "get supported MIP versions" method. |
| 1256 | @endparblock |
| 1257 | |
| 1258 | @bt_pre_not_null{_method} |
| 1259 | */ |
| 1260 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1261 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD, _plugin_id, _component_class_id, source, _method) |
| 1262 | |
| 1263 | /*! |
| 1264 | @brief |
| 1265 | Alias of |
| 1266 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID() |
| 1267 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1268 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1269 | */ |
| 1270 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \ |
| 1271 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method) |
| 1272 | |
| 1273 | /*! |
| 1274 | @brief |
| 1275 | Sets the initialization method of the \bt_src_comp_cls having the ID |
| 1276 | \bt_p{_component_class_id} in the plugin having the ID |
| 1277 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 1278 | |
| 1279 | See the \ref api-comp-cls-dev-meth-init "initialize" method. |
| 1280 | |
| 1281 | @param[in] _plugin_id |
| 1282 | @parblock |
| 1283 | C identifier. |
| 1284 | |
| 1285 | ID of the plugin which contains the source component class of which |
| 1286 | to set the initialization method. |
| 1287 | @endparblock |
| 1288 | @param[in] _component_class_id |
| 1289 | @parblock |
| 1290 | C identifier. |
| 1291 | |
| 1292 | ID of the source component class, within the plugin having the ID |
| 1293 | \bt_p{_plugin_id}, of which to set the initialization method to |
| 1294 | \bt_p{_method}. |
| 1295 | @endparblock |
| 1296 | @param[in] _method |
| 1297 | @parblock |
| 1298 | #bt_component_class_source_initialize_method |
| 1299 | |
| 1300 | Source component class's initialization method. |
| 1301 | @endparblock |
| 1302 | |
| 1303 | @bt_pre_not_null{_method} |
| 1304 | */ |
| 1305 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1306 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD, _plugin_id, _component_class_id, source, _method) |
| 1307 | |
| 1308 | /*! |
| 1309 | @brief |
| 1310 | Alias of |
| 1311 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID() |
| 1312 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1313 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1314 | */ |
| 1315 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \ |
| 1316 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method) |
| 1317 | |
| 1318 | /*! |
| 1319 | @brief |
| 1320 | Sets the finalization method of the \bt_msg_iter_cls of the |
| 1321 | \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the |
| 1322 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. |
| 1323 | |
| 1324 | See the \ref api-msg-iter-cls-meth-fini "finalize" method. |
| 1325 | |
| 1326 | @param[in] _plugin_id |
| 1327 | @parblock |
| 1328 | C identifier. |
| 1329 | |
| 1330 | ID of the plugin which contains the source component class of which |
| 1331 | to set the finalization method of the message iterator class. |
| 1332 | @endparblock |
| 1333 | @param[in] _component_class_id |
| 1334 | @parblock |
| 1335 | C identifier. |
| 1336 | |
| 1337 | ID of the source component class, within the plugin having the ID |
| 1338 | \bt_p{_plugin_id}, of which to set the finalization method of the |
| 1339 | message iterator class to \bt_p{_method}. |
| 1340 | @endparblock |
| 1341 | @param[in] _method |
| 1342 | @parblock |
| 1343 | #bt_message_iterator_class_finalize_method |
| 1344 | |
| 1345 | Source component class's message iterator class's finalization method. |
| 1346 | @endparblock |
| 1347 | |
| 1348 | @bt_pre_not_null{_method} |
| 1349 | */ |
| 1350 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1351 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _plugin_id, _component_class_id, source, _method) |
| 1352 | |
| 1353 | /*! |
| 1354 | @brief |
| 1355 | Alias of |
| 1356 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID() |
| 1357 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1358 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1359 | */ |
| 1360 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \ |
| 1361 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method) |
| 1362 | |
| 1363 | /*! |
| 1364 | @brief |
| 1365 | Sets the initialization method of the \bt_msg_iter_cls of the |
| 1366 | \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the |
| 1367 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. |
| 1368 | |
| 1369 | See the \ref api-msg-iter-cls-meth-init "initialize" method. |
| 1370 | |
| 1371 | @param[in] _plugin_id |
| 1372 | @parblock |
| 1373 | C identifier. |
| 1374 | |
| 1375 | ID of the plugin which contains the source component class of which |
| 1376 | to set the initialization method of the message iterator class. |
| 1377 | @endparblock |
| 1378 | @param[in] _component_class_id |
| 1379 | @parblock |
| 1380 | C identifier. |
| 1381 | |
| 1382 | ID of the source component class, within the plugin having the ID |
| 1383 | \bt_p{_plugin_id}, of which to set the initialization method of the |
| 1384 | message iterator class to \bt_p{_method}. |
| 1385 | @endparblock |
| 1386 | @param[in] _method |
| 1387 | @parblock |
| 1388 | #bt_message_iterator_class_initialize_method |
| 1389 | |
| 1390 | Source component class's message iterator class's initialization |
| 1391 | method. |
| 1392 | @endparblock |
| 1393 | |
| 1394 | @bt_pre_not_null{_method} |
| 1395 | */ |
| 1396 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1397 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD, _plugin_id, _component_class_id, source, _method) |
| 1398 | |
| 1399 | /*! |
| 1400 | @brief |
| 1401 | Alias of |
| 1402 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID() |
| 1403 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1404 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1405 | */ |
| 1406 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \ |
| 1407 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method) |
| 1408 | |
| 1409 | /*! |
| 1410 | @brief |
| 1411 | Sets the "seek beginning" and "can seek beginning?" methods of the |
| 1412 | \bt_msg_iter_cls of the \bt_src_comp_cls having the ID |
| 1413 | \bt_p{_component_class_id} in the plugin having the ID |
| 1414 | \bt_p{_plugin_id} to \bt_p{_seek_method} and |
| 1415 | \bt_p{_can_seek_method}. |
| 1416 | |
| 1417 | See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and |
| 1418 | \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods. |
| 1419 | |
| 1420 | @param[in] _plugin_id |
| 1421 | @parblock |
| 1422 | C identifier. |
| 1423 | |
| 1424 | ID of the plugin which contains the source component class of which |
| 1425 | to set the "seek beginning" and "can seek beginning?" methods of the |
| 1426 | message iterator class. |
| 1427 | @endparblock |
| 1428 | @param[in] _component_class_id |
| 1429 | @parblock |
| 1430 | C identifier. |
| 1431 | |
| 1432 | ID of the source component class, within the plugin having the ID |
| 1433 | \bt_p{_plugin_id}, of which to set the "seek beginning" and "can |
| 1434 | seek beginning" methods of the message iterator class to |
| 1435 | \bt_p{_seek_method} and \bt_p{_can_seek_method}. |
| 1436 | @endparblock |
| 1437 | @param[in] _seek_method |
| 1438 | @parblock |
| 1439 | #bt_message_iterator_class_seek_beginning_method |
| 1440 | |
| 1441 | Source component class's message iterator class's "seek beginning" |
| 1442 | method. |
| 1443 | @endparblock |
| 1444 | @param[in] _can_seek_method |
| 1445 | @parblock |
| 1446 | #bt_message_iterator_class_can_seek_beginning_method |
| 1447 | |
| 1448 | Source component class's message iterator class's |
| 1449 | "can seek beginning?" method. |
| 1450 | |
| 1451 | Can be \c NULL, in which case it is equivalent to setting a method |
| 1452 | which always returns #BT_TRUE. |
| 1453 | @endparblock |
| 1454 | |
| 1455 | @bt_pre_not_null{_seek_method} |
| 1456 | @bt_pre_not_null{_can_seek_method} |
| 1457 | */ |
| 1458 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \ |
| 1459 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _plugin_id, _component_class_id, source, _seek_method); \ |
| 1460 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _plugin_id, _component_class_id, source, _can_seek_method) |
| 1461 | |
| 1462 | /*! |
| 1463 | @brief |
| 1464 | Alias of |
| 1465 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS() |
| 1466 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1467 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1468 | */ |
| 1469 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \ |
| 1470 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method) |
| 1471 | |
| 1472 | /*! |
| 1473 | @brief |
| 1474 | Sets the "seek ns from origin" and "can seek ns from origin?" |
| 1475 | methods of the \bt_msg_iter_cls of the \bt_src_comp_cls having the |
| 1476 | ID \bt_p{_component_class_id} in the plugin having the ID |
| 1477 | \bt_p{_plugin_id} to \bt_p{_seek_method} and |
| 1478 | \bt_p{_can_seek_method}. |
| 1479 | |
| 1480 | See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and |
| 1481 | \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?" |
| 1482 | methods. |
| 1483 | |
| 1484 | @param[in] _plugin_id |
| 1485 | @parblock |
| 1486 | C identifier. |
| 1487 | |
| 1488 | ID of the plugin which contains the source component class of which |
| 1489 | to set the "seek ns from origin" and "can seek ns from origin?" |
| 1490 | methods of the message iterator class. |
| 1491 | @endparblock |
| 1492 | @param[in] _component_class_id |
| 1493 | @parblock |
| 1494 | C identifier. |
| 1495 | |
| 1496 | ID of the source component class, within the plugin having the ID |
| 1497 | \bt_p{_plugin_id}, of which to set the "seek ns from origin" and |
| 1498 | "can seek ns from origin" methods of the message iterator class to |
| 1499 | \bt_p{_seek_method} and \bt_p{_can_seek_method}. |
| 1500 | @endparblock |
| 1501 | @param[in] _seek_method |
| 1502 | @parblock |
| 1503 | #bt_message_iterator_class_seek_ns_from_origin_method |
| 1504 | |
| 1505 | Source component class's message iterator class's "seek ns from |
| 1506 | origin" method. |
| 1507 | @endparblock |
| 1508 | @param[in] _can_seek_method |
| 1509 | @parblock |
| 1510 | #bt_message_iterator_class_can_seek_ns_from_origin_method |
| 1511 | |
| 1512 | Source component class's message iterator class's "can seek ns from |
| 1513 | origin?" method. |
| 1514 | |
| 1515 | Can be \c NULL, in which case it is equivalent to setting a method |
| 1516 | which always returns #BT_TRUE. |
| 1517 | @endparblock |
| 1518 | |
| 1519 | @bt_pre_not_null{_seek_method} |
| 1520 | @bt_pre_not_null{_can_seek_method} |
| 1521 | */ |
| 1522 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \ |
| 1523 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _plugin_id, _component_class_id, source, _seek_method); \ |
| 1524 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _plugin_id, _component_class_id, source, _can_seek_method) |
| 1525 | |
| 1526 | /*! |
| 1527 | @brief |
| 1528 | Alias of |
| 1529 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID() |
| 1530 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1531 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1532 | */ |
| 1533 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \ |
| 1534 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method) |
| 1535 | |
| 1536 | /*! |
| 1537 | @brief |
| 1538 | Sets the "output port connected" method of the \bt_src_comp_cls |
| 1539 | having the ID \bt_p{_component_class_id} in the plugin having the ID |
| 1540 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 1541 | |
| 1542 | See the |
| 1543 | \ref api-comp-cls-dev-meth-oport-connected "output port connected" |
| 1544 | method. |
| 1545 | |
| 1546 | @param[in] _plugin_id |
| 1547 | @parblock |
| 1548 | C identifier. |
| 1549 | |
| 1550 | ID of the plugin which contains the source component class of which |
| 1551 | to set the "output port connected" method. |
| 1552 | @endparblock |
| 1553 | @param[in] _component_class_id |
| 1554 | @parblock |
| 1555 | C identifier. |
| 1556 | |
| 1557 | ID of the source component class, within the plugin having the ID |
| 1558 | \bt_p{_plugin_id}, of which to set the "output port connected" |
| 1559 | method to \bt_p{_method}. |
| 1560 | @endparblock |
| 1561 | @param[in] _method |
| 1562 | @parblock |
| 1563 | #bt_component_class_source_output_port_connected_method |
| 1564 | |
| 1565 | Source component class's "output port connected" method. |
| 1566 | @endparblock |
| 1567 | |
| 1568 | @bt_pre_not_null{_method} |
| 1569 | */ |
| 1570 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1571 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_output_port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD, _plugin_id, _component_class_id, source, _method) |
| 1572 | |
| 1573 | /*! |
| 1574 | @brief |
| 1575 | Alias of |
| 1576 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID() |
| 1577 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1578 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1579 | */ |
| 1580 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \ |
| 1581 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method) |
| 1582 | |
| 1583 | /*! |
| 1584 | @brief |
| 1585 | Sets the query method of the \bt_src_comp_cls |
| 1586 | having the ID \bt_p{_component_class_id} in the plugin having the ID |
| 1587 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 1588 | |
| 1589 | See the \ref api-comp-cls-dev-meth-query "query" method. |
| 1590 | |
| 1591 | @param[in] _plugin_id |
| 1592 | @parblock |
| 1593 | C identifier. |
| 1594 | |
| 1595 | ID of the plugin which contains the source component class of which |
| 1596 | to set the query method. |
| 1597 | @endparblock |
| 1598 | @param[in] _component_class_id |
| 1599 | @parblock |
| 1600 | C identifier. |
| 1601 | |
| 1602 | ID of the source component class, within the plugin having the ID |
| 1603 | \bt_p{_plugin_id}, of which to set the query |
| 1604 | method to \bt_p{_method}. |
| 1605 | @endparblock |
| 1606 | @param[in] _method |
| 1607 | @parblock |
| 1608 | #bt_component_class_source_query_method |
| 1609 | |
| 1610 | Source component class's query method. |
| 1611 | @endparblock |
| 1612 | |
| 1613 | @bt_pre_not_null{_method} |
| 1614 | */ |
| 1615 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1616 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _plugin_id, _component_class_id, source, _method) |
| 1617 | |
| 1618 | /*! |
| 1619 | @brief |
| 1620 | Alias of |
| 1621 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID() |
| 1622 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1623 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1624 | */ |
| 1625 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \ |
| 1626 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method) |
| 1627 | |
| 1628 | /*! @} */ |
| 1629 | |
| 1630 | /*! |
| 1631 | @name Filter component class methods |
| 1632 | @{ |
| 1633 | */ |
| 1634 | |
| 1635 | /*! |
| 1636 | @brief |
| 1637 | Sets the finalization method of the \bt_flt_comp_cls having the ID |
| 1638 | \bt_p{_component_class_id} in the plugin having the ID |
| 1639 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 1640 | |
| 1641 | See the \ref api-comp-cls-dev-meth-fini "finalize" method. |
| 1642 | |
| 1643 | @param[in] _plugin_id |
| 1644 | @parblock |
| 1645 | C identifier. |
| 1646 | |
| 1647 | ID of the plugin which contains the filter component class of which |
| 1648 | to set the finalization method. |
| 1649 | @endparblock |
| 1650 | @param[in] _component_class_id |
| 1651 | @parblock |
| 1652 | C identifier. |
| 1653 | |
| 1654 | ID of the filter component class, within the plugin having the ID |
| 1655 | \bt_p{_plugin_id}, of which to set the finalization method to |
| 1656 | \bt_p{_method}. |
| 1657 | @endparblock |
| 1658 | @param[in] _method |
| 1659 | @parblock |
| 1660 | #bt_component_class_filter_finalize_method |
| 1661 | |
| 1662 | Filter component class's finalization method. |
| 1663 | @endparblock |
| 1664 | |
| 1665 | @bt_pre_not_null{_method} |
| 1666 | */ |
| 1667 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1668 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _plugin_id, _component_class_id, filter, _method) |
| 1669 | |
| 1670 | /*! |
| 1671 | @brief |
| 1672 | Alias of |
| 1673 | BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID() |
| 1674 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1675 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1676 | */ |
| 1677 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \ |
| 1678 | BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method) |
| 1679 | |
| 1680 | /*! |
| 1681 | @brief |
| 1682 | Sets the \"get supported \bt_mip versions\" method of the |
| 1683 | \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the |
| 1684 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. |
| 1685 | |
| 1686 | See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions" |
| 1687 | method. |
| 1688 | |
| 1689 | @param[in] _plugin_id |
| 1690 | @parblock |
| 1691 | C identifier. |
| 1692 | |
| 1693 | ID of the plugin which contains the filter component class of which |
| 1694 | to set the "get supported MIP versions" method. |
| 1695 | @endparblock |
| 1696 | @param[in] _component_class_id |
| 1697 | @parblock |
| 1698 | C identifier. |
| 1699 | |
| 1700 | ID of the filter component class, within the plugin having the ID |
| 1701 | \bt_p{_plugin_id}, of which to set the "get supported MIP versions" |
| 1702 | method to \bt_p{_method}. |
| 1703 | @endparblock |
| 1704 | @param[in] _method |
| 1705 | @parblock |
| 1706 | #bt_component_class_filter_get_supported_mip_versions_method |
| 1707 | |
| 1708 | Filter component class's "get supported MIP versions" method. |
| 1709 | @endparblock |
| 1710 | |
| 1711 | @bt_pre_not_null{_method} |
| 1712 | */ |
| 1713 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1714 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD, _plugin_id, _component_class_id, filter, _method) |
| 1715 | |
| 1716 | /*! |
| 1717 | @brief |
| 1718 | Alias of |
| 1719 | BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID() |
| 1720 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1721 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1722 | */ |
| 1723 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \ |
| 1724 | BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method) |
| 1725 | |
| 1726 | /*! |
| 1727 | @brief |
| 1728 | Sets the initialization method of the \bt_flt_comp_cls having the ID |
| 1729 | \bt_p{_component_class_id} in the plugin having the ID |
| 1730 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 1731 | |
| 1732 | See the \ref api-comp-cls-dev-meth-init "initialize" method. |
| 1733 | |
| 1734 | @param[in] _plugin_id |
| 1735 | @parblock |
| 1736 | C identifier. |
| 1737 | |
| 1738 | ID of the plugin which contains the filter component class of which |
| 1739 | to set the initialization method. |
| 1740 | @endparblock |
| 1741 | @param[in] _component_class_id |
| 1742 | @parblock |
| 1743 | C identifier. |
| 1744 | |
| 1745 | ID of the filter component class, within the plugin having the ID |
| 1746 | \bt_p{_plugin_id}, of which to set the initialization method to |
| 1747 | \bt_p{_method}. |
| 1748 | @endparblock |
| 1749 | @param[in] _method |
| 1750 | @parblock |
| 1751 | #bt_component_class_filter_initialize_method |
| 1752 | |
| 1753 | Filter component class's initialization method. |
| 1754 | @endparblock |
| 1755 | |
| 1756 | @bt_pre_not_null{_method} |
| 1757 | */ |
| 1758 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1759 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD, _plugin_id, _component_class_id, filter, _method) |
| 1760 | |
| 1761 | /*! |
| 1762 | @brief |
| 1763 | Alias of |
| 1764 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID() |
| 1765 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1766 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1767 | */ |
| 1768 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \ |
| 1769 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method) |
| 1770 | |
| 1771 | /*! |
| 1772 | @brief |
| 1773 | Sets the "input port connected" method of the \bt_flt_comp_cls |
| 1774 | having the ID \bt_p{_component_class_id} in the plugin having the ID |
| 1775 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 1776 | |
| 1777 | See the |
| 1778 | \ref api-comp-cls-dev-meth-iport-connected "input port connected" |
| 1779 | method. |
| 1780 | |
| 1781 | @param[in] _plugin_id |
| 1782 | @parblock |
| 1783 | C identifier. |
| 1784 | |
| 1785 | ID of the plugin which contains the filter component class of which |
| 1786 | to set the "input port connected" method. |
| 1787 | @endparblock |
| 1788 | @param[in] _component_class_id |
| 1789 | @parblock |
| 1790 | C identifier. |
| 1791 | |
| 1792 | ID of the filter component class, within the plugin having the ID |
| 1793 | \bt_p{_plugin_id}, of which to set the "input port connected" |
| 1794 | method to \bt_p{_method}. |
| 1795 | @endparblock |
| 1796 | @param[in] _method |
| 1797 | @parblock |
| 1798 | #bt_component_class_filter_input_port_connected_method |
| 1799 | |
| 1800 | Filter component class's "input port connected" method. |
| 1801 | @endparblock |
| 1802 | |
| 1803 | @bt_pre_not_null{_method} |
| 1804 | */ |
| 1805 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1806 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_input_port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD, _plugin_id, _component_class_id, filter, _method) |
| 1807 | |
| 1808 | /*! |
| 1809 | @brief |
| 1810 | Alias of |
| 1811 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID() |
| 1812 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1813 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1814 | */ |
| 1815 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \ |
| 1816 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method) |
| 1817 | |
| 1818 | /*! |
| 1819 | @brief |
| 1820 | Sets the finalization method of the \bt_msg_iter_cls of the |
| 1821 | \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the |
| 1822 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. |
| 1823 | |
| 1824 | See the \ref api-msg-iter-cls-meth-fini "finalize" method. |
| 1825 | |
| 1826 | @param[in] _plugin_id |
| 1827 | @parblock |
| 1828 | C identifier. |
| 1829 | |
| 1830 | ID of the plugin which contains the filter component class of which |
| 1831 | to set the finalization method of the message iterator class. |
| 1832 | @endparblock |
| 1833 | @param[in] _component_class_id |
| 1834 | @parblock |
| 1835 | C identifier. |
| 1836 | |
| 1837 | ID of the filter component class, within the plugin having the ID |
| 1838 | \bt_p{_plugin_id}, of which to set the finalization method of the |
| 1839 | message iterator class to \bt_p{_method}. |
| 1840 | @endparblock |
| 1841 | @param[in] _method |
| 1842 | @parblock |
| 1843 | #bt_message_iterator_class_finalize_method |
| 1844 | |
| 1845 | Filter component class's message iterator class's finalization method. |
| 1846 | @endparblock |
| 1847 | |
| 1848 | @bt_pre_not_null{_method} |
| 1849 | */ |
| 1850 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1851 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _plugin_id, _component_class_id, filter, _method) |
| 1852 | |
| 1853 | /*! |
| 1854 | @brief |
| 1855 | Alias of |
| 1856 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID() |
| 1857 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1858 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1859 | */ |
| 1860 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \ |
| 1861 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method) |
| 1862 | |
| 1863 | /*! |
| 1864 | @brief |
| 1865 | Sets the initialization method of the \bt_msg_iter_cls of the |
| 1866 | \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the |
| 1867 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. |
| 1868 | |
| 1869 | See the \ref api-msg-iter-cls-meth-init "initialize" method. |
| 1870 | |
| 1871 | @param[in] _plugin_id |
| 1872 | @parblock |
| 1873 | C identifier. |
| 1874 | |
| 1875 | ID of the plugin which contains the filter component class of which |
| 1876 | to set the initialization method of the message iterator class. |
| 1877 | @endparblock |
| 1878 | @param[in] _component_class_id |
| 1879 | @parblock |
| 1880 | C identifier. |
| 1881 | |
| 1882 | ID of the filter component class, within the plugin having the ID |
| 1883 | \bt_p{_plugin_id}, of which to set the initialization method of the |
| 1884 | message iterator class to \bt_p{_method}. |
| 1885 | @endparblock |
| 1886 | @param[in] _method |
| 1887 | @parblock |
| 1888 | #bt_message_iterator_class_initialize_method |
| 1889 | |
| 1890 | Filter component class's message iterator class's initialization |
| 1891 | method. |
| 1892 | @endparblock |
| 1893 | |
| 1894 | @bt_pre_not_null{_method} |
| 1895 | */ |
| 1896 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 1897 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD, _plugin_id, _component_class_id, filter, _method) |
| 1898 | |
| 1899 | /*! |
| 1900 | @brief |
| 1901 | Alias of |
| 1902 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID() |
| 1903 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1904 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1905 | */ |
| 1906 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \ |
| 1907 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method) |
| 1908 | |
| 1909 | /*! |
| 1910 | @brief |
| 1911 | Sets the "seek beginning" and "can seek beginning?" methods of the |
| 1912 | \bt_msg_iter_cls of the \bt_flt_comp_cls having the ID |
| 1913 | \bt_p{_component_class_id} in the plugin having the ID |
| 1914 | \bt_p{_plugin_id} to \bt_p{_seek_method} and |
| 1915 | \bt_p{_can_seek_method}. |
| 1916 | |
| 1917 | See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and |
| 1918 | \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods. |
| 1919 | |
| 1920 | @param[in] _plugin_id |
| 1921 | @parblock |
| 1922 | C identifier. |
| 1923 | |
| 1924 | ID of the plugin which contains the filter component class of which |
| 1925 | to set the "seek beginning" and "can seek beginning?" methods of the |
| 1926 | message iterator class. |
| 1927 | @endparblock |
| 1928 | @param[in] _component_class_id |
| 1929 | @parblock |
| 1930 | C identifier. |
| 1931 | |
| 1932 | ID of the filter component class, within the plugin having the ID |
| 1933 | \bt_p{_plugin_id}, of which to set the "seek beginning" and "can |
| 1934 | seek beginning" methods of the message iterator class to |
| 1935 | \bt_p{_seek_method} and \bt_p{_can_seek_method}. |
| 1936 | @endparblock |
| 1937 | @param[in] _seek_method |
| 1938 | @parblock |
| 1939 | #bt_message_iterator_class_seek_beginning_method |
| 1940 | |
| 1941 | Filter component class's message iterator class's "seek beginning" |
| 1942 | method. |
| 1943 | @endparblock |
| 1944 | @param[in] _can_seek_method |
| 1945 | @parblock |
| 1946 | #bt_message_iterator_class_can_seek_beginning_method |
| 1947 | |
| 1948 | Filter component class's message iterator class's |
| 1949 | "can seek beginning?" method. |
| 1950 | |
| 1951 | Can be \c NULL, in which case it is equivalent to setting a method |
| 1952 | which always returns #BT_TRUE. |
| 1953 | @endparblock |
| 1954 | |
| 1955 | @bt_pre_not_null{_seek_method} |
| 1956 | @bt_pre_not_null{_can_seek_method} |
| 1957 | */ |
| 1958 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \ |
| 1959 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _plugin_id, _component_class_id, filter, _seek_method); \ |
| 1960 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _plugin_id, _component_class_id, filter, _can_seek_method); |
| 1961 | |
| 1962 | /*! |
| 1963 | @brief |
| 1964 | Alias of |
| 1965 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID() |
| 1966 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 1967 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 1968 | */ |
| 1969 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \ |
| 1970 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method) |
| 1971 | |
| 1972 | /*! |
| 1973 | @brief |
| 1974 | Sets the "seek ns from origin" and "can seek ns from origin?" |
| 1975 | methods of the \bt_msg_iter_cls of the \bt_flt_comp_cls having the |
| 1976 | ID \bt_p{_component_class_id} in the plugin having the ID |
| 1977 | \bt_p{_plugin_id} to \bt_p{_seek_method} and |
| 1978 | \bt_p{_can_seek_method}. |
| 1979 | |
| 1980 | See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and |
| 1981 | \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?" |
| 1982 | methods. |
| 1983 | |
| 1984 | @param[in] _plugin_id |
| 1985 | @parblock |
| 1986 | C identifier. |
| 1987 | |
| 1988 | ID of the plugin which contains the filter component class of which |
| 1989 | to set the "seek ns from origin" and "can seek ns from origin?" |
| 1990 | methods of the message iterator class. |
| 1991 | @endparblock |
| 1992 | @param[in] _component_class_id |
| 1993 | @parblock |
| 1994 | C identifier. |
| 1995 | |
| 1996 | ID of the filter component class, within the plugin having the ID |
| 1997 | \bt_p{_plugin_id}, of which to set the "seek ns from origin" and |
| 1998 | "can seek ns from origin" methods of the message iterator class to |
| 1999 | \bt_p{_seek_method} and \bt_p{_can_seek_method}. |
| 2000 | @endparblock |
| 2001 | @param[in] _seek_method |
| 2002 | @parblock |
| 2003 | #bt_message_iterator_class_seek_ns_from_origin_method |
| 2004 | |
| 2005 | Filter component class's message iterator class's "seek ns from |
| 2006 | origin" method. |
| 2007 | @endparblock |
| 2008 | @param[in] _can_seek_method |
| 2009 | @parblock |
| 2010 | #bt_message_iterator_class_can_seek_ns_from_origin_method |
| 2011 | |
| 2012 | Filter component class's message iterator class's "can seek ns from |
| 2013 | origin?" method. |
| 2014 | |
| 2015 | Can be \c NULL, in which case it is equivalent to setting a method |
| 2016 | which always returns #BT_TRUE. |
| 2017 | @endparblock |
| 2018 | |
| 2019 | @bt_pre_not_null{_seek_method} |
| 2020 | @bt_pre_not_null{_can_seek_method} |
| 2021 | */ |
| 2022 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \ |
| 2023 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _plugin_id, _component_class_id, filter, _seek_method); \ |
| 2024 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _plugin_id, _component_class_id, filter, _can_seek_method) |
| 2025 | |
| 2026 | /*! |
| 2027 | @brief |
| 2028 | Alias of |
| 2029 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID() |
| 2030 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 2031 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 2032 | */ |
| 2033 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \ |
| 2034 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method) |
| 2035 | |
| 2036 | /*! |
| 2037 | @brief |
| 2038 | Sets the "output port connected" method of the \bt_flt_comp_cls |
| 2039 | having the ID \bt_p{_component_class_id} in the plugin having the ID |
| 2040 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 2041 | |
| 2042 | See the |
| 2043 | \ref api-comp-cls-dev-meth-oport-connected "output port connected" |
| 2044 | method. |
| 2045 | |
| 2046 | @param[in] _plugin_id |
| 2047 | @parblock |
| 2048 | C identifier. |
| 2049 | |
| 2050 | ID of the plugin which contains the filter component class of which |
| 2051 | to set the "output port connected" method. |
| 2052 | @endparblock |
| 2053 | @param[in] _component_class_id |
| 2054 | @parblock |
| 2055 | C identifier. |
| 2056 | |
| 2057 | ID of the filter component class, within the plugin having the ID |
| 2058 | \bt_p{_plugin_id}, of which to set the "output port connected" |
| 2059 | method to \bt_p{_method}. |
| 2060 | @endparblock |
| 2061 | @param[in] _method |
| 2062 | @parblock |
| 2063 | #bt_component_class_filter_output_port_connected_method |
| 2064 | |
| 2065 | Filter component class's "output port connected" method. |
| 2066 | @endparblock |
| 2067 | |
| 2068 | @bt_pre_not_null{_method} |
| 2069 | */ |
| 2070 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 2071 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_output_port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD, _plugin_id, _component_class_id, filter, _method) |
| 2072 | |
| 2073 | /*! |
| 2074 | @brief |
| 2075 | Alias of |
| 2076 | BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID() |
| 2077 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 2078 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 2079 | */ |
| 2080 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \ |
| 2081 | BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method) |
| 2082 | |
| 2083 | /*! |
| 2084 | @brief |
| 2085 | Sets the query method of the \bt_flt_comp_cls |
| 2086 | having the ID \bt_p{_component_class_id} in the plugin having the ID |
| 2087 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 2088 | |
| 2089 | See the \ref api-comp-cls-dev-meth-query "query" method. |
| 2090 | |
| 2091 | @param[in] _plugin_id |
| 2092 | @parblock |
| 2093 | C identifier. |
| 2094 | |
| 2095 | ID of the plugin which contains the filter component class of which |
| 2096 | to set the query method. |
| 2097 | @endparblock |
| 2098 | @param[in] _component_class_id |
| 2099 | @parblock |
| 2100 | C identifier. |
| 2101 | |
| 2102 | ID of the filter component class, within the plugin having the ID |
| 2103 | \bt_p{_plugin_id}, of which to set the query |
| 2104 | method to \bt_p{_method}. |
| 2105 | @endparblock |
| 2106 | @param[in] _method |
| 2107 | @parblock |
| 2108 | #bt_component_class_filter_query_method |
| 2109 | |
| 2110 | Filter component class's query method. |
| 2111 | @endparblock |
| 2112 | |
| 2113 | @bt_pre_not_null{_method} |
| 2114 | */ |
| 2115 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 2116 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _plugin_id, _component_class_id, filter, _method) |
| 2117 | |
| 2118 | /*! |
| 2119 | @brief |
| 2120 | Alias of |
| 2121 | BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID() |
| 2122 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 2123 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 2124 | */ |
| 2125 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \ |
| 2126 | BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method) |
| 2127 | |
| 2128 | /*! @} */ |
| 2129 | |
| 2130 | /*! |
| 2131 | @name Sink component class methods |
| 2132 | @{ |
| 2133 | */ |
| 2134 | |
| 2135 | /*! |
| 2136 | @brief |
| 2137 | Sets the finalization method of the \bt_sink_comp_cls having the ID |
| 2138 | \bt_p{_component_class_id} in the plugin having the ID |
| 2139 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 2140 | |
| 2141 | See the \ref api-comp-cls-dev-meth-fini "finalize" method. |
| 2142 | |
| 2143 | @param[in] _plugin_id |
| 2144 | @parblock |
| 2145 | C identifier. |
| 2146 | |
| 2147 | ID of the plugin which contains the sink component class of which |
| 2148 | to set the finalization method. |
| 2149 | @endparblock |
| 2150 | @param[in] _component_class_id |
| 2151 | @parblock |
| 2152 | C identifier. |
| 2153 | |
| 2154 | ID of the sink component class, within the plugin having the ID |
| 2155 | \bt_p{_plugin_id}, of which to set the finalization method to |
| 2156 | \bt_p{_method}. |
| 2157 | @endparblock |
| 2158 | @param[in] _method |
| 2159 | @parblock |
| 2160 | #bt_component_class_sink_finalize_method |
| 2161 | |
| 2162 | Sink component class's finalization method. |
| 2163 | @endparblock |
| 2164 | |
| 2165 | @bt_pre_not_null{_method} |
| 2166 | */ |
| 2167 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 2168 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _plugin_id, _component_class_id, sink, _method) |
| 2169 | |
| 2170 | /*! |
| 2171 | @brief |
| 2172 | Alias of |
| 2173 | BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID() |
| 2174 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 2175 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 2176 | */ |
| 2177 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \ |
| 2178 | BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method) |
| 2179 | |
| 2180 | /*! |
| 2181 | @brief |
| 2182 | Sets the \"get supported \bt_mip versions\" method of the |
| 2183 | \bt_sink_comp_cls having the ID \bt_p{_component_class_id} in the |
| 2184 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. |
| 2185 | |
| 2186 | See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions" |
| 2187 | method. |
| 2188 | |
| 2189 | @param[in] _plugin_id |
| 2190 | @parblock |
| 2191 | C identifier. |
| 2192 | |
| 2193 | ID of the plugin which contains the sink component class of which |
| 2194 | to set the "get supported MIP versions" method. |
| 2195 | @endparblock |
| 2196 | @param[in] _component_class_id |
| 2197 | @parblock |
| 2198 | C identifier. |
| 2199 | |
| 2200 | ID of the sink component class, within the plugin having the ID |
| 2201 | \bt_p{_plugin_id}, of which to set the "get supported MIP versions" |
| 2202 | method to \bt_p{_method}. |
| 2203 | @endparblock |
| 2204 | @param[in] _method |
| 2205 | @parblock |
| 2206 | #bt_component_class_sink_get_supported_mip_versions_method |
| 2207 | |
| 2208 | Sink component class's "get supported MIP versions" method. |
| 2209 | @endparblock |
| 2210 | |
| 2211 | @bt_pre_not_null{_method} |
| 2212 | */ |
| 2213 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 2214 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD, _plugin_id, _component_class_id, sink, _method) |
| 2215 | |
| 2216 | /*! |
| 2217 | @brief |
| 2218 | Alias of |
| 2219 | BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID() |
| 2220 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 2221 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 2222 | */ |
| 2223 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \ |
| 2224 | BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method) |
| 2225 | |
| 2226 | /*! |
| 2227 | @brief |
| 2228 | Sets the "graph is configured" method of the \bt_sink_comp_cls |
| 2229 | having the ID \bt_p{_component_class_id} in the plugin having the ID |
| 2230 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 2231 | |
| 2232 | See the |
| 2233 | \ref api-comp-cls-dev-meth-graph-configured "graph is configured" |
| 2234 | method. |
| 2235 | |
| 2236 | @param[in] _plugin_id |
| 2237 | @parblock |
| 2238 | C identifier. |
| 2239 | |
| 2240 | ID of the plugin which contains the sink component class of which |
| 2241 | to set the "graph is configured" method. |
| 2242 | @endparblock |
| 2243 | @param[in] _component_class_id |
| 2244 | @parblock |
| 2245 | C identifier. |
| 2246 | |
| 2247 | ID of the sink component class, within the plugin having the ID |
| 2248 | \bt_p{_plugin_id}, of which to set the "graph is configured" |
| 2249 | method to \bt_p{_method}. |
| 2250 | @endparblock |
| 2251 | @param[in] _method |
| 2252 | @parblock |
| 2253 | #bt_component_class_sink_graph_is_configured_method |
| 2254 | |
| 2255 | Sink component class's "graph is configured" method. |
| 2256 | @endparblock |
| 2257 | |
| 2258 | @bt_pre_not_null{_method} |
| 2259 | */ |
| 2260 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 2261 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_graph_is_configured_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD, _plugin_id, _component_class_id, sink, _method) |
| 2262 | |
| 2263 | /*! |
| 2264 | @brief |
| 2265 | Alias of |
| 2266 | BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID() |
| 2267 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 2268 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 2269 | */ |
| 2270 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _method) \ |
| 2271 | BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _method) |
| 2272 | |
| 2273 | /*! |
| 2274 | @brief |
| 2275 | Sets the initialization method of the \bt_sink_comp_cls having the |
| 2276 | ID \bt_p{_component_class_id} in the plugin having the ID |
| 2277 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 2278 | |
| 2279 | See the \ref api-comp-cls-dev-meth-init "initialize" method. |
| 2280 | |
| 2281 | @param[in] _plugin_id |
| 2282 | @parblock |
| 2283 | C identifier. |
| 2284 | |
| 2285 | ID of the plugin which contains the sink component class of which |
| 2286 | to set the initialization method. |
| 2287 | @endparblock |
| 2288 | @param[in] _component_class_id |
| 2289 | @parblock |
| 2290 | C identifier. |
| 2291 | |
| 2292 | ID of the sink component class, within the plugin having the ID |
| 2293 | \bt_p{_plugin_id}, of which to set the initialization method to |
| 2294 | \bt_p{_method}. |
| 2295 | @endparblock |
| 2296 | @param[in] _method |
| 2297 | @parblock |
| 2298 | #bt_component_class_sink_initialize_method |
| 2299 | |
| 2300 | Sink component class's initialization method. |
| 2301 | @endparblock |
| 2302 | |
| 2303 | @bt_pre_not_null{_method} |
| 2304 | */ |
| 2305 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 2306 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD, _plugin_id, _component_class_id, sink, _method) |
| 2307 | |
| 2308 | /*! |
| 2309 | @brief |
| 2310 | Alias of |
| 2311 | BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID() |
| 2312 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 2313 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 2314 | */ |
| 2315 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \ |
| 2316 | BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method) |
| 2317 | |
| 2318 | /*! |
| 2319 | @brief |
| 2320 | Sets the "input port connected" method of the \bt_sink_comp_cls |
| 2321 | having the ID \bt_p{_component_class_id} in the plugin having the ID |
| 2322 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 2323 | |
| 2324 | See the |
| 2325 | \ref api-comp-cls-dev-meth-iport-connected "input port connected" |
| 2326 | method. |
| 2327 | |
| 2328 | @param[in] _plugin_id |
| 2329 | @parblock |
| 2330 | C identifier. |
| 2331 | |
| 2332 | ID of the plugin which contains the sink component class of which |
| 2333 | to set the "input port connected" method. |
| 2334 | @endparblock |
| 2335 | @param[in] _component_class_id |
| 2336 | @parblock |
| 2337 | C identifier. |
| 2338 | |
| 2339 | ID of the sink component class, within the plugin having the ID |
| 2340 | \bt_p{_plugin_id}, of which to set the "input port connected" |
| 2341 | method to \bt_p{_method}. |
| 2342 | @endparblock |
| 2343 | @param[in] _method |
| 2344 | @parblock |
| 2345 | #bt_component_class_sink_input_port_connected_method |
| 2346 | |
| 2347 | Sink component class's "input port connected" method. |
| 2348 | @endparblock |
| 2349 | |
| 2350 | @bt_pre_not_null{_method} |
| 2351 | */ |
| 2352 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 2353 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_input_port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD, _plugin_id, _component_class_id, sink, _method) |
| 2354 | |
| 2355 | /*! |
| 2356 | @brief |
| 2357 | Alias of |
| 2358 | BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID() |
| 2359 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 2360 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 2361 | */ |
| 2362 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \ |
| 2363 | BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method) |
| 2364 | |
| 2365 | /*! |
| 2366 | @brief |
| 2367 | Sets the query method of the \bt_sink_comp_cls |
| 2368 | having the ID \bt_p{_component_class_id} in the plugin having the ID |
| 2369 | \bt_p{_plugin_id} to \bt_p{_method}. |
| 2370 | |
| 2371 | See the \ref api-comp-cls-dev-meth-query "query" method. |
| 2372 | |
| 2373 | @param[in] _plugin_id |
| 2374 | @parblock |
| 2375 | C identifier. |
| 2376 | |
| 2377 | ID of the plugin which contains the sink component class of which |
| 2378 | to set the query method. |
| 2379 | @endparblock |
| 2380 | @param[in] _component_class_id |
| 2381 | @parblock |
| 2382 | C identifier. |
| 2383 | |
| 2384 | ID of the sink component class, within the plugin having the ID |
| 2385 | \bt_p{_plugin_id}, of which to set the query |
| 2386 | method to \bt_p{_method}. |
| 2387 | @endparblock |
| 2388 | @param[in] _method |
| 2389 | @parblock |
| 2390 | #bt_component_class_sink_query_method |
| 2391 | |
| 2392 | Sink component class's query method. |
| 2393 | @endparblock |
| 2394 | |
| 2395 | @bt_pre_not_null{_method} |
| 2396 | */ |
| 2397 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ |
| 2398 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _plugin_id, _component_class_id, sink, _method) |
| 2399 | |
| 2400 | /*! |
| 2401 | @brief |
| 2402 | Alias of |
| 2403 | BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID() |
| 2404 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and |
| 2405 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. |
| 2406 | */ |
| 2407 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \ |
| 2408 | BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method) |
| 2409 | |
| 2410 | /*! @} */ |
| 2411 | |
| 2412 | /*! @} */ |
| 2413 | |
| 2414 | /* Plugin descriptor: describes a single plugin (internal use) */ |
| 2415 | struct __bt_plugin_descriptor { |
| 2416 | /* Plugin's name */ |
| 2417 | const char *name; |
| 2418 | } __attribute__((packed)); |
| 2419 | |
| 2420 | /* Type of a plugin attribute (internal use) */ |
| 2421 | enum __bt_plugin_descriptor_attribute_type { |
| 2422 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT = 0, |
| 2423 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT = 1, |
| 2424 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR = 2, |
| 2425 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE = 3, |
| 2426 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 4, |
| 2427 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION = 5, |
| 2428 | }; |
| 2429 | |
| 2430 | /* Plugin (user) version */ |
| 2431 | struct __bt_plugin_descriptor_version { |
| 2432 | uint32_t major; |
| 2433 | uint32_t minor; |
| 2434 | uint32_t patch; |
| 2435 | const char *extra; |
| 2436 | }; |
| 2437 | |
| 2438 | /* Plugin attribute (internal use) */ |
| 2439 | struct __bt_plugin_descriptor_attribute { |
| 2440 | /* Plugin descriptor to which to associate this attribute */ |
| 2441 | const struct __bt_plugin_descriptor *plugin_descriptor; |
| 2442 | |
| 2443 | /* Name of the attribute's type for debug purposes */ |
| 2444 | const char *type_name; |
| 2445 | |
| 2446 | /* Attribute's type */ |
| 2447 | enum __bt_plugin_descriptor_attribute_type type; |
| 2448 | |
| 2449 | /* Attribute's value (depends on attribute's type) */ |
| 2450 | union { |
| 2451 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */ |
| 2452 | bt_plugin_initialize_func init; |
| 2453 | |
| 2454 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */ |
| 2455 | bt_plugin_finalize_func exit; |
| 2456 | |
| 2457 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */ |
| 2458 | const char *author; |
| 2459 | |
| 2460 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */ |
| 2461 | const char *license; |
| 2462 | |
| 2463 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */ |
| 2464 | const char *description; |
| 2465 | |
| 2466 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */ |
| 2467 | struct __bt_plugin_descriptor_version version; |
| 2468 | } value; |
| 2469 | } __attribute__((packed)); |
| 2470 | |
| 2471 | /* Component class descriptor (internal use) */ |
| 2472 | struct __bt_plugin_component_class_descriptor { |
| 2473 | /* |
| 2474 | * Plugin descriptor to which to associate this component |
| 2475 | * class descriptor. |
| 2476 | */ |
| 2477 | const struct __bt_plugin_descriptor *plugin_descriptor; |
| 2478 | |
| 2479 | /* Component class name */ |
| 2480 | const char *name; |
| 2481 | |
| 2482 | /* Component class type */ |
| 2483 | bt_component_class_type type; |
| 2484 | |
| 2485 | /* Mandatory methods (depends on component class type) */ |
| 2486 | union { |
| 2487 | /* BT_COMPONENT_CLASS_TYPE_SOURCE */ |
| 2488 | struct { |
| 2489 | bt_message_iterator_class_next_method msg_iter_next; |
| 2490 | } source; |
| 2491 | |
| 2492 | /* BT_COMPONENT_CLASS_TYPE_FILTER */ |
| 2493 | struct { |
| 2494 | bt_message_iterator_class_next_method msg_iter_next; |
| 2495 | } filter; |
| 2496 | |
| 2497 | /* BT_COMPONENT_CLASS_TYPE_SINK */ |
| 2498 | struct { |
| 2499 | bt_component_class_sink_consume_method consume; |
| 2500 | } sink; |
| 2501 | } methods; |
| 2502 | } __attribute__((packed)); |
| 2503 | |
| 2504 | /* Type of a component class attribute (internal use) */ |
| 2505 | enum __bt_plugin_component_class_descriptor_attribute_type { |
| 2506 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 0, |
| 2507 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP = 1, |
| 2508 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD = 2, |
| 2509 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD = 3, |
| 2510 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD = 4, |
| 2511 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD = 5, |
| 2512 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD = 6, |
| 2513 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD = 7, |
| 2514 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD = 8, |
| 2515 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD = 9, |
| 2516 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD = 10, |
| 2517 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD = 11, |
| 2518 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD = 12, |
| 2519 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD = 13, |
| 2520 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD = 14, |
| 2521 | }; |
| 2522 | |
| 2523 | /* Component class attribute (internal use) */ |
| 2524 | struct __bt_plugin_component_class_descriptor_attribute { |
| 2525 | /* |
| 2526 | * Component class plugin attribute to which to associate this |
| 2527 | * component class attribute. |
| 2528 | */ |
| 2529 | const struct __bt_plugin_component_class_descriptor *comp_class_descriptor; |
| 2530 | |
| 2531 | /* Name of the attribute's type for debug purposes */ |
| 2532 | const char *type_name; |
| 2533 | |
| 2534 | /* Attribute's type */ |
| 2535 | enum __bt_plugin_component_class_descriptor_attribute_type type; |
| 2536 | |
| 2537 | /* Attribute's value (depends on attribute's type) */ |
| 2538 | union { |
| 2539 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */ |
| 2540 | const char *description; |
| 2541 | |
| 2542 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */ |
| 2543 | const char *help; |
| 2544 | |
| 2545 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD */ |
| 2546 | bt_component_class_source_get_supported_mip_versions_method source_get_supported_mip_versions_method; |
| 2547 | bt_component_class_filter_get_supported_mip_versions_method filter_get_supported_mip_versions_method; |
| 2548 | bt_component_class_sink_get_supported_mip_versions_method sink_get_supported_mip_versions_method; |
| 2549 | |
| 2550 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD */ |
| 2551 | bt_component_class_source_initialize_method source_initialize_method; |
| 2552 | bt_component_class_filter_initialize_method filter_initialize_method; |
| 2553 | bt_component_class_sink_initialize_method sink_initialize_method; |
| 2554 | |
| 2555 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */ |
| 2556 | bt_component_class_source_finalize_method source_finalize_method; |
| 2557 | bt_component_class_filter_finalize_method filter_finalize_method; |
| 2558 | bt_component_class_sink_finalize_method sink_finalize_method; |
| 2559 | |
| 2560 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */ |
| 2561 | bt_component_class_source_query_method source_query_method; |
| 2562 | bt_component_class_filter_query_method filter_query_method; |
| 2563 | bt_component_class_sink_query_method sink_query_method; |
| 2564 | |
| 2565 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */ |
| 2566 | bt_component_class_filter_input_port_connected_method filter_input_port_connected_method; |
| 2567 | bt_component_class_sink_input_port_connected_method sink_input_port_connected_method; |
| 2568 | |
| 2569 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */ |
| 2570 | bt_component_class_source_output_port_connected_method source_output_port_connected_method; |
| 2571 | bt_component_class_filter_output_port_connected_method filter_output_port_connected_method; |
| 2572 | |
| 2573 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */ |
| 2574 | bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method; |
| 2575 | |
| 2576 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD */ |
| 2577 | bt_message_iterator_class_initialize_method msg_iter_initialize_method; |
| 2578 | |
| 2579 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */ |
| 2580 | bt_message_iterator_class_finalize_method msg_iter_finalize_method; |
| 2581 | |
| 2582 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */ |
| 2583 | bt_message_iterator_class_seek_ns_from_origin_method msg_iter_seek_ns_from_origin_method; |
| 2584 | |
| 2585 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */ |
| 2586 | bt_message_iterator_class_seek_beginning_method msg_iter_seek_beginning_method; |
| 2587 | |
| 2588 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */ |
| 2589 | bt_message_iterator_class_can_seek_ns_from_origin_method msg_iter_can_seek_ns_from_origin_method; |
| 2590 | |
| 2591 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */ |
| 2592 | bt_message_iterator_class_can_seek_beginning_method msg_iter_can_seek_beginning_method; |
| 2593 | } value; |
| 2594 | } __attribute__((packed)); |
| 2595 | |
| 2596 | struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void); |
| 2597 | struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void); |
| 2598 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void); |
| 2599 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void); |
| 2600 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void); |
| 2601 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void); |
| 2602 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void); |
| 2603 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void); |
| 2604 | |
| 2605 | /* |
| 2606 | * Defines a plugin attribute (generic, internal use). |
| 2607 | * |
| 2608 | * _attr_name: Name of the attribute (C identifier). |
| 2609 | * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type). |
| 2610 | * _id: Plugin descriptor ID (C identifier). |
| 2611 | * _x: Value. |
| 2612 | */ |
| 2613 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \ |
| 2614 | static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \ |
| 2615 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ |
| 2616 | .type_name = #_attr_name, \ |
| 2617 | .type = _attr_type, \ |
| 2618 | .value = { ._attr_name = _x }, \ |
| 2619 | }; \ |
| 2620 | static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_##_id##_##_attr_name##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = &__bt_plugin_descriptor_attribute_##_id##_##_attr_name |
| 2621 | |
| 2622 | #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \ |
| 2623 | {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,} |
| 2624 | |
| 2625 | /* |
| 2626 | * Defines a component class descriptor attribute (generic, internal |
| 2627 | * use). |
| 2628 | * |
| 2629 | * _id: Plugin descriptor ID (C identifier). |
| 2630 | * _component_class_id: Component class ID (C identifier). |
| 2631 | * _type: Component class type (`source`, `filter`, or `sink`). |
| 2632 | * _attr_name: Name of the attribute (C identifier). |
| 2633 | * _attr_type: Type of the attribute |
| 2634 | * (enum __bt_plugin_descriptor_attribute_type). |
| 2635 | * _x: Value. |
| 2636 | */ |
| 2637 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _component_class_id, _type, _x) \ |
| 2638 | static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name = { \ |
| 2639 | .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_component_class_id, \ |
| 2640 | .type_name = #_attr_name, \ |
| 2641 | .type = _attr_type, \ |
| 2642 | .value = { ._attr_name = _x }, \ |
| 2643 | }; \ |
| 2644 | static struct __bt_plugin_component_class_descriptor_attribute const * const __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS = &__bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name |
| 2645 | |
| 2646 | /* |
| 2647 | * Clang supports the no_sanitize variable attribute on global variables. |
| 2648 | * GCC only supports the no_sanitize_address function attribute, which is |
| 2649 | * not what we need. This is fine because, as far as we have seen, gcc |
| 2650 | * does not insert red zones around global variables. |
| 2651 | */ |
| 2652 | #if defined(__clang__) |
| 2653 | # if __has_feature(address_sanitizer) |
| 2654 | # define __bt_plugin_variable_attribute_no_sanitize_address \ |
| 2655 | __attribute__((no_sanitize("address"))) |
| 2656 | # else |
| 2657 | # define __bt_plugin_variable_attribute_no_sanitize_address |
| 2658 | # endif |
| 2659 | #else |
| 2660 | # define __bt_plugin_variable_attribute_no_sanitize_address |
| 2661 | #endif |
| 2662 | |
| 2663 | /* |
| 2664 | * Variable attributes for a plugin descriptor pointer to be added to |
| 2665 | * the plugin descriptor section (internal use). |
| 2666 | */ |
| 2667 | #ifdef __APPLE__ |
| 2668 | #define __BT_PLUGIN_DESCRIPTOR_ATTRS \ |
| 2669 | __attribute__((section("__DATA,btp_desc"), used)) \ |
| 2670 | __bt_plugin_variable_attribute_no_sanitize_address |
| 2671 | |
| 2672 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \ |
| 2673 | __start___bt_plugin_descriptors |
| 2674 | |
| 2675 | #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \ |
| 2676 | __stop___bt_plugin_descriptors |
| 2677 | |
| 2678 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \ |
| 2679 | __asm("section$start$__DATA$btp_desc") |
| 2680 | |
| 2681 | #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \ |
| 2682 | __asm("section$end$__DATA$btp_desc") |
| 2683 | |
| 2684 | #else |
| 2685 | |
| 2686 | #define __BT_PLUGIN_DESCRIPTOR_ATTRS \ |
| 2687 | __attribute__((section("__bt_plugin_descriptors"), used)) \ |
| 2688 | __bt_plugin_variable_attribute_no_sanitize_address |
| 2689 | |
| 2690 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \ |
| 2691 | __start___bt_plugin_descriptors |
| 2692 | |
| 2693 | #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \ |
| 2694 | __stop___bt_plugin_descriptors |
| 2695 | |
| 2696 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA |
| 2697 | |
| 2698 | #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA |
| 2699 | #endif |
| 2700 | |
| 2701 | /* |
| 2702 | * Variable attributes for a plugin attribute pointer to be added to |
| 2703 | * the plugin attribute section (internal use). |
| 2704 | */ |
| 2705 | #ifdef __APPLE__ |
| 2706 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
| 2707 | __attribute__((section("__DATA,btp_desc_att"), used)) \ |
| 2708 | __bt_plugin_variable_attribute_no_sanitize_address |
| 2709 | |
| 2710 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ |
| 2711 | __start___bt_plugin_descriptor_attributes |
| 2712 | |
| 2713 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ |
| 2714 | __stop___bt_plugin_descriptor_attributes |
| 2715 | |
| 2716 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \ |
| 2717 | __asm("section$start$__DATA$btp_desc_att") |
| 2718 | |
| 2719 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \ |
| 2720 | __asm("section$end$__DATA$btp_desc_att") |
| 2721 | |
| 2722 | #else |
| 2723 | |
| 2724 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
| 2725 | __attribute__((section("__bt_plugin_descriptor_attributes"), used)) \ |
| 2726 | __bt_plugin_variable_attribute_no_sanitize_address |
| 2727 | |
| 2728 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ |
| 2729 | __start___bt_plugin_descriptor_attributes |
| 2730 | |
| 2731 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ |
| 2732 | __stop___bt_plugin_descriptor_attributes |
| 2733 | |
| 2734 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA |
| 2735 | |
| 2736 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA |
| 2737 | #endif |
| 2738 | |
| 2739 | /* |
| 2740 | * Variable attributes for a component class descriptor pointer to be |
| 2741 | * added to the component class descriptor section (internal use). |
| 2742 | */ |
| 2743 | #ifdef __APPLE__ |
| 2744 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \ |
| 2745 | __attribute__((section("__DATA,btp_cc_desc"), used)) \ |
| 2746 | __bt_plugin_variable_attribute_no_sanitize_address |
| 2747 | |
| 2748 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \ |
| 2749 | __start___bt_plugin_component_class_descriptors |
| 2750 | |
| 2751 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \ |
| 2752 | __stop___bt_plugin_component_class_descriptors |
| 2753 | |
| 2754 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \ |
| 2755 | __asm("section$start$__DATA$btp_cc_desc") |
| 2756 | |
| 2757 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \ |
| 2758 | __asm("section$end$__DATA$btp_cc_desc") |
| 2759 | |
| 2760 | #else |
| 2761 | |
| 2762 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \ |
| 2763 | __attribute__((section("__bt_plugin_component_class_descriptors"), used)) \ |
| 2764 | __bt_plugin_variable_attribute_no_sanitize_address |
| 2765 | |
| 2766 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \ |
| 2767 | __start___bt_plugin_component_class_descriptors |
| 2768 | |
| 2769 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \ |
| 2770 | __stop___bt_plugin_component_class_descriptors |
| 2771 | |
| 2772 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA |
| 2773 | |
| 2774 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA |
| 2775 | #endif |
| 2776 | |
| 2777 | /* |
| 2778 | * Variable attributes for a component class descriptor attribute |
| 2779 | * pointer to be added to the component class descriptor attribute |
| 2780 | * section (internal use). |
| 2781 | */ |
| 2782 | #ifdef __APPLE__ |
| 2783 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
| 2784 | __attribute__((section("__DATA,btp_cc_desc_att"), used)) \ |
| 2785 | __bt_plugin_variable_attribute_no_sanitize_address |
| 2786 | |
| 2787 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ |
| 2788 | __start___bt_plugin_component_class_descriptor_attributes |
| 2789 | |
| 2790 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ |
| 2791 | __stop___bt_plugin_component_class_descriptor_attributes |
| 2792 | |
| 2793 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \ |
| 2794 | __asm("section$start$__DATA$btp_cc_desc_att") |
| 2795 | |
| 2796 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \ |
| 2797 | __asm("section$end$__DATA$btp_cc_desc_att") |
| 2798 | |
| 2799 | #else |
| 2800 | |
| 2801 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
| 2802 | __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) \ |
| 2803 | __bt_plugin_variable_attribute_no_sanitize_address |
| 2804 | |
| 2805 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ |
| 2806 | __start___bt_plugin_component_class_descriptor_attributes |
| 2807 | |
| 2808 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ |
| 2809 | __stop___bt_plugin_component_class_descriptor_attributes |
| 2810 | |
| 2811 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA |
| 2812 | |
| 2813 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA |
| 2814 | #endif |
| 2815 | |
| 2816 | #ifdef __cplusplus |
| 2817 | } |
| 2818 | #endif |
| 2819 | |
| 2820 | #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */ |