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 <babeltrace2/plugin/plugin-const.h>
35 /* For bt_component_class_type */
36 #include <babeltrace2/graph/component-class-const.h>
38 /* For component class method type definitions */
39 #include <babeltrace2/graph/component-class-source.h>
40 #include <babeltrace2/graph/component-class-filter.h>
41 #include <babeltrace2/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_GRAPH_IS_CONFIGURED_METHOD
= 9,
188 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD
= 10,
189 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 11,
190 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD
= 12,
191 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD
= 13,
192 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD
= 14,
193 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD
= 15,
196 /* Component class attribute (internal use) */
197 struct __bt_plugin_component_class_descriptor_attribute
{
199 * Component class plugin attribute to which to associate this
200 * component class attribute.
202 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
204 /* Name of the attribute's type for debug purposes */
205 const char *type_name
;
207 /* Attribute's type */
208 enum __bt_plugin_component_class_descriptor_attribute_type type
;
210 /* Attribute's value (depends on attribute's type) */
212 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
213 const char *description
;
215 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
218 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
219 bt_component_class_source_init_method source_init_method
;
220 bt_component_class_filter_init_method filter_init_method
;
221 bt_component_class_sink_init_method sink_init_method
;
223 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
224 bt_component_class_source_finalize_method source_finalize_method
;
225 bt_component_class_filter_finalize_method filter_finalize_method
;
226 bt_component_class_sink_finalize_method sink_finalize_method
;
228 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
229 bt_component_class_source_query_method source_query_method
;
230 bt_component_class_filter_query_method filter_query_method
;
231 bt_component_class_sink_query_method sink_query_method
;
233 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD */
234 bt_component_class_filter_accept_input_port_connection_method filter_accept_input_port_connection_method
;
235 bt_component_class_sink_accept_input_port_connection_method sink_accept_input_port_connection_method
;
237 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD */
238 bt_component_class_source_accept_output_port_connection_method source_accept_output_port_connection_method
;
239 bt_component_class_filter_accept_output_port_connection_method filter_accept_output_port_connection_method
;
241 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
242 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
243 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
245 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
246 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
247 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
249 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */
250 bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_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 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
261 bt_component_class_source_message_iterator_seek_ns_from_origin_method source_msg_iter_seek_ns_from_origin_method
;
262 bt_component_class_filter_message_iterator_seek_ns_from_origin_method filter_msg_iter_seek_ns_from_origin_method
;
264 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
265 bt_component_class_source_message_iterator_seek_beginning_method source_msg_iter_seek_beginning_method
;
266 bt_component_class_filter_message_iterator_seek_beginning_method filter_msg_iter_seek_beginning_method
;
268 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
269 bt_component_class_source_message_iterator_can_seek_ns_from_origin_method source_msg_iter_can_seek_ns_from_origin_method
;
270 bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method filter_msg_iter_can_seek_ns_from_origin_method
;
272 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
273 bt_component_class_source_message_iterator_can_seek_beginning_method source_msg_iter_can_seek_beginning_method
;
274 bt_component_class_filter_message_iterator_can_seek_beginning_method filter_msg_iter_can_seek_beginning_method
;
276 } __attribute__((packed
));
278 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
279 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
280 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
281 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
282 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
283 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
284 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
285 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
288 * Variable attributes for a plugin descriptor pointer to be added to
289 * the plugin descriptor section (internal use).
292 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
293 __attribute__((section("__DATA,btp_desc"), used))
295 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
296 __start___bt_plugin_descriptors
298 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
299 __stop___bt_plugin_descriptors
301 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
302 __asm("section$start$__DATA$btp_desc")
304 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
305 __asm("section$end$__DATA$btp_desc")
309 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
310 __attribute__((section("__bt_plugin_descriptors"), used))
312 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
313 __start___bt_plugin_descriptors
315 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
316 __stop___bt_plugin_descriptors
318 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
320 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
324 * Variable attributes for a plugin attribute pointer to be added to
325 * the plugin attribute section (internal use).
328 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
329 __attribute__((section("__DATA,btp_desc_att"), used))
331 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
332 __start___bt_plugin_descriptor_attributes
334 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
335 __stop___bt_plugin_descriptor_attributes
337 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
338 __asm("section$start$__DATA$btp_desc_att")
340 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
341 __asm("section$end$__DATA$btp_desc_att")
345 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
346 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
348 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
349 __start___bt_plugin_descriptor_attributes
351 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
352 __stop___bt_plugin_descriptor_attributes
354 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
356 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
360 * Variable attributes for a component class descriptor pointer to be
361 * added to the component class descriptor section (internal use).
364 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
365 __attribute__((section("__DATA,btp_cc_desc"), used))
367 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
368 __start___bt_plugin_component_class_descriptors
370 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
371 __stop___bt_plugin_component_class_descriptors
373 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
374 __asm("section$start$__DATA$btp_cc_desc")
376 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
377 __asm("section$end$__DATA$btp_cc_desc")
381 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
382 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
384 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
385 __start___bt_plugin_component_class_descriptors
387 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
388 __stop___bt_plugin_component_class_descriptors
390 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
392 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
396 * Variable attributes for a component class descriptor attribute
397 * pointer to be added to the component class descriptor attribute
398 * section (internal use).
401 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
402 __attribute__((section("__DATA,btp_cc_desc_att"), used))
404 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
405 __start___bt_plugin_component_class_descriptor_attributes
407 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
408 __stop___bt_plugin_component_class_descriptor_attributes
410 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
411 __asm("section$start$__DATA$btp_cc_desc_att")
413 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
414 __asm("section$end$__DATA$btp_cc_desc_att")
418 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
419 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
421 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
422 __start___bt_plugin_component_class_descriptor_attributes
424 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
425 __stop___bt_plugin_component_class_descriptor_attributes
427 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
429 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
433 * Declares a plugin descriptor pointer variable with a custom ID.
435 * _id: ID (any valid C identifier except `auto`).
437 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
440 * Defines a plugin descriptor with a custom ID.
442 * _id: ID (any valid C identifier except `auto`).
443 * _name: Plugin's name (C string).
445 #define BT_PLUGIN_WITH_ID(_id, _name) \
446 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
447 .major = __BT_PLUGIN_VERSION_MAJOR, \
448 .minor = __BT_PLUGIN_VERSION_MINOR, \
451 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
454 * Defines a plugin attribute (generic, internal use).
456 * _attr_name: Name of the attribute (C identifier).
457 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
458 * _id: Plugin descriptor ID (C identifier).
461 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
462 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
463 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
464 .type_name = #_attr_name, \
465 .type = _attr_type, \
466 .value._attr_name = _x, \
468 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
471 * Defines a plugin initialization function attribute attached to a
472 * specific plugin descriptor.
474 * _id: Plugin descriptor ID (C identifier).
475 * _x: Initialization function (bt_plugin_init_func).
477 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
478 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
481 * Defines a plugin exit function attribute attached to a specific
484 * _id: Plugin descriptor ID (C identifier).
485 * _x: Exit function (bt_plugin_exit_func).
487 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
488 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
491 * Defines an author attribute attached to a specific plugin descriptor.
493 * _id: Plugin descriptor ID (C identifier).
494 * _x: Author (C string).
496 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
497 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
500 * Defines a license attribute attached to a specific plugin descriptor.
502 * _id: Plugin descriptor ID (C identifier).
503 * _x: License (C string).
505 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
506 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
509 * Defines a description attribute attached to a specific plugin
512 * _id: Plugin descriptor ID (C identifier).
513 * _x: Description (C string).
515 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
516 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
518 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
519 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
522 * Defines a version attribute attached to a specific plugin descriptor.
524 * _id: Plugin descriptor ID (C identifier).
525 * _major: Plugin's major version (uint32_t).
526 * _minor: Plugin's minor version (uint32_t).
527 * _patch: Plugin's patch version (uint32_t).
528 * _extra: Plugin's version extra information (C string).
530 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
531 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
534 * Defines a source component class descriptor with a custom ID.
536 * _id: ID (any valid C identifier except `auto`).
537 * _comp_class_id: Component class ID (C identifier).
538 * _name: Component class name (C string).
539 * _msg_iter_next_method: Component class's iterator next method
540 * (bt_component_class_source_message_iterator_next_method).
542 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
543 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
544 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
546 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
547 .methods.source = { \
548 .msg_iter_next = _msg_iter_next_method, \
551 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
554 * Defines a filter component class descriptor with a custom ID.
556 * _id: ID (any valid C identifier except `auto`).
557 * _comp_class_id: Component class ID (C identifier).
558 * _name: Component class name (C string).
559 * _msg_iter_next_method: Component class's iterator next method
560 * (bt_component_class_filter_message_iterator_next_method).
562 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
563 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
564 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
566 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
567 .methods.filter = { \
568 .msg_iter_next = _msg_iter_next_method, \
571 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
574 * Defines a sink component class descriptor with a custom ID.
576 * _id: ID (any valid C identifier except `auto`).
577 * _comp_class_id: Component class ID (C identifier).
578 * _name: Component class name (C string).
579 * _consume_method: Component class's iterator consume method
580 * (bt_component_class_sink_consume_method).
582 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
583 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
584 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
586 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
588 .consume = _consume_method, \
591 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
594 * Defines a component class descriptor attribute (generic, internal
597 * _id: Plugin descriptor ID (C identifier).
598 * _comp_class_id: Component class ID (C identifier).
599 * _type: Component class type (`source`, `filter`, or `sink`).
600 * _attr_name: Name of the attribute (C identifier).
601 * _attr_type: Type of the attribute
602 * (enum __bt_plugin_descriptor_attribute_type).
605 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
606 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
607 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
608 .type_name = #_attr_name, \
609 .type = _attr_type, \
610 .value._attr_name = _x, \
612 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
615 * Defines a description attribute attached to a specific source
616 * component class descriptor.
618 * _id: Plugin descriptor ID (C identifier).
619 * _comp_class_id: Component class descriptor ID (C identifier).
620 * _x: Description (C string).
622 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
623 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
626 * Defines a description attribute attached to a specific filter
627 * component class descriptor.
629 * _id: Plugin descriptor ID (C identifier).
630 * _comp_class_id: Component class descriptor ID (C identifier).
631 * _x: Description (C string).
633 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
634 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
637 * Defines a description attribute attached to a specific sink
638 * component class descriptor.
640 * _id: Plugin descriptor ID (C identifier).
641 * _comp_class_id: Component class descriptor ID (C identifier).
642 * _x: Description (C string).
644 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
645 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
648 * Defines a help attribute attached to a specific source component
651 * _id: Plugin descriptor ID (C identifier).
652 * _comp_class_id: Component class descriptor ID (C identifier).
653 * _x: Help (C string).
655 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
656 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
659 * Defines a help attribute attached to a specific filter component
662 * _id: Plugin descriptor ID (C identifier).
663 * _comp_class_id: Component class descriptor ID (C identifier).
664 * _x: Help (C string).
666 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
667 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
670 * Defines a help attribute attached to a specific sink component class
673 * _id: Plugin descriptor ID (C identifier).
674 * _comp_class_id: Component class descriptor ID (C identifier).
675 * _x: Help (C string).
677 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
678 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
681 * Defines an initialization method attribute attached to a specific
682 * source component class descriptor.
684 * _id: Plugin descriptor ID (C identifier).
685 * _comp_class_id: Component class descriptor ID (C identifier).
686 * _x: Initialization method (bt_component_class_source_init_method).
688 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
689 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
692 * Defines an initialization method attribute attached to a specific
693 * filter component class descriptor.
695 * _id: Plugin descriptor ID (C identifier).
696 * _comp_class_id: Component class descriptor ID (C identifier).
697 * _x: Initialization method (bt_component_class_filter_init_method).
699 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
700 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
703 * Defines an initialization method attribute attached to a specific
704 * sink component class descriptor.
706 * _id: Plugin descriptor ID (C identifier).
707 * _comp_class_id: Component class descriptor ID (C identifier).
708 * _x: Initialization method (bt_component_class_sink_init_method).
710 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
711 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
714 * Defines a finalization method attribute attached to a specific source
715 * component class descriptor.
717 * _id: Plugin descriptor ID (C identifier).
718 * _comp_class_id: Component class descriptor ID (C identifier).
719 * _x: Finalize method (bt_component_class_source_finalize_method).
721 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
722 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
725 * Defines a finalization method attribute attached to a specific filter
726 * component class descriptor.
728 * _id: Plugin descriptor ID (C identifier).
729 * _comp_class_id: Component class descriptor ID (C identifier).
730 * _x: Finalize method (bt_component_class_filter_finalize_method).
732 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
733 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
736 * Defines a finalization method attribute attached to a specific sink
737 * component class descriptor.
739 * _id: Plugin descriptor ID (C identifier).
740 * _comp_class_id: Component class descriptor ID (C identifier).
741 * _x: Finalize method (bt_component_class_sink_finalize_method).
743 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
744 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
747 * Defines a query method attribute attached to a specific source
748 * component class descriptor.
750 * _id: Plugin descriptor ID (C identifier).
751 * _comp_class_id: Component class descriptor ID (C identifier).
752 * _x: Finalize method (bt_component_class_source_query_method).
754 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
755 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
758 * Defines a query method attribute attached to a specific filter
759 * component class descriptor.
761 * _id: Plugin descriptor ID (C identifier).
762 * _comp_class_id: Component class descriptor ID (C identifier).
763 * _x: Finalize method (bt_component_class_filter_query_method).
765 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
766 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
769 * Defines a query method attribute attached to a specific sink
770 * component class descriptor.
772 * _id: Plugin descriptor ID (C identifier).
773 * _comp_class_id: Component class descriptor ID (C identifier).
774 * _x: Finalize method (bt_component_class_sink_query_method).
776 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
777 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
780 * Defines an accept input port connection method attribute attached to
781 * a specific filter component class descriptor.
783 * _id: Plugin descriptor ID (C identifier).
784 * _comp_class_id: Component class descriptor ID (C identifier).
785 * _x: Accept port connection method
786 * (bt_component_class_filter_accept_input_port_connection_method).
788 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
789 __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)
792 * Defines an accept input port connection method attribute attached to
793 * a specific sink component class descriptor.
795 * _id: Plugin descriptor ID (C identifier).
796 * _comp_class_id: Component class descriptor ID (C identifier).
797 * _x: Accept port connection method
798 * (bt_component_class_sink_accept_input_port_connection_method).
800 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
801 __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)
804 * Defines an accept output port connection method attribute attached to
805 * a specific source component class descriptor.
807 * _id: Plugin descriptor ID (C identifier).
808 * _comp_class_id: Component class descriptor ID (C identifier).
809 * _x: Accept port connection method
810 * (bt_component_class_source_accept_output_port_connection_method).
812 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
813 __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)
816 * Defines an accept output port connection method attribute attached to
817 * a specific filter component class descriptor.
819 * _id: Plugin descriptor ID (C identifier).
820 * _comp_class_id: Component class descriptor ID (C identifier).
821 * _x: Accept port connection method
822 * (bt_component_class_filter_accept_output_port_connection_method).
824 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
825 __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)
828 * Defines an input port connected method attribute attached to a
829 * specific filter component class descriptor.
831 * _id: Plugin descriptor ID (C identifier).
832 * _comp_class_id: Component class descriptor ID (C identifier).
833 * _x: Port connected method
834 * (bt_component_class_filter_input_port_connected_method).
836 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
837 __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)
840 * Defines an input port connected method attribute attached to a
841 * specific sink component class descriptor.
843 * _id: Plugin descriptor ID (C identifier).
844 * _comp_class_id: Component class descriptor ID (C identifier).
845 * _x: Port connected method
846 * (bt_component_class_sink_input_port_connected_method).
848 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
849 __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)
852 * Defines an output port connected method attribute attached to a
853 * specific source component class descriptor.
855 * _id: Plugin descriptor ID (C identifier).
856 * _comp_class_id: Component class descriptor ID (C identifier).
857 * _x: Port connected method
858 * (bt_component_class_source_output_port_connected_method).
860 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
861 __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)
864 * Defines an output port connected method attribute attached to a
865 * specific filter component class descriptor.
867 * _id: Plugin descriptor ID (C identifier).
868 * _comp_class_id: Component class descriptor ID (C identifier).
869 * _x: Port connected method
870 * (bt_component_class_filter_output_port_connected_method).
872 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
873 __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)
876 * Defines a "graph is configured" method attribute attached to a
877 * specific sink component class descriptor.
879 * _id: Plugin descriptor ID (C identifier).
880 * _comp_class_id: Component class descriptor ID (C identifier).
881 * _x: "Graph is configured" method
882 * (bt_component_class_sink_graph_is_configured_method).
884 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
885 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_graph_is_configured_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD, _id, _comp_class_id, sink, _x)
888 * Defines an iterator initialization method attribute attached to a
889 * specific source component class descriptor.
891 * _id: Plugin descriptor ID (C identifier).
892 * _comp_class_id: Component class descriptor ID (C identifier).
893 * _x: Iterator initialization method
894 * (bt_component_class_source_message_iterator_init_method).
896 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
897 __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)
900 * Defines an iterator finalize method attribute attached to a specific
901 * source component class descriptor.
903 * _id: Plugin descriptor ID (C identifier).
904 * _comp_class_id: Component class descriptor ID (C identifier).
905 * _x: Iterator finalize method
906 * (bt_component_class_source_message_iterator_finalize_method).
908 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
909 __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)
912 * Defines an iterator "seek nanoseconds from origin" method attribute
913 * attached to a specific source component class descriptor.
915 * _id: Plugin descriptor ID (C identifier).
916 * _comp_class_id: Component class descriptor ID (C identifier).
917 * _x: Iterator "seek nanoseconds from origin" method
918 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
920 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
921 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, source, _x)
924 * Defines an iterator "seek beginning" method attribute attached to a
925 * specific source component class descriptor.
927 * _id: Plugin descriptor ID (C identifier).
928 * _comp_class_id: Component class descriptor ID (C identifier).
929 * _x: Iterator "seek beginning" method
930 * (bt_component_class_source_message_iterator_seek_beginning_method).
932 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
933 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _id, _comp_class_id, source, _x)
936 * Defines an iterator "can seek nanoseconds from origin" method
937 * attribute attached to a specific source component class descriptor.
939 * _id: Plugin descriptor ID (C identifier).
940 * _comp_class_id: Component class descriptor ID (C identifier).
941 * _x: Iterator "can seek nanoseconds from origin" method
942 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
944 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
945 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, source, _x)
948 * Defines an iterator "can seek beginning" method attribute attached to a
949 * specific source component class descriptor.
951 * _id: Plugin descriptor ID (C identifier).
952 * _comp_class_id: Component class descriptor ID (C identifier).
953 * _x: Iterator "can seek beginning" method
954 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
956 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
957 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _id, _comp_class_id, source, _x)
960 * Defines an iterator initialization method attribute attached to a
961 * specific filter component class descriptor.
963 * _id: Plugin descriptor ID (C identifier).
964 * _comp_class_id: Component class descriptor ID (C identifier).
965 * _x: Iterator initialization method
966 * (bt_component_class_filter_message_iterator_init_method).
968 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
969 __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)
972 * Defines an iterator finalize method attribute attached to a specific
973 * filter component class descriptor.
975 * _id: Plugin descriptor ID (C identifier).
976 * _comp_class_id: Component class descriptor ID (C identifier).
977 * _x: Iterator finalize method
978 * (bt_component_class_filter_message_iterator_finalize_method).
980 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
981 __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)
984 * Defines an iterator "seek nanoseconds from origin" method attribute
985 * attached to a specific filter component class descriptor.
987 * _id: Plugin descriptor ID (C identifier).
988 * _comp_class_id: Component class descriptor ID (C identifier).
989 * _x: Iterator "seek nanoseconds from origin" method
990 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
992 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
993 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, filter, _x)
996 * Defines an iterator "seek beginning" method attribute attached to a
997 * specific filter component class descriptor.
999 * _id: Plugin descriptor ID (C identifier).
1000 * _comp_class_id: Component class descriptor ID (C identifier).
1001 * _x: Iterator "seek beginning" method
1002 * (bt_component_class_filter_message_iterator_seek_beginning_method).
1004 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
1005 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _id, _comp_class_id, filter, _x)
1008 * Defines an iterator "can seek nanoseconds from origin" method
1009 * attribute attached to a specific filter component class descriptor.
1011 * _id: Plugin descriptor ID (C identifier).
1012 * _comp_class_id: Component class descriptor ID (C identifier).
1013 * _x: Iterator "can seek nanoseconds from origin" method
1014 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
1016 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
1017 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, filter, _x)
1020 * Defines an iterator "can seek beginning" method attribute attached to a
1021 * specific filter component class descriptor.
1023 * _id: Plugin descriptor ID (C identifier).
1024 * _comp_class_id: Component class descriptor ID (C identifier).
1025 * _x: Iterator "can seek beginning" method
1026 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
1028 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
1029 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _id, _comp_class_id, filter, _x)
1032 * Defines a plugin descriptor with an automatic ID.
1034 * _name: Plugin's name (C string).
1036 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
1039 * Defines a plugin initialization function attribute attached to the
1040 * automatic plugin descriptor.
1042 * _x: Initialization function (bt_plugin_init_func).
1044 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
1047 * Defines a plugin exit function attribute attached to the automatic
1048 * plugin descriptor.
1050 * _x: Exit function (bt_plugin_exit_func).
1052 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
1055 * Defines an author attribute attached to the automatic plugin
1058 * _x: Author (C string).
1060 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
1063 * Defines a license attribute attached to the automatic plugin
1066 * _x: License (C string).
1068 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
1071 * Defines a description attribute attached to the automatic plugin
1074 * _x: Description (C string).
1076 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
1079 * Defines a version attribute attached to the automatic plugin
1082 * _major: Plugin's major version (uint32_t).
1083 * _minor: Plugin's minor version (uint32_t).
1084 * _patch: Plugin's patch version (uint32_t).
1085 * _extra: Plugin's version extra information (C string).
1087 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
1090 * Defines a source component class attached to the automatic plugin
1091 * descriptor. Its ID is the same as its name, hence its name must be a
1092 * C identifier in this version.
1094 * _name: Component class name (C identifier).
1095 * _msg_iter_next_method: Component class's iterator next method
1096 * (bt_component_class_source_message_iterator_next_method).
1098 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1099 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1102 * Defines a filter component class attached to the automatic plugin
1103 * descriptor. Its ID is the same as its name, hence its name must be a
1104 * C identifier in this version.
1106 * _name: Component class name (C identifier).
1107 * _msg_iter_next_method: Component class's iterator next method
1108 * (bt_component_class_filter_message_iterator_next_method).
1110 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1111 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1114 * Defines a sink component class attached to the automatic plugin
1115 * descriptor. Its ID is the same as its name, hence its name must be a
1116 * C identifier in this version.
1118 * _name: Component class name (C identifier).
1119 * _consume_method: Component class's consume method
1120 * (bt_component_class_sink_consume_method).
1122 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1123 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1126 * Defines a description attribute attached to a source component class
1127 * descriptor which is attached to the automatic plugin descriptor.
1129 * _name: Component class name (C identifier).
1130 * _x: Description (C string).
1132 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1133 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1136 * Defines a description attribute attached to a filter component class
1137 * descriptor which is attached to the automatic plugin descriptor.
1139 * _name: Component class name (C identifier).
1140 * _x: Description (C string).
1142 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1143 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1146 * Defines a description attribute attached to a sink component class
1147 * descriptor which is attached to the automatic plugin descriptor.
1149 * _name: Component class name (C identifier).
1150 * _x: Description (C string).
1152 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1153 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1156 * Defines a help attribute attached to a source component class
1157 * descriptor which is attached to the automatic plugin descriptor.
1159 * _name: Component class name (C identifier).
1160 * _x: Help (C string).
1162 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1163 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1166 * Defines a help attribute attached to a filter component class
1167 * descriptor which is attached to the automatic plugin descriptor.
1169 * _name: Component class name (C identifier).
1170 * _x: Help (C string).
1172 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1173 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1176 * Defines a help attribute attached to a sink component class
1177 * descriptor which is attached to the automatic plugin descriptor.
1179 * _name: Component class name (C identifier).
1180 * _x: Help (C string).
1182 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1183 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1186 * Defines an initialization method attribute attached to a source
1187 * component class descriptor which is attached to the automatic plugin
1190 * _name: Component class name (C identifier).
1191 * _x: Initialization method (bt_component_class_source_init_method).
1193 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1194 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1197 * Defines an initialization method attribute attached to a filter
1198 * component class descriptor which is attached to the automatic plugin
1201 * _name: Component class name (C identifier).
1202 * _x: Initialization method (bt_component_class_filter_init_method).
1204 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1205 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1208 * Defines an initialization method attribute attached to a sink
1209 * component class descriptor which is attached to the automatic plugin
1212 * _name: Component class name (C identifier).
1213 * _x: Initialization method (bt_component_class_sink_init_method).
1215 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1216 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1219 * Defines a finalization method attribute attached to a source component
1220 * class descriptor which is attached to the automatic plugin
1223 * _name: Component class name (C identifier).
1224 * _x: Initialization method (bt_component_class_source_finalize_method).
1226 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1227 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1230 * Defines a finalization method attribute attached to a filter component
1231 * class descriptor which is attached to the automatic plugin
1234 * _name: Component class name (C identifier).
1235 * _x: Initialization method (bt_component_class_filter_finalize_method).
1237 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1238 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1241 * Defines a finalization method attribute attached to a sink component class
1242 * descriptor which is attached to the automatic plugin descriptor.
1244 * _name: Component class name (C identifier).
1245 * _x: Initialization method (bt_component_class_sink_finalize_method).
1247 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1248 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1251 * Defines a query method attribute attached to a source component
1252 * class descriptor which is attached to the automatic plugin
1255 * _name: Component class name (C identifier).
1256 * _x: Initialization method (bt_component_class_source_query_method).
1258 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1259 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1262 * Defines a query method attribute attached to a filter component
1263 * class descriptor which is attached to the automatic plugin
1266 * _name: Component class name (C identifier).
1267 * _x: Initialization method (bt_component_class_filter_query_method).
1269 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1270 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1273 * Defines a query method attribute attached to a sink component
1274 * class descriptor which is attached to the automatic plugin
1277 * _name: Component class name (C identifier).
1278 * _x: Initialization method (bt_component_class_sink_query_method).
1280 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1281 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1284 * Defines an accept input port connection method attribute attached to
1285 * a filter component class descriptor which is attached to the
1286 * automatic plugin descriptor.
1288 * _name: Component class name (C identifier).
1289 * _x: Accept port connection method
1290 * (bt_component_class_filter_accept_input_port_connection_method).
1292 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1293 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1296 * Defines an accept input port connection method attribute attached to
1297 * a sink component class descriptor which is attached to the automatic
1298 * plugin descriptor.
1300 * _name: Component class name (C identifier).
1301 * _x: Accept port connection method
1302 * (bt_component_class_sink_accept_input_port_connection_method).
1304 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1305 BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1308 * Defines an accept output port connection method attribute attached to
1309 * a source component class descriptor which is attached to the
1310 * automatic plugin descriptor.
1312 * _name: Component class name (C identifier).
1313 * _x: Accept port connection method
1314 * (bt_component_class_source_accept_output_port_connection_method).
1316 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1317 BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1320 * Defines an accept output port connection method attribute attached to
1321 * a filter component class descriptor which is attached to the
1322 * automatic plugin descriptor.
1324 * _name: Component class name (C identifier).
1325 * _x: Accept port connection method
1326 * (bt_component_class_filter_accept_output_port_connection_method).
1328 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1329 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1332 * Defines an input port connected method attribute attached to a filter
1333 * component class descriptor which is attached to the automatic plugin
1336 * _name: Component class name (C identifier).
1337 * _x: Port connected (bt_component_class_filter_input_port_connected_method).
1339 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1340 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1343 * Defines an input port connected method attribute attached to a sink
1344 * component class descriptor which is attached to the automatic plugin
1347 * _name: Component class name (C identifier).
1348 * _x: Port connected (bt_component_class_sink_input_port_connected_method).
1350 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1351 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1354 * Defines an output port connected method attribute attached to a source
1355 * component class descriptor which is attached to the automatic plugin
1358 * _name: Component class name (C identifier).
1359 * _x: Port connected (bt_component_class_source_output_port_connected_method).
1361 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1362 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1365 * Defines an output port connected method attribute attached to a filter
1366 * component class descriptor which is attached to the automatic plugin
1369 * _name: Component class name (C identifier).
1370 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
1372 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1373 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1376 * Defines a "graph is configured" method attribute attached to
1377 * a sink component class descriptor which is attached to the automatic
1378 * plugin descriptor.
1380 * _name: Component class name (C identifier).
1381 * _x: "Graph is configured" method
1382 * (bt_component_class_sink_graph_is_configured_method).
1384 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _x) \
1385 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _x)
1388 * Defines an iterator initialization method attribute attached to a
1389 * source component class descriptor which is attached to the automatic
1390 * plugin descriptor.
1392 * _name: Component class name (C identifier).
1393 * _x: Iterator initialization method
1394 * (bt_component_class_source_message_iterator_init_method).
1396 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1397 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1400 * Defines an iterator finalize method attribute attached to a source
1401 * component class descriptor which is attached to the automatic plugin
1404 * _name: Component class name (C identifier).
1405 * _x: Iterator finalize method
1406 * (bt_component_class_source_message_iterator_finalize_method).
1408 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1409 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1412 * Defines an iterator "seek nanoseconds from origin" method attribute
1413 * attached to a source component class descriptor which is attached to
1414 * the automatic plugin descriptor.
1416 * _name: Component class name (C identifier).
1417 * _x: Iterator "seek nanoseconds from origin" method
1418 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
1420 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1421 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1424 * Defines an iterator "seek beginning" method attribute
1425 * attached to a source component class descriptor which is attached to
1426 * the automatic plugin descriptor.
1428 * _name: Component class name (C identifier).
1429 * _x: Iterator "seek beginning" method
1430 * (bt_component_class_source_message_iterator_seek_beginning_method).
1432 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1433 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1436 * Defines an iterator "can seek nanoseconds from origin" method
1437 * attribute attached to a source component class descriptor which is
1438 * attached to the automatic plugin descriptor.
1440 * _name: Component class name (C identifier).
1441 * _x: Iterator "can seek nanoseconds from origin" method
1442 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
1444 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1445 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1448 * Defines an iterator "can seek beginning" method attribute
1449 * attached to a source component class descriptor which is attached to
1450 * the automatic plugin descriptor.
1452 * _name: Component class name (C identifier).
1453 * _x: Iterator "can seek beginning" method
1454 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
1456 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1457 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1460 * Defines an iterator initialization method attribute attached to a
1461 * filter component class descriptor which is attached to the automatic
1462 * plugin descriptor.
1464 * _name: Component class name (C identifier).
1465 * _x: Iterator initialization method
1466 * (bt_component_class_filter_message_iterator_init_method).
1468 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1469 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1472 * Defines an iterator finalize method attribute attached to a filter
1473 * component class descriptor which is attached to the automatic plugin
1476 * _name: Component class name (C identifier).
1477 * _x: Iterator finalize method
1478 * (bt_component_class_filter_message_iterator_finalize_method).
1480 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1481 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1484 * Defines an iterator "seek nanoseconds from origin" method attribute
1485 * attached to a filter component class descriptor which is attached to
1486 * the automatic plugin descriptor.
1488 * _name: Component class name (C identifier).
1489 * _x: Iterator "seek nanoseconds from origin" method
1490 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
1492 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1493 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1496 * Defines an iterator "seek beginning" method attribute
1497 * attached to a filter component class descriptor which is attached to
1498 * the automatic plugin descriptor.
1500 * _name: Component class name (C identifier).
1501 * _x: Iterator "seek beginning" method
1502 * (bt_component_class_filter_message_iterator_seek_beginning_method).
1504 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1505 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1508 * Defines an iterator "can seek nanoseconds from origin" method
1509 * attribute attached to a filter component class descriptor which is
1510 * attached to the automatic plugin descriptor.
1512 * _name: Component class name (C identifier).
1513 * _x: Iterator "can seek nanoseconds from origin" method
1514 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
1516 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1517 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1520 * Defines an iterator "can seek beginning" method attribute
1521 * attached to a filter component class descriptor which is attached to
1522 * the automatic plugin descriptor.
1524 * _name: Component class name (C identifier).
1525 * _x: Iterator "can seek beginning" method
1526 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
1528 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1529 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1531 #define BT_PLUGIN_MODULE() \
1532 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
1533 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1534 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
1536 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
1537 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1538 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
1540 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
1541 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1542 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
1544 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; \
1545 _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; \
1546 _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; \
1548 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1550 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1552 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1554 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1556 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1558 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1560 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1562 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1564 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1566 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1568 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1570 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1572 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1574 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1576 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1578 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1585 #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */