1 #ifndef BABELTRACE_PLUGIN_PLUGIN_DEV_H
2 #define BABELTRACE_PLUGIN_PLUGIN_DEV_H
5 * This is the header that you need to include for the development of
6 * a Babeltrace plug-in.
8 * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
11 * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
13 * Permission is hereby granted, free of charge, to any person obtaining a copy
14 * of this software and associated documentation files (the "Software"), to deal
15 * in the Software without restriction, including without limitation the rights
16 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17 * copies of the Software, and to permit persons to whom the Software is
18 * furnished to do so, subject to the following conditions:
20 * The above copyright notice and this permission notice shall be included in
21 * all copies or substantial portions of the Software.
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
34 /* For enum bt_plugin_status */
35 #include <babeltrace/plugin/plugin-const.h>
37 /* For enum bt_component_class_type */
38 #include <babeltrace/graph/component-class-const.h>
40 /* For component class method type definitions */
41 #include <babeltrace/graph/component-class-source-const.h>
42 #include <babeltrace/graph/component-class-filter-const.h>
43 #include <babeltrace/graph/component-class-sink-const.h>
46 * _BT_HIDDEN: set the hidden attribute for internal functions
47 * On Windows, symbols are local unless explicitly exported,
48 * see https://gcc.gnu.org/wiki/Visibility
50 #if defined(_WIN32) || defined(__CYGWIN__)
53 #define _BT_HIDDEN __attribute__((visibility("hidden")))
61 * Plugin interface's version, not synced with Babeltrace's version
64 #define __BT_PLUGIN_VERSION_MAJOR 1
65 #define __BT_PLUGIN_VERSION_MINOR 0
67 /* Plugin initialization function type */
68 typedef enum bt_plugin_status (*bt_plugin_init_func
)(
69 const struct bt_plugin
*plugin
);
71 /* Plugin exit function type */
72 typedef enum bt_plugin_status (*bt_plugin_exit_func
)(void);
74 /* Plugin descriptor: describes a single plugin (internal use) */
75 struct __bt_plugin_descriptor
{
76 /* Plugin's interface major version number */
79 /* Plugin's interface minor version number */
84 } __attribute__((packed
));
86 /* Type of a plugin attribute (internal use) */
87 enum __bt_plugin_descriptor_attribute_type
{
88 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
89 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
90 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
91 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
92 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
93 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
96 /* Plugin (user) version */
97 struct __bt_plugin_descriptor_version
{
104 /* Plugin attribute (internal use) */
105 struct __bt_plugin_descriptor_attribute
{
106 /* Plugin descriptor to which to associate this attribute */
107 const struct __bt_plugin_descriptor
*plugin_descriptor
;
109 /* Name of the attribute's type for debug purposes */
110 const char *type_name
;
112 /* Attribute's type */
113 enum __bt_plugin_descriptor_attribute_type type
;
115 /* Attribute's value (depends on attribute's type) */
117 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
118 bt_plugin_init_func init
;
120 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
121 bt_plugin_exit_func exit
;
123 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
126 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
129 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
130 const char *description
;
132 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
133 struct __bt_plugin_descriptor_version version
;
135 } __attribute__((packed
));
137 /* Component class descriptor (internal use) */
138 struct __bt_plugin_component_class_descriptor
{
140 * Plugin descriptor to which to associate this component
143 const struct __bt_plugin_descriptor
*plugin_descriptor
;
145 /* Component class name */
148 /* Component class type */
149 enum bt_component_class_type type
;
151 /* Mandatory methods (depends on component class type) */
153 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
155 bt_component_class_source_notification_iterator_next_method notif_iter_next
;
158 /* BT_COMPONENT_CLASS_TYPE_FILTER */
160 bt_component_class_filter_notification_iterator_next_method notif_iter_next
;
163 /* BT_COMPONENT_CLASS_TYPE_SINK */
165 bt_component_class_sink_consume_method consume
;
168 } __attribute__((packed
));
170 /* Type of a component class attribute (internal use) */
171 enum __bt_plugin_component_class_descriptor_attribute_type
{
172 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
173 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
174 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD
= 2,
175 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 3,
176 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 4,
177 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD
= 5,
178 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD
= 6,
179 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 7,
180 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 8,
181 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD
= 9,
182 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD
= 10,
183 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD
= 11,
184 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD
= 12,
187 /* Component class attribute (internal use) */
188 struct __bt_plugin_component_class_descriptor_attribute
{
190 * Component class plugin attribute to which to associate this
191 * component class attribute.
193 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
195 /* Name of the attribute's type for debug purposes */
196 const char *type_name
;
198 /* Attribute's type */
199 enum __bt_plugin_component_class_descriptor_attribute_type type
;
201 /* Attribute's value (depends on attribute's type) */
203 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
204 const char *description
;
206 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
209 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
210 bt_component_class_source_init_method source_init_method
;
211 bt_component_class_filter_init_method filter_init_method
;
212 bt_component_class_sink_init_method sink_init_method
;
214 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
215 bt_component_class_source_finalize_method source_finalize_method
;
216 bt_component_class_filter_finalize_method filter_finalize_method
;
217 bt_component_class_sink_finalize_method sink_finalize_method
;
219 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
220 bt_component_class_source_query_method source_query_method
;
221 bt_component_class_filter_query_method filter_query_method
;
222 bt_component_class_sink_query_method sink_query_method
;
224 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD */
225 bt_component_class_filter_accept_input_port_connection_method filter_accept_input_port_connection_method
;
226 bt_component_class_sink_accept_input_port_connection_method sink_accept_input_port_connection_method
;
228 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD */
229 bt_component_class_source_accept_output_port_connection_method source_accept_output_port_connection_method
;
230 bt_component_class_filter_accept_output_port_connection_method filter_accept_output_port_connection_method
;
232 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
233 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
234 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
236 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
237 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
238 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
240 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD */
241 bt_component_class_filter_input_port_disconnected_method filter_input_port_disconnected_method
;
242 bt_component_class_sink_input_port_disconnected_method sink_input_port_disconnected_method
;
244 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD */
245 bt_component_class_source_output_port_disconnected_method source_output_port_disconnected_method
;
246 bt_component_class_filter_output_port_disconnected_method filter_output_port_disconnected_method
;
248 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD */
249 bt_component_class_source_notification_iterator_init_method source_notif_iter_init_method
;
250 bt_component_class_filter_notification_iterator_init_method filter_notif_iter_init_method
;
252 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD */
253 bt_component_class_source_notification_iterator_finalize_method source_notif_iter_finalize_method
;
254 bt_component_class_filter_notification_iterator_finalize_method filter_notif_iter_finalize_method
;
256 } __attribute__((packed
));
258 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
259 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
260 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
261 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
262 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
263 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
264 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
265 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
268 * Variable attributes for a plugin descriptor pointer to be added to
269 * the plugin descriptor section (internal use).
272 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
273 __attribute__((section("__DATA,btp_desc"), used))
275 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
276 __start___bt_plugin_descriptors
278 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
279 __stop___bt_plugin_descriptors
281 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
282 __asm("section$start$__DATA$btp_desc")
284 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
285 __asm("section$end$__DATA$btp_desc")
289 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
290 __attribute__((section("__bt_plugin_descriptors"), used))
292 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
293 __start___bt_plugin_descriptors
295 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
296 __stop___bt_plugin_descriptors
298 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
300 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
304 * Variable attributes for a plugin attribute pointer to be added to
305 * the plugin attribute section (internal use).
308 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
309 __attribute__((section("__DATA,btp_desc_att"), used))
311 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
312 __start___bt_plugin_descriptor_attributes
314 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
315 __stop___bt_plugin_descriptor_attributes
317 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
318 __asm("section$start$__DATA$btp_desc_att")
320 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
321 __asm("section$end$__DATA$btp_desc_att")
325 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
326 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
328 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
329 __start___bt_plugin_descriptor_attributes
331 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
332 __stop___bt_plugin_descriptor_attributes
334 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
336 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
340 * Variable attributes for a component class descriptor pointer to be
341 * added to the component class descriptor section (internal use).
344 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
345 __attribute__((section("__DATA,btp_cc_desc"), used))
347 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
348 __start___bt_plugin_component_class_descriptors
350 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
351 __stop___bt_plugin_component_class_descriptors
353 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
354 __asm("section$start$__DATA$btp_cc_desc")
356 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
357 __asm("section$end$__DATA$btp_cc_desc")
361 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
362 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
364 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
365 __start___bt_plugin_component_class_descriptors
367 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
368 __stop___bt_plugin_component_class_descriptors
370 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
372 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
376 * Variable attributes for a component class descriptor attribute
377 * pointer to be added to the component class descriptor attribute
378 * section (internal use).
381 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
382 __attribute__((section("__DATA,btp_cc_desc_att"), used))
384 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
385 __start___bt_plugin_component_class_descriptor_attributes
387 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
388 __stop___bt_plugin_component_class_descriptor_attributes
390 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
391 __asm("section$start$__DATA$btp_cc_desc_att")
393 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
394 __asm("section$end$__DATA$btp_cc_desc_att")
398 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
399 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
401 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
402 __start___bt_plugin_component_class_descriptor_attributes
404 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
405 __stop___bt_plugin_component_class_descriptor_attributes
407 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
409 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
413 * Declares a plugin descriptor pointer variable with a custom ID.
415 * _id: ID (any valid C identifier except `auto`).
417 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
420 * Defines a plugin descriptor with a custom ID.
422 * _id: ID (any valid C identifier except `auto`).
423 * _name: Plugin's name (C string).
425 #define BT_PLUGIN_WITH_ID(_id, _name) \
426 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
427 .major = __BT_PLUGIN_VERSION_MAJOR, \
428 .minor = __BT_PLUGIN_VERSION_MINOR, \
431 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
434 * Defines a plugin attribute (generic, internal use).
436 * _attr_name: Name of the attribute (C identifier).
437 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
438 * _id: Plugin descriptor ID (C identifier).
441 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
442 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
443 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
444 .type_name = #_attr_name, \
445 .type = _attr_type, \
446 .value._attr_name = _x, \
448 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
451 * Defines a plugin initialization function attribute attached to a
452 * specific plugin descriptor.
454 * _id: Plugin descriptor ID (C identifier).
455 * _x: Initialization function (bt_plugin_init_func).
457 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
458 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
461 * Defines a plugin exit function attribute attached to a specific
464 * _id: Plugin descriptor ID (C identifier).
465 * _x: Exit function (bt_plugin_exit_func).
467 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
468 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
471 * Defines an author attribute attached to a specific plugin descriptor.
473 * _id: Plugin descriptor ID (C identifier).
474 * _x: Author (C string).
476 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
477 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
480 * Defines a license attribute attached to a specific plugin descriptor.
482 * _id: Plugin descriptor ID (C identifier).
483 * _x: License (C string).
485 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
486 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
489 * Defines a description attribute attached to a specific plugin
492 * _id: Plugin descriptor ID (C identifier).
493 * _x: Description (C string).
495 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
496 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
498 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
499 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
502 * Defines a version attribute attached to a specific plugin descriptor.
504 * _id: Plugin descriptor ID (C identifier).
505 * _major: Plugin's major version (uint32_t).
506 * _minor: Plugin's minor version (uint32_t).
507 * _patch: Plugin's patch version (uint32_t).
508 * _extra: Plugin's version extra information (C string).
510 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
511 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
514 * Defines a source component class descriptor with a custom ID.
516 * _id: ID (any valid C identifier except `auto`).
517 * _comp_class_id: Component class ID (C identifier).
518 * _name: Component class name (C string).
519 * _notif_iter_next_method: Component class's iterator next method
520 * (bt_component_class_source_notification_iterator_next_method).
522 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_next_method) \
523 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
524 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
526 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
527 .methods.source = { \
528 .notif_iter_next = _notif_iter_next_method, \
531 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
534 * Defines a filter component class descriptor with a custom ID.
536 * _id: ID (any valid C identifier except `auto`).
537 * _comp_class_id: Component class ID (C identifier).
538 * _name: Component class name (C string).
539 * _notif_iter_next_method: Component class's iterator next method
540 * (bt_component_class_filter_notification_iterator_next_method).
542 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_next_method) \
543 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
544 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
546 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
547 .methods.filter = { \
548 .notif_iter_next = _notif_iter_next_method, \
551 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
554 * Defines a sink component class descriptor with a custom ID.
556 * _id: ID (any valid C identifier except `auto`).
557 * _comp_class_id: Component class ID (C identifier).
558 * _name: Component class name (C string).
559 * _consume_method: Component class's iterator consume method
560 * (bt_component_class_sink_consume_method).
562 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
563 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
564 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
566 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
568 .consume = _consume_method, \
571 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
574 * Defines a component class descriptor attribute (generic, internal
577 * _id: Plugin descriptor ID (C identifier).
578 * _comp_class_id: Component class ID (C identifier).
579 * _type: Component class type (`source`, `filter`, or `sink`).
580 * _attr_name: Name of the attribute (C identifier).
581 * _attr_type: Type of the attribute
582 * (enum __bt_plugin_descriptor_attribute_type).
585 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
586 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
587 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
588 .type_name = #_attr_name, \
589 .type = _attr_type, \
590 .value._attr_name = _x, \
592 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
595 * Defines a description attribute attached to a specific source
596 * component class descriptor.
598 * _id: Plugin descriptor ID (C identifier).
599 * _comp_class_id: Component class descriptor ID (C identifier).
600 * _x: Description (C string).
602 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
603 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
606 * Defines a description attribute attached to a specific filter
607 * component class descriptor.
609 * _id: Plugin descriptor ID (C identifier).
610 * _comp_class_id: Component class descriptor ID (C identifier).
611 * _x: Description (C string).
613 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
614 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
617 * Defines a description attribute attached to a specific sink
618 * component class descriptor.
620 * _id: Plugin descriptor ID (C identifier).
621 * _comp_class_id: Component class descriptor ID (C identifier).
622 * _x: Description (C string).
624 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
625 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
628 * Defines a help attribute attached to a specific source component
631 * _id: Plugin descriptor ID (C identifier).
632 * _comp_class_id: Component class descriptor ID (C identifier).
633 * _x: Help (C string).
635 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
636 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
639 * Defines a help attribute attached to a specific filter component
642 * _id: Plugin descriptor ID (C identifier).
643 * _comp_class_id: Component class descriptor ID (C identifier).
644 * _x: Help (C string).
646 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
647 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
650 * Defines a help attribute attached to a specific sink component class
653 * _id: Plugin descriptor ID (C identifier).
654 * _comp_class_id: Component class descriptor ID (C identifier).
655 * _x: Help (C string).
657 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
658 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
661 * Defines an initialization method attribute attached to a specific
662 * source component class descriptor.
664 * _id: Plugin descriptor ID (C identifier).
665 * _comp_class_id: Component class descriptor ID (C identifier).
666 * _x: Initialization method (bt_component_class_source_init_method).
668 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
669 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
672 * Defines an initialization method attribute attached to a specific
673 * filter component class descriptor.
675 * _id: Plugin descriptor ID (C identifier).
676 * _comp_class_id: Component class descriptor ID (C identifier).
677 * _x: Initialization method (bt_component_class_filter_init_method).
679 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
680 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
683 * Defines an initialization method attribute attached to a specific
684 * sink component class descriptor.
686 * _id: Plugin descriptor ID (C identifier).
687 * _comp_class_id: Component class descriptor ID (C identifier).
688 * _x: Initialization method (bt_component_class_sink_init_method).
690 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
691 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
694 * Defines a finalization method attribute attached to a specific source
695 * component class descriptor.
697 * _id: Plugin descriptor ID (C identifier).
698 * _comp_class_id: Component class descriptor ID (C identifier).
699 * _x: Finalize method (bt_component_class_source_finalize_method).
701 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
702 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
705 * Defines a finalization method attribute attached to a specific filter
706 * component class descriptor.
708 * _id: Plugin descriptor ID (C identifier).
709 * _comp_class_id: Component class descriptor ID (C identifier).
710 * _x: Finalize method (bt_component_class_filter_finalize_method).
712 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
713 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
716 * Defines a finalization method attribute attached to a specific sink
717 * component class descriptor.
719 * _id: Plugin descriptor ID (C identifier).
720 * _comp_class_id: Component class descriptor ID (C identifier).
721 * _x: Finalize method (bt_component_class_sink_finalize_method).
723 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
724 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
727 * Defines a query method attribute attached to a specific source
728 * component class descriptor.
730 * _id: Plugin descriptor ID (C identifier).
731 * _comp_class_id: Component class descriptor ID (C identifier).
732 * _x: Finalize method (bt_component_class_source_query_method).
734 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
735 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
738 * Defines a query method attribute attached to a specific filter
739 * component class descriptor.
741 * _id: Plugin descriptor ID (C identifier).
742 * _comp_class_id: Component class descriptor ID (C identifier).
743 * _x: Finalize method (bt_component_class_filter_query_method).
745 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
746 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
749 * Defines a query method attribute attached to a specific sink
750 * component class descriptor.
752 * _id: Plugin descriptor ID (C identifier).
753 * _comp_class_id: Component class descriptor ID (C identifier).
754 * _x: Finalize method (bt_component_class_sink_query_method).
756 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
757 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
760 * Defines an accept input port connection method attribute attached to
761 * a specific filter component class descriptor.
763 * _id: Plugin descriptor ID (C identifier).
764 * _comp_class_id: Component class descriptor ID (C identifier).
765 * _x: Accept port connection method
766 * (bt_component_class_filter_accept_input_port_connection_method).
768 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
769 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_accept_input_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, filter, _x)
772 * Defines an accept input port connection method attribute attached to
773 * a specific sink component class descriptor.
775 * _id: Plugin descriptor ID (C identifier).
776 * _comp_class_id: Component class descriptor ID (C identifier).
777 * _x: Accept port connection method
778 * (bt_component_class_sink_accept_input_port_connection_method).
780 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
781 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_accept_input_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, sink, _x)
784 * Defines an accept output port connection method attribute attached to
785 * a specific source component class descriptor.
787 * _id: Plugin descriptor ID (C identifier).
788 * _comp_class_id: Component class descriptor ID (C identifier).
789 * _x: Accept port connection method
790 * (bt_component_class_source_accept_output_port_connection_method).
792 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
793 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_accept_output_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, source, _x)
796 * Defines an accept output port connection method attribute attached to
797 * a specific filter component class descriptor.
799 * _id: Plugin descriptor ID (C identifier).
800 * _comp_class_id: Component class descriptor ID (C identifier).
801 * _x: Accept port connection method
802 * (bt_component_class_filter_accept_output_port_connection_method).
804 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
805 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_accept_output_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, filter, _x)
808 * Defines an input port connected method attribute attached to a
809 * specific filter component class descriptor.
811 * _id: Plugin descriptor ID (C identifier).
812 * _comp_class_id: Component class descriptor ID (C identifier).
813 * _x: Port connected method
814 * (bt_component_class_filter_input_port_connected_method).
816 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
817 __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)
820 * Defines an input port connected method attribute attached to a
821 * specific sink component class descriptor.
823 * _id: Plugin descriptor ID (C identifier).
824 * _comp_class_id: Component class descriptor ID (C identifier).
825 * _x: Port connected method
826 * (bt_component_class_sink_input_port_connected_method).
828 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
829 __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)
832 * Defines an output port connected method attribute attached to a
833 * specific source component class descriptor.
835 * _id: Plugin descriptor ID (C identifier).
836 * _comp_class_id: Component class descriptor ID (C identifier).
837 * _x: Port connected method
838 * (bt_component_class_source_output_port_connected_method).
840 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
841 __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)
844 * Defines an output port connected method attribute attached to a
845 * specific filter component class descriptor.
847 * _id: Plugin descriptor ID (C identifier).
848 * _comp_class_id: Component class descriptor ID (C identifier).
849 * _x: Port connected method
850 * (bt_component_class_filter_output_port_connected_method).
852 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
853 __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)
856 * Defines an input port disconnected method attribute attached to a
857 * specific filter component class descriptor.
859 * _id: Plugin descriptor ID (C identifier).
860 * _comp_class_id: Component class descriptor ID (C identifier).
861 * _x: Port disconnected method
862 * (bt_component_class_filter_input_port_disconnected_method).
864 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
865 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_input_port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, filter, _x)
868 * Defines an input port disconnected method attribute attached to a
869 * specific sink component class descriptor.
871 * _id: Plugin descriptor ID (C identifier).
872 * _comp_class_id: Component class descriptor ID (C identifier).
873 * _x: Port disconnected method
874 * (bt_component_class_sink_input_port_disconnected_method).
876 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
877 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_input_port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, sink, _x)
880 * Defines an output port disconnected method attribute attached to a
881 * specific source component class descriptor.
883 * _id: Plugin descriptor ID (C identifier).
884 * _comp_class_id: Component class descriptor ID (C identifier).
885 * _x: Port disconnected method
886 * (bt_component_class_source_output_port_disconnected_method).
888 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
889 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_output_port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, source, _x)
892 * Defines an output port disconnected method attribute attached to a
893 * specific filter component class descriptor.
895 * _id: Plugin descriptor ID (C identifier).
896 * _comp_class_id: Component class descriptor ID (C identifier).
897 * _x: Port disconnected method
898 * (bt_component_class_filter_output_port_disconnected_method).
900 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
901 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_output_port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, filter, _x)
904 * Defines an iterator initialization method attribute attached to a
905 * specific source component class descriptor.
907 * _id: Plugin descriptor ID (C identifier).
908 * _comp_class_id: Component class descriptor ID (C identifier).
909 * _x: Iterator initialization method
910 * (bt_component_class_source_notification_iterator_init_method).
912 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
913 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_notif_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD, _id, _comp_class_id, source, _x)
916 * Defines an iterator finalize method attribute attached to a specific
917 * source component class descriptor.
919 * _id: Plugin descriptor ID (C identifier).
920 * _comp_class_id: Component class descriptor ID (C identifier).
921 * _x: Iterator finalize method
922 * (bt_component_class_source_notification_iterator_finalize_method).
924 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
925 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_notif_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
928 * Defines an iterator initialization method attribute attached to a
929 * specific filter component class descriptor.
931 * _id: Plugin descriptor ID (C identifier).
932 * _comp_class_id: Component class descriptor ID (C identifier).
933 * _x: Iterator initialization method
934 * (bt_component_class_filter_notification_iterator_init_method).
936 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
937 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_notif_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD, _id, _comp_class_id, filter, _x)
940 * Defines an iterator finalize method attribute attached to a specific
941 * filter component class descriptor.
943 * _id: Plugin descriptor ID (C identifier).
944 * _comp_class_id: Component class descriptor ID (C identifier).
945 * _x: Iterator finalize method
946 * (bt_component_class_filter_notification_iterator_finalize_method).
948 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
949 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_notif_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
952 * Defines a plugin descriptor with an automatic ID.
954 * _name: Plugin's name (C string).
956 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
959 * Defines a plugin initialization function attribute attached to the
960 * automatic plugin descriptor.
962 * _x: Initialization function (bt_plugin_init_func).
964 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
967 * Defines a plugin exit function attribute attached to the automatic
970 * _x: Exit function (bt_plugin_exit_func).
972 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
975 * Defines an author attribute attached to the automatic plugin
978 * _x: Author (C string).
980 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
983 * Defines a license attribute attached to the automatic plugin
986 * _x: License (C string).
988 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
991 * Defines a description attribute attached to the automatic plugin
994 * _x: Description (C string).
996 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
999 * Defines a version attribute attached to the automatic plugin
1002 * _major: Plugin's major version (uint32_t).
1003 * _minor: Plugin's minor version (uint32_t).
1004 * _patch: Plugin's patch version (uint32_t).
1005 * _extra: Plugin's version extra information (C string).
1007 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
1010 * Defines a source component class attached to the automatic plugin
1011 * descriptor. Its ID is the same as its name, hence its name must be a
1012 * C identifier in this version.
1014 * _name: Component class name (C identifier).
1015 * _notif_iter_next_method: Component class's iterator next method
1016 * (bt_component_class_source_notification_iterator_next_method).
1018 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _notif_iter_next_method) \
1019 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_next_method)
1022 * Defines a filter component class attached to the automatic plugin
1023 * descriptor. Its ID is the same as its name, hence its name must be a
1024 * C identifier in this version.
1026 * _name: Component class name (C identifier).
1027 * _notif_iter_next_method: Component class's iterator next method
1028 * (bt_component_class_filter_notification_iterator_next_method).
1030 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _notif_iter_next_method) \
1031 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_next_method)
1034 * Defines a sink component class attached to the automatic plugin
1035 * descriptor. Its ID is the same as its name, hence its name must be a
1036 * C identifier in this version.
1038 * _name: Component class name (C identifier).
1039 * _consume_method: Component class's consume method
1040 * (bt_component_class_sink_consume_method).
1042 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1043 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1046 * Defines a description attribute attached to a source component class
1047 * descriptor which is attached to the automatic plugin descriptor.
1049 * _name: Component class name (C identifier).
1050 * _x: Description (C string).
1052 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1053 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1056 * Defines a description attribute attached to a filter component class
1057 * descriptor which is attached to the automatic plugin descriptor.
1059 * _name: Component class name (C identifier).
1060 * _x: Description (C string).
1062 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1063 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1066 * Defines a description attribute attached to a sink component class
1067 * descriptor which is attached to the automatic plugin descriptor.
1069 * _name: Component class name (C identifier).
1070 * _x: Description (C string).
1072 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1073 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1076 * Defines a help attribute attached to a source component class
1077 * descriptor which is attached to the automatic plugin descriptor.
1079 * _name: Component class name (C identifier).
1080 * _x: Help (C string).
1082 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1083 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1086 * Defines a help attribute attached to a filter component class
1087 * descriptor which is attached to the automatic plugin descriptor.
1089 * _name: Component class name (C identifier).
1090 * _x: Help (C string).
1092 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1093 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1096 * Defines a help attribute attached to a sink component class
1097 * descriptor which is attached to the automatic plugin descriptor.
1099 * _name: Component class name (C identifier).
1100 * _x: Help (C string).
1102 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1103 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1106 * Defines an initialization method attribute attached to a source
1107 * component class descriptor which is attached to the automatic plugin
1110 * _name: Component class name (C identifier).
1111 * _x: Initialization method (bt_component_class_source_init_method).
1113 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1114 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1117 * Defines an initialization method attribute attached to a filter
1118 * component class descriptor which is attached to the automatic plugin
1121 * _name: Component class name (C identifier).
1122 * _x: Initialization method (bt_component_class_filter_init_method).
1124 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1125 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1128 * Defines an initialization method attribute attached to a sink
1129 * component class descriptor which is attached to the automatic plugin
1132 * _name: Component class name (C identifier).
1133 * _x: Initialization method (bt_component_class_sink_init_method).
1135 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1136 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1139 * Defines a finalization method attribute attached to a source component
1140 * class descriptor which is attached to the automatic plugin
1143 * _name: Component class name (C identifier).
1144 * _x: Initialization method (bt_component_class_source_finalize_method).
1146 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1147 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1150 * Defines a finalization method attribute attached to a filter component
1151 * class descriptor which is attached to the automatic plugin
1154 * _name: Component class name (C identifier).
1155 * _x: Initialization method (bt_component_class_filter_finalize_method).
1157 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1158 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1161 * Defines a finalization method attribute attached to a sink component class
1162 * descriptor which is attached to the automatic plugin descriptor.
1164 * _name: Component class name (C identifier).
1165 * _x: Initialization method (bt_component_class_sink_finalize_method).
1167 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1168 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1171 * Defines a query method attribute attached to a source component
1172 * class descriptor which is attached to the automatic plugin
1175 * _name: Component class name (C identifier).
1176 * _x: Initialization method (bt_component_class_source_query_method).
1178 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1179 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1182 * Defines a query method attribute attached to a filter component
1183 * class descriptor which is attached to the automatic plugin
1186 * _name: Component class name (C identifier).
1187 * _x: Initialization method (bt_component_class_filter_query_method).
1189 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1190 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1193 * Defines a query method attribute attached to a sink component
1194 * class descriptor which is attached to the automatic plugin
1197 * _name: Component class name (C identifier).
1198 * _x: Initialization method (bt_component_class_sink_query_method).
1200 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1201 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1204 * Defines an accept input port connection method attribute attached to
1205 * a filter component class descriptor which is attached to the
1206 * automatic plugin descriptor.
1208 * _name: Component class name (C identifier).
1209 * _x: Accept port connection method
1210 * (bt_component_class_filter_accept_input_port_connection_method).
1212 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1213 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1216 * Defines an accept input port connection method attribute attached to
1217 * a sink component class descriptor which is attached to the automatic
1218 * plugin descriptor.
1220 * _name: Component class name (C identifier).
1221 * _x: Accept port connection method
1222 * (bt_component_class_sink_accept_input_port_connection_method).
1224 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1225 BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1228 * Defines an accept output port connection method attribute attached to
1229 * a source component class descriptor which is attached to the
1230 * automatic plugin descriptor.
1232 * _name: Component class name (C identifier).
1233 * _x: Accept port connection method
1234 * (bt_component_class_source_accept_output_port_connection_method).
1236 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1237 BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1240 * Defines an accept output port connection method attribute attached to
1241 * a filter component class descriptor which is attached to the
1242 * automatic plugin descriptor.
1244 * _name: Component class name (C identifier).
1245 * _x: Accept port connection method
1246 * (bt_component_class_filter_accept_output_port_connection_method).
1248 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1249 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1252 * Defines an input port connected method attribute attached to a filter
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_filter_input_port_connected_method).
1259 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1260 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1263 * Defines an input port connected method attribute attached to a sink
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_sink_input_port_connected_method).
1270 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1271 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1274 * Defines an output port connected method attribute attached to a source
1275 * component class descriptor which is attached to the automatic plugin
1278 * _name: Component class name (C identifier).
1279 * _x: Port connected (bt_component_class_source_output_port_connected_method).
1281 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1282 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1285 * Defines an output port connected method attribute attached to a filter
1286 * component class descriptor which is attached to the automatic plugin
1289 * _name: Component class name (C identifier).
1290 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
1292 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1293 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1296 * Defines an input port disconnected method attribute attached to a
1297 * filter component class descriptor which is attached to the automatic
1298 * plugin descriptor.
1300 * _name: Component class name (C identifier).
1301 * _x: Port disconnected (bt_component_class_filter_input_port_disconnected_method).
1303 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1304 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1307 * Defines an input port disconnected method attribute attached to a
1308 * sink component class descriptor which is attached to the automatic
1309 * plugin descriptor.
1311 * _name: Component class name (C identifier).
1312 * _x: Port disconnected (bt_component_class_sink_input_port_disconnected_method).
1314 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1315 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1318 * Defines an output port disconnected method attribute attached to a
1319 * source component class descriptor which is attached to the automatic
1320 * plugin descriptor.
1322 * _name: Component class name (C identifier).
1323 * _x: Port disconnected (bt_component_class_source_output_port_disconnected_method).
1325 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1326 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1329 * Defines an output port disconnected method attribute attached to a
1330 * filter component class descriptor which is attached to the automatic
1331 * plugin descriptor.
1333 * _name: Component class name (C identifier).
1334 * _x: Port disconnected (bt_component_class_filter_output_port_disconnected_method).
1336 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1337 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1340 * Defines an iterator initialization method attribute attached to a
1341 * source component class descriptor which is attached to the automatic
1342 * plugin descriptor.
1344 * _name: Component class name (C identifier).
1345 * _x: Iterator initialization method
1346 * (bt_component_class_source_notification_iterator_init_method).
1348 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(_name, _x) \
1349 BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1352 * Defines an iterator finalize method attribute attached to a source
1353 * component class descriptor which is attached to the automatic plugin
1356 * _name: Component class name (C identifier).
1357 * _x: Iterator finalize method
1358 * (bt_component_class_source_notification_iterator_finalize_method).
1360 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD(_name, _x) \
1361 BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1364 * Defines an iterator initialization method attribute attached to a
1365 * filter component class descriptor which is attached to the automatic
1366 * plugin descriptor.
1368 * _name: Component class name (C identifier).
1369 * _x: Iterator initialization method
1370 * (bt_component_class_filter_notification_iterator_init_method).
1372 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(_name, _x) \
1373 BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1376 * Defines an iterator finalize method attribute attached to a filter
1377 * component class descriptor which is attached to the automatic plugin
1380 * _name: Component class name (C identifier).
1381 * _x: Iterator finalize method
1382 * (bt_component_class_filter_notification_iterator_finalize_method).
1384 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD(_name, _x) \
1385 BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1387 #define BT_PLUGIN_MODULE() \
1388 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
1389 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1390 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
1392 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
1393 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1394 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
1396 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
1397 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1398 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
1400 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; \
1401 _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; \
1402 _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; \
1404 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1406 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1408 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1410 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1412 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1414 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1416 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1418 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1420 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1422 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1424 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1426 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1428 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1430 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1432 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1434 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1441 #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */