1 #ifndef BABELTRACE2_PLUGIN_PLUGIN_DEV_H
2 #define BABELTRACE2_PLUGIN_PLUGIN_DEV_H
5 * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
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:
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
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
26 #ifndef __BT_IN_BABELTRACE_H
27 # error "Please include <babeltrace2/babeltrace.h> instead."
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>
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
44 #if defined(_WIN32) || defined(__CYGWIN__)
47 #define _BT_HIDDEN __attribute__((visibility("hidden")))
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
;
61 typedef bt_plugin_initialize_func_status (*bt_plugin_initialize_func
)(
62 bt_self_plugin
*plugin
);
64 /* Plugin exit function type */
65 typedef void (*bt_plugin_finalize_func
)(void);
67 /* Plugin descriptor: describes a single plugin (internal use) */
68 struct __bt_plugin_descriptor
{
71 } __attribute__((packed
));
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,
83 /* Plugin (user) version */
84 struct __bt_plugin_descriptor_version
{
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
;
96 /* Name of the attribute's type for debug purposes */
97 const char *type_name
;
99 /* Attribute's type */
100 enum __bt_plugin_descriptor_attribute_type type
;
102 /* Attribute's value (depends on attribute's type) */
104 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
105 bt_plugin_initialize_func init
;
107 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
108 bt_plugin_finalize_func exit
;
110 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
113 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
116 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
117 const char *description
;
119 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
120 struct __bt_plugin_descriptor_version version
;
122 } __attribute__((packed
));
124 /* Component class descriptor (internal use) */
125 struct __bt_plugin_component_class_descriptor
{
127 * Plugin descriptor to which to associate this component
130 const struct __bt_plugin_descriptor
*plugin_descriptor
;
132 /* Component class name */
135 /* Component class type */
136 bt_component_class_type type
;
138 /* Mandatory methods (depends on component class type) */
140 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
142 bt_message_iterator_class_next_method msg_iter_next
;
145 /* BT_COMPONENT_CLASS_TYPE_FILTER */
147 bt_message_iterator_class_next_method msg_iter_next
;
150 /* BT_COMPONENT_CLASS_TYPE_SINK */
152 bt_component_class_sink_consume_method consume
;
155 } __attribute__((packed
));
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,
176 /* Component class attribute (internal use) */
177 struct __bt_plugin_component_class_descriptor_attribute
{
179 * Component class plugin attribute to which to associate this
180 * component class attribute.
182 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
184 /* Name of the attribute's type for debug purposes */
185 const char *type_name
;
187 /* Attribute's type */
188 enum __bt_plugin_component_class_descriptor_attribute_type type
;
190 /* Attribute's value (depends on attribute's type) */
192 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
193 const char *description
;
195 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
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
;
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
;
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
;
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
;
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
;
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
;
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
;
229 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD */
230 bt_message_iterator_class_initialize_method msg_iter_initialize_method
;
232 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
233 bt_message_iterator_class_finalize_method msg_iter_finalize_method
;
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
;
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
;
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
;
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
;
247 } __attribute__((packed
));
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);
259 * Variable attributes for a plugin descriptor pointer to be added to
260 * the plugin descriptor section (internal use).
263 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
264 __attribute__((section("__DATA,btp_desc"), used))
266 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
267 __start___bt_plugin_descriptors
269 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
270 __stop___bt_plugin_descriptors
272 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
273 __asm("section$start$__DATA$btp_desc")
275 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
276 __asm("section$end$__DATA$btp_desc")
280 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
281 __attribute__((section("__bt_plugin_descriptors"), used))
283 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
284 __start___bt_plugin_descriptors
286 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
287 __stop___bt_plugin_descriptors
289 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
291 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
295 * Variable attributes for a plugin attribute pointer to be added to
296 * the plugin attribute section (internal use).
299 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
300 __attribute__((section("__DATA,btp_desc_att"), used))
302 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
303 __start___bt_plugin_descriptor_attributes
305 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
306 __stop___bt_plugin_descriptor_attributes
308 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
309 __asm("section$start$__DATA$btp_desc_att")
311 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
312 __asm("section$end$__DATA$btp_desc_att")
316 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
317 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
319 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
320 __start___bt_plugin_descriptor_attributes
322 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
323 __stop___bt_plugin_descriptor_attributes
325 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
327 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
331 * Variable attributes for a component class descriptor pointer to be
332 * added to the component class descriptor section (internal use).
335 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
336 __attribute__((section("__DATA,btp_cc_desc"), used))
338 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
339 __start___bt_plugin_component_class_descriptors
341 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
342 __stop___bt_plugin_component_class_descriptors
344 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
345 __asm("section$start$__DATA$btp_cc_desc")
347 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
348 __asm("section$end$__DATA$btp_cc_desc")
352 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
353 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
355 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
356 __start___bt_plugin_component_class_descriptors
358 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
359 __stop___bt_plugin_component_class_descriptors
361 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
363 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
367 * Variable attributes for a component class descriptor attribute
368 * pointer to be added to the component class descriptor attribute
369 * section (internal use).
372 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
373 __attribute__((section("__DATA,btp_cc_desc_att"), used))
375 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
376 __start___bt_plugin_component_class_descriptor_attributes
378 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
379 __stop___bt_plugin_component_class_descriptor_attributes
381 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
382 __asm("section$start$__DATA$btp_cc_desc_att")
384 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
385 __asm("section$end$__DATA$btp_cc_desc_att")
389 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
390 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
392 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
393 __start___bt_plugin_component_class_descriptor_attributes
395 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
396 __stop___bt_plugin_component_class_descriptor_attributes
398 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
400 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
404 * Declares a plugin descriptor pointer variable with a custom ID.
406 * _id: ID (any valid C identifier except `auto`).
408 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
411 * Defines a plugin descriptor with a custom ID.
413 * _id: ID (any valid C identifier except `auto`).
414 * _name: Plugin's name (C string).
416 #define BT_PLUGIN_WITH_ID(_id, _name) \
417 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
420 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
423 * Defines a plugin attribute (generic, internal use).
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).
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 }, \
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
440 * Defines a plugin initialization function attribute attached to a
441 * specific plugin descriptor.
443 * _id: Plugin descriptor ID (C identifier).
444 * _x: Initialization function (bt_plugin_initialize_func).
446 #define BT_PLUGIN_INITIALIZE_WITH_ID(_id, _x) \
447 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
450 * Defines a plugin exit function attribute attached to a specific
453 * _id: Plugin descriptor ID (C identifier).
454 * _x: Exit function (bt_plugin_finalize_func).
456 #define BT_PLUGIN_FINALIZE_WITH_ID(_id, _x) \
457 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
460 * Defines an author attribute attached to a specific plugin descriptor.
462 * _id: Plugin descriptor ID (C identifier).
463 * _x: Author (C string).
465 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
466 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
469 * Defines a license attribute attached to a specific plugin descriptor.
471 * _id: Plugin descriptor ID (C identifier).
472 * _x: License (C string).
474 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
475 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
478 * Defines a description attribute attached to a specific plugin
481 * _id: Plugin descriptor ID (C identifier).
482 * _x: Description (C string).
484 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
485 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
487 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
488 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
491 * Defines a version attribute attached to a specific plugin descriptor.
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).
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))
503 * Defines a source component class descriptor with a custom ID.
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).
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, \
515 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
516 .methods = { .source = { .msg_iter_next = _msg_iter_next_method } }, \
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
521 * Defines a filter component class descriptor with a custom ID.
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).
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, \
533 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
534 .methods = { .filter = { .msg_iter_next = _msg_iter_next_method } }, \
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
539 * Defines a sink component class descriptor with a custom ID.
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).
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, \
551 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
552 .methods = { .sink = { .consume = _consume_method } }, \
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
557 * Defines a component class descriptor attribute (generic, internal
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).
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 }, \
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
578 * Defines a description attribute attached to a specific source
579 * component class descriptor.
581 * _id: Plugin descriptor ID (C identifier).
582 * _comp_class_id: Component class descriptor ID (C identifier).
583 * _x: Description (C string).
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)
589 * Defines a description attribute attached to a specific filter
590 * component class descriptor.
592 * _id: Plugin descriptor ID (C identifier).
593 * _comp_class_id: Component class descriptor ID (C identifier).
594 * _x: Description (C string).
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)
600 * Defines a description attribute attached to a specific sink
601 * component class descriptor.
603 * _id: Plugin descriptor ID (C identifier).
604 * _comp_class_id: Component class descriptor ID (C identifier).
605 * _x: Description (C string).
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)
611 * Defines a help attribute attached to a specific source component
614 * _id: Plugin descriptor ID (C identifier).
615 * _comp_class_id: Component class descriptor ID (C identifier).
616 * _x: Help (C string).
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)
622 * Defines a help attribute attached to a specific filter component
625 * _id: Plugin descriptor ID (C identifier).
626 * _comp_class_id: Component class descriptor ID (C identifier).
627 * _x: Help (C string).
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)
633 * Defines a help attribute attached to a specific sink component class
636 * _id: Plugin descriptor ID (C identifier).
637 * _comp_class_id: Component class descriptor ID (C identifier).
638 * _x: Help (C string).
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)
644 * Defines an initialization method attribute attached to a specific
645 * source component class descriptor.
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).
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)
655 * Defines an initialization method attribute attached to a specific
656 * filter component class descriptor.
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).
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)
666 * Defines an initialization method attribute attached to a specific
667 * sink component class descriptor.
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).
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)
677 * Defines a "get supported MIP versions" attribute attached to a
678 * specific source component class descriptor.
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).
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)
688 * Defines a "get supported MIP versions" attribute attached to a
689 * specific filter component class descriptor.
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).
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)
699 * Defines a "get supported MIP versions" attribute attached to a
700 * specific sink component class descriptor.
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).
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)
710 * Defines a finalization method attribute attached to a specific source
711 * component class descriptor.
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).
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)
721 * Defines a finalization method attribute attached to a specific filter
722 * component class descriptor.
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).
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)
732 * Defines a finalization method attribute attached to a specific sink
733 * component class descriptor.
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).
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)
743 * Defines a query method attribute attached to a specific source
744 * component class descriptor.
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).
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)
754 * Defines a query method attribute attached to a specific filter
755 * component class descriptor.
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).
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)
765 * Defines a query method attribute attached to a specific sink
766 * component class descriptor.
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).
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)
776 * Defines an input port connected method attribute attached to a
777 * specific filter component class descriptor.
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).
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)
788 * Defines an input port connected method attribute attached to a
789 * specific sink component class descriptor.
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).
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)
800 * Defines an output port connected method attribute attached to a
801 * specific source component class descriptor.
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).
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)
812 * Defines an output port connected method attribute attached to a
813 * specific filter component class descriptor.
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).
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)
824 * Defines a "graph is configured" method attribute attached to a
825 * specific sink component class descriptor.
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).
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)
836 * Defines an iterator initialization method attribute attached to a
837 * specific source component class descriptor.
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).
844 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_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)
848 * Defines an iterator finalize method attribute attached to a specific
849 * source component class descriptor.
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).
856 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_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)
860 * Defines an iterator "seek nanoseconds from origin" and "can seek nanoseconds
861 * from origin" method attributes attached to a specific source component class
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).
871 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_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)
876 * Defines an iterator "seek beginning" and "can seek beginning" method
877 * attributes attached to a specific source component class descriptor.
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).
886 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_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)
891 * Defines an iterator initialization method attribute attached to a
892 * specific filter component class descriptor.
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).
899 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_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)
903 * Defines an iterator finalize method attribute attached to a specific
904 * filter component class descriptor.
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).
911 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_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)
915 * Defines an iterator "seek nanoseconds" and "can seek nanoseconds from origin"
916 * method attributes attached to a specific filter component class descriptor.
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).
925 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_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)
930 * Defines an iterator "seek beginning" and "can seek beginning" method
931 * attributes attached to a specific filter component class descriptor.
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).
940 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_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);
945 * Defines a plugin descriptor with an automatic ID.
947 * _name: Plugin's name (C string).
949 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
952 * Defines a plugin initialization function attribute attached to the
953 * automatic plugin descriptor.
955 * _x: Initialization function (bt_plugin_initialize_func).
957 #define BT_PLUGIN_INITIALIZE(_x) BT_PLUGIN_INITIALIZE_WITH_ID(auto, _x)
960 * Defines a plugin exit function attribute attached to the automatic
963 * _x: Exit function (bt_plugin_finalize_func).
965 #define BT_PLUGIN_FINALIZE(_x) BT_PLUGIN_FINALIZE_WITH_ID(auto, _x)
968 * Defines an author attribute attached to the automatic plugin
971 * _x: Author (C string).
973 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
976 * Defines a license attribute attached to the automatic plugin
979 * _x: License (C string).
981 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
984 * Defines a description attribute attached to the automatic plugin
987 * _x: Description (C string).
989 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
992 * Defines a version attribute attached to the automatic plugin
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).
1000 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
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.
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).
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)
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.
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).
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)
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.
1031 * _name: Component class name (C identifier).
1032 * _consume_method: Component class's consume method
1033 * (bt_component_class_sink_consume_method).
1035 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1036 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1039 * Defines a description attribute attached to a source component class
1040 * descriptor which is attached to the automatic plugin descriptor.
1042 * _name: Component class name (C identifier).
1043 * _x: Description (C string).
1045 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1046 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1049 * Defines a description attribute attached to a filter component class
1050 * descriptor which is attached to the automatic plugin descriptor.
1052 * _name: Component class name (C identifier).
1053 * _x: Description (C string).
1055 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1056 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1059 * Defines a description attribute attached to a sink component class
1060 * descriptor which is attached to the automatic plugin descriptor.
1062 * _name: Component class name (C identifier).
1063 * _x: Description (C string).
1065 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1066 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1069 * Defines a help attribute attached to a source component class
1070 * descriptor which is attached to the automatic plugin descriptor.
1072 * _name: Component class name (C identifier).
1073 * _x: Help (C string).
1075 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1076 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1079 * Defines a help attribute attached to a filter component class
1080 * descriptor which is attached to the automatic plugin descriptor.
1082 * _name: Component class name (C identifier).
1083 * _x: Help (C string).
1085 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1086 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1089 * Defines a help attribute attached to a sink component class
1090 * descriptor which is attached to the automatic plugin descriptor.
1092 * _name: Component class name (C identifier).
1093 * _x: Help (C string).
1095 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1096 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1099 * Defines an initialization method attribute attached to a source
1100 * component class descriptor which is attached to the automatic plugin
1103 * _name: Component class name (C identifier).
1104 * _x: Initialization method (bt_component_class_source_initialize_method).
1106 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _x) \
1107 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _x)
1110 * Defines an initialization method attribute attached to a filter
1111 * component class descriptor which is attached to the automatic plugin
1114 * _name: Component class name (C identifier).
1115 * _x: Initialization method (bt_component_class_filter_initialize_method).
1117 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _x) \
1118 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _x)
1121 * Defines an initialization method attribute attached to a sink
1122 * component class descriptor which is attached to the automatic plugin
1125 * _name: Component class name (C identifier).
1126 * _x: Initialization method (bt_component_class_sink_initialize_method).
1128 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _x) \
1129 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _x)
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.
1136 * _name: Component class name (C identifier).
1137 * _x: Initialization method (bt_component_class_source_get_supported_mip_versions_method).
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)
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.
1147 * _name: Component class name (C identifier).
1148 * _x: Initialization method (bt_component_class_filter_get_supported_mip_versions_method).
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)
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.
1158 * _name: Component class name (C identifier).
1159 * _x: Initialization method (bt_component_class_sink_get_supported_mip_versions_method).
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)
1165 * Defines a finalization method attribute attached to a source component
1166 * class descriptor which is attached to the automatic plugin
1169 * _name: Component class name (C identifier).
1170 * _x: Initialization method (bt_component_class_source_finalize_method).
1172 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1173 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1176 * Defines a finalization method attribute attached to a filter component
1177 * class descriptor which is attached to the automatic plugin
1180 * _name: Component class name (C identifier).
1181 * _x: Initialization method (bt_component_class_filter_finalize_method).
1183 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1184 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1187 * Defines a finalization method attribute attached to a sink component class
1188 * descriptor which is attached to the automatic plugin descriptor.
1190 * _name: Component class name (C identifier).
1191 * _x: Initialization method (bt_component_class_sink_finalize_method).
1193 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1194 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1197 * Defines a query method attribute attached to a source component
1198 * class descriptor which is attached to the automatic plugin
1201 * _name: Component class name (C identifier).
1202 * _x: Initialization method (bt_component_class_source_query_method).
1204 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1205 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1208 * Defines a query method attribute attached to a filter component
1209 * class descriptor which is attached to the automatic plugin
1212 * _name: Component class name (C identifier).
1213 * _x: Initialization method (bt_component_class_filter_query_method).
1215 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1216 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1219 * Defines a query method attribute attached to a sink component
1220 * class descriptor which is attached to the automatic plugin
1223 * _name: Component class name (C identifier).
1224 * _x: Initialization method (bt_component_class_sink_query_method).
1226 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1227 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1230 * Defines an input port connected method attribute attached to a filter
1231 * component class descriptor which is attached to the automatic plugin
1234 * _name: Component class name (C identifier).
1235 * _x: Port connected (bt_component_class_filter_input_port_connected_method).
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)
1241 * Defines an input port connected method attribute attached to a sink
1242 * component class descriptor which is attached to the automatic plugin
1245 * _name: Component class name (C identifier).
1246 * _x: Port connected (bt_component_class_sink_input_port_connected_method).
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)
1252 * Defines an output port connected method attribute attached to a source
1253 * component class descriptor which is attached to the automatic plugin
1256 * _name: Component class name (C identifier).
1257 * _x: Port connected (bt_component_class_source_output_port_connected_method).
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)
1263 * Defines an output port connected method attribute attached to a filter
1264 * component class descriptor which is attached to the automatic plugin
1267 * _name: Component class name (C identifier).
1268 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
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)
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.
1278 * _name: Component class name (C identifier).
1279 * _x: "Graph is configured" method
1280 * (bt_component_class_sink_graph_is_configured_method).
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)
1286 * Defines an iterator initialization method attribute attached to a
1287 * source component class descriptor which is attached to the automatic
1288 * plugin descriptor.
1290 * _name: Component class name (C identifier).
1291 * _x: Iterator initialization method
1292 * (bt_component_class_source_message_iterator_initialize_method).
1294 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INITIALIZE_METHOD(_name, _x) \
1295 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INITIALIZE_METHOD_WITH_ID(auto, _name, _x)
1298 * Defines an iterator finalize method attribute attached to a source
1299 * component class descriptor which is attached to the automatic plugin
1302 * _name: Component class name (C identifier).
1303 * _x: Iterator finalize method
1304 * (bt_component_class_source_message_iterator_finalize_method).
1306 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1307 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
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.
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).
1320 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
1321 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
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.
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).
1334 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1335 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1338 * Defines an iterator initialization method attribute attached to a
1339 * filter component class descriptor which is attached to the automatic
1340 * plugin descriptor.
1342 * _name: Component class name (C identifier).
1343 * _x: Iterator initialization method
1344 * (bt_component_class_filter_message_iterator_initialize_method).
1346 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INITIALIZE_METHOD(_name, _x) \
1347 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INITIALIZE_METHOD_WITH_ID(auto, _name, _x)
1350 * Defines an iterator finalize method attribute attached to a filter
1351 * component class descriptor which is attached to the automatic plugin
1354 * _name: Component class name (C identifier).
1355 * _x: Iterator finalize method
1356 * (bt_component_class_filter_message_iterator_finalize_method).
1358 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1359 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
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.
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).
1372 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
1373 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
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.
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).
1386 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1387 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
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; \
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; \
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; \
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; \
1406 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1408 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1410 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1412 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1414 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1416 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1418 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1420 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1422 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1424 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1426 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1428 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1430 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1432 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1434 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1436 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1443 #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */