| 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-const.h> |
| 33 | #include <babeltrace2/graph/component-class-source.h> |
| 34 | #include <babeltrace2/graph/component-class-filter.h> |
| 35 | #include <babeltrace2/graph/component-class-sink.h> |
| 36 | #include <babeltrace2/types.h> |
| 37 | |
| 38 | /* |
| 39 | * _BT_HIDDEN: set the hidden attribute for internal functions |
| 40 | * On Windows, symbols are local unless explicitly exported, |
| 41 | * see https://gcc.gnu.org/wiki/Visibility |
| 42 | */ |
| 43 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 44 | #define _BT_HIDDEN |
| 45 | #else |
| 46 | #define _BT_HIDDEN __attribute__((visibility("hidden"))) |
| 47 | #endif |
| 48 | |
| 49 | #ifdef __cplusplus |
| 50 | extern "C" { |
| 51 | #endif |
| 52 | |
| 53 | /* |
| 54 | * Plugin interface's version, not synced with Babeltrace's version |
| 55 | * (internal use). |
| 56 | */ |
| 57 | #define __BT_PLUGIN_VERSION_MAJOR 1 |
| 58 | #define __BT_PLUGIN_VERSION_MINOR 0 |
| 59 | |
| 60 | /* Plugin initialization function type */ |
| 61 | typedef enum bt_plugin_init_func_status { |
| 62 | BT_PLUGIN_INIT_FUNC_STATUS_OK = __BT_FUNC_STATUS_OK, |
| 63 | BT_PLUGIN_INIT_FUNC_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR, |
| 64 | BT_PLUGIN_INIT_FUNC_STATUS_ERROR = __BT_FUNC_STATUS_ERROR, |
| 65 | } bt_plugin_init_func_status; |
| 66 | |
| 67 | typedef bt_plugin_init_func_status (*bt_plugin_init_func)( |
| 68 | bt_self_plugin *plugin); |
| 69 | |
| 70 | /* Plugin exit function type */ |
| 71 | typedef void (*bt_plugin_exit_func)(void); |
| 72 | |
| 73 | /* Plugin descriptor: describes a single plugin (internal use) */ |
| 74 | struct __bt_plugin_descriptor { |
| 75 | /* Plugin's interface major version number */ |
| 76 | uint32_t major; |
| 77 | |
| 78 | /* Plugin's interface minor version number */ |
| 79 | uint32_t minor; |
| 80 | |
| 81 | /* Plugin's name */ |
| 82 | const char *name; |
| 83 | } __attribute__((packed)); |
| 84 | |
| 85 | /* Type of a plugin attribute (internal use) */ |
| 86 | enum __bt_plugin_descriptor_attribute_type { |
| 87 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT = 0, |
| 88 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT = 1, |
| 89 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR = 2, |
| 90 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE = 3, |
| 91 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 4, |
| 92 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION = 5, |
| 93 | }; |
| 94 | |
| 95 | /* Plugin (user) version */ |
| 96 | struct __bt_plugin_descriptor_version { |
| 97 | uint32_t major; |
| 98 | uint32_t minor; |
| 99 | uint32_t patch; |
| 100 | const char *extra; |
| 101 | }; |
| 102 | |
| 103 | /* Plugin attribute (internal use) */ |
| 104 | struct __bt_plugin_descriptor_attribute { |
| 105 | /* Plugin descriptor to which to associate this attribute */ |
| 106 | const struct __bt_plugin_descriptor *plugin_descriptor; |
| 107 | |
| 108 | /* Name of the attribute's type for debug purposes */ |
| 109 | const char *type_name; |
| 110 | |
| 111 | /* Attribute's type */ |
| 112 | enum __bt_plugin_descriptor_attribute_type type; |
| 113 | |
| 114 | /* Attribute's value (depends on attribute's type) */ |
| 115 | union { |
| 116 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */ |
| 117 | bt_plugin_init_func init; |
| 118 | |
| 119 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */ |
| 120 | bt_plugin_exit_func exit; |
| 121 | |
| 122 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */ |
| 123 | const char *author; |
| 124 | |
| 125 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */ |
| 126 | const char *license; |
| 127 | |
| 128 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */ |
| 129 | const char *description; |
| 130 | |
| 131 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */ |
| 132 | struct __bt_plugin_descriptor_version version; |
| 133 | } value; |
| 134 | } __attribute__((packed)); |
| 135 | |
| 136 | /* Component class descriptor (internal use) */ |
| 137 | struct __bt_plugin_component_class_descriptor { |
| 138 | /* |
| 139 | * Plugin descriptor to which to associate this component |
| 140 | * class descriptor. |
| 141 | */ |
| 142 | const struct __bt_plugin_descriptor *plugin_descriptor; |
| 143 | |
| 144 | /* Component class name */ |
| 145 | const char *name; |
| 146 | |
| 147 | /* Component class type */ |
| 148 | bt_component_class_type type; |
| 149 | |
| 150 | /* Mandatory methods (depends on component class type) */ |
| 151 | union { |
| 152 | /* BT_COMPONENT_CLASS_TYPE_SOURCE */ |
| 153 | struct { |
| 154 | bt_component_class_source_message_iterator_next_method msg_iter_next; |
| 155 | } source; |
| 156 | |
| 157 | /* BT_COMPONENT_CLASS_TYPE_FILTER */ |
| 158 | struct { |
| 159 | bt_component_class_filter_message_iterator_next_method msg_iter_next; |
| 160 | } filter; |
| 161 | |
| 162 | /* BT_COMPONENT_CLASS_TYPE_SINK */ |
| 163 | struct { |
| 164 | bt_component_class_sink_consume_method consume; |
| 165 | } sink; |
| 166 | } methods; |
| 167 | } __attribute__((packed)); |
| 168 | |
| 169 | /* Type of a component class attribute (internal use) */ |
| 170 | enum __bt_plugin_component_class_descriptor_attribute_type { |
| 171 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 0, |
| 172 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP = 1, |
| 173 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD = 2, |
| 174 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD = 3, |
| 175 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD = 4, |
| 176 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD = 5, |
| 177 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD = 6, |
| 178 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD = 7, |
| 179 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD = 8, |
| 180 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD = 9, |
| 181 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD = 10, |
| 182 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD = 11, |
| 183 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD = 12, |
| 184 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD = 13, |
| 185 | }; |
| 186 | |
| 187 | /* Component class attribute (internal use) */ |
| 188 | struct __bt_plugin_component_class_descriptor_attribute { |
| 189 | /* |
| 190 | * Component class plugin attribute to which to associate this |
| 191 | * component class attribute. |
| 192 | */ |
| 193 | const struct __bt_plugin_component_class_descriptor *comp_class_descriptor; |
| 194 | |
| 195 | /* Name of the attribute's type for debug purposes */ |
| 196 | const char *type_name; |
| 197 | |
| 198 | /* Attribute's type */ |
| 199 | enum __bt_plugin_component_class_descriptor_attribute_type type; |
| 200 | |
| 201 | /* Attribute's value (depends on attribute's type) */ |
| 202 | union { |
| 203 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */ |
| 204 | const char *description; |
| 205 | |
| 206 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */ |
| 207 | const char *help; |
| 208 | |
| 209 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */ |
| 210 | bt_component_class_source_init_method source_init_method; |
| 211 | bt_component_class_filter_init_method filter_init_method; |
| 212 | bt_component_class_sink_init_method sink_init_method; |
| 213 | |
| 214 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */ |
| 215 | bt_component_class_source_finalize_method source_finalize_method; |
| 216 | bt_component_class_filter_finalize_method filter_finalize_method; |
| 217 | bt_component_class_sink_finalize_method sink_finalize_method; |
| 218 | |
| 219 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */ |
| 220 | bt_component_class_source_query_method source_query_method; |
| 221 | bt_component_class_filter_query_method filter_query_method; |
| 222 | bt_component_class_sink_query_method sink_query_method; |
| 223 | |
| 224 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */ |
| 225 | bt_component_class_filter_input_port_connected_method filter_input_port_connected_method; |
| 226 | bt_component_class_sink_input_port_connected_method sink_input_port_connected_method; |
| 227 | |
| 228 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */ |
| 229 | bt_component_class_source_output_port_connected_method source_output_port_connected_method; |
| 230 | bt_component_class_filter_output_port_connected_method filter_output_port_connected_method; |
| 231 | |
| 232 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */ |
| 233 | bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method; |
| 234 | |
| 235 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD */ |
| 236 | bt_component_class_source_message_iterator_init_method source_msg_iter_init_method; |
| 237 | bt_component_class_filter_message_iterator_init_method filter_msg_iter_init_method; |
| 238 | |
| 239 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */ |
| 240 | bt_component_class_source_message_iterator_finalize_method source_msg_iter_finalize_method; |
| 241 | bt_component_class_filter_message_iterator_finalize_method filter_msg_iter_finalize_method; |
| 242 | |
| 243 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */ |
| 244 | bt_component_class_source_message_iterator_seek_ns_from_origin_method source_msg_iter_seek_ns_from_origin_method; |
| 245 | bt_component_class_filter_message_iterator_seek_ns_from_origin_method filter_msg_iter_seek_ns_from_origin_method; |
| 246 | |
| 247 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */ |
| 248 | bt_component_class_source_message_iterator_seek_beginning_method source_msg_iter_seek_beginning_method; |
| 249 | bt_component_class_filter_message_iterator_seek_beginning_method filter_msg_iter_seek_beginning_method; |
| 250 | |
| 251 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */ |
| 252 | bt_component_class_source_message_iterator_can_seek_ns_from_origin_method source_msg_iter_can_seek_ns_from_origin_method; |
| 253 | bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method filter_msg_iter_can_seek_ns_from_origin_method; |
| 254 | |
| 255 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */ |
| 256 | bt_component_class_source_message_iterator_can_seek_beginning_method source_msg_iter_can_seek_beginning_method; |
| 257 | bt_component_class_filter_message_iterator_can_seek_beginning_method filter_msg_iter_can_seek_beginning_method; |
| 258 | } value; |
| 259 | } __attribute__((packed)); |
| 260 | |
| 261 | struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void); |
| 262 | struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void); |
| 263 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void); |
| 264 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void); |
| 265 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void); |
| 266 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void); |
| 267 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void); |
| 268 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void); |
| 269 | |
| 270 | /* |
| 271 | * Variable attributes for a plugin descriptor pointer to be added to |
| 272 | * the plugin descriptor section (internal use). |
| 273 | */ |
| 274 | #ifdef __APPLE__ |
| 275 | #define __BT_PLUGIN_DESCRIPTOR_ATTRS \ |
| 276 | __attribute__((section("__DATA,btp_desc"), used)) |
| 277 | |
| 278 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \ |
| 279 | __start___bt_plugin_descriptors |
| 280 | |
| 281 | #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \ |
| 282 | __stop___bt_plugin_descriptors |
| 283 | |
| 284 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \ |
| 285 | __asm("section$start$__DATA$btp_desc") |
| 286 | |
| 287 | #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \ |
| 288 | __asm("section$end$__DATA$btp_desc") |
| 289 | |
| 290 | #else |
| 291 | |
| 292 | #define __BT_PLUGIN_DESCRIPTOR_ATTRS \ |
| 293 | __attribute__((section("__bt_plugin_descriptors"), used)) |
| 294 | |
| 295 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \ |
| 296 | __start___bt_plugin_descriptors |
| 297 | |
| 298 | #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \ |
| 299 | __stop___bt_plugin_descriptors |
| 300 | |
| 301 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA |
| 302 | |
| 303 | #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA |
| 304 | #endif |
| 305 | |
| 306 | /* |
| 307 | * Variable attributes for a plugin attribute pointer to be added to |
| 308 | * the plugin attribute section (internal use). |
| 309 | */ |
| 310 | #ifdef __APPLE__ |
| 311 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
| 312 | __attribute__((section("__DATA,btp_desc_att"), used)) |
| 313 | |
| 314 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ |
| 315 | __start___bt_plugin_descriptor_attributes |
| 316 | |
| 317 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ |
| 318 | __stop___bt_plugin_descriptor_attributes |
| 319 | |
| 320 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \ |
| 321 | __asm("section$start$__DATA$btp_desc_att") |
| 322 | |
| 323 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \ |
| 324 | __asm("section$end$__DATA$btp_desc_att") |
| 325 | |
| 326 | #else |
| 327 | |
| 328 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
| 329 | __attribute__((section("__bt_plugin_descriptor_attributes"), used)) |
| 330 | |
| 331 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ |
| 332 | __start___bt_plugin_descriptor_attributes |
| 333 | |
| 334 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ |
| 335 | __stop___bt_plugin_descriptor_attributes |
| 336 | |
| 337 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA |
| 338 | |
| 339 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA |
| 340 | #endif |
| 341 | |
| 342 | /* |
| 343 | * Variable attributes for a component class descriptor pointer to be |
| 344 | * added to the component class descriptor section (internal use). |
| 345 | */ |
| 346 | #ifdef __APPLE__ |
| 347 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \ |
| 348 | __attribute__((section("__DATA,btp_cc_desc"), used)) |
| 349 | |
| 350 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \ |
| 351 | __start___bt_plugin_component_class_descriptors |
| 352 | |
| 353 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \ |
| 354 | __stop___bt_plugin_component_class_descriptors |
| 355 | |
| 356 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \ |
| 357 | __asm("section$start$__DATA$btp_cc_desc") |
| 358 | |
| 359 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \ |
| 360 | __asm("section$end$__DATA$btp_cc_desc") |
| 361 | |
| 362 | #else |
| 363 | |
| 364 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \ |
| 365 | __attribute__((section("__bt_plugin_component_class_descriptors"), used)) |
| 366 | |
| 367 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \ |
| 368 | __start___bt_plugin_component_class_descriptors |
| 369 | |
| 370 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \ |
| 371 | __stop___bt_plugin_component_class_descriptors |
| 372 | |
| 373 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA |
| 374 | |
| 375 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA |
| 376 | #endif |
| 377 | |
| 378 | /* |
| 379 | * Variable attributes for a component class descriptor attribute |
| 380 | * pointer to be added to the component class descriptor attribute |
| 381 | * section (internal use). |
| 382 | */ |
| 383 | #ifdef __APPLE__ |
| 384 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
| 385 | __attribute__((section("__DATA,btp_cc_desc_att"), used)) |
| 386 | |
| 387 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ |
| 388 | __start___bt_plugin_component_class_descriptor_attributes |
| 389 | |
| 390 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ |
| 391 | __stop___bt_plugin_component_class_descriptor_attributes |
| 392 | |
| 393 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \ |
| 394 | __asm("section$start$__DATA$btp_cc_desc_att") |
| 395 | |
| 396 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \ |
| 397 | __asm("section$end$__DATA$btp_cc_desc_att") |
| 398 | |
| 399 | #else |
| 400 | |
| 401 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
| 402 | __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) |
| 403 | |
| 404 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ |
| 405 | __start___bt_plugin_component_class_descriptor_attributes |
| 406 | |
| 407 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ |
| 408 | __stop___bt_plugin_component_class_descriptor_attributes |
| 409 | |
| 410 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA |
| 411 | |
| 412 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA |
| 413 | #endif |
| 414 | |
| 415 | /* |
| 416 | * Declares a plugin descriptor pointer variable with a custom ID. |
| 417 | * |
| 418 | * _id: ID (any valid C identifier except `auto`). |
| 419 | */ |
| 420 | #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id |
| 421 | |
| 422 | /* |
| 423 | * Defines a plugin descriptor with a custom ID. |
| 424 | * |
| 425 | * _id: ID (any valid C identifier except `auto`). |
| 426 | * _name: Plugin's name (C string). |
| 427 | */ |
| 428 | #define BT_PLUGIN_WITH_ID(_id, _name) \ |
| 429 | struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \ |
| 430 | .major = __BT_PLUGIN_VERSION_MAJOR, \ |
| 431 | .minor = __BT_PLUGIN_VERSION_MINOR, \ |
| 432 | .name = _name, \ |
| 433 | }; \ |
| 434 | static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id |
| 435 | |
| 436 | /* |
| 437 | * Defines a plugin attribute (generic, internal use). |
| 438 | * |
| 439 | * _attr_name: Name of the attribute (C identifier). |
| 440 | * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type). |
| 441 | * _id: Plugin descriptor ID (C identifier). |
| 442 | * _x: Value. |
| 443 | */ |
| 444 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \ |
| 445 | static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \ |
| 446 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ |
| 447 | .type_name = #_attr_name, \ |
| 448 | .type = _attr_type, \ |
| 449 | .value._attr_name = _x, \ |
| 450 | }; \ |
| 451 | 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 |
| 452 | |
| 453 | /* |
| 454 | * Defines a plugin initialization function attribute attached to a |
| 455 | * specific plugin descriptor. |
| 456 | * |
| 457 | * _id: Plugin descriptor ID (C identifier). |
| 458 | * _x: Initialization function (bt_plugin_init_func). |
| 459 | */ |
| 460 | #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \ |
| 461 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x) |
| 462 | |
| 463 | /* |
| 464 | * Defines a plugin exit function attribute attached to a specific |
| 465 | * plugin descriptor. |
| 466 | * |
| 467 | * _id: Plugin descriptor ID (C identifier). |
| 468 | * _x: Exit function (bt_plugin_exit_func). |
| 469 | */ |
| 470 | #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \ |
| 471 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x) |
| 472 | |
| 473 | /* |
| 474 | * Defines an author attribute attached to a specific plugin descriptor. |
| 475 | * |
| 476 | * _id: Plugin descriptor ID (C identifier). |
| 477 | * _x: Author (C string). |
| 478 | */ |
| 479 | #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \ |
| 480 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x) |
| 481 | |
| 482 | /* |
| 483 | * Defines a license attribute attached to a specific plugin descriptor. |
| 484 | * |
| 485 | * _id: Plugin descriptor ID (C identifier). |
| 486 | * _x: License (C string). |
| 487 | */ |
| 488 | #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \ |
| 489 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x) |
| 490 | |
| 491 | /* |
| 492 | * Defines a description attribute attached to a specific plugin |
| 493 | * descriptor. |
| 494 | * |
| 495 | * _id: Plugin descriptor ID (C identifier). |
| 496 | * _x: Description (C string). |
| 497 | */ |
| 498 | #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \ |
| 499 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x) |
| 500 | |
| 501 | #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \ |
| 502 | {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,} |
| 503 | |
| 504 | /* |
| 505 | * Defines a version attribute attached to a specific plugin descriptor. |
| 506 | * |
| 507 | * _id: Plugin descriptor ID (C identifier). |
| 508 | * _major: Plugin's major version (uint32_t). |
| 509 | * _minor: Plugin's minor version (uint32_t). |
| 510 | * _patch: Plugin's patch version (uint32_t). |
| 511 | * _extra: Plugin's version extra information (C string). |
| 512 | */ |
| 513 | #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \ |
| 514 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra)) |
| 515 | |
| 516 | /* |
| 517 | * Defines a source component class descriptor with a custom ID. |
| 518 | * |
| 519 | * _id: ID (any valid C identifier except `auto`). |
| 520 | * _comp_class_id: Component class ID (C identifier). |
| 521 | * _name: Component class name (C string). |
| 522 | * _msg_iter_next_method: Component class's iterator next method |
| 523 | * (bt_component_class_source_message_iterator_next_method). |
| 524 | */ |
| 525 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \ |
| 526 | static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \ |
| 527 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ |
| 528 | .name = _name, \ |
| 529 | .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \ |
| 530 | .methods.source = { \ |
| 531 | .msg_iter_next = _msg_iter_next_method, \ |
| 532 | }, \ |
| 533 | }; \ |
| 534 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id |
| 535 | |
| 536 | /* |
| 537 | * Defines a filter component class descriptor with a custom ID. |
| 538 | * |
| 539 | * _id: ID (any valid C identifier except `auto`). |
| 540 | * _comp_class_id: Component class ID (C identifier). |
| 541 | * _name: Component class name (C string). |
| 542 | * _msg_iter_next_method: Component class's iterator next method |
| 543 | * (bt_component_class_filter_message_iterator_next_method). |
| 544 | */ |
| 545 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \ |
| 546 | static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \ |
| 547 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ |
| 548 | .name = _name, \ |
| 549 | .type = BT_COMPONENT_CLASS_TYPE_FILTER, \ |
| 550 | .methods.filter = { \ |
| 551 | .msg_iter_next = _msg_iter_next_method, \ |
| 552 | }, \ |
| 553 | }; \ |
| 554 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id |
| 555 | |
| 556 | /* |
| 557 | * Defines a sink component class descriptor with a custom ID. |
| 558 | * |
| 559 | * _id: ID (any valid C identifier except `auto`). |
| 560 | * _comp_class_id: Component class ID (C identifier). |
| 561 | * _name: Component class name (C string). |
| 562 | * _consume_method: Component class's iterator consume method |
| 563 | * (bt_component_class_sink_consume_method). |
| 564 | */ |
| 565 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \ |
| 566 | static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \ |
| 567 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ |
| 568 | .name = _name, \ |
| 569 | .type = BT_COMPONENT_CLASS_TYPE_SINK, \ |
| 570 | .methods.sink = { \ |
| 571 | .consume = _consume_method, \ |
| 572 | }, \ |
| 573 | }; \ |
| 574 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id |
| 575 | |
| 576 | /* |
| 577 | * Defines a component class descriptor attribute (generic, internal |
| 578 | * use). |
| 579 | * |
| 580 | * _id: Plugin descriptor ID (C identifier). |
| 581 | * _comp_class_id: Component class ID (C identifier). |
| 582 | * _type: Component class type (`source`, `filter`, or `sink`). |
| 583 | * _attr_name: Name of the attribute (C identifier). |
| 584 | * _attr_type: Type of the attribute |
| 585 | * (enum __bt_plugin_descriptor_attribute_type). |
| 586 | * _x: Value. |
| 587 | */ |
| 588 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \ |
| 589 | static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \ |
| 590 | .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \ |
| 591 | .type_name = #_attr_name, \ |
| 592 | .type = _attr_type, \ |
| 593 | .value._attr_name = _x, \ |
| 594 | }; \ |
| 595 | static struct __bt_plugin_component_class_descriptor_attribute const * const __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS = &__bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name |
| 596 | |
| 597 | /* |
| 598 | * Defines a description attribute attached to a specific source |
| 599 | * component class descriptor. |
| 600 | * |
| 601 | * _id: Plugin descriptor ID (C identifier). |
| 602 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 603 | * _x: Description (C string). |
| 604 | */ |
| 605 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \ |
| 606 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x) |
| 607 | |
| 608 | /* |
| 609 | * Defines a description attribute attached to a specific filter |
| 610 | * component class descriptor. |
| 611 | * |
| 612 | * _id: Plugin descriptor ID (C identifier). |
| 613 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 614 | * _x: Description (C string). |
| 615 | */ |
| 616 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \ |
| 617 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x) |
| 618 | |
| 619 | /* |
| 620 | * Defines a description attribute attached to a specific sink |
| 621 | * component class descriptor. |
| 622 | * |
| 623 | * _id: Plugin descriptor ID (C identifier). |
| 624 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 625 | * _x: Description (C string). |
| 626 | */ |
| 627 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \ |
| 628 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x) |
| 629 | |
| 630 | /* |
| 631 | * Defines a help attribute attached to a specific source component |
| 632 | * class descriptor. |
| 633 | * |
| 634 | * _id: Plugin descriptor ID (C identifier). |
| 635 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 636 | * _x: Help (C string). |
| 637 | */ |
| 638 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \ |
| 639 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x) |
| 640 | |
| 641 | /* |
| 642 | * Defines a help attribute attached to a specific filter component |
| 643 | * class descriptor. |
| 644 | * |
| 645 | * _id: Plugin descriptor ID (C identifier). |
| 646 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 647 | * _x: Help (C string). |
| 648 | */ |
| 649 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \ |
| 650 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x) |
| 651 | |
| 652 | /* |
| 653 | * Defines a help attribute attached to a specific sink component class |
| 654 | * descriptor. |
| 655 | * |
| 656 | * _id: Plugin descriptor ID (C identifier). |
| 657 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 658 | * _x: Help (C string). |
| 659 | */ |
| 660 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \ |
| 661 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x) |
| 662 | |
| 663 | /* |
| 664 | * Defines an initialization method attribute attached to a specific |
| 665 | * source component class descriptor. |
| 666 | * |
| 667 | * _id: Plugin descriptor ID (C identifier). |
| 668 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 669 | * _x: Initialization method (bt_component_class_source_init_method). |
| 670 | */ |
| 671 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 672 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x) |
| 673 | |
| 674 | /* |
| 675 | * Defines an initialization method attribute attached to a specific |
| 676 | * filter component class descriptor. |
| 677 | * |
| 678 | * _id: Plugin descriptor ID (C identifier). |
| 679 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 680 | * _x: Initialization method (bt_component_class_filter_init_method). |
| 681 | */ |
| 682 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 683 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x) |
| 684 | |
| 685 | /* |
| 686 | * Defines an initialization method attribute attached to a specific |
| 687 | * sink component class descriptor. |
| 688 | * |
| 689 | * _id: Plugin descriptor ID (C identifier). |
| 690 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 691 | * _x: Initialization method (bt_component_class_sink_init_method). |
| 692 | */ |
| 693 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 694 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x) |
| 695 | |
| 696 | /* |
| 697 | * Defines a finalization method attribute attached to a specific source |
| 698 | * component class descriptor. |
| 699 | * |
| 700 | * _id: Plugin descriptor ID (C identifier). |
| 701 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 702 | * _x: Finalize method (bt_component_class_source_finalize_method). |
| 703 | */ |
| 704 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 705 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x) |
| 706 | |
| 707 | /* |
| 708 | * Defines a finalization method attribute attached to a specific filter |
| 709 | * component class descriptor. |
| 710 | * |
| 711 | * _id: Plugin descriptor ID (C identifier). |
| 712 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 713 | * _x: Finalize method (bt_component_class_filter_finalize_method). |
| 714 | */ |
| 715 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 716 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x) |
| 717 | |
| 718 | /* |
| 719 | * Defines a finalization method attribute attached to a specific sink |
| 720 | * component class descriptor. |
| 721 | * |
| 722 | * _id: Plugin descriptor ID (C identifier). |
| 723 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 724 | * _x: Finalize method (bt_component_class_sink_finalize_method). |
| 725 | */ |
| 726 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 727 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x) |
| 728 | |
| 729 | /* |
| 730 | * Defines a query method attribute attached to a specific source |
| 731 | * component class descriptor. |
| 732 | * |
| 733 | * _id: Plugin descriptor ID (C identifier). |
| 734 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 735 | * _x: Finalize method (bt_component_class_source_query_method). |
| 736 | */ |
| 737 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 738 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x) |
| 739 | |
| 740 | /* |
| 741 | * Defines a query method attribute attached to a specific filter |
| 742 | * component class descriptor. |
| 743 | * |
| 744 | * _id: Plugin descriptor ID (C identifier). |
| 745 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 746 | * _x: Finalize method (bt_component_class_filter_query_method). |
| 747 | */ |
| 748 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 749 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x) |
| 750 | |
| 751 | /* |
| 752 | * Defines a query method attribute attached to a specific sink |
| 753 | * component class descriptor. |
| 754 | * |
| 755 | * _id: Plugin descriptor ID (C identifier). |
| 756 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 757 | * _x: Finalize method (bt_component_class_sink_query_method). |
| 758 | */ |
| 759 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 760 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x) |
| 761 | |
| 762 | /* |
| 763 | * Defines an input port connected method attribute attached to a |
| 764 | * specific filter component class descriptor. |
| 765 | * |
| 766 | * _id: Plugin descriptor ID (C identifier). |
| 767 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 768 | * _x: Port connected method |
| 769 | * (bt_component_class_filter_input_port_connected_method). |
| 770 | */ |
| 771 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 772 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_input_port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD, _id, _comp_class_id, filter, _x) |
| 773 | |
| 774 | /* |
| 775 | * Defines an input port connected method attribute attached to a |
| 776 | * specific sink component class descriptor. |
| 777 | * |
| 778 | * _id: Plugin descriptor ID (C identifier). |
| 779 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 780 | * _x: Port connected method |
| 781 | * (bt_component_class_sink_input_port_connected_method). |
| 782 | */ |
| 783 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 784 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_input_port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD, _id, _comp_class_id, sink, _x) |
| 785 | |
| 786 | /* |
| 787 | * Defines an output port connected method attribute attached to a |
| 788 | * specific source component class descriptor. |
| 789 | * |
| 790 | * _id: Plugin descriptor ID (C identifier). |
| 791 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 792 | * _x: Port connected method |
| 793 | * (bt_component_class_source_output_port_connected_method). |
| 794 | */ |
| 795 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 796 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_output_port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD, _id, _comp_class_id, source, _x) |
| 797 | |
| 798 | /* |
| 799 | * Defines an output port connected method attribute attached to a |
| 800 | * specific filter component class descriptor. |
| 801 | * |
| 802 | * _id: Plugin descriptor ID (C identifier). |
| 803 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 804 | * _x: Port connected method |
| 805 | * (bt_component_class_filter_output_port_connected_method). |
| 806 | */ |
| 807 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 808 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_output_port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD, _id, _comp_class_id, filter, _x) |
| 809 | |
| 810 | /* |
| 811 | * Defines a "graph is configured" method attribute attached to a |
| 812 | * specific sink component class descriptor. |
| 813 | * |
| 814 | * _id: Plugin descriptor ID (C identifier). |
| 815 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 816 | * _x: "Graph is configured" method |
| 817 | * (bt_component_class_sink_graph_is_configured_method). |
| 818 | */ |
| 819 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 820 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_graph_is_configured_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD, _id, _comp_class_id, sink, _x) |
| 821 | |
| 822 | /* |
| 823 | * Defines an iterator initialization method attribute attached to a |
| 824 | * specific source component class descriptor. |
| 825 | * |
| 826 | * _id: Plugin descriptor ID (C identifier). |
| 827 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 828 | * _x: Iterator initialization method |
| 829 | * (bt_component_class_source_message_iterator_init_method). |
| 830 | */ |
| 831 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 832 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD, _id, _comp_class_id, source, _x) |
| 833 | |
| 834 | /* |
| 835 | * Defines an iterator finalize method attribute attached to a specific |
| 836 | * source component class descriptor. |
| 837 | * |
| 838 | * _id: Plugin descriptor ID (C identifier). |
| 839 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 840 | * _x: Iterator finalize method |
| 841 | * (bt_component_class_source_message_iterator_finalize_method). |
| 842 | */ |
| 843 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 844 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _id, _comp_class_id, source, _x) |
| 845 | |
| 846 | /* |
| 847 | * Defines an iterator "seek nanoseconds from origin" method attribute |
| 848 | * attached to a specific source component class descriptor. |
| 849 | * |
| 850 | * _id: Plugin descriptor ID (C identifier). |
| 851 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 852 | * _x: Iterator "seek nanoseconds from origin" method |
| 853 | * (bt_component_class_source_message_iterator_seek_ns_from_origin_method). |
| 854 | */ |
| 855 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 856 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, source, _x) |
| 857 | |
| 858 | /* |
| 859 | * Defines an iterator "seek beginning" method attribute attached to a |
| 860 | * specific source component class descriptor. |
| 861 | * |
| 862 | * _id: Plugin descriptor ID (C identifier). |
| 863 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 864 | * _x: Iterator "seek beginning" method |
| 865 | * (bt_component_class_source_message_iterator_seek_beginning_method). |
| 866 | */ |
| 867 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 868 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _id, _comp_class_id, source, _x) |
| 869 | |
| 870 | /* |
| 871 | * Defines an iterator "can seek nanoseconds from origin" method |
| 872 | * attribute attached to a specific source component class descriptor. |
| 873 | * |
| 874 | * _id: Plugin descriptor ID (C identifier). |
| 875 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 876 | * _x: Iterator "can seek nanoseconds from origin" method |
| 877 | * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method). |
| 878 | */ |
| 879 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 880 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, source, _x) |
| 881 | |
| 882 | /* |
| 883 | * Defines an iterator "can seek beginning" method attribute attached to a |
| 884 | * specific source component class descriptor. |
| 885 | * |
| 886 | * _id: Plugin descriptor ID (C identifier). |
| 887 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 888 | * _x: Iterator "can seek beginning" method |
| 889 | * (bt_component_class_source_message_iterator_can_seek_beginning_method). |
| 890 | */ |
| 891 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 892 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _id, _comp_class_id, source, _x) |
| 893 | |
| 894 | /* |
| 895 | * Defines an iterator initialization method attribute attached to a |
| 896 | * specific filter component class descriptor. |
| 897 | * |
| 898 | * _id: Plugin descriptor ID (C identifier). |
| 899 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 900 | * _x: Iterator initialization method |
| 901 | * (bt_component_class_filter_message_iterator_init_method). |
| 902 | */ |
| 903 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 904 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD, _id, _comp_class_id, filter, _x) |
| 905 | |
| 906 | /* |
| 907 | * Defines an iterator finalize method attribute attached to a specific |
| 908 | * filter component class descriptor. |
| 909 | * |
| 910 | * _id: Plugin descriptor ID (C identifier). |
| 911 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 912 | * _x: Iterator finalize method |
| 913 | * (bt_component_class_filter_message_iterator_finalize_method). |
| 914 | */ |
| 915 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 916 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _id, _comp_class_id, filter, _x) |
| 917 | |
| 918 | /* |
| 919 | * Defines an iterator "seek nanoseconds from origin" method attribute |
| 920 | * attached to a specific filter component class descriptor. |
| 921 | * |
| 922 | * _id: Plugin descriptor ID (C identifier). |
| 923 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 924 | * _x: Iterator "seek nanoseconds from origin" method |
| 925 | * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method). |
| 926 | */ |
| 927 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 928 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, filter, _x) |
| 929 | |
| 930 | /* |
| 931 | * Defines an iterator "seek beginning" method attribute attached to a |
| 932 | * specific filter component class descriptor. |
| 933 | * |
| 934 | * _id: Plugin descriptor ID (C identifier). |
| 935 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 936 | * _x: Iterator "seek beginning" method |
| 937 | * (bt_component_class_filter_message_iterator_seek_beginning_method). |
| 938 | */ |
| 939 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 940 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _id, _comp_class_id, filter, _x) |
| 941 | |
| 942 | /* |
| 943 | * Defines an iterator "can seek nanoseconds from origin" method |
| 944 | * attribute attached to a specific filter component class descriptor. |
| 945 | * |
| 946 | * _id: Plugin descriptor ID (C identifier). |
| 947 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 948 | * _x: Iterator "can seek nanoseconds from origin" method |
| 949 | * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method). |
| 950 | */ |
| 951 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 952 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, filter, _x) |
| 953 | |
| 954 | /* |
| 955 | * Defines an iterator "can seek beginning" method attribute attached to a |
| 956 | * specific filter component class descriptor. |
| 957 | * |
| 958 | * _id: Plugin descriptor ID (C identifier). |
| 959 | * _comp_class_id: Component class descriptor ID (C identifier). |
| 960 | * _x: Iterator "can seek beginning" method |
| 961 | * (bt_component_class_filter_message_iterator_can_seek_beginning_method). |
| 962 | */ |
| 963 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
| 964 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _id, _comp_class_id, filter, _x) |
| 965 | |
| 966 | /* |
| 967 | * Defines a plugin descriptor with an automatic ID. |
| 968 | * |
| 969 | * _name: Plugin's name (C string). |
| 970 | */ |
| 971 | #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name) |
| 972 | |
| 973 | /* |
| 974 | * Defines a plugin initialization function attribute attached to the |
| 975 | * automatic plugin descriptor. |
| 976 | * |
| 977 | * _x: Initialization function (bt_plugin_init_func). |
| 978 | */ |
| 979 | #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x) |
| 980 | |
| 981 | /* |
| 982 | * Defines a plugin exit function attribute attached to the automatic |
| 983 | * plugin descriptor. |
| 984 | * |
| 985 | * _x: Exit function (bt_plugin_exit_func). |
| 986 | */ |
| 987 | #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x) |
| 988 | |
| 989 | /* |
| 990 | * Defines an author attribute attached to the automatic plugin |
| 991 | * descriptor. |
| 992 | * |
| 993 | * _x: Author (C string). |
| 994 | */ |
| 995 | #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x) |
| 996 | |
| 997 | /* |
| 998 | * Defines a license attribute attached to the automatic plugin |
| 999 | * descriptor. |
| 1000 | * |
| 1001 | * _x: License (C string). |
| 1002 | */ |
| 1003 | #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x) |
| 1004 | |
| 1005 | /* |
| 1006 | * Defines a description attribute attached to the automatic plugin |
| 1007 | * descriptor. |
| 1008 | * |
| 1009 | * _x: Description (C string). |
| 1010 | */ |
| 1011 | #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x) |
| 1012 | |
| 1013 | /* |
| 1014 | * Defines a version attribute attached to the automatic plugin |
| 1015 | * descriptor. |
| 1016 | * |
| 1017 | * _major: Plugin's major version (uint32_t). |
| 1018 | * _minor: Plugin's minor version (uint32_t). |
| 1019 | * _patch: Plugin's patch version (uint32_t). |
| 1020 | * _extra: Plugin's version extra information (C string). |
| 1021 | */ |
| 1022 | #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra) |
| 1023 | |
| 1024 | /* |
| 1025 | * Defines a source component class attached to the automatic plugin |
| 1026 | * descriptor. Its ID is the same as its name, hence its name must be a |
| 1027 | * C identifier in this version. |
| 1028 | * |
| 1029 | * _name: Component class name (C identifier). |
| 1030 | * _msg_iter_next_method: Component class's iterator next method |
| 1031 | * (bt_component_class_source_message_iterator_next_method). |
| 1032 | */ |
| 1033 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _msg_iter_next_method) \ |
| 1034 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method) |
| 1035 | |
| 1036 | /* |
| 1037 | * Defines a filter component class attached to the automatic plugin |
| 1038 | * descriptor. Its ID is the same as its name, hence its name must be a |
| 1039 | * C identifier in this version. |
| 1040 | * |
| 1041 | * _name: Component class name (C identifier). |
| 1042 | * _msg_iter_next_method: Component class's iterator next method |
| 1043 | * (bt_component_class_filter_message_iterator_next_method). |
| 1044 | */ |
| 1045 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _msg_iter_next_method) \ |
| 1046 | BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method) |
| 1047 | |
| 1048 | /* |
| 1049 | * Defines a sink component class attached to the automatic plugin |
| 1050 | * descriptor. Its ID is the same as its name, hence its name must be a |
| 1051 | * C identifier in this version. |
| 1052 | * |
| 1053 | * _name: Component class name (C identifier). |
| 1054 | * _consume_method: Component class's consume method |
| 1055 | * (bt_component_class_sink_consume_method). |
| 1056 | */ |
| 1057 | #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \ |
| 1058 | BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method) |
| 1059 | |
| 1060 | /* |
| 1061 | * Defines a description attribute attached to a source component class |
| 1062 | * descriptor which is attached to the automatic plugin descriptor. |
| 1063 | * |
| 1064 | * _name: Component class name (C identifier). |
| 1065 | * _x: Description (C string). |
| 1066 | */ |
| 1067 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \ |
| 1068 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x) |
| 1069 | |
| 1070 | /* |
| 1071 | * Defines a description attribute attached to a filter component class |
| 1072 | * descriptor which is attached to the automatic plugin descriptor. |
| 1073 | * |
| 1074 | * _name: Component class name (C identifier). |
| 1075 | * _x: Description (C string). |
| 1076 | */ |
| 1077 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \ |
| 1078 | BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x) |
| 1079 | |
| 1080 | /* |
| 1081 | * Defines a description attribute attached to a sink component class |
| 1082 | * descriptor which is attached to the automatic plugin descriptor. |
| 1083 | * |
| 1084 | * _name: Component class name (C identifier). |
| 1085 | * _x: Description (C string). |
| 1086 | */ |
| 1087 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \ |
| 1088 | BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x) |
| 1089 | |
| 1090 | /* |
| 1091 | * Defines a help attribute attached to a source component class |
| 1092 | * descriptor which is attached to the automatic plugin descriptor. |
| 1093 | * |
| 1094 | * _name: Component class name (C identifier). |
| 1095 | * _x: Help (C string). |
| 1096 | */ |
| 1097 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \ |
| 1098 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x) |
| 1099 | |
| 1100 | /* |
| 1101 | * Defines a help attribute attached to a filter component class |
| 1102 | * descriptor which is attached to the automatic plugin descriptor. |
| 1103 | * |
| 1104 | * _name: Component class name (C identifier). |
| 1105 | * _x: Help (C string). |
| 1106 | */ |
| 1107 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \ |
| 1108 | BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x) |
| 1109 | |
| 1110 | /* |
| 1111 | * Defines a help attribute attached to a sink component class |
| 1112 | * descriptor which is attached to the automatic plugin descriptor. |
| 1113 | * |
| 1114 | * _name: Component class name (C identifier). |
| 1115 | * _x: Help (C string). |
| 1116 | */ |
| 1117 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \ |
| 1118 | BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x) |
| 1119 | |
| 1120 | /* |
| 1121 | * Defines an initialization method attribute attached to a source |
| 1122 | * component class descriptor which is attached to the automatic plugin |
| 1123 | * descriptor. |
| 1124 | * |
| 1125 | * _name: Component class name (C identifier). |
| 1126 | * _x: Initialization method (bt_component_class_source_init_method). |
| 1127 | */ |
| 1128 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ |
| 1129 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) |
| 1130 | |
| 1131 | /* |
| 1132 | * Defines an initialization method attribute attached to a filter |
| 1133 | * component class descriptor which is attached to the automatic plugin |
| 1134 | * descriptor. |
| 1135 | * |
| 1136 | * _name: Component class name (C identifier). |
| 1137 | * _x: Initialization method (bt_component_class_filter_init_method). |
| 1138 | */ |
| 1139 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ |
| 1140 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) |
| 1141 | |
| 1142 | /* |
| 1143 | * Defines an initialization method attribute attached to a sink |
| 1144 | * component class descriptor which is attached to the automatic plugin |
| 1145 | * descriptor. |
| 1146 | * |
| 1147 | * _name: Component class name (C identifier). |
| 1148 | * _x: Initialization method (bt_component_class_sink_init_method). |
| 1149 | */ |
| 1150 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ |
| 1151 | BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) |
| 1152 | |
| 1153 | /* |
| 1154 | * Defines a finalization method attribute attached to a source component |
| 1155 | * class descriptor which is attached to the automatic plugin |
| 1156 | * descriptor. |
| 1157 | * |
| 1158 | * _name: Component class name (C identifier). |
| 1159 | * _x: Initialization method (bt_component_class_source_finalize_method). |
| 1160 | */ |
| 1161 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \ |
| 1162 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x) |
| 1163 | |
| 1164 | /* |
| 1165 | * Defines a finalization method attribute attached to a filter component |
| 1166 | * class descriptor which is attached to the automatic plugin |
| 1167 | * descriptor. |
| 1168 | * |
| 1169 | * _name: Component class name (C identifier). |
| 1170 | * _x: Initialization method (bt_component_class_filter_finalize_method). |
| 1171 | */ |
| 1172 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \ |
| 1173 | BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x) |
| 1174 | |
| 1175 | /* |
| 1176 | * Defines a finalization method attribute attached to a sink component class |
| 1177 | * descriptor which is attached to the automatic plugin descriptor. |
| 1178 | * |
| 1179 | * _name: Component class name (C identifier). |
| 1180 | * _x: Initialization method (bt_component_class_sink_finalize_method). |
| 1181 | */ |
| 1182 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \ |
| 1183 | BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x) |
| 1184 | |
| 1185 | /* |
| 1186 | * Defines a query method attribute attached to a source component |
| 1187 | * class descriptor which is attached to the automatic plugin |
| 1188 | * descriptor. |
| 1189 | * |
| 1190 | * _name: Component class name (C identifier). |
| 1191 | * _x: Initialization method (bt_component_class_source_query_method). |
| 1192 | */ |
| 1193 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
| 1194 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) |
| 1195 | |
| 1196 | /* |
| 1197 | * Defines a query method attribute attached to a filter component |
| 1198 | * class descriptor which is attached to the automatic plugin |
| 1199 | * descriptor. |
| 1200 | * |
| 1201 | * _name: Component class name (C identifier). |
| 1202 | * _x: Initialization method (bt_component_class_filter_query_method). |
| 1203 | */ |
| 1204 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
| 1205 | BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) |
| 1206 | |
| 1207 | /* |
| 1208 | * Defines a query method attribute attached to a sink component |
| 1209 | * class descriptor which is attached to the automatic plugin |
| 1210 | * descriptor. |
| 1211 | * |
| 1212 | * _name: Component class name (C identifier). |
| 1213 | * _x: Initialization method (bt_component_class_sink_query_method). |
| 1214 | */ |
| 1215 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
| 1216 | BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) |
| 1217 | |
| 1218 | /* |
| 1219 | * Defines an input port connected method attribute attached to a filter |
| 1220 | * component class descriptor which is attached to the automatic plugin |
| 1221 | * descriptor. |
| 1222 | * |
| 1223 | * _name: Component class name (C identifier). |
| 1224 | * _x: Port connected (bt_component_class_filter_input_port_connected_method). |
| 1225 | */ |
| 1226 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \ |
| 1227 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x) |
| 1228 | |
| 1229 | /* |
| 1230 | * Defines an input port connected method attribute attached to a sink |
| 1231 | * component class descriptor which is attached to the automatic plugin |
| 1232 | * descriptor. |
| 1233 | * |
| 1234 | * _name: Component class name (C identifier). |
| 1235 | * _x: Port connected (bt_component_class_sink_input_port_connected_method). |
| 1236 | */ |
| 1237 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \ |
| 1238 | BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x) |
| 1239 | |
| 1240 | /* |
| 1241 | * Defines an output port connected method attribute attached to a source |
| 1242 | * component class descriptor which is attached to the automatic plugin |
| 1243 | * descriptor. |
| 1244 | * |
| 1245 | * _name: Component class name (C identifier). |
| 1246 | * _x: Port connected (bt_component_class_source_output_port_connected_method). |
| 1247 | */ |
| 1248 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \ |
| 1249 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x) |
| 1250 | |
| 1251 | /* |
| 1252 | * Defines an output port connected method attribute attached to a filter |
| 1253 | * component class descriptor which is attached to the automatic plugin |
| 1254 | * descriptor. |
| 1255 | * |
| 1256 | * _name: Component class name (C identifier). |
| 1257 | * _x: Port connected (bt_component_class_filter_output_port_connected_method). |
| 1258 | */ |
| 1259 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \ |
| 1260 | BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x) |
| 1261 | |
| 1262 | /* |
| 1263 | * Defines a "graph is configured" method attribute attached to |
| 1264 | * a sink component class descriptor which is attached to the automatic |
| 1265 | * plugin descriptor. |
| 1266 | * |
| 1267 | * _name: Component class name (C identifier). |
| 1268 | * _x: "Graph is configured" method |
| 1269 | * (bt_component_class_sink_graph_is_configured_method). |
| 1270 | */ |
| 1271 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _x) \ |
| 1272 | BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _x) |
| 1273 | |
| 1274 | /* |
| 1275 | * Defines an iterator initialization method attribute attached to a |
| 1276 | * source component class descriptor which is attached to the automatic |
| 1277 | * plugin descriptor. |
| 1278 | * |
| 1279 | * _name: Component class name (C identifier). |
| 1280 | * _x: Iterator initialization method |
| 1281 | * (bt_component_class_source_message_iterator_init_method). |
| 1282 | */ |
| 1283 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \ |
| 1284 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x) |
| 1285 | |
| 1286 | /* |
| 1287 | * Defines an iterator finalize method attribute attached to a source |
| 1288 | * component class descriptor which is attached to the automatic plugin |
| 1289 | * descriptor. |
| 1290 | * |
| 1291 | * _name: Component class name (C identifier). |
| 1292 | * _x: Iterator finalize method |
| 1293 | * (bt_component_class_source_message_iterator_finalize_method). |
| 1294 | */ |
| 1295 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \ |
| 1296 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x) |
| 1297 | |
| 1298 | /* |
| 1299 | * Defines an iterator "seek nanoseconds from origin" method attribute |
| 1300 | * attached to a source component class descriptor which is attached to |
| 1301 | * the automatic plugin descriptor. |
| 1302 | * |
| 1303 | * _name: Component class name (C identifier). |
| 1304 | * _x: Iterator "seek nanoseconds from origin" method |
| 1305 | * (bt_component_class_source_message_iterator_seek_ns_from_origin_method). |
| 1306 | */ |
| 1307 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \ |
| 1308 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x) |
| 1309 | |
| 1310 | /* |
| 1311 | * Defines an iterator "seek beginning" method attribute |
| 1312 | * attached to a source component class descriptor which is attached to |
| 1313 | * the automatic plugin descriptor. |
| 1314 | * |
| 1315 | * _name: Component class name (C identifier). |
| 1316 | * _x: Iterator "seek beginning" method |
| 1317 | * (bt_component_class_source_message_iterator_seek_beginning_method). |
| 1318 | */ |
| 1319 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \ |
| 1320 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x) |
| 1321 | |
| 1322 | /* |
| 1323 | * Defines an iterator "can seek nanoseconds from origin" method |
| 1324 | * attribute attached to a source component class descriptor which is |
| 1325 | * attached to the automatic plugin descriptor. |
| 1326 | * |
| 1327 | * _name: Component class name (C identifier). |
| 1328 | * _x: Iterator "can seek nanoseconds from origin" method |
| 1329 | * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method). |
| 1330 | */ |
| 1331 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \ |
| 1332 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x) |
| 1333 | |
| 1334 | /* |
| 1335 | * Defines an iterator "can seek beginning" method attribute |
| 1336 | * attached to a source component class descriptor which is attached to |
| 1337 | * the automatic plugin descriptor. |
| 1338 | * |
| 1339 | * _name: Component class name (C identifier). |
| 1340 | * _x: Iterator "can seek beginning" method |
| 1341 | * (bt_component_class_source_message_iterator_can_seek_beginning_method). |
| 1342 | */ |
| 1343 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \ |
| 1344 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x) |
| 1345 | |
| 1346 | /* |
| 1347 | * Defines an iterator initialization method attribute attached to a |
| 1348 | * filter component class descriptor which is attached to the automatic |
| 1349 | * plugin descriptor. |
| 1350 | * |
| 1351 | * _name: Component class name (C identifier). |
| 1352 | * _x: Iterator initialization method |
| 1353 | * (bt_component_class_filter_message_iterator_init_method). |
| 1354 | */ |
| 1355 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \ |
| 1356 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x) |
| 1357 | |
| 1358 | /* |
| 1359 | * Defines an iterator finalize method attribute attached to a filter |
| 1360 | * component class descriptor which is attached to the automatic plugin |
| 1361 | * descriptor. |
| 1362 | * |
| 1363 | * _name: Component class name (C identifier). |
| 1364 | * _x: Iterator finalize method |
| 1365 | * (bt_component_class_filter_message_iterator_finalize_method). |
| 1366 | */ |
| 1367 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \ |
| 1368 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x) |
| 1369 | |
| 1370 | /* |
| 1371 | * Defines an iterator "seek nanoseconds from origin" method attribute |
| 1372 | * attached to a filter component class descriptor which is attached to |
| 1373 | * the automatic plugin descriptor. |
| 1374 | * |
| 1375 | * _name: Component class name (C identifier). |
| 1376 | * _x: Iterator "seek nanoseconds from origin" method |
| 1377 | * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method). |
| 1378 | */ |
| 1379 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \ |
| 1380 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x) |
| 1381 | |
| 1382 | /* |
| 1383 | * Defines an iterator "seek beginning" method attribute |
| 1384 | * attached to a filter component class descriptor which is attached to |
| 1385 | * the automatic plugin descriptor. |
| 1386 | * |
| 1387 | * _name: Component class name (C identifier). |
| 1388 | * _x: Iterator "seek beginning" method |
| 1389 | * (bt_component_class_filter_message_iterator_seek_beginning_method). |
| 1390 | */ |
| 1391 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \ |
| 1392 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x) |
| 1393 | |
| 1394 | /* |
| 1395 | * Defines an iterator "can seek nanoseconds from origin" method |
| 1396 | * attribute attached to a filter component class descriptor which is |
| 1397 | * attached to the automatic plugin descriptor. |
| 1398 | * |
| 1399 | * _name: Component class name (C identifier). |
| 1400 | * _x: Iterator "can seek nanoseconds from origin" method |
| 1401 | * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method). |
| 1402 | */ |
| 1403 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \ |
| 1404 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x) |
| 1405 | |
| 1406 | /* |
| 1407 | * Defines an iterator "can seek beginning" method attribute |
| 1408 | * attached to a filter component class descriptor which is attached to |
| 1409 | * the automatic plugin descriptor. |
| 1410 | * |
| 1411 | * _name: Component class name (C identifier). |
| 1412 | * _x: Iterator "can seek beginning" method |
| 1413 | * (bt_component_class_filter_message_iterator_can_seek_beginning_method). |
| 1414 | */ |
| 1415 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \ |
| 1416 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x) |
| 1417 | |
| 1418 | #define BT_PLUGIN_MODULE() \ |
| 1419 | static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \ |
| 1420 | _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \ |
| 1421 | _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \ |
| 1422 | \ |
| 1423 | static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \ |
| 1424 | _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \ |
| 1425 | _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \ |
| 1426 | \ |
| 1427 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \ |
| 1428 | _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \ |
| 1429 | _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \ |
| 1430 | \ |
| 1431 | 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; \ |
| 1432 | _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; \ |
| 1433 | _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; \ |
| 1434 | \ |
| 1435 | struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \ |
| 1436 | { \ |
| 1437 | return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \ |
| 1438 | } \ |
| 1439 | struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \ |
| 1440 | { \ |
| 1441 | return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \ |
| 1442 | } \ |
| 1443 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \ |
| 1444 | { \ |
| 1445 | return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \ |
| 1446 | } \ |
| 1447 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \ |
| 1448 | { \ |
| 1449 | return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \ |
| 1450 | } \ |
| 1451 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \ |
| 1452 | { \ |
| 1453 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \ |
| 1454 | } \ |
| 1455 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \ |
| 1456 | { \ |
| 1457 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \ |
| 1458 | } \ |
| 1459 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \ |
| 1460 | { \ |
| 1461 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \ |
| 1462 | } \ |
| 1463 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \ |
| 1464 | { \ |
| 1465 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \ |
| 1466 | } |
| 1467 | |
| 1468 | #ifdef __cplusplus |
| 1469 | } |
| 1470 | #endif |
| 1471 | |
| 1472 | #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */ |