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