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 2017-2018 Philippe Proulx <pproulx@efficios.com>
9 * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
18 * The above copyright notice and this permission notice shall be included in
19 * all copies or substantial portions of the Software.
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32 /* For enum bt_plugin_status */
33 #include <babeltrace/plugin/plugin-const.h>
35 /* For enum bt_component_class_type */
36 #include <babeltrace/graph/component-class-const.h>
38 /* For component class method type definitions */
39 #include <babeltrace/graph/component-class-source-const.h>
40 #include <babeltrace/graph/component-class-filter-const.h>
41 #include <babeltrace/graph/component-class-sink-const.h>
44 * _BT_HIDDEN: set the hidden attribute for internal functions
45 * On Windows, symbols are local unless explicitly exported,
46 * see https://gcc.gnu.org/wiki/Visibility
48 #if defined(_WIN32) || defined(__CYGWIN__)
51 #define _BT_HIDDEN __attribute__((visibility("hidden")))
59 * Plugin interface's version, not synced with Babeltrace's version
62 #define __BT_PLUGIN_VERSION_MAJOR 1
63 #define __BT_PLUGIN_VERSION_MINOR 0
65 /* Plugin initialization function type */
66 typedef enum bt_plugin_status (*bt_plugin_init_func
)(
67 const bt_plugin
*plugin
);
69 /* Plugin exit function type */
70 typedef enum bt_plugin_status (*bt_plugin_exit_func
)(void);
72 /* Plugin descriptor: describes a single plugin (internal use) */
73 struct __bt_plugin_descriptor
{
74 /* Plugin's interface major version number */
77 /* Plugin's interface minor version number */
82 } __attribute__((packed
));
84 /* Type of a plugin attribute (internal use) */
85 enum __bt_plugin_descriptor_attribute_type
{
86 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
87 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
88 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
89 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
90 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
91 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
94 /* Plugin (user) version */
95 struct __bt_plugin_descriptor_version
{
102 /* Plugin attribute (internal use) */
103 struct __bt_plugin_descriptor_attribute
{
104 /* Plugin descriptor to which to associate this attribute */
105 const struct __bt_plugin_descriptor
*plugin_descriptor
;
107 /* Name of the attribute's type for debug purposes */
108 const char *type_name
;
110 /* Attribute's type */
111 enum __bt_plugin_descriptor_attribute_type type
;
113 /* Attribute's value (depends on attribute's type) */
115 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
116 bt_plugin_init_func init
;
118 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
119 bt_plugin_exit_func exit
;
121 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
124 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
127 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
128 const char *description
;
130 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
131 struct __bt_plugin_descriptor_version version
;
133 } __attribute__((packed
));
135 /* Component class descriptor (internal use) */
136 struct __bt_plugin_component_class_descriptor
{
138 * Plugin descriptor to which to associate this component
141 const struct __bt_plugin_descriptor
*plugin_descriptor
;
143 /* Component class name */
146 /* Component class type */
147 enum bt_component_class_type type
;
149 /* Mandatory methods (depends on component class type) */
151 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
153 bt_component_class_source_notification_iterator_next_method notif_iter_next
;
156 /* BT_COMPONENT_CLASS_TYPE_FILTER */
158 bt_component_class_filter_notification_iterator_next_method notif_iter_next
;
161 /* BT_COMPONENT_CLASS_TYPE_SINK */
163 bt_component_class_sink_consume_method consume
;
166 } __attribute__((packed
));
168 /* Type of a component class attribute (internal use) */
169 enum __bt_plugin_component_class_descriptor_attribute_type
{
170 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
171 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
172 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD
= 2,
173 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 3,
174 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 4,
175 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD
= 5,
176 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD
= 6,
177 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 7,
178 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 8,
179 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD
= 9,
180 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD
= 10,
181 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD
= 11,
182 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD
= 12,
185 /* Component class attribute (internal use) */
186 struct __bt_plugin_component_class_descriptor_attribute
{
188 * Component class plugin attribute to which to associate this
189 * component class attribute.
191 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
193 /* Name of the attribute's type for debug purposes */
194 const char *type_name
;
196 /* Attribute's type */
197 enum __bt_plugin_component_class_descriptor_attribute_type type
;
199 /* Attribute's value (depends on attribute's type) */
201 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
202 const char *description
;
204 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
207 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
208 bt_component_class_source_init_method source_init_method
;
209 bt_component_class_filter_init_method filter_init_method
;
210 bt_component_class_sink_init_method sink_init_method
;
212 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
213 bt_component_class_source_finalize_method source_finalize_method
;
214 bt_component_class_filter_finalize_method filter_finalize_method
;
215 bt_component_class_sink_finalize_method sink_finalize_method
;
217 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
218 bt_component_class_source_query_method source_query_method
;
219 bt_component_class_filter_query_method filter_query_method
;
220 bt_component_class_sink_query_method sink_query_method
;
222 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD */
223 bt_component_class_filter_accept_input_port_connection_method filter_accept_input_port_connection_method
;
224 bt_component_class_sink_accept_input_port_connection_method sink_accept_input_port_connection_method
;
226 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD */
227 bt_component_class_source_accept_output_port_connection_method source_accept_output_port_connection_method
;
228 bt_component_class_filter_accept_output_port_connection_method filter_accept_output_port_connection_method
;
230 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
231 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
232 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
234 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
235 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
236 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
238 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD */
239 bt_component_class_filter_input_port_disconnected_method filter_input_port_disconnected_method
;
240 bt_component_class_sink_input_port_disconnected_method sink_input_port_disconnected_method
;
242 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD */
243 bt_component_class_source_output_port_disconnected_method source_output_port_disconnected_method
;
244 bt_component_class_filter_output_port_disconnected_method filter_output_port_disconnected_method
;
246 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD */
247 bt_component_class_source_notification_iterator_init_method source_notif_iter_init_method
;
248 bt_component_class_filter_notification_iterator_init_method filter_notif_iter_init_method
;
250 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD */
251 bt_component_class_source_notification_iterator_finalize_method source_notif_iter_finalize_method
;
252 bt_component_class_filter_notification_iterator_finalize_method filter_notif_iter_finalize_method
;
254 } __attribute__((packed
));
256 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
257 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
258 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
259 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
260 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
261 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
262 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
263 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
266 * Variable attributes for a plugin descriptor pointer to be added to
267 * the plugin descriptor section (internal use).
270 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
271 __attribute__((section("__DATA,btp_desc"), used))
273 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
274 __start___bt_plugin_descriptors
276 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
277 __stop___bt_plugin_descriptors
279 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
280 __asm("section$start$__DATA$btp_desc")
282 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
283 __asm("section$end$__DATA$btp_desc")
287 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
288 __attribute__((section("__bt_plugin_descriptors"), used))
290 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
291 __start___bt_plugin_descriptors
293 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
294 __stop___bt_plugin_descriptors
296 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
298 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
302 * Variable attributes for a plugin attribute pointer to be added to
303 * the plugin attribute section (internal use).
306 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
307 __attribute__((section("__DATA,btp_desc_att"), used))
309 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
310 __start___bt_plugin_descriptor_attributes
312 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
313 __stop___bt_plugin_descriptor_attributes
315 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
316 __asm("section$start$__DATA$btp_desc_att")
318 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
319 __asm("section$end$__DATA$btp_desc_att")
323 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
324 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
326 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
327 __start___bt_plugin_descriptor_attributes
329 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
330 __stop___bt_plugin_descriptor_attributes
332 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
334 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
338 * Variable attributes for a component class descriptor pointer to be
339 * added to the component class descriptor section (internal use).
342 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
343 __attribute__((section("__DATA,btp_cc_desc"), used))
345 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
346 __start___bt_plugin_component_class_descriptors
348 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
349 __stop___bt_plugin_component_class_descriptors
351 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
352 __asm("section$start$__DATA$btp_cc_desc")
354 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
355 __asm("section$end$__DATA$btp_cc_desc")
359 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
360 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
362 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
363 __start___bt_plugin_component_class_descriptors
365 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
366 __stop___bt_plugin_component_class_descriptors
368 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
370 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
374 * Variable attributes for a component class descriptor attribute
375 * pointer to be added to the component class descriptor attribute
376 * section (internal use).
379 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
380 __attribute__((section("__DATA,btp_cc_desc_att"), used))
382 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
383 __start___bt_plugin_component_class_descriptor_attributes
385 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
386 __stop___bt_plugin_component_class_descriptor_attributes
388 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
389 __asm("section$start$__DATA$btp_cc_desc_att")
391 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
392 __asm("section$end$__DATA$btp_cc_desc_att")
396 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
397 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
399 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
400 __start___bt_plugin_component_class_descriptor_attributes
402 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
403 __stop___bt_plugin_component_class_descriptor_attributes
405 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
407 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
411 * Declares a plugin descriptor pointer variable with a custom ID.
413 * _id: ID (any valid C identifier except `auto`).
415 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
418 * Defines a plugin descriptor with a custom ID.
420 * _id: ID (any valid C identifier except `auto`).
421 * _name: Plugin's name (C string).
423 #define BT_PLUGIN_WITH_ID(_id, _name) \
424 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
425 .major = __BT_PLUGIN_VERSION_MAJOR, \
426 .minor = __BT_PLUGIN_VERSION_MINOR, \
429 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
432 * Defines a plugin attribute (generic, internal use).
434 * _attr_name: Name of the attribute (C identifier).
435 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
436 * _id: Plugin descriptor ID (C identifier).
439 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
440 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
441 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
442 .type_name = #_attr_name, \
443 .type = _attr_type, \
444 .value._attr_name = _x, \
446 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
449 * Defines a plugin initialization function attribute attached to a
450 * specific plugin descriptor.
452 * _id: Plugin descriptor ID (C identifier).
453 * _x: Initialization function (bt_plugin_init_func).
455 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
456 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
459 * Defines a plugin exit function attribute attached to a specific
462 * _id: Plugin descriptor ID (C identifier).
463 * _x: Exit function (bt_plugin_exit_func).
465 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
466 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
469 * Defines an author attribute attached to a specific plugin descriptor.
471 * _id: Plugin descriptor ID (C identifier).
472 * _x: Author (C string).
474 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
475 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
478 * Defines a license attribute attached to a specific plugin descriptor.
480 * _id: Plugin descriptor ID (C identifier).
481 * _x: License (C string).
483 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
484 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
487 * Defines a description attribute attached to a specific plugin
490 * _id: Plugin descriptor ID (C identifier).
491 * _x: Description (C string).
493 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
494 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
496 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
497 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
500 * Defines a version attribute attached to a specific plugin descriptor.
502 * _id: Plugin descriptor ID (C identifier).
503 * _major: Plugin's major version (uint32_t).
504 * _minor: Plugin's minor version (uint32_t).
505 * _patch: Plugin's patch version (uint32_t).
506 * _extra: Plugin's version extra information (C string).
508 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
509 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
512 * Defines a source component class descriptor with a custom ID.
514 * _id: ID (any valid C identifier except `auto`).
515 * _comp_class_id: Component class ID (C identifier).
516 * _name: Component class name (C string).
517 * _notif_iter_next_method: Component class's iterator next method
518 * (bt_component_class_source_notification_iterator_next_method).
520 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_next_method) \
521 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
522 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
524 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
525 .methods.source = { \
526 .notif_iter_next = _notif_iter_next_method, \
529 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
532 * Defines a filter component class descriptor with a custom ID.
534 * _id: ID (any valid C identifier except `auto`).
535 * _comp_class_id: Component class ID (C identifier).
536 * _name: Component class name (C string).
537 * _notif_iter_next_method: Component class's iterator next method
538 * (bt_component_class_filter_notification_iterator_next_method).
540 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_next_method) \
541 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
542 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
544 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
545 .methods.filter = { \
546 .notif_iter_next = _notif_iter_next_method, \
549 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
552 * Defines a sink component class descriptor with a custom ID.
554 * _id: ID (any valid C identifier except `auto`).
555 * _comp_class_id: Component class ID (C identifier).
556 * _name: Component class name (C string).
557 * _consume_method: Component class's iterator consume method
558 * (bt_component_class_sink_consume_method).
560 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
561 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
562 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
564 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
566 .consume = _consume_method, \
569 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
572 * Defines a component class descriptor attribute (generic, internal
575 * _id: Plugin descriptor ID (C identifier).
576 * _comp_class_id: Component class ID (C identifier).
577 * _type: Component class type (`source`, `filter`, or `sink`).
578 * _attr_name: Name of the attribute (C identifier).
579 * _attr_type: Type of the attribute
580 * (enum __bt_plugin_descriptor_attribute_type).
583 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
584 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
585 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
586 .type_name = #_attr_name, \
587 .type = _attr_type, \
588 .value._attr_name = _x, \
590 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
593 * Defines a description attribute attached to a specific source
594 * component class descriptor.
596 * _id: Plugin descriptor ID (C identifier).
597 * _comp_class_id: Component class descriptor ID (C identifier).
598 * _x: Description (C string).
600 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
601 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
604 * Defines a description attribute attached to a specific filter
605 * component class descriptor.
607 * _id: Plugin descriptor ID (C identifier).
608 * _comp_class_id: Component class descriptor ID (C identifier).
609 * _x: Description (C string).
611 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
612 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
615 * Defines a description attribute attached to a specific sink
616 * component class descriptor.
618 * _id: Plugin descriptor ID (C identifier).
619 * _comp_class_id: Component class descriptor ID (C identifier).
620 * _x: Description (C string).
622 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
623 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
626 * Defines a help attribute attached to a specific source component
629 * _id: Plugin descriptor ID (C identifier).
630 * _comp_class_id: Component class descriptor ID (C identifier).
631 * _x: Help (C string).
633 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
634 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
637 * Defines a help attribute attached to a specific filter component
640 * _id: Plugin descriptor ID (C identifier).
641 * _comp_class_id: Component class descriptor ID (C identifier).
642 * _x: Help (C string).
644 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
645 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
648 * Defines a help attribute attached to a specific sink component class
651 * _id: Plugin descriptor ID (C identifier).
652 * _comp_class_id: Component class descriptor ID (C identifier).
653 * _x: Help (C string).
655 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
656 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
659 * Defines an initialization method attribute attached to a specific
660 * source component class descriptor.
662 * _id: Plugin descriptor ID (C identifier).
663 * _comp_class_id: Component class descriptor ID (C identifier).
664 * _x: Initialization method (bt_component_class_source_init_method).
666 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
667 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
670 * Defines an initialization method attribute attached to a specific
671 * filter component class descriptor.
673 * _id: Plugin descriptor ID (C identifier).
674 * _comp_class_id: Component class descriptor ID (C identifier).
675 * _x: Initialization method (bt_component_class_filter_init_method).
677 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
678 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
681 * Defines an initialization method attribute attached to a specific
682 * sink component class descriptor.
684 * _id: Plugin descriptor ID (C identifier).
685 * _comp_class_id: Component class descriptor ID (C identifier).
686 * _x: Initialization method (bt_component_class_sink_init_method).
688 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
689 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
692 * Defines a finalization method attribute attached to a specific source
693 * component class descriptor.
695 * _id: Plugin descriptor ID (C identifier).
696 * _comp_class_id: Component class descriptor ID (C identifier).
697 * _x: Finalize method (bt_component_class_source_finalize_method).
699 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
700 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
703 * Defines a finalization method attribute attached to a specific filter
704 * component class descriptor.
706 * _id: Plugin descriptor ID (C identifier).
707 * _comp_class_id: Component class descriptor ID (C identifier).
708 * _x: Finalize method (bt_component_class_filter_finalize_method).
710 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
711 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
714 * Defines a finalization method attribute attached to a specific sink
715 * component class descriptor.
717 * _id: Plugin descriptor ID (C identifier).
718 * _comp_class_id: Component class descriptor ID (C identifier).
719 * _x: Finalize method (bt_component_class_sink_finalize_method).
721 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
722 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
725 * Defines a query method attribute attached to a specific source
726 * component class descriptor.
728 * _id: Plugin descriptor ID (C identifier).
729 * _comp_class_id: Component class descriptor ID (C identifier).
730 * _x: Finalize method (bt_component_class_source_query_method).
732 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
733 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
736 * Defines a query method attribute attached to a specific filter
737 * component class descriptor.
739 * _id: Plugin descriptor ID (C identifier).
740 * _comp_class_id: Component class descriptor ID (C identifier).
741 * _x: Finalize method (bt_component_class_filter_query_method).
743 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
744 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
747 * Defines a query method attribute attached to a specific sink
748 * component class descriptor.
750 * _id: Plugin descriptor ID (C identifier).
751 * _comp_class_id: Component class descriptor ID (C identifier).
752 * _x: Finalize method (bt_component_class_sink_query_method).
754 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
755 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
758 * Defines an accept input port connection method attribute attached to
759 * a specific filter component class descriptor.
761 * _id: Plugin descriptor ID (C identifier).
762 * _comp_class_id: Component class descriptor ID (C identifier).
763 * _x: Accept port connection method
764 * (bt_component_class_filter_accept_input_port_connection_method).
766 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
767 __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)
770 * Defines an accept input port connection method attribute attached to
771 * a specific sink component class descriptor.
773 * _id: Plugin descriptor ID (C identifier).
774 * _comp_class_id: Component class descriptor ID (C identifier).
775 * _x: Accept port connection method
776 * (bt_component_class_sink_accept_input_port_connection_method).
778 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
779 __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)
782 * Defines an accept output port connection method attribute attached to
783 * a specific source component class descriptor.
785 * _id: Plugin descriptor ID (C identifier).
786 * _comp_class_id: Component class descriptor ID (C identifier).
787 * _x: Accept port connection method
788 * (bt_component_class_source_accept_output_port_connection_method).
790 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
791 __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)
794 * Defines an accept output port connection method attribute attached to
795 * a specific filter component class descriptor.
797 * _id: Plugin descriptor ID (C identifier).
798 * _comp_class_id: Component class descriptor ID (C identifier).
799 * _x: Accept port connection method
800 * (bt_component_class_filter_accept_output_port_connection_method).
802 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
803 __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)
806 * Defines an input port connected method attribute attached to a
807 * specific filter component class descriptor.
809 * _id: Plugin descriptor ID (C identifier).
810 * _comp_class_id: Component class descriptor ID (C identifier).
811 * _x: Port connected method
812 * (bt_component_class_filter_input_port_connected_method).
814 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
815 __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)
818 * Defines an input port connected method attribute attached to a
819 * specific sink component class descriptor.
821 * _id: Plugin descriptor ID (C identifier).
822 * _comp_class_id: Component class descriptor ID (C identifier).
823 * _x: Port connected method
824 * (bt_component_class_sink_input_port_connected_method).
826 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
827 __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)
830 * Defines an output port connected method attribute attached to a
831 * specific source component class descriptor.
833 * _id: Plugin descriptor ID (C identifier).
834 * _comp_class_id: Component class descriptor ID (C identifier).
835 * _x: Port connected method
836 * (bt_component_class_source_output_port_connected_method).
838 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
839 __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)
842 * Defines an output port connected method attribute attached to a
843 * specific filter component class descriptor.
845 * _id: Plugin descriptor ID (C identifier).
846 * _comp_class_id: Component class descriptor ID (C identifier).
847 * _x: Port connected method
848 * (bt_component_class_filter_output_port_connected_method).
850 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
851 __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)
854 * Defines an input port disconnected method attribute attached to a
855 * specific filter component class descriptor.
857 * _id: Plugin descriptor ID (C identifier).
858 * _comp_class_id: Component class descriptor ID (C identifier).
859 * _x: Port disconnected method
860 * (bt_component_class_filter_input_port_disconnected_method).
862 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
863 __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)
866 * Defines an input port disconnected method attribute attached to a
867 * specific sink component class descriptor.
869 * _id: Plugin descriptor ID (C identifier).
870 * _comp_class_id: Component class descriptor ID (C identifier).
871 * _x: Port disconnected method
872 * (bt_component_class_sink_input_port_disconnected_method).
874 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
875 __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)
878 * Defines an output port disconnected method attribute attached to a
879 * specific source component class descriptor.
881 * _id: Plugin descriptor ID (C identifier).
882 * _comp_class_id: Component class descriptor ID (C identifier).
883 * _x: Port disconnected method
884 * (bt_component_class_source_output_port_disconnected_method).
886 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
887 __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)
890 * Defines an output port disconnected method attribute attached to a
891 * specific filter component class descriptor.
893 * _id: Plugin descriptor ID (C identifier).
894 * _comp_class_id: Component class descriptor ID (C identifier).
895 * _x: Port disconnected method
896 * (bt_component_class_filter_output_port_disconnected_method).
898 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
899 __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)
902 * Defines an iterator initialization method attribute attached to a
903 * specific source component class descriptor.
905 * _id: Plugin descriptor ID (C identifier).
906 * _comp_class_id: Component class descriptor ID (C identifier).
907 * _x: Iterator initialization method
908 * (bt_component_class_source_notification_iterator_init_method).
910 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
911 __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)
914 * Defines an iterator finalize method attribute attached to a specific
915 * source component class descriptor.
917 * _id: Plugin descriptor ID (C identifier).
918 * _comp_class_id: Component class descriptor ID (C identifier).
919 * _x: Iterator finalize method
920 * (bt_component_class_source_notification_iterator_finalize_method).
922 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
923 __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)
926 * Defines an iterator initialization method attribute attached to a
927 * specific filter component class descriptor.
929 * _id: Plugin descriptor ID (C identifier).
930 * _comp_class_id: Component class descriptor ID (C identifier).
931 * _x: Iterator initialization method
932 * (bt_component_class_filter_notification_iterator_init_method).
934 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
935 __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)
938 * Defines an iterator finalize method attribute attached to a specific
939 * filter component class descriptor.
941 * _id: Plugin descriptor ID (C identifier).
942 * _comp_class_id: Component class descriptor ID (C identifier).
943 * _x: Iterator finalize method
944 * (bt_component_class_filter_notification_iterator_finalize_method).
946 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
947 __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)
950 * Defines a plugin descriptor with an automatic ID.
952 * _name: Plugin's name (C string).
954 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
957 * Defines a plugin initialization function attribute attached to the
958 * automatic plugin descriptor.
960 * _x: Initialization function (bt_plugin_init_func).
962 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
965 * Defines a plugin exit function attribute attached to the automatic
968 * _x: Exit function (bt_plugin_exit_func).
970 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
973 * Defines an author attribute attached to the automatic plugin
976 * _x: Author (C string).
978 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
981 * Defines a license attribute attached to the automatic plugin
984 * _x: License (C string).
986 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
989 * Defines a description attribute attached to the automatic plugin
992 * _x: Description (C string).
994 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
997 * Defines a version attribute attached to the automatic plugin
1000 * _major: Plugin's major version (uint32_t).
1001 * _minor: Plugin's minor version (uint32_t).
1002 * _patch: Plugin's patch version (uint32_t).
1003 * _extra: Plugin's version extra information (C string).
1005 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
1008 * Defines a source component class attached to the automatic plugin
1009 * descriptor. Its ID is the same as its name, hence its name must be a
1010 * C identifier in this version.
1012 * _name: Component class name (C identifier).
1013 * _notif_iter_next_method: Component class's iterator next method
1014 * (bt_component_class_source_notification_iterator_next_method).
1016 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _notif_iter_next_method) \
1017 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_next_method)
1020 * Defines a filter component class attached to the automatic plugin
1021 * descriptor. Its ID is the same as its name, hence its name must be a
1022 * C identifier in this version.
1024 * _name: Component class name (C identifier).
1025 * _notif_iter_next_method: Component class's iterator next method
1026 * (bt_component_class_filter_notification_iterator_next_method).
1028 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _notif_iter_next_method) \
1029 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_next_method)
1032 * Defines a sink component class attached to the automatic plugin
1033 * descriptor. Its ID is the same as its name, hence its name must be a
1034 * C identifier in this version.
1036 * _name: Component class name (C identifier).
1037 * _consume_method: Component class's consume method
1038 * (bt_component_class_sink_consume_method).
1040 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1041 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1044 * Defines a description attribute attached to a source component class
1045 * descriptor which is attached to the automatic plugin descriptor.
1047 * _name: Component class name (C identifier).
1048 * _x: Description (C string).
1050 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1051 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1054 * Defines a description attribute attached to a filter component class
1055 * descriptor which is attached to the automatic plugin descriptor.
1057 * _name: Component class name (C identifier).
1058 * _x: Description (C string).
1060 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1061 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1064 * Defines a description attribute attached to a sink component class
1065 * descriptor which is attached to the automatic plugin descriptor.
1067 * _name: Component class name (C identifier).
1068 * _x: Description (C string).
1070 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1071 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1074 * Defines a help attribute attached to a source component class
1075 * descriptor which is attached to the automatic plugin descriptor.
1077 * _name: Component class name (C identifier).
1078 * _x: Help (C string).
1080 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1081 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1084 * Defines a help attribute attached to a filter component class
1085 * descriptor which is attached to the automatic plugin descriptor.
1087 * _name: Component class name (C identifier).
1088 * _x: Help (C string).
1090 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1091 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1094 * Defines a help attribute attached to a sink component class
1095 * descriptor which is attached to the automatic plugin descriptor.
1097 * _name: Component class name (C identifier).
1098 * _x: Help (C string).
1100 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1101 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1104 * Defines an initialization method attribute attached to a source
1105 * component class descriptor which is attached to the automatic plugin
1108 * _name: Component class name (C identifier).
1109 * _x: Initialization method (bt_component_class_source_init_method).
1111 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1112 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1115 * Defines an initialization method attribute attached to a filter
1116 * component class descriptor which is attached to the automatic plugin
1119 * _name: Component class name (C identifier).
1120 * _x: Initialization method (bt_component_class_filter_init_method).
1122 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1123 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1126 * Defines an initialization method attribute attached to a sink
1127 * component class descriptor which is attached to the automatic plugin
1130 * _name: Component class name (C identifier).
1131 * _x: Initialization method (bt_component_class_sink_init_method).
1133 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1134 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1137 * Defines a finalization method attribute attached to a source component
1138 * class descriptor which is attached to the automatic plugin
1141 * _name: Component class name (C identifier).
1142 * _x: Initialization method (bt_component_class_source_finalize_method).
1144 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1145 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1148 * Defines a finalization method attribute attached to a filter component
1149 * class descriptor which is attached to the automatic plugin
1152 * _name: Component class name (C identifier).
1153 * _x: Initialization method (bt_component_class_filter_finalize_method).
1155 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1156 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1159 * Defines a finalization method attribute attached to a sink component class
1160 * descriptor which is attached to the automatic plugin descriptor.
1162 * _name: Component class name (C identifier).
1163 * _x: Initialization method (bt_component_class_sink_finalize_method).
1165 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1166 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1169 * Defines a query method attribute attached to a source component
1170 * class descriptor which is attached to the automatic plugin
1173 * _name: Component class name (C identifier).
1174 * _x: Initialization method (bt_component_class_source_query_method).
1176 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1177 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1180 * Defines a query method attribute attached to a filter component
1181 * class descriptor which is attached to the automatic plugin
1184 * _name: Component class name (C identifier).
1185 * _x: Initialization method (bt_component_class_filter_query_method).
1187 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1188 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1191 * Defines a query method attribute attached to a sink component
1192 * class descriptor which is attached to the automatic plugin
1195 * _name: Component class name (C identifier).
1196 * _x: Initialization method (bt_component_class_sink_query_method).
1198 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1199 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1202 * Defines an accept input port connection method attribute attached to
1203 * a filter component class descriptor which is attached to the
1204 * automatic plugin descriptor.
1206 * _name: Component class name (C identifier).
1207 * _x: Accept port connection method
1208 * (bt_component_class_filter_accept_input_port_connection_method).
1210 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1211 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1214 * Defines an accept input port connection method attribute attached to
1215 * a sink component class descriptor which is attached to the automatic
1216 * plugin descriptor.
1218 * _name: Component class name (C identifier).
1219 * _x: Accept port connection method
1220 * (bt_component_class_sink_accept_input_port_connection_method).
1222 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1223 BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1226 * Defines an accept output port connection method attribute attached to
1227 * a source component class descriptor which is attached to the
1228 * automatic plugin descriptor.
1230 * _name: Component class name (C identifier).
1231 * _x: Accept port connection method
1232 * (bt_component_class_source_accept_output_port_connection_method).
1234 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1235 BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1238 * Defines an accept output port connection method attribute attached to
1239 * a filter component class descriptor which is attached to the
1240 * automatic plugin descriptor.
1242 * _name: Component class name (C identifier).
1243 * _x: Accept port connection method
1244 * (bt_component_class_filter_accept_output_port_connection_method).
1246 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1247 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1250 * Defines an input port connected method attribute attached to a filter
1251 * component class descriptor which is attached to the automatic plugin
1254 * _name: Component class name (C identifier).
1255 * _x: Port connected (bt_component_class_filter_input_port_connected_method).
1257 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1258 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1261 * Defines an input port connected method attribute attached to a sink
1262 * component class descriptor which is attached to the automatic plugin
1265 * _name: Component class name (C identifier).
1266 * _x: Port connected (bt_component_class_sink_input_port_connected_method).
1268 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1269 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1272 * Defines an output port connected method attribute attached to a source
1273 * component class descriptor which is attached to the automatic plugin
1276 * _name: Component class name (C identifier).
1277 * _x: Port connected (bt_component_class_source_output_port_connected_method).
1279 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1280 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1283 * Defines an output port connected method attribute attached to a filter
1284 * component class descriptor which is attached to the automatic plugin
1287 * _name: Component class name (C identifier).
1288 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
1290 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1291 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1294 * Defines an input port disconnected method attribute attached to a
1295 * filter component class descriptor which is attached to the automatic
1296 * plugin descriptor.
1298 * _name: Component class name (C identifier).
1299 * _x: Port disconnected (bt_component_class_filter_input_port_disconnected_method).
1301 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1302 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1305 * Defines an input port disconnected method attribute attached to a
1306 * sink component class descriptor which is attached to the automatic
1307 * plugin descriptor.
1309 * _name: Component class name (C identifier).
1310 * _x: Port disconnected (bt_component_class_sink_input_port_disconnected_method).
1312 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1313 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1316 * Defines an output port disconnected method attribute attached to a
1317 * source component class descriptor which is attached to the automatic
1318 * plugin descriptor.
1320 * _name: Component class name (C identifier).
1321 * _x: Port disconnected (bt_component_class_source_output_port_disconnected_method).
1323 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1324 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1327 * Defines an output port disconnected method attribute attached to a
1328 * filter component class descriptor which is attached to the automatic
1329 * plugin descriptor.
1331 * _name: Component class name (C identifier).
1332 * _x: Port disconnected (bt_component_class_filter_output_port_disconnected_method).
1334 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1335 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1338 * Defines an iterator initialization method attribute attached to a
1339 * source 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_source_notification_iterator_init_method).
1346 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(_name, _x) \
1347 BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1350 * Defines an iterator finalize method attribute attached to a source
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_source_notification_iterator_finalize_method).
1358 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD(_name, _x) \
1359 BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1362 * Defines an iterator initialization method attribute attached to a
1363 * filter component class descriptor which is attached to the automatic
1364 * plugin descriptor.
1366 * _name: Component class name (C identifier).
1367 * _x: Iterator initialization method
1368 * (bt_component_class_filter_notification_iterator_init_method).
1370 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(_name, _x) \
1371 BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1374 * Defines an iterator finalize method attribute attached to a filter
1375 * component class descriptor which is attached to the automatic plugin
1378 * _name: Component class name (C identifier).
1379 * _x: Iterator finalize method
1380 * (bt_component_class_filter_notification_iterator_finalize_method).
1382 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD(_name, _x) \
1383 BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1385 #define BT_PLUGIN_MODULE() \
1386 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
1387 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1388 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
1390 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
1391 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1392 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
1394 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
1395 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1396 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
1398 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; \
1399 _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; \
1400 _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; \
1402 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1404 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1406 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1408 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1410 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1412 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1414 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1416 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1418 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1420 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1422 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1424 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1426 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1428 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1430 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1432 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1439 #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */