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 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.h>
40 #include <babeltrace/graph/component-class-filter.h>
41 #include <babeltrace/graph/component-class-sink.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_self_plugin_status
{
67 BT_SELF_PLUGIN_STATUS_OK
= 0,
68 BT_SELF_PLUGIN_STATUS_NOMEM
= -12,
69 BT_SELF_PLUGIN_STATUS_ERROR
= -1,
70 } bt_self_plugin_status
;
72 typedef struct bt_self_plugin bt_self_plugin
;
74 typedef bt_self_plugin_status (*bt_plugin_init_func
)(
75 bt_self_plugin
*plugin
);
77 /* Plugin exit function type */
78 typedef void (*bt_plugin_exit_func
)(void);
80 /* Plugin descriptor: describes a single plugin (internal use) */
81 struct __bt_plugin_descriptor
{
82 /* Plugin's interface major version number */
85 /* Plugin's interface minor version number */
90 } __attribute__((packed
));
92 /* Type of a plugin attribute (internal use) */
93 enum __bt_plugin_descriptor_attribute_type
{
94 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
95 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
96 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
97 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
98 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
99 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
102 /* Plugin (user) version */
103 struct __bt_plugin_descriptor_version
{
110 /* Plugin attribute (internal use) */
111 struct __bt_plugin_descriptor_attribute
{
112 /* Plugin descriptor to which to associate this attribute */
113 const struct __bt_plugin_descriptor
*plugin_descriptor
;
115 /* Name of the attribute's type for debug purposes */
116 const char *type_name
;
118 /* Attribute's type */
119 enum __bt_plugin_descriptor_attribute_type type
;
121 /* Attribute's value (depends on attribute's type) */
123 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
124 bt_plugin_init_func init
;
126 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
127 bt_plugin_exit_func exit
;
129 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
132 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
135 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
136 const char *description
;
138 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
139 struct __bt_plugin_descriptor_version version
;
141 } __attribute__((packed
));
143 /* Component class descriptor (internal use) */
144 struct __bt_plugin_component_class_descriptor
{
146 * Plugin descriptor to which to associate this component
149 const struct __bt_plugin_descriptor
*plugin_descriptor
;
151 /* Component class name */
154 /* Component class type */
155 bt_component_class_type type
;
157 /* Mandatory methods (depends on component class type) */
159 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
161 bt_component_class_source_message_iterator_next_method msg_iter_next
;
164 /* BT_COMPONENT_CLASS_TYPE_FILTER */
166 bt_component_class_filter_message_iterator_next_method msg_iter_next
;
169 /* BT_COMPONENT_CLASS_TYPE_SINK */
171 bt_component_class_sink_consume_method consume
;
174 } __attribute__((packed
));
176 /* Type of a component class attribute (internal use) */
177 enum __bt_plugin_component_class_descriptor_attribute_type
{
178 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
179 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
180 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD
= 2,
181 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 3,
182 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 4,
183 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD
= 5,
184 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD
= 6,
185 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 7,
186 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 8,
187 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD
= 9,
188 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD
= 10,
189 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD
= 11,
190 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 12,
193 /* Component class attribute (internal use) */
194 struct __bt_plugin_component_class_descriptor_attribute
{
196 * Component class plugin attribute to which to associate this
197 * component class attribute.
199 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
201 /* Name of the attribute's type for debug purposes */
202 const char *type_name
;
204 /* Attribute's type */
205 enum __bt_plugin_component_class_descriptor_attribute_type type
;
207 /* Attribute's value (depends on attribute's type) */
209 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
210 const char *description
;
212 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
215 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
216 bt_component_class_source_init_method source_init_method
;
217 bt_component_class_filter_init_method filter_init_method
;
218 bt_component_class_sink_init_method sink_init_method
;
220 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
221 bt_component_class_source_finalize_method source_finalize_method
;
222 bt_component_class_filter_finalize_method filter_finalize_method
;
223 bt_component_class_sink_finalize_method sink_finalize_method
;
225 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
226 bt_component_class_source_query_method source_query_method
;
227 bt_component_class_filter_query_method filter_query_method
;
228 bt_component_class_sink_query_method sink_query_method
;
230 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD */
231 bt_component_class_filter_accept_input_port_connection_method filter_accept_input_port_connection_method
;
232 bt_component_class_sink_accept_input_port_connection_method sink_accept_input_port_connection_method
;
234 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD */
235 bt_component_class_source_accept_output_port_connection_method source_accept_output_port_connection_method
;
236 bt_component_class_filter_accept_output_port_connection_method filter_accept_output_port_connection_method
;
238 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
239 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
240 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
242 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
243 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
244 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
246 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD */
247 bt_component_class_filter_input_port_disconnected_method filter_input_port_disconnected_method
;
248 bt_component_class_sink_input_port_disconnected_method sink_input_port_disconnected_method
;
250 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD */
251 bt_component_class_source_output_port_disconnected_method source_output_port_disconnected_method
;
252 bt_component_class_filter_output_port_disconnected_method filter_output_port_disconnected_method
;
254 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD */
255 bt_component_class_source_message_iterator_init_method source_msg_iter_init_method
;
256 bt_component_class_filter_message_iterator_init_method filter_msg_iter_init_method
;
258 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
259 bt_component_class_source_message_iterator_finalize_method source_msg_iter_finalize_method
;
260 bt_component_class_filter_message_iterator_finalize_method filter_msg_iter_finalize_method
;
262 } __attribute__((packed
));
264 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
265 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
266 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
267 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
268 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
269 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
270 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
271 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
274 * Variable attributes for a plugin descriptor pointer to be added to
275 * the plugin descriptor section (internal use).
278 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
279 __attribute__((section("__DATA,btp_desc"), used))
281 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
282 __start___bt_plugin_descriptors
284 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
285 __stop___bt_plugin_descriptors
287 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
288 __asm("section$start$__DATA$btp_desc")
290 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
291 __asm("section$end$__DATA$btp_desc")
295 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
296 __attribute__((section("__bt_plugin_descriptors"), used))
298 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
299 __start___bt_plugin_descriptors
301 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
302 __stop___bt_plugin_descriptors
304 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
306 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
310 * Variable attributes for a plugin attribute pointer to be added to
311 * the plugin attribute section (internal use).
314 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
315 __attribute__((section("__DATA,btp_desc_att"), used))
317 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
318 __start___bt_plugin_descriptor_attributes
320 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
321 __stop___bt_plugin_descriptor_attributes
323 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
324 __asm("section$start$__DATA$btp_desc_att")
326 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
327 __asm("section$end$__DATA$btp_desc_att")
331 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
332 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
334 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
335 __start___bt_plugin_descriptor_attributes
337 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
338 __stop___bt_plugin_descriptor_attributes
340 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
342 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
346 * Variable attributes for a component class descriptor pointer to be
347 * added to the component class descriptor section (internal use).
350 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
351 __attribute__((section("__DATA,btp_cc_desc"), used))
353 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
354 __start___bt_plugin_component_class_descriptors
356 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
357 __stop___bt_plugin_component_class_descriptors
359 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
360 __asm("section$start$__DATA$btp_cc_desc")
362 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
363 __asm("section$end$__DATA$btp_cc_desc")
367 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
368 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
370 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
371 __start___bt_plugin_component_class_descriptors
373 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
374 __stop___bt_plugin_component_class_descriptors
376 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
378 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
382 * Variable attributes for a component class descriptor attribute
383 * pointer to be added to the component class descriptor attribute
384 * section (internal use).
387 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
388 __attribute__((section("__DATA,btp_cc_desc_att"), used))
390 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
391 __start___bt_plugin_component_class_descriptor_attributes
393 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
394 __stop___bt_plugin_component_class_descriptor_attributes
396 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
397 __asm("section$start$__DATA$btp_cc_desc_att")
399 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
400 __asm("section$end$__DATA$btp_cc_desc_att")
404 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
405 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
407 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
408 __start___bt_plugin_component_class_descriptor_attributes
410 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
411 __stop___bt_plugin_component_class_descriptor_attributes
413 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
415 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
419 * Declares a plugin descriptor pointer variable with a custom ID.
421 * _id: ID (any valid C identifier except `auto`).
423 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
426 * Defines a plugin descriptor with a custom ID.
428 * _id: ID (any valid C identifier except `auto`).
429 * _name: Plugin's name (C string).
431 #define BT_PLUGIN_WITH_ID(_id, _name) \
432 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
433 .major = __BT_PLUGIN_VERSION_MAJOR, \
434 .minor = __BT_PLUGIN_VERSION_MINOR, \
437 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
440 * Defines a plugin attribute (generic, internal use).
442 * _attr_name: Name of the attribute (C identifier).
443 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
444 * _id: Plugin descriptor ID (C identifier).
447 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
448 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
449 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
450 .type_name = #_attr_name, \
451 .type = _attr_type, \
452 .value._attr_name = _x, \
454 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
457 * Defines a plugin initialization function attribute attached to a
458 * specific plugin descriptor.
460 * _id: Plugin descriptor ID (C identifier).
461 * _x: Initialization function (bt_plugin_init_func).
463 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
464 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
467 * Defines a plugin exit function attribute attached to a specific
470 * _id: Plugin descriptor ID (C identifier).
471 * _x: Exit function (bt_plugin_exit_func).
473 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
474 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
477 * Defines an author attribute attached to a specific plugin descriptor.
479 * _id: Plugin descriptor ID (C identifier).
480 * _x: Author (C string).
482 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
483 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
486 * Defines a license attribute attached to a specific plugin descriptor.
488 * _id: Plugin descriptor ID (C identifier).
489 * _x: License (C string).
491 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
492 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
495 * Defines a description attribute attached to a specific plugin
498 * _id: Plugin descriptor ID (C identifier).
499 * _x: Description (C string).
501 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
502 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
504 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
505 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
508 * Defines a version attribute attached to a specific plugin descriptor.
510 * _id: Plugin descriptor ID (C identifier).
511 * _major: Plugin's major version (uint32_t).
512 * _minor: Plugin's minor version (uint32_t).
513 * _patch: Plugin's patch version (uint32_t).
514 * _extra: Plugin's version extra information (C string).
516 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
517 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
520 * Defines a source component class descriptor with a custom ID.
522 * _id: ID (any valid C identifier except `auto`).
523 * _comp_class_id: Component class ID (C identifier).
524 * _name: Component class name (C string).
525 * _msg_iter_next_method: Component class's iterator next method
526 * (bt_component_class_source_message_iterator_next_method).
528 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
529 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
530 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
532 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
533 .methods.source = { \
534 .msg_iter_next = _msg_iter_next_method, \
537 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
540 * Defines a filter component class descriptor with a custom ID.
542 * _id: ID (any valid C identifier except `auto`).
543 * _comp_class_id: Component class ID (C identifier).
544 * _name: Component class name (C string).
545 * _msg_iter_next_method: Component class's iterator next method
546 * (bt_component_class_filter_message_iterator_next_method).
548 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
549 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
550 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
552 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
553 .methods.filter = { \
554 .msg_iter_next = _msg_iter_next_method, \
557 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
560 * Defines a sink component class descriptor with a custom ID.
562 * _id: ID (any valid C identifier except `auto`).
563 * _comp_class_id: Component class ID (C identifier).
564 * _name: Component class name (C string).
565 * _consume_method: Component class's iterator consume method
566 * (bt_component_class_sink_consume_method).
568 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
569 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
570 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
572 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
574 .consume = _consume_method, \
577 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
580 * Defines a component class descriptor attribute (generic, internal
583 * _id: Plugin descriptor ID (C identifier).
584 * _comp_class_id: Component class ID (C identifier).
585 * _type: Component class type (`source`, `filter`, or `sink`).
586 * _attr_name: Name of the attribute (C identifier).
587 * _attr_type: Type of the attribute
588 * (enum __bt_plugin_descriptor_attribute_type).
591 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
592 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
593 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
594 .type_name = #_attr_name, \
595 .type = _attr_type, \
596 .value._attr_name = _x, \
598 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
601 * Defines a description attribute attached to a specific source
602 * component class descriptor.
604 * _id: Plugin descriptor ID (C identifier).
605 * _comp_class_id: Component class descriptor ID (C identifier).
606 * _x: Description (C string).
608 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
609 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
612 * Defines a description attribute attached to a specific filter
613 * component class descriptor.
615 * _id: Plugin descriptor ID (C identifier).
616 * _comp_class_id: Component class descriptor ID (C identifier).
617 * _x: Description (C string).
619 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
620 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
623 * Defines a description attribute attached to a specific sink
624 * component class descriptor.
626 * _id: Plugin descriptor ID (C identifier).
627 * _comp_class_id: Component class descriptor ID (C identifier).
628 * _x: Description (C string).
630 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
631 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
634 * Defines a help attribute attached to a specific source component
637 * _id: Plugin descriptor ID (C identifier).
638 * _comp_class_id: Component class descriptor ID (C identifier).
639 * _x: Help (C string).
641 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
642 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
645 * Defines a help attribute attached to a specific filter component
648 * _id: Plugin descriptor ID (C identifier).
649 * _comp_class_id: Component class descriptor ID (C identifier).
650 * _x: Help (C string).
652 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
653 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
656 * Defines a help attribute attached to a specific sink component class
659 * _id: Plugin descriptor ID (C identifier).
660 * _comp_class_id: Component class descriptor ID (C identifier).
661 * _x: Help (C string).
663 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
664 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
667 * Defines an initialization method attribute attached to a specific
668 * source component class descriptor.
670 * _id: Plugin descriptor ID (C identifier).
671 * _comp_class_id: Component class descriptor ID (C identifier).
672 * _x: Initialization method (bt_component_class_source_init_method).
674 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
675 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
678 * Defines an initialization method attribute attached to a specific
679 * filter component class descriptor.
681 * _id: Plugin descriptor ID (C identifier).
682 * _comp_class_id: Component class descriptor ID (C identifier).
683 * _x: Initialization method (bt_component_class_filter_init_method).
685 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
686 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
689 * Defines an initialization method attribute attached to a specific
690 * sink component class descriptor.
692 * _id: Plugin descriptor ID (C identifier).
693 * _comp_class_id: Component class descriptor ID (C identifier).
694 * _x: Initialization method (bt_component_class_sink_init_method).
696 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
697 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
700 * Defines a finalization method attribute attached to a specific source
701 * component class descriptor.
703 * _id: Plugin descriptor ID (C identifier).
704 * _comp_class_id: Component class descriptor ID (C identifier).
705 * _x: Finalize method (bt_component_class_source_finalize_method).
707 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
708 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
711 * Defines a finalization method attribute attached to a specific filter
712 * component class descriptor.
714 * _id: Plugin descriptor ID (C identifier).
715 * _comp_class_id: Component class descriptor ID (C identifier).
716 * _x: Finalize method (bt_component_class_filter_finalize_method).
718 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
719 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
722 * Defines a finalization method attribute attached to a specific sink
723 * component class descriptor.
725 * _id: Plugin descriptor ID (C identifier).
726 * _comp_class_id: Component class descriptor ID (C identifier).
727 * _x: Finalize method (bt_component_class_sink_finalize_method).
729 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
730 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
733 * Defines a query method attribute attached to a specific source
734 * component class descriptor.
736 * _id: Plugin descriptor ID (C identifier).
737 * _comp_class_id: Component class descriptor ID (C identifier).
738 * _x: Finalize method (bt_component_class_source_query_method).
740 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
741 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
744 * Defines a query method attribute attached to a specific filter
745 * component class descriptor.
747 * _id: Plugin descriptor ID (C identifier).
748 * _comp_class_id: Component class descriptor ID (C identifier).
749 * _x: Finalize method (bt_component_class_filter_query_method).
751 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
752 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
755 * Defines a query method attribute attached to a specific sink
756 * component class descriptor.
758 * _id: Plugin descriptor ID (C identifier).
759 * _comp_class_id: Component class descriptor ID (C identifier).
760 * _x: Finalize method (bt_component_class_sink_query_method).
762 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
763 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
766 * Defines an accept input port connection method attribute attached to
767 * a specific filter component class descriptor.
769 * _id: Plugin descriptor ID (C identifier).
770 * _comp_class_id: Component class descriptor ID (C identifier).
771 * _x: Accept port connection method
772 * (bt_component_class_filter_accept_input_port_connection_method).
774 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
775 __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)
778 * Defines an accept input port connection method attribute attached to
779 * a specific sink component class descriptor.
781 * _id: Plugin descriptor ID (C identifier).
782 * _comp_class_id: Component class descriptor ID (C identifier).
783 * _x: Accept port connection method
784 * (bt_component_class_sink_accept_input_port_connection_method).
786 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
787 __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)
790 * Defines an accept output port connection method attribute attached to
791 * a specific source component class descriptor.
793 * _id: Plugin descriptor ID (C identifier).
794 * _comp_class_id: Component class descriptor ID (C identifier).
795 * _x: Accept port connection method
796 * (bt_component_class_source_accept_output_port_connection_method).
798 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
799 __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)
802 * Defines an accept output port connection method attribute attached to
803 * a specific filter component class descriptor.
805 * _id: Plugin descriptor ID (C identifier).
806 * _comp_class_id: Component class descriptor ID (C identifier).
807 * _x: Accept port connection method
808 * (bt_component_class_filter_accept_output_port_connection_method).
810 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
811 __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)
814 * Defines an input port connected method attribute attached to a
815 * specific filter component class descriptor.
817 * _id: Plugin descriptor ID (C identifier).
818 * _comp_class_id: Component class descriptor ID (C identifier).
819 * _x: Port connected method
820 * (bt_component_class_filter_input_port_connected_method).
822 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
823 __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)
826 * Defines an input port connected method attribute attached to a
827 * specific sink component class descriptor.
829 * _id: Plugin descriptor ID (C identifier).
830 * _comp_class_id: Component class descriptor ID (C identifier).
831 * _x: Port connected method
832 * (bt_component_class_sink_input_port_connected_method).
834 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
835 __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)
838 * Defines an output port connected method attribute attached to a
839 * specific source component class descriptor.
841 * _id: Plugin descriptor ID (C identifier).
842 * _comp_class_id: Component class descriptor ID (C identifier).
843 * _x: Port connected method
844 * (bt_component_class_source_output_port_connected_method).
846 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
847 __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)
850 * Defines an output port connected method attribute attached to a
851 * specific filter component class descriptor.
853 * _id: Plugin descriptor ID (C identifier).
854 * _comp_class_id: Component class descriptor ID (C identifier).
855 * _x: Port connected method
856 * (bt_component_class_filter_output_port_connected_method).
858 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
859 __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)
862 * Defines an input port disconnected method attribute attached to a
863 * specific filter component class descriptor.
865 * _id: Plugin descriptor ID (C identifier).
866 * _comp_class_id: Component class descriptor ID (C identifier).
867 * _x: Port disconnected method
868 * (bt_component_class_filter_input_port_disconnected_method).
870 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
871 __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)
874 * Defines an input port disconnected method attribute attached to a
875 * specific sink component class descriptor.
877 * _id: Plugin descriptor ID (C identifier).
878 * _comp_class_id: Component class descriptor ID (C identifier).
879 * _x: Port disconnected method
880 * (bt_component_class_sink_input_port_disconnected_method).
882 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
883 __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)
886 * Defines an output port disconnected method attribute attached to a
887 * specific source component class descriptor.
889 * _id: Plugin descriptor ID (C identifier).
890 * _comp_class_id: Component class descriptor ID (C identifier).
891 * _x: Port disconnected method
892 * (bt_component_class_source_output_port_disconnected_method).
894 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
895 __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)
898 * Defines an output port disconnected method attribute attached to a
899 * specific filter component class descriptor.
901 * _id: Plugin descriptor ID (C identifier).
902 * _comp_class_id: Component class descriptor ID (C identifier).
903 * _x: Port disconnected method
904 * (bt_component_class_filter_output_port_disconnected_method).
906 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
907 __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)
910 * Defines an iterator initialization method attribute attached to a
911 * specific source component class descriptor.
913 * _id: Plugin descriptor ID (C identifier).
914 * _comp_class_id: Component class descriptor ID (C identifier).
915 * _x: Iterator initialization method
916 * (bt_component_class_source_message_iterator_init_method).
918 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
919 __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)
922 * Defines an iterator finalize method attribute attached to a specific
923 * source component class descriptor.
925 * _id: Plugin descriptor ID (C identifier).
926 * _comp_class_id: Component class descriptor ID (C identifier).
927 * _x: Iterator finalize method
928 * (bt_component_class_source_message_iterator_finalize_method).
930 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
931 __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)
934 * Defines an iterator initialization method attribute attached to a
935 * specific filter component class descriptor.
937 * _id: Plugin descriptor ID (C identifier).
938 * _comp_class_id: Component class descriptor ID (C identifier).
939 * _x: Iterator initialization method
940 * (bt_component_class_filter_message_iterator_init_method).
942 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
943 __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)
946 * Defines an iterator finalize method attribute attached to a specific
947 * filter component class descriptor.
949 * _id: Plugin descriptor ID (C identifier).
950 * _comp_class_id: Component class descriptor ID (C identifier).
951 * _x: Iterator finalize method
952 * (bt_component_class_filter_message_iterator_finalize_method).
954 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
955 __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)
958 * Defines a plugin descriptor with an automatic ID.
960 * _name: Plugin's name (C string).
962 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
965 * Defines a plugin initialization function attribute attached to the
966 * automatic plugin descriptor.
968 * _x: Initialization function (bt_plugin_init_func).
970 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
973 * Defines a plugin exit function attribute attached to the automatic
976 * _x: Exit function (bt_plugin_exit_func).
978 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
981 * Defines an author attribute attached to the automatic plugin
984 * _x: Author (C string).
986 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
989 * Defines a license attribute attached to the automatic plugin
992 * _x: License (C string).
994 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
997 * Defines a description attribute attached to the automatic plugin
1000 * _x: Description (C string).
1002 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
1005 * Defines a version attribute attached to the automatic plugin
1008 * _major: Plugin's major version (uint32_t).
1009 * _minor: Plugin's minor version (uint32_t).
1010 * _patch: Plugin's patch version (uint32_t).
1011 * _extra: Plugin's version extra information (C string).
1013 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
1016 * Defines a source component class attached to the automatic plugin
1017 * descriptor. Its ID is the same as its name, hence its name must be a
1018 * C identifier in this version.
1020 * _name: Component class name (C identifier).
1021 * _msg_iter_next_method: Component class's iterator next method
1022 * (bt_component_class_source_message_iterator_next_method).
1024 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1025 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1028 * Defines a filter component class attached to the automatic plugin
1029 * descriptor. Its ID is the same as its name, hence its name must be a
1030 * C identifier in this version.
1032 * _name: Component class name (C identifier).
1033 * _msg_iter_next_method: Component class's iterator next method
1034 * (bt_component_class_filter_message_iterator_next_method).
1036 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1037 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1040 * Defines a sink component class attached to the automatic plugin
1041 * descriptor. Its ID is the same as its name, hence its name must be a
1042 * C identifier in this version.
1044 * _name: Component class name (C identifier).
1045 * _consume_method: Component class's consume method
1046 * (bt_component_class_sink_consume_method).
1048 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1049 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1052 * Defines a description attribute attached to a source component class
1053 * descriptor which is attached to the automatic plugin descriptor.
1055 * _name: Component class name (C identifier).
1056 * _x: Description (C string).
1058 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1059 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1062 * Defines a description attribute attached to a filter component class
1063 * descriptor which is attached to the automatic plugin descriptor.
1065 * _name: Component class name (C identifier).
1066 * _x: Description (C string).
1068 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1069 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1072 * Defines a description attribute attached to a sink component class
1073 * descriptor which is attached to the automatic plugin descriptor.
1075 * _name: Component class name (C identifier).
1076 * _x: Description (C string).
1078 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1079 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1082 * Defines a help attribute attached to a source component class
1083 * descriptor which is attached to the automatic plugin descriptor.
1085 * _name: Component class name (C identifier).
1086 * _x: Help (C string).
1088 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1089 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1092 * Defines a help attribute attached to a filter component class
1093 * descriptor which is attached to the automatic plugin descriptor.
1095 * _name: Component class name (C identifier).
1096 * _x: Help (C string).
1098 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1099 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1102 * Defines a help attribute attached to a sink component class
1103 * descriptor which is attached to the automatic plugin descriptor.
1105 * _name: Component class name (C identifier).
1106 * _x: Help (C string).
1108 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1109 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1112 * Defines an initialization method attribute attached to a source
1113 * component class descriptor which is attached to the automatic plugin
1116 * _name: Component class name (C identifier).
1117 * _x: Initialization method (bt_component_class_source_init_method).
1119 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1120 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1123 * Defines an initialization method attribute attached to a filter
1124 * component class descriptor which is attached to the automatic plugin
1127 * _name: Component class name (C identifier).
1128 * _x: Initialization method (bt_component_class_filter_init_method).
1130 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1131 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1134 * Defines an initialization method attribute attached to a sink
1135 * component class descriptor which is attached to the automatic plugin
1138 * _name: Component class name (C identifier).
1139 * _x: Initialization method (bt_component_class_sink_init_method).
1141 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1142 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1145 * Defines a finalization method attribute attached to a source component
1146 * class descriptor which is attached to the automatic plugin
1149 * _name: Component class name (C identifier).
1150 * _x: Initialization method (bt_component_class_source_finalize_method).
1152 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1153 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1156 * Defines a finalization method attribute attached to a filter component
1157 * class descriptor which is attached to the automatic plugin
1160 * _name: Component class name (C identifier).
1161 * _x: Initialization method (bt_component_class_filter_finalize_method).
1163 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1164 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1167 * Defines a finalization method attribute attached to a sink component class
1168 * descriptor which is attached to the automatic plugin descriptor.
1170 * _name: Component class name (C identifier).
1171 * _x: Initialization method (bt_component_class_sink_finalize_method).
1173 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1174 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1177 * Defines a query method attribute attached to a source component
1178 * class descriptor which is attached to the automatic plugin
1181 * _name: Component class name (C identifier).
1182 * _x: Initialization method (bt_component_class_source_query_method).
1184 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1185 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1188 * Defines a query method attribute attached to a filter component
1189 * class descriptor which is attached to the automatic plugin
1192 * _name: Component class name (C identifier).
1193 * _x: Initialization method (bt_component_class_filter_query_method).
1195 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1196 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1199 * Defines a query method attribute attached to a sink component
1200 * class descriptor which is attached to the automatic plugin
1203 * _name: Component class name (C identifier).
1204 * _x: Initialization method (bt_component_class_sink_query_method).
1206 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1207 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1210 * Defines an accept input port connection method attribute attached to
1211 * a filter component class descriptor which is attached to the
1212 * automatic plugin descriptor.
1214 * _name: Component class name (C identifier).
1215 * _x: Accept port connection method
1216 * (bt_component_class_filter_accept_input_port_connection_method).
1218 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1219 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1222 * Defines an accept input port connection method attribute attached to
1223 * a sink component class descriptor which is attached to the automatic
1224 * plugin descriptor.
1226 * _name: Component class name (C identifier).
1227 * _x: Accept port connection method
1228 * (bt_component_class_sink_accept_input_port_connection_method).
1230 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1231 BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1234 * Defines an accept output port connection method attribute attached to
1235 * a source component class descriptor which is attached to the
1236 * automatic plugin descriptor.
1238 * _name: Component class name (C identifier).
1239 * _x: Accept port connection method
1240 * (bt_component_class_source_accept_output_port_connection_method).
1242 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1243 BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1246 * Defines an accept output port connection method attribute attached to
1247 * a filter component class descriptor which is attached to the
1248 * automatic plugin descriptor.
1250 * _name: Component class name (C identifier).
1251 * _x: Accept port connection method
1252 * (bt_component_class_filter_accept_output_port_connection_method).
1254 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1255 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1258 * Defines an input port connected method attribute attached to a filter
1259 * component class descriptor which is attached to the automatic plugin
1262 * _name: Component class name (C identifier).
1263 * _x: Port connected (bt_component_class_filter_input_port_connected_method).
1265 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1266 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1269 * Defines an input port connected method attribute attached to a sink
1270 * component class descriptor which is attached to the automatic plugin
1273 * _name: Component class name (C identifier).
1274 * _x: Port connected (bt_component_class_sink_input_port_connected_method).
1276 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1277 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1280 * Defines an output port connected method attribute attached to a source
1281 * component class descriptor which is attached to the automatic plugin
1284 * _name: Component class name (C identifier).
1285 * _x: Port connected (bt_component_class_source_output_port_connected_method).
1287 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1288 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1291 * Defines an output port connected method attribute attached to a filter
1292 * component class descriptor which is attached to the automatic plugin
1295 * _name: Component class name (C identifier).
1296 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
1298 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1299 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1302 * Defines an input port disconnected method attribute attached to a
1303 * filter component class descriptor which is attached to the automatic
1304 * plugin descriptor.
1306 * _name: Component class name (C identifier).
1307 * _x: Port disconnected (bt_component_class_filter_input_port_disconnected_method).
1309 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1310 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1313 * Defines an input port disconnected method attribute attached to a
1314 * sink component class descriptor which is attached to the automatic
1315 * plugin descriptor.
1317 * _name: Component class name (C identifier).
1318 * _x: Port disconnected (bt_component_class_sink_input_port_disconnected_method).
1320 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1321 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1324 * Defines an output port disconnected method attribute attached to a
1325 * source component class descriptor which is attached to the automatic
1326 * plugin descriptor.
1328 * _name: Component class name (C identifier).
1329 * _x: Port disconnected (bt_component_class_source_output_port_disconnected_method).
1331 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1332 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1335 * Defines an output port disconnected method attribute attached to a
1336 * filter component class descriptor which is attached to the automatic
1337 * plugin descriptor.
1339 * _name: Component class name (C identifier).
1340 * _x: Port disconnected (bt_component_class_filter_output_port_disconnected_method).
1342 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1343 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1346 * Defines an iterator initialization method attribute attached to a
1347 * source component class descriptor which is attached to the automatic
1348 * plugin descriptor.
1350 * _name: Component class name (C identifier).
1351 * _x: Iterator initialization method
1352 * (bt_component_class_source_message_iterator_init_method).
1354 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1355 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1358 * Defines an iterator finalize method attribute attached to a source
1359 * component class descriptor which is attached to the automatic plugin
1362 * _name: Component class name (C identifier).
1363 * _x: Iterator finalize method
1364 * (bt_component_class_source_message_iterator_finalize_method).
1366 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1367 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1370 * Defines an iterator initialization method attribute attached to a
1371 * filter component class descriptor which is attached to the automatic
1372 * plugin descriptor.
1374 * _name: Component class name (C identifier).
1375 * _x: Iterator initialization method
1376 * (bt_component_class_filter_message_iterator_init_method).
1378 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1379 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1382 * Defines an iterator finalize method attribute attached to a filter
1383 * component class descriptor which is attached to the automatic plugin
1386 * _name: Component class name (C identifier).
1387 * _x: Iterator finalize method
1388 * (bt_component_class_filter_message_iterator_finalize_method).
1390 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1391 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1393 #define BT_PLUGIN_MODULE() \
1394 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
1395 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1396 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
1398 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
1399 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1400 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
1402 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
1403 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1404 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
1406 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; \
1407 _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; \
1408 _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; \
1410 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1412 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1414 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1416 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1418 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1420 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1422 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1424 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1426 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1428 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1430 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1432 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1434 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1436 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1438 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1440 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1447 #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */