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