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 enum bt_plugin_init_status
{
67 BT_PLUGIN_INIT_STATUS_OK
= 0,
68 BT_PLUGIN_INIT_STATUS_NOMEM
= -12,
69 BT_PLUGIN_INIT_STATUS_ERROR
= -1,
72 typedef enum bt_plugin_init_status (*bt_plugin_init_func
)(
73 const bt_plugin
*plugin
);
75 /* Plugin exit function type */
76 typedef void (*bt_plugin_exit_func
)(void);
78 /* Plugin descriptor: describes a single plugin (internal use) */
79 struct __bt_plugin_descriptor
{
80 /* Plugin's interface major version number */
83 /* Plugin's interface minor version number */
88 } __attribute__((packed
));
90 /* Type of a plugin attribute (internal use) */
91 enum __bt_plugin_descriptor_attribute_type
{
92 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
93 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
94 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
95 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
96 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
97 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
100 /* Plugin (user) version */
101 struct __bt_plugin_descriptor_version
{
108 /* Plugin attribute (internal use) */
109 struct __bt_plugin_descriptor_attribute
{
110 /* Plugin descriptor to which to associate this attribute */
111 const struct __bt_plugin_descriptor
*plugin_descriptor
;
113 /* Name of the attribute's type for debug purposes */
114 const char *type_name
;
116 /* Attribute's type */
117 enum __bt_plugin_descriptor_attribute_type type
;
119 /* Attribute's value (depends on attribute's type) */
121 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
122 bt_plugin_init_func init
;
124 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
125 bt_plugin_exit_func exit
;
127 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
130 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
133 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
134 const char *description
;
136 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
137 struct __bt_plugin_descriptor_version version
;
139 } __attribute__((packed
));
141 /* Component class descriptor (internal use) */
142 struct __bt_plugin_component_class_descriptor
{
144 * Plugin descriptor to which to associate this component
147 const struct __bt_plugin_descriptor
*plugin_descriptor
;
149 /* Component class name */
152 /* Component class type */
153 enum bt_component_class_type type
;
155 /* Mandatory methods (depends on component class type) */
157 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
159 bt_component_class_source_message_iterator_next_method msg_iter_next
;
162 /* BT_COMPONENT_CLASS_TYPE_FILTER */
164 bt_component_class_filter_message_iterator_next_method msg_iter_next
;
167 /* BT_COMPONENT_CLASS_TYPE_SINK */
169 bt_component_class_sink_consume_method consume
;
172 } __attribute__((packed
));
174 /* Type of a component class attribute (internal use) */
175 enum __bt_plugin_component_class_descriptor_attribute_type
{
176 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
177 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
178 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD
= 2,
179 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 3,
180 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 4,
181 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD
= 5,
182 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD
= 6,
183 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 7,
184 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 8,
185 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD
= 9,
186 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD
= 10,
187 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD
= 11,
188 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 12,
191 /* Component class attribute (internal use) */
192 struct __bt_plugin_component_class_descriptor_attribute
{
194 * Component class plugin attribute to which to associate this
195 * component class attribute.
197 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
199 /* Name of the attribute's type for debug purposes */
200 const char *type_name
;
202 /* Attribute's type */
203 enum __bt_plugin_component_class_descriptor_attribute_type type
;
205 /* Attribute's value (depends on attribute's type) */
207 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
208 const char *description
;
210 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
213 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
214 bt_component_class_source_init_method source_init_method
;
215 bt_component_class_filter_init_method filter_init_method
;
216 bt_component_class_sink_init_method sink_init_method
;
218 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
219 bt_component_class_source_finalize_method source_finalize_method
;
220 bt_component_class_filter_finalize_method filter_finalize_method
;
221 bt_component_class_sink_finalize_method sink_finalize_method
;
223 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
224 bt_component_class_source_query_method source_query_method
;
225 bt_component_class_filter_query_method filter_query_method
;
226 bt_component_class_sink_query_method sink_query_method
;
228 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD */
229 bt_component_class_filter_accept_input_port_connection_method filter_accept_input_port_connection_method
;
230 bt_component_class_sink_accept_input_port_connection_method sink_accept_input_port_connection_method
;
232 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD */
233 bt_component_class_source_accept_output_port_connection_method source_accept_output_port_connection_method
;
234 bt_component_class_filter_accept_output_port_connection_method filter_accept_output_port_connection_method
;
236 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
237 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
238 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
240 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
241 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
242 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
244 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD */
245 bt_component_class_filter_input_port_disconnected_method filter_input_port_disconnected_method
;
246 bt_component_class_sink_input_port_disconnected_method sink_input_port_disconnected_method
;
248 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD */
249 bt_component_class_source_output_port_disconnected_method source_output_port_disconnected_method
;
250 bt_component_class_filter_output_port_disconnected_method filter_output_port_disconnected_method
;
252 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD */
253 bt_component_class_source_message_iterator_init_method source_msg_iter_init_method
;
254 bt_component_class_filter_message_iterator_init_method filter_msg_iter_init_method
;
256 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
257 bt_component_class_source_message_iterator_finalize_method source_msg_iter_finalize_method
;
258 bt_component_class_filter_message_iterator_finalize_method filter_msg_iter_finalize_method
;
260 } __attribute__((packed
));
262 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
263 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
264 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
265 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
266 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
267 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
268 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
269 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
272 * Variable attributes for a plugin descriptor pointer to be added to
273 * the plugin descriptor section (internal use).
276 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
277 __attribute__((section("__DATA,btp_desc"), used))
279 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
280 __start___bt_plugin_descriptors
282 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
283 __stop___bt_plugin_descriptors
285 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
286 __asm("section$start$__DATA$btp_desc")
288 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
289 __asm("section$end$__DATA$btp_desc")
293 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
294 __attribute__((section("__bt_plugin_descriptors"), used))
296 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
297 __start___bt_plugin_descriptors
299 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
300 __stop___bt_plugin_descriptors
302 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
304 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
308 * Variable attributes for a plugin attribute pointer to be added to
309 * the plugin attribute section (internal use).
312 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
313 __attribute__((section("__DATA,btp_desc_att"), used))
315 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
316 __start___bt_plugin_descriptor_attributes
318 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
319 __stop___bt_plugin_descriptor_attributes
321 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
322 __asm("section$start$__DATA$btp_desc_att")
324 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
325 __asm("section$end$__DATA$btp_desc_att")
329 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
330 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
332 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
333 __start___bt_plugin_descriptor_attributes
335 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
336 __stop___bt_plugin_descriptor_attributes
338 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
340 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
344 * Variable attributes for a component class descriptor pointer to be
345 * added to the component class descriptor section (internal use).
348 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
349 __attribute__((section("__DATA,btp_cc_desc"), used))
351 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
352 __start___bt_plugin_component_class_descriptors
354 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
355 __stop___bt_plugin_component_class_descriptors
357 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
358 __asm("section$start$__DATA$btp_cc_desc")
360 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
361 __asm("section$end$__DATA$btp_cc_desc")
365 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
366 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
368 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
369 __start___bt_plugin_component_class_descriptors
371 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
372 __stop___bt_plugin_component_class_descriptors
374 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
376 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
380 * Variable attributes for a component class descriptor attribute
381 * pointer to be added to the component class descriptor attribute
382 * section (internal use).
385 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
386 __attribute__((section("__DATA,btp_cc_desc_att"), used))
388 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
389 __start___bt_plugin_component_class_descriptor_attributes
391 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
392 __stop___bt_plugin_component_class_descriptor_attributes
394 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
395 __asm("section$start$__DATA$btp_cc_desc_att")
397 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
398 __asm("section$end$__DATA$btp_cc_desc_att")
402 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
403 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
405 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
406 __start___bt_plugin_component_class_descriptor_attributes
408 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
409 __stop___bt_plugin_component_class_descriptor_attributes
411 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
413 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
417 * Declares a plugin descriptor pointer variable with a custom ID.
419 * _id: ID (any valid C identifier except `auto`).
421 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
424 * Defines a plugin descriptor with a custom ID.
426 * _id: ID (any valid C identifier except `auto`).
427 * _name: Plugin's name (C string).
429 #define BT_PLUGIN_WITH_ID(_id, _name) \
430 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
431 .major = __BT_PLUGIN_VERSION_MAJOR, \
432 .minor = __BT_PLUGIN_VERSION_MINOR, \
435 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
438 * Defines a plugin attribute (generic, internal use).
440 * _attr_name: Name of the attribute (C identifier).
441 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
442 * _id: Plugin descriptor ID (C identifier).
445 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
446 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
447 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
448 .type_name = #_attr_name, \
449 .type = _attr_type, \
450 .value._attr_name = _x, \
452 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
455 * Defines a plugin initialization function attribute attached to a
456 * specific plugin descriptor.
458 * _id: Plugin descriptor ID (C identifier).
459 * _x: Initialization function (bt_plugin_init_func).
461 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
462 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
465 * Defines a plugin exit function attribute attached to a specific
468 * _id: Plugin descriptor ID (C identifier).
469 * _x: Exit function (bt_plugin_exit_func).
471 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
472 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
475 * Defines an author attribute attached to a specific plugin descriptor.
477 * _id: Plugin descriptor ID (C identifier).
478 * _x: Author (C string).
480 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
481 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
484 * Defines a license attribute attached to a specific plugin descriptor.
486 * _id: Plugin descriptor ID (C identifier).
487 * _x: License (C string).
489 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
490 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
493 * Defines a description attribute attached to a specific plugin
496 * _id: Plugin descriptor ID (C identifier).
497 * _x: Description (C string).
499 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
500 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
502 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
503 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
506 * Defines a version attribute attached to a specific plugin descriptor.
508 * _id: Plugin descriptor ID (C identifier).
509 * _major: Plugin's major version (uint32_t).
510 * _minor: Plugin's minor version (uint32_t).
511 * _patch: Plugin's patch version (uint32_t).
512 * _extra: Plugin's version extra information (C string).
514 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
515 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
518 * Defines a source component class descriptor with a custom ID.
520 * _id: ID (any valid C identifier except `auto`).
521 * _comp_class_id: Component class ID (C identifier).
522 * _name: Component class name (C string).
523 * _msg_iter_next_method: Component class's iterator next method
524 * (bt_component_class_source_message_iterator_next_method).
526 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
527 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
528 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
530 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
531 .methods.source = { \
532 .msg_iter_next = _msg_iter_next_method, \
535 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
538 * Defines a filter component class descriptor with a custom ID.
540 * _id: ID (any valid C identifier except `auto`).
541 * _comp_class_id: Component class ID (C identifier).
542 * _name: Component class name (C string).
543 * _msg_iter_next_method: Component class's iterator next method
544 * (bt_component_class_filter_message_iterator_next_method).
546 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
547 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
548 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
550 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
551 .methods.filter = { \
552 .msg_iter_next = _msg_iter_next_method, \
555 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
558 * Defines a sink component class descriptor with a custom ID.
560 * _id: ID (any valid C identifier except `auto`).
561 * _comp_class_id: Component class ID (C identifier).
562 * _name: Component class name (C string).
563 * _consume_method: Component class's iterator consume method
564 * (bt_component_class_sink_consume_method).
566 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
567 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
568 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
570 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
572 .consume = _consume_method, \
575 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
578 * Defines a component class descriptor attribute (generic, internal
581 * _id: Plugin descriptor ID (C identifier).
582 * _comp_class_id: Component class ID (C identifier).
583 * _type: Component class type (`source`, `filter`, or `sink`).
584 * _attr_name: Name of the attribute (C identifier).
585 * _attr_type: Type of the attribute
586 * (enum __bt_plugin_descriptor_attribute_type).
589 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
590 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
591 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
592 .type_name = #_attr_name, \
593 .type = _attr_type, \
594 .value._attr_name = _x, \
596 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
599 * Defines a description attribute attached to a specific source
600 * component class descriptor.
602 * _id: Plugin descriptor ID (C identifier).
603 * _comp_class_id: Component class descriptor ID (C identifier).
604 * _x: Description (C string).
606 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
607 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
610 * Defines a description attribute attached to a specific filter
611 * component class descriptor.
613 * _id: Plugin descriptor ID (C identifier).
614 * _comp_class_id: Component class descriptor ID (C identifier).
615 * _x: Description (C string).
617 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
618 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
621 * Defines a description attribute attached to a specific sink
622 * component class descriptor.
624 * _id: Plugin descriptor ID (C identifier).
625 * _comp_class_id: Component class descriptor ID (C identifier).
626 * _x: Description (C string).
628 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
629 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
632 * Defines a help attribute attached to a specific source component
635 * _id: Plugin descriptor ID (C identifier).
636 * _comp_class_id: Component class descriptor ID (C identifier).
637 * _x: Help (C string).
639 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
640 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
643 * Defines a help attribute attached to a specific filter component
646 * _id: Plugin descriptor ID (C identifier).
647 * _comp_class_id: Component class descriptor ID (C identifier).
648 * _x: Help (C string).
650 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
651 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
654 * Defines a help attribute attached to a specific sink component class
657 * _id: Plugin descriptor ID (C identifier).
658 * _comp_class_id: Component class descriptor ID (C identifier).
659 * _x: Help (C string).
661 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
662 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
665 * Defines an initialization method attribute attached to a specific
666 * source component class descriptor.
668 * _id: Plugin descriptor ID (C identifier).
669 * _comp_class_id: Component class descriptor ID (C identifier).
670 * _x: Initialization method (bt_component_class_source_init_method).
672 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
673 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
676 * Defines an initialization method attribute attached to a specific
677 * filter component class descriptor.
679 * _id: Plugin descriptor ID (C identifier).
680 * _comp_class_id: Component class descriptor ID (C identifier).
681 * _x: Initialization method (bt_component_class_filter_init_method).
683 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
684 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
687 * Defines an initialization method attribute attached to a specific
688 * sink component class descriptor.
690 * _id: Plugin descriptor ID (C identifier).
691 * _comp_class_id: Component class descriptor ID (C identifier).
692 * _x: Initialization method (bt_component_class_sink_init_method).
694 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
695 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
698 * Defines a finalization method attribute attached to a specific source
699 * component class descriptor.
701 * _id: Plugin descriptor ID (C identifier).
702 * _comp_class_id: Component class descriptor ID (C identifier).
703 * _x: Finalize method (bt_component_class_source_finalize_method).
705 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
706 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
709 * Defines a finalization method attribute attached to a specific filter
710 * component class descriptor.
712 * _id: Plugin descriptor ID (C identifier).
713 * _comp_class_id: Component class descriptor ID (C identifier).
714 * _x: Finalize method (bt_component_class_filter_finalize_method).
716 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
717 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
720 * Defines a finalization method attribute attached to a specific sink
721 * component class descriptor.
723 * _id: Plugin descriptor ID (C identifier).
724 * _comp_class_id: Component class descriptor ID (C identifier).
725 * _x: Finalize method (bt_component_class_sink_finalize_method).
727 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
728 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
731 * Defines a query method attribute attached to a specific source
732 * component class descriptor.
734 * _id: Plugin descriptor ID (C identifier).
735 * _comp_class_id: Component class descriptor ID (C identifier).
736 * _x: Finalize method (bt_component_class_source_query_method).
738 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
739 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
742 * Defines a query method attribute attached to a specific filter
743 * component class descriptor.
745 * _id: Plugin descriptor ID (C identifier).
746 * _comp_class_id: Component class descriptor ID (C identifier).
747 * _x: Finalize method (bt_component_class_filter_query_method).
749 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
750 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
753 * Defines a query method attribute attached to a specific sink
754 * component class descriptor.
756 * _id: Plugin descriptor ID (C identifier).
757 * _comp_class_id: Component class descriptor ID (C identifier).
758 * _x: Finalize method (bt_component_class_sink_query_method).
760 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
761 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
764 * Defines an accept input port connection method attribute attached to
765 * a specific filter component class descriptor.
767 * _id: Plugin descriptor ID (C identifier).
768 * _comp_class_id: Component class descriptor ID (C identifier).
769 * _x: Accept port connection method
770 * (bt_component_class_filter_accept_input_port_connection_method).
772 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
773 __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)
776 * Defines an accept input port connection method attribute attached to
777 * a specific sink component class descriptor.
779 * _id: Plugin descriptor ID (C identifier).
780 * _comp_class_id: Component class descriptor ID (C identifier).
781 * _x: Accept port connection method
782 * (bt_component_class_sink_accept_input_port_connection_method).
784 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
785 __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)
788 * Defines an accept output port connection method attribute attached to
789 * a specific source component class descriptor.
791 * _id: Plugin descriptor ID (C identifier).
792 * _comp_class_id: Component class descriptor ID (C identifier).
793 * _x: Accept port connection method
794 * (bt_component_class_source_accept_output_port_connection_method).
796 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
797 __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)
800 * Defines an accept output port connection method attribute attached to
801 * a specific filter component class descriptor.
803 * _id: Plugin descriptor ID (C identifier).
804 * _comp_class_id: Component class descriptor ID (C identifier).
805 * _x: Accept port connection method
806 * (bt_component_class_filter_accept_output_port_connection_method).
808 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
809 __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)
812 * Defines an input port connected method attribute attached to a
813 * specific filter component class descriptor.
815 * _id: Plugin descriptor ID (C identifier).
816 * _comp_class_id: Component class descriptor ID (C identifier).
817 * _x: Port connected method
818 * (bt_component_class_filter_input_port_connected_method).
820 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
821 __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)
824 * Defines an input port connected method attribute attached to a
825 * specific sink component class descriptor.
827 * _id: Plugin descriptor ID (C identifier).
828 * _comp_class_id: Component class descriptor ID (C identifier).
829 * _x: Port connected method
830 * (bt_component_class_sink_input_port_connected_method).
832 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
833 __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)
836 * Defines an output port connected method attribute attached to a
837 * specific source component class descriptor.
839 * _id: Plugin descriptor ID (C identifier).
840 * _comp_class_id: Component class descriptor ID (C identifier).
841 * _x: Port connected method
842 * (bt_component_class_source_output_port_connected_method).
844 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
845 __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)
848 * Defines an output port connected method attribute attached to a
849 * specific filter component class descriptor.
851 * _id: Plugin descriptor ID (C identifier).
852 * _comp_class_id: Component class descriptor ID (C identifier).
853 * _x: Port connected method
854 * (bt_component_class_filter_output_port_connected_method).
856 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
857 __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)
860 * Defines an input port disconnected method attribute attached to a
861 * specific filter component class descriptor.
863 * _id: Plugin descriptor ID (C identifier).
864 * _comp_class_id: Component class descriptor ID (C identifier).
865 * _x: Port disconnected method
866 * (bt_component_class_filter_input_port_disconnected_method).
868 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
869 __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)
872 * Defines an input port disconnected method attribute attached to a
873 * specific sink component class descriptor.
875 * _id: Plugin descriptor ID (C identifier).
876 * _comp_class_id: Component class descriptor ID (C identifier).
877 * _x: Port disconnected method
878 * (bt_component_class_sink_input_port_disconnected_method).
880 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
881 __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)
884 * Defines an output port disconnected method attribute attached to a
885 * specific source component class descriptor.
887 * _id: Plugin descriptor ID (C identifier).
888 * _comp_class_id: Component class descriptor ID (C identifier).
889 * _x: Port disconnected method
890 * (bt_component_class_source_output_port_disconnected_method).
892 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
893 __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)
896 * Defines an output port disconnected method attribute attached to a
897 * specific filter component class descriptor.
899 * _id: Plugin descriptor ID (C identifier).
900 * _comp_class_id: Component class descriptor ID (C identifier).
901 * _x: Port disconnected method
902 * (bt_component_class_filter_output_port_disconnected_method).
904 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
905 __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)
908 * Defines an iterator initialization method attribute attached to a
909 * specific source component class descriptor.
911 * _id: Plugin descriptor ID (C identifier).
912 * _comp_class_id: Component class descriptor ID (C identifier).
913 * _x: Iterator initialization method
914 * (bt_component_class_source_message_iterator_init_method).
916 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
917 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD, _id, _comp_class_id, source, _x)
920 * Defines an iterator finalize method attribute attached to a specific
921 * source component class descriptor.
923 * _id: Plugin descriptor ID (C identifier).
924 * _comp_class_id: Component class descriptor ID (C identifier).
925 * _x: Iterator finalize method
926 * (bt_component_class_source_message_iterator_finalize_method).
928 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
929 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
932 * Defines an iterator initialization method attribute attached to a
933 * specific filter component class descriptor.
935 * _id: Plugin descriptor ID (C identifier).
936 * _comp_class_id: Component class descriptor ID (C identifier).
937 * _x: Iterator initialization method
938 * (bt_component_class_filter_message_iterator_init_method).
940 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
941 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD, _id, _comp_class_id, filter, _x)
944 * Defines an iterator finalize method attribute attached to a specific
945 * filter component class descriptor.
947 * _id: Plugin descriptor ID (C identifier).
948 * _comp_class_id: Component class descriptor ID (C identifier).
949 * _x: Iterator finalize method
950 * (bt_component_class_filter_message_iterator_finalize_method).
952 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
953 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
956 * Defines a plugin descriptor with an automatic ID.
958 * _name: Plugin's name (C string).
960 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
963 * Defines a plugin initialization function attribute attached to the
964 * automatic plugin descriptor.
966 * _x: Initialization function (bt_plugin_init_func).
968 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
971 * Defines a plugin exit function attribute attached to the automatic
974 * _x: Exit function (bt_plugin_exit_func).
976 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
979 * Defines an author attribute attached to the automatic plugin
982 * _x: Author (C string).
984 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
987 * Defines a license attribute attached to the automatic plugin
990 * _x: License (C string).
992 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
995 * Defines a description attribute attached to the automatic plugin
998 * _x: Description (C string).
1000 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
1003 * Defines a version attribute attached to the automatic plugin
1006 * _major: Plugin's major version (uint32_t).
1007 * _minor: Plugin's minor version (uint32_t).
1008 * _patch: Plugin's patch version (uint32_t).
1009 * _extra: Plugin's version extra information (C string).
1011 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
1014 * Defines a source component class attached to the automatic plugin
1015 * descriptor. Its ID is the same as its name, hence its name must be a
1016 * C identifier in this version.
1018 * _name: Component class name (C identifier).
1019 * _msg_iter_next_method: Component class's iterator next method
1020 * (bt_component_class_source_message_iterator_next_method).
1022 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1023 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1026 * Defines a filter component class attached to the automatic plugin
1027 * descriptor. Its ID is the same as its name, hence its name must be a
1028 * C identifier in this version.
1030 * _name: Component class name (C identifier).
1031 * _msg_iter_next_method: Component class's iterator next method
1032 * (bt_component_class_filter_message_iterator_next_method).
1034 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1035 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1038 * Defines a sink component class attached to the automatic plugin
1039 * descriptor. Its ID is the same as its name, hence its name must be a
1040 * C identifier in this version.
1042 * _name: Component class name (C identifier).
1043 * _consume_method: Component class's consume method
1044 * (bt_component_class_sink_consume_method).
1046 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1047 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1050 * Defines a description attribute attached to a source component class
1051 * descriptor which is attached to the automatic plugin descriptor.
1053 * _name: Component class name (C identifier).
1054 * _x: Description (C string).
1056 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1057 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1060 * Defines a description attribute attached to a filter component class
1061 * descriptor which is attached to the automatic plugin descriptor.
1063 * _name: Component class name (C identifier).
1064 * _x: Description (C string).
1066 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1067 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1070 * Defines a description attribute attached to a sink component class
1071 * descriptor which is attached to the automatic plugin descriptor.
1073 * _name: Component class name (C identifier).
1074 * _x: Description (C string).
1076 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1077 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1080 * Defines a help attribute attached to a source component class
1081 * descriptor which is attached to the automatic plugin descriptor.
1083 * _name: Component class name (C identifier).
1084 * _x: Help (C string).
1086 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1087 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1090 * Defines a help attribute attached to a filter component class
1091 * descriptor which is attached to the automatic plugin descriptor.
1093 * _name: Component class name (C identifier).
1094 * _x: Help (C string).
1096 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1097 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1100 * Defines a help attribute attached to a sink component class
1101 * descriptor which is attached to the automatic plugin descriptor.
1103 * _name: Component class name (C identifier).
1104 * _x: Help (C string).
1106 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1107 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1110 * Defines an initialization method attribute attached to a source
1111 * component class descriptor which is attached to the automatic plugin
1114 * _name: Component class name (C identifier).
1115 * _x: Initialization method (bt_component_class_source_init_method).
1117 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1118 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1121 * Defines an initialization method attribute attached to a filter
1122 * component class descriptor which is attached to the automatic plugin
1125 * _name: Component class name (C identifier).
1126 * _x: Initialization method (bt_component_class_filter_init_method).
1128 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1129 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1132 * Defines an initialization method attribute attached to a sink
1133 * component class descriptor which is attached to the automatic plugin
1136 * _name: Component class name (C identifier).
1137 * _x: Initialization method (bt_component_class_sink_init_method).
1139 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1140 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1143 * Defines a finalization method attribute attached to a source component
1144 * class descriptor which is attached to the automatic plugin
1147 * _name: Component class name (C identifier).
1148 * _x: Initialization method (bt_component_class_source_finalize_method).
1150 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1151 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1154 * Defines a finalization method attribute attached to a filter component
1155 * class descriptor which is attached to the automatic plugin
1158 * _name: Component class name (C identifier).
1159 * _x: Initialization method (bt_component_class_filter_finalize_method).
1161 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1162 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1165 * Defines a finalization method attribute attached to a sink component class
1166 * descriptor which is attached to the automatic plugin descriptor.
1168 * _name: Component class name (C identifier).
1169 * _x: Initialization method (bt_component_class_sink_finalize_method).
1171 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1172 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1175 * Defines a query method attribute attached to a source component
1176 * class descriptor which is attached to the automatic plugin
1179 * _name: Component class name (C identifier).
1180 * _x: Initialization method (bt_component_class_source_query_method).
1182 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1183 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1186 * Defines a query method attribute attached to a filter component
1187 * class descriptor which is attached to the automatic plugin
1190 * _name: Component class name (C identifier).
1191 * _x: Initialization method (bt_component_class_filter_query_method).
1193 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1194 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1197 * Defines a query method attribute attached to a sink component
1198 * class descriptor which is attached to the automatic plugin
1201 * _name: Component class name (C identifier).
1202 * _x: Initialization method (bt_component_class_sink_query_method).
1204 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1205 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1208 * Defines an accept input port connection method attribute attached to
1209 * a filter component class descriptor which is attached to the
1210 * automatic plugin descriptor.
1212 * _name: Component class name (C identifier).
1213 * _x: Accept port connection method
1214 * (bt_component_class_filter_accept_input_port_connection_method).
1216 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1217 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1220 * Defines an accept input port connection method attribute attached to
1221 * a sink component class descriptor which is attached to the automatic
1222 * plugin descriptor.
1224 * _name: Component class name (C identifier).
1225 * _x: Accept port connection method
1226 * (bt_component_class_sink_accept_input_port_connection_method).
1228 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1229 BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1232 * Defines an accept output port connection method attribute attached to
1233 * a source component class descriptor which is attached to the
1234 * automatic plugin descriptor.
1236 * _name: Component class name (C identifier).
1237 * _x: Accept port connection method
1238 * (bt_component_class_source_accept_output_port_connection_method).
1240 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1241 BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1244 * Defines an accept output port connection method attribute attached to
1245 * a filter component class descriptor which is attached to the
1246 * automatic plugin descriptor.
1248 * _name: Component class name (C identifier).
1249 * _x: Accept port connection method
1250 * (bt_component_class_filter_accept_output_port_connection_method).
1252 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1253 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1256 * Defines an input port connected method attribute attached to a filter
1257 * component class descriptor which is attached to the automatic plugin
1260 * _name: Component class name (C identifier).
1261 * _x: Port connected (bt_component_class_filter_input_port_connected_method).
1263 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1264 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1267 * Defines an input port connected method attribute attached to a sink
1268 * component class descriptor which is attached to the automatic plugin
1271 * _name: Component class name (C identifier).
1272 * _x: Port connected (bt_component_class_sink_input_port_connected_method).
1274 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1275 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1278 * Defines an output port connected method attribute attached to a source
1279 * component class descriptor which is attached to the automatic plugin
1282 * _name: Component class name (C identifier).
1283 * _x: Port connected (bt_component_class_source_output_port_connected_method).
1285 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1286 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1289 * Defines an output port connected method attribute attached to a filter
1290 * component class descriptor which is attached to the automatic plugin
1293 * _name: Component class name (C identifier).
1294 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
1296 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1297 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1300 * Defines an input port disconnected method attribute attached to a
1301 * filter component class descriptor which is attached to the automatic
1302 * plugin descriptor.
1304 * _name: Component class name (C identifier).
1305 * _x: Port disconnected (bt_component_class_filter_input_port_disconnected_method).
1307 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1308 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1311 * Defines an input port disconnected method attribute attached to a
1312 * sink component class descriptor which is attached to the automatic
1313 * plugin descriptor.
1315 * _name: Component class name (C identifier).
1316 * _x: Port disconnected (bt_component_class_sink_input_port_disconnected_method).
1318 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1319 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1322 * Defines an output port disconnected method attribute attached to a
1323 * source component class descriptor which is attached to the automatic
1324 * plugin descriptor.
1326 * _name: Component class name (C identifier).
1327 * _x: Port disconnected (bt_component_class_source_output_port_disconnected_method).
1329 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1330 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1333 * Defines an output port disconnected method attribute attached to a
1334 * filter component class descriptor which is attached to the automatic
1335 * plugin descriptor.
1337 * _name: Component class name (C identifier).
1338 * _x: Port disconnected (bt_component_class_filter_output_port_disconnected_method).
1340 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1341 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1344 * Defines an iterator initialization method attribute attached to a
1345 * source component class descriptor which is attached to the automatic
1346 * plugin descriptor.
1348 * _name: Component class name (C identifier).
1349 * _x: Iterator initialization method
1350 * (bt_component_class_source_message_iterator_init_method).
1352 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1353 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1356 * Defines an iterator finalize method attribute attached to a source
1357 * component class descriptor which is attached to the automatic plugin
1360 * _name: Component class name (C identifier).
1361 * _x: Iterator finalize method
1362 * (bt_component_class_source_message_iterator_finalize_method).
1364 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1365 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1368 * Defines an iterator initialization method attribute attached to a
1369 * filter component class descriptor which is attached to the automatic
1370 * plugin descriptor.
1372 * _name: Component class name (C identifier).
1373 * _x: Iterator initialization method
1374 * (bt_component_class_filter_message_iterator_init_method).
1376 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1377 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1380 * Defines an iterator finalize method attribute attached to a filter
1381 * component class descriptor which is attached to the automatic plugin
1384 * _name: Component class name (C identifier).
1385 * _x: Iterator finalize method
1386 * (bt_component_class_filter_message_iterator_finalize_method).
1388 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1389 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1391 #define BT_PLUGIN_MODULE() \
1392 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
1393 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1394 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
1396 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
1397 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1398 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
1400 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
1401 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1402 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
1404 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; \
1405 _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; \
1406 _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; \
1408 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1410 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1412 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1414 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1416 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1418 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1420 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1422 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1424 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1426 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1428 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1430 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1432 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1434 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1436 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1438 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1445 #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */