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_MSG_ITER_INIT_METHOD
= 9,
188 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 10,
189 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD
= 11,
190 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD
= 12,
191 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD
= 13,
192 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD
= 14,
195 /* Component class attribute (internal use) */
196 struct __bt_plugin_component_class_descriptor_attribute
{
198 * Component class plugin attribute to which to associate this
199 * component class attribute.
201 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
203 /* Name of the attribute's type for debug purposes */
204 const char *type_name
;
206 /* Attribute's type */
207 enum __bt_plugin_component_class_descriptor_attribute_type type
;
209 /* Attribute's value (depends on attribute's type) */
211 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
212 const char *description
;
214 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
217 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
218 bt_component_class_source_init_method source_init_method
;
219 bt_component_class_filter_init_method filter_init_method
;
220 bt_component_class_sink_init_method sink_init_method
;
222 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
223 bt_component_class_source_finalize_method source_finalize_method
;
224 bt_component_class_filter_finalize_method filter_finalize_method
;
225 bt_component_class_sink_finalize_method sink_finalize_method
;
227 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
228 bt_component_class_source_query_method source_query_method
;
229 bt_component_class_filter_query_method filter_query_method
;
230 bt_component_class_sink_query_method sink_query_method
;
232 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD */
233 bt_component_class_filter_accept_input_port_connection_method filter_accept_input_port_connection_method
;
234 bt_component_class_sink_accept_input_port_connection_method sink_accept_input_port_connection_method
;
236 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD */
237 bt_component_class_source_accept_output_port_connection_method source_accept_output_port_connection_method
;
238 bt_component_class_filter_accept_output_port_connection_method filter_accept_output_port_connection_method
;
240 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
241 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
242 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
244 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
245 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
246 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
248 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD */
249 bt_component_class_source_message_iterator_init_method source_msg_iter_init_method
;
250 bt_component_class_filter_message_iterator_init_method filter_msg_iter_init_method
;
252 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
253 bt_component_class_source_message_iterator_finalize_method source_msg_iter_finalize_method
;
254 bt_component_class_filter_message_iterator_finalize_method filter_msg_iter_finalize_method
;
256 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
257 bt_component_class_source_message_iterator_seek_ns_from_origin_method source_msg_iter_seek_ns_from_origin_method
;
258 bt_component_class_filter_message_iterator_seek_ns_from_origin_method filter_msg_iter_seek_ns_from_origin_method
;
260 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
261 bt_component_class_source_message_iterator_seek_beginning_method source_msg_iter_seek_beginning_method
;
262 bt_component_class_filter_message_iterator_seek_beginning_method filter_msg_iter_seek_beginning_method
;
264 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
265 bt_component_class_source_message_iterator_can_seek_ns_from_origin_method source_msg_iter_can_seek_ns_from_origin_method
;
266 bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method filter_msg_iter_can_seek_ns_from_origin_method
;
268 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
269 bt_component_class_source_message_iterator_can_seek_beginning_method source_msg_iter_can_seek_beginning_method
;
270 bt_component_class_filter_message_iterator_can_seek_beginning_method filter_msg_iter_can_seek_beginning_method
;
272 } __attribute__((packed
));
274 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
275 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
276 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
277 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
278 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
279 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
280 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
281 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
284 * Variable attributes for a plugin descriptor pointer to be added to
285 * the plugin descriptor section (internal use).
288 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
289 __attribute__((section("__DATA,btp_desc"), used))
291 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
292 __start___bt_plugin_descriptors
294 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
295 __stop___bt_plugin_descriptors
297 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
298 __asm("section$start$__DATA$btp_desc")
300 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
301 __asm("section$end$__DATA$btp_desc")
305 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
306 __attribute__((section("__bt_plugin_descriptors"), used))
308 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
309 __start___bt_plugin_descriptors
311 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
312 __stop___bt_plugin_descriptors
314 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
316 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
320 * Variable attributes for a plugin attribute pointer to be added to
321 * the plugin attribute section (internal use).
324 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
325 __attribute__((section("__DATA,btp_desc_att"), used))
327 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
328 __start___bt_plugin_descriptor_attributes
330 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
331 __stop___bt_plugin_descriptor_attributes
333 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
334 __asm("section$start$__DATA$btp_desc_att")
336 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
337 __asm("section$end$__DATA$btp_desc_att")
341 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
342 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
344 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
345 __start___bt_plugin_descriptor_attributes
347 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
348 __stop___bt_plugin_descriptor_attributes
350 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
352 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
356 * Variable attributes for a component class descriptor pointer to be
357 * added to the component class descriptor section (internal use).
360 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
361 __attribute__((section("__DATA,btp_cc_desc"), used))
363 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
364 __start___bt_plugin_component_class_descriptors
366 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
367 __stop___bt_plugin_component_class_descriptors
369 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
370 __asm("section$start$__DATA$btp_cc_desc")
372 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
373 __asm("section$end$__DATA$btp_cc_desc")
377 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
378 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
380 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
381 __start___bt_plugin_component_class_descriptors
383 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
384 __stop___bt_plugin_component_class_descriptors
386 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
388 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
392 * Variable attributes for a component class descriptor attribute
393 * pointer to be added to the component class descriptor attribute
394 * section (internal use).
397 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
398 __attribute__((section("__DATA,btp_cc_desc_att"), used))
400 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
401 __start___bt_plugin_component_class_descriptor_attributes
403 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
404 __stop___bt_plugin_component_class_descriptor_attributes
406 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
407 __asm("section$start$__DATA$btp_cc_desc_att")
409 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
410 __asm("section$end$__DATA$btp_cc_desc_att")
414 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
415 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
417 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
418 __start___bt_plugin_component_class_descriptor_attributes
420 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
421 __stop___bt_plugin_component_class_descriptor_attributes
423 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
425 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
429 * Declares a plugin descriptor pointer variable with a custom ID.
431 * _id: ID (any valid C identifier except `auto`).
433 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
436 * Defines a plugin descriptor with a custom ID.
438 * _id: ID (any valid C identifier except `auto`).
439 * _name: Plugin's name (C string).
441 #define BT_PLUGIN_WITH_ID(_id, _name) \
442 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
443 .major = __BT_PLUGIN_VERSION_MAJOR, \
444 .minor = __BT_PLUGIN_VERSION_MINOR, \
447 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
450 * Defines a plugin attribute (generic, internal use).
452 * _attr_name: Name of the attribute (C identifier).
453 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
454 * _id: Plugin descriptor ID (C identifier).
457 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
458 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
459 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
460 .type_name = #_attr_name, \
461 .type = _attr_type, \
462 .value._attr_name = _x, \
464 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
467 * Defines a plugin initialization function attribute attached to a
468 * specific plugin descriptor.
470 * _id: Plugin descriptor ID (C identifier).
471 * _x: Initialization function (bt_plugin_init_func).
473 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
474 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
477 * Defines a plugin exit function attribute attached to a specific
480 * _id: Plugin descriptor ID (C identifier).
481 * _x: Exit function (bt_plugin_exit_func).
483 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
484 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
487 * Defines an author attribute attached to a specific plugin descriptor.
489 * _id: Plugin descriptor ID (C identifier).
490 * _x: Author (C string).
492 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
493 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
496 * Defines a license attribute attached to a specific plugin descriptor.
498 * _id: Plugin descriptor ID (C identifier).
499 * _x: License (C string).
501 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
502 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
505 * Defines a description attribute attached to a specific plugin
508 * _id: Plugin descriptor ID (C identifier).
509 * _x: Description (C string).
511 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
512 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
514 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
515 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
518 * Defines a version attribute attached to a specific plugin descriptor.
520 * _id: Plugin descriptor ID (C identifier).
521 * _major: Plugin's major version (uint32_t).
522 * _minor: Plugin's minor version (uint32_t).
523 * _patch: Plugin's patch version (uint32_t).
524 * _extra: Plugin's version extra information (C string).
526 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
527 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
530 * Defines a source component class descriptor with a custom ID.
532 * _id: ID (any valid C identifier except `auto`).
533 * _comp_class_id: Component class ID (C identifier).
534 * _name: Component class name (C string).
535 * _msg_iter_next_method: Component class's iterator next method
536 * (bt_component_class_source_message_iterator_next_method).
538 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
539 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
540 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
542 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
543 .methods.source = { \
544 .msg_iter_next = _msg_iter_next_method, \
547 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
550 * Defines a filter component class descriptor with a custom ID.
552 * _id: ID (any valid C identifier except `auto`).
553 * _comp_class_id: Component class ID (C identifier).
554 * _name: Component class name (C string).
555 * _msg_iter_next_method: Component class's iterator next method
556 * (bt_component_class_filter_message_iterator_next_method).
558 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
559 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
560 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
562 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
563 .methods.filter = { \
564 .msg_iter_next = _msg_iter_next_method, \
567 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
570 * Defines a sink component class descriptor with a custom ID.
572 * _id: ID (any valid C identifier except `auto`).
573 * _comp_class_id: Component class ID (C identifier).
574 * _name: Component class name (C string).
575 * _consume_method: Component class's iterator consume method
576 * (bt_component_class_sink_consume_method).
578 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
579 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
580 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
582 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
584 .consume = _consume_method, \
587 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
590 * Defines a component class descriptor attribute (generic, internal
593 * _id: Plugin descriptor ID (C identifier).
594 * _comp_class_id: Component class ID (C identifier).
595 * _type: Component class type (`source`, `filter`, or `sink`).
596 * _attr_name: Name of the attribute (C identifier).
597 * _attr_type: Type of the attribute
598 * (enum __bt_plugin_descriptor_attribute_type).
601 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
602 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
603 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
604 .type_name = #_attr_name, \
605 .type = _attr_type, \
606 .value._attr_name = _x, \
608 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
611 * Defines a description attribute attached to a specific source
612 * component class descriptor.
614 * _id: Plugin descriptor ID (C identifier).
615 * _comp_class_id: Component class descriptor ID (C identifier).
616 * _x: Description (C string).
618 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
619 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
622 * Defines a description attribute attached to a specific filter
623 * component class descriptor.
625 * _id: Plugin descriptor ID (C identifier).
626 * _comp_class_id: Component class descriptor ID (C identifier).
627 * _x: Description (C string).
629 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
630 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
633 * Defines a description attribute attached to a specific sink
634 * component class descriptor.
636 * _id: Plugin descriptor ID (C identifier).
637 * _comp_class_id: Component class descriptor ID (C identifier).
638 * _x: Description (C string).
640 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
641 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
644 * Defines a help attribute attached to a specific source component
647 * _id: Plugin descriptor ID (C identifier).
648 * _comp_class_id: Component class descriptor ID (C identifier).
649 * _x: Help (C string).
651 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
652 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
655 * Defines a help attribute attached to a specific filter component
658 * _id: Plugin descriptor ID (C identifier).
659 * _comp_class_id: Component class descriptor ID (C identifier).
660 * _x: Help (C string).
662 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
663 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
666 * Defines a help attribute attached to a specific sink component class
669 * _id: Plugin descriptor ID (C identifier).
670 * _comp_class_id: Component class descriptor ID (C identifier).
671 * _x: Help (C string).
673 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
674 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
677 * Defines an initialization method attribute attached to a specific
678 * source component class descriptor.
680 * _id: Plugin descriptor ID (C identifier).
681 * _comp_class_id: Component class descriptor ID (C identifier).
682 * _x: Initialization method (bt_component_class_source_init_method).
684 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
685 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
688 * Defines an initialization method attribute attached to a specific
689 * filter component class descriptor.
691 * _id: Plugin descriptor ID (C identifier).
692 * _comp_class_id: Component class descriptor ID (C identifier).
693 * _x: Initialization method (bt_component_class_filter_init_method).
695 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
696 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
699 * Defines an initialization method attribute attached to a specific
700 * sink component class descriptor.
702 * _id: Plugin descriptor ID (C identifier).
703 * _comp_class_id: Component class descriptor ID (C identifier).
704 * _x: Initialization method (bt_component_class_sink_init_method).
706 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
707 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
710 * Defines a finalization method attribute attached to a specific source
711 * component class descriptor.
713 * _id: Plugin descriptor ID (C identifier).
714 * _comp_class_id: Component class descriptor ID (C identifier).
715 * _x: Finalize method (bt_component_class_source_finalize_method).
717 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
718 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
721 * Defines a finalization method attribute attached to a specific filter
722 * component class descriptor.
724 * _id: Plugin descriptor ID (C identifier).
725 * _comp_class_id: Component class descriptor ID (C identifier).
726 * _x: Finalize method (bt_component_class_filter_finalize_method).
728 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
729 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
732 * Defines a finalization method attribute attached to a specific sink
733 * component class descriptor.
735 * _id: Plugin descriptor ID (C identifier).
736 * _comp_class_id: Component class descriptor ID (C identifier).
737 * _x: Finalize method (bt_component_class_sink_finalize_method).
739 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
740 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
743 * Defines a query method attribute attached to a specific source
744 * component class descriptor.
746 * _id: Plugin descriptor ID (C identifier).
747 * _comp_class_id: Component class descriptor ID (C identifier).
748 * _x: Finalize method (bt_component_class_source_query_method).
750 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
751 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
754 * Defines a query method attribute attached to a specific filter
755 * component class descriptor.
757 * _id: Plugin descriptor ID (C identifier).
758 * _comp_class_id: Component class descriptor ID (C identifier).
759 * _x: Finalize method (bt_component_class_filter_query_method).
761 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
762 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
765 * Defines a query method attribute attached to a specific sink
766 * component class descriptor.
768 * _id: Plugin descriptor ID (C identifier).
769 * _comp_class_id: Component class descriptor ID (C identifier).
770 * _x: Finalize method (bt_component_class_sink_query_method).
772 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
773 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
776 * Defines an accept input port connection method attribute attached to
777 * a specific filter component class descriptor.
779 * _id: Plugin descriptor ID (C identifier).
780 * _comp_class_id: Component class descriptor ID (C identifier).
781 * _x: Accept port connection method
782 * (bt_component_class_filter_accept_input_port_connection_method).
784 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
785 __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)
788 * Defines an accept input port connection method attribute attached to
789 * a specific sink component class descriptor.
791 * _id: Plugin descriptor ID (C identifier).
792 * _comp_class_id: Component class descriptor ID (C identifier).
793 * _x: Accept port connection method
794 * (bt_component_class_sink_accept_input_port_connection_method).
796 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
797 __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)
800 * Defines an accept output port connection method attribute attached to
801 * a specific source component class descriptor.
803 * _id: Plugin descriptor ID (C identifier).
804 * _comp_class_id: Component class descriptor ID (C identifier).
805 * _x: Accept port connection method
806 * (bt_component_class_source_accept_output_port_connection_method).
808 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
809 __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)
812 * Defines an accept output port connection method attribute attached to
813 * a specific filter component class descriptor.
815 * _id: Plugin descriptor ID (C identifier).
816 * _comp_class_id: Component class descriptor ID (C identifier).
817 * _x: Accept port connection method
818 * (bt_component_class_filter_accept_output_port_connection_method).
820 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
821 __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)
824 * Defines an input port connected method attribute attached to a
825 * specific filter component class descriptor.
827 * _id: Plugin descriptor ID (C identifier).
828 * _comp_class_id: Component class descriptor ID (C identifier).
829 * _x: Port connected method
830 * (bt_component_class_filter_input_port_connected_method).
832 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
833 __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)
836 * Defines an input port connected method attribute attached to a
837 * specific sink component class descriptor.
839 * _id: Plugin descriptor ID (C identifier).
840 * _comp_class_id: Component class descriptor ID (C identifier).
841 * _x: Port connected method
842 * (bt_component_class_sink_input_port_connected_method).
844 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
845 __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)
848 * Defines an output port connected method attribute attached to a
849 * specific source component class descriptor.
851 * _id: Plugin descriptor ID (C identifier).
852 * _comp_class_id: Component class descriptor ID (C identifier).
853 * _x: Port connected method
854 * (bt_component_class_source_output_port_connected_method).
856 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
857 __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)
860 * Defines an output port connected method attribute attached to a
861 * specific filter component class descriptor.
863 * _id: Plugin descriptor ID (C identifier).
864 * _comp_class_id: Component class descriptor ID (C identifier).
865 * _x: Port connected method
866 * (bt_component_class_filter_output_port_connected_method).
868 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
869 __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)
872 * Defines an iterator initialization method attribute attached to a
873 * specific source component class descriptor.
875 * _id: Plugin descriptor ID (C identifier).
876 * _comp_class_id: Component class descriptor ID (C identifier).
877 * _x: Iterator initialization method
878 * (bt_component_class_source_message_iterator_init_method).
880 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
881 __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)
884 * Defines an iterator finalize method attribute attached to a specific
885 * source component class descriptor.
887 * _id: Plugin descriptor ID (C identifier).
888 * _comp_class_id: Component class descriptor ID (C identifier).
889 * _x: Iterator finalize method
890 * (bt_component_class_source_message_iterator_finalize_method).
892 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
893 __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)
896 * Defines an iterator "seek nanoseconds from origin" method attribute
897 * attached to a specific source component class descriptor.
899 * _id: Plugin descriptor ID (C identifier).
900 * _comp_class_id: Component class descriptor ID (C identifier).
901 * _x: Iterator "seek nanoseconds from origin" method
902 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
904 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
905 __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)
908 * Defines an iterator "seek beginning" method attribute attached to a
909 * specific source component class descriptor.
911 * _id: Plugin descriptor ID (C identifier).
912 * _comp_class_id: Component class descriptor ID (C identifier).
913 * _x: Iterator "seek beginning" method
914 * (bt_component_class_source_message_iterator_seek_beginning_method).
916 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
917 __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)
920 * Defines an iterator "can seek nanoseconds from origin" method
921 * attribute attached to a specific source component class descriptor.
923 * _id: Plugin descriptor ID (C identifier).
924 * _comp_class_id: Component class descriptor ID (C identifier).
925 * _x: Iterator "can seek nanoseconds from origin" method
926 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
928 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
929 __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)
932 * Defines an iterator "can seek beginning" method attribute attached to a
933 * specific source component class descriptor.
935 * _id: Plugin descriptor ID (C identifier).
936 * _comp_class_id: Component class descriptor ID (C identifier).
937 * _x: Iterator "can seek beginning" method
938 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
940 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
941 __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)
944 * Defines an iterator initialization method attribute attached to a
945 * specific filter component class descriptor.
947 * _id: Plugin descriptor ID (C identifier).
948 * _comp_class_id: Component class descriptor ID (C identifier).
949 * _x: Iterator initialization method
950 * (bt_component_class_filter_message_iterator_init_method).
952 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
953 __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)
956 * Defines an iterator finalize method attribute attached to a specific
957 * filter component class descriptor.
959 * _id: Plugin descriptor ID (C identifier).
960 * _comp_class_id: Component class descriptor ID (C identifier).
961 * _x: Iterator finalize method
962 * (bt_component_class_filter_message_iterator_finalize_method).
964 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
965 __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)
968 * Defines an iterator "seek nanoseconds from origin" method attribute
969 * attached to a specific filter component class descriptor.
971 * _id: Plugin descriptor ID (C identifier).
972 * _comp_class_id: Component class descriptor ID (C identifier).
973 * _x: Iterator "seek nanoseconds from origin" method
974 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
976 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
977 __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)
980 * Defines an iterator "seek beginning" method attribute attached to a
981 * specific filter component class descriptor.
983 * _id: Plugin descriptor ID (C identifier).
984 * _comp_class_id: Component class descriptor ID (C identifier).
985 * _x: Iterator "seek beginning" method
986 * (bt_component_class_filter_message_iterator_seek_beginning_method).
988 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
989 __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)
992 * Defines an iterator "can seek nanoseconds from origin" method
993 * attribute attached to a specific filter component class descriptor.
995 * _id: Plugin descriptor ID (C identifier).
996 * _comp_class_id: Component class descriptor ID (C identifier).
997 * _x: Iterator "can seek nanoseconds from origin" method
998 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
1000 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
1001 __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)
1004 * Defines an iterator "can seek beginning" method attribute attached to a
1005 * specific filter component class descriptor.
1007 * _id: Plugin descriptor ID (C identifier).
1008 * _comp_class_id: Component class descriptor ID (C identifier).
1009 * _x: Iterator "can seek beginning" method
1010 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
1012 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
1013 __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)
1016 * Defines a plugin descriptor with an automatic ID.
1018 * _name: Plugin's name (C string).
1020 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
1023 * Defines a plugin initialization function attribute attached to the
1024 * automatic plugin descriptor.
1026 * _x: Initialization function (bt_plugin_init_func).
1028 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
1031 * Defines a plugin exit function attribute attached to the automatic
1032 * plugin descriptor.
1034 * _x: Exit function (bt_plugin_exit_func).
1036 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
1039 * Defines an author attribute attached to the automatic plugin
1042 * _x: Author (C string).
1044 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
1047 * Defines a license attribute attached to the automatic plugin
1050 * _x: License (C string).
1052 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
1055 * Defines a description attribute attached to the automatic plugin
1058 * _x: Description (C string).
1060 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
1063 * Defines a version attribute attached to the automatic plugin
1066 * _major: Plugin's major version (uint32_t).
1067 * _minor: Plugin's minor version (uint32_t).
1068 * _patch: Plugin's patch version (uint32_t).
1069 * _extra: Plugin's version extra information (C string).
1071 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
1074 * Defines a source component class attached to the automatic plugin
1075 * descriptor. Its ID is the same as its name, hence its name must be a
1076 * C identifier in this version.
1078 * _name: Component class name (C identifier).
1079 * _msg_iter_next_method: Component class's iterator next method
1080 * (bt_component_class_source_message_iterator_next_method).
1082 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1083 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1086 * Defines a filter component class attached to the automatic plugin
1087 * descriptor. Its ID is the same as its name, hence its name must be a
1088 * C identifier in this version.
1090 * _name: Component class name (C identifier).
1091 * _msg_iter_next_method: Component class's iterator next method
1092 * (bt_component_class_filter_message_iterator_next_method).
1094 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1095 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1098 * Defines a sink component class attached to the automatic plugin
1099 * descriptor. Its ID is the same as its name, hence its name must be a
1100 * C identifier in this version.
1102 * _name: Component class name (C identifier).
1103 * _consume_method: Component class's consume method
1104 * (bt_component_class_sink_consume_method).
1106 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1107 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1110 * Defines a description attribute attached to a source component class
1111 * descriptor which is attached to the automatic plugin descriptor.
1113 * _name: Component class name (C identifier).
1114 * _x: Description (C string).
1116 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1117 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1120 * Defines a description attribute attached to a filter component class
1121 * descriptor which is attached to the automatic plugin descriptor.
1123 * _name: Component class name (C identifier).
1124 * _x: Description (C string).
1126 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1127 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1130 * Defines a description attribute attached to a sink component class
1131 * descriptor which is attached to the automatic plugin descriptor.
1133 * _name: Component class name (C identifier).
1134 * _x: Description (C string).
1136 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1137 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1140 * Defines a help attribute attached to a source component class
1141 * descriptor which is attached to the automatic plugin descriptor.
1143 * _name: Component class name (C identifier).
1144 * _x: Help (C string).
1146 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1147 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1150 * Defines a help attribute attached to a filter component class
1151 * descriptor which is attached to the automatic plugin descriptor.
1153 * _name: Component class name (C identifier).
1154 * _x: Help (C string).
1156 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1157 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1160 * Defines a help attribute attached to a sink component class
1161 * descriptor which is attached to the automatic plugin descriptor.
1163 * _name: Component class name (C identifier).
1164 * _x: Help (C string).
1166 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1167 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1170 * Defines an initialization method attribute attached to a source
1171 * component class descriptor which is attached to the automatic plugin
1174 * _name: Component class name (C identifier).
1175 * _x: Initialization method (bt_component_class_source_init_method).
1177 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1178 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1181 * Defines an initialization method attribute attached to a filter
1182 * component class descriptor which is attached to the automatic plugin
1185 * _name: Component class name (C identifier).
1186 * _x: Initialization method (bt_component_class_filter_init_method).
1188 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1189 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1192 * Defines an initialization method attribute attached to a sink
1193 * component class descriptor which is attached to the automatic plugin
1196 * _name: Component class name (C identifier).
1197 * _x: Initialization method (bt_component_class_sink_init_method).
1199 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1200 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1203 * Defines a finalization method attribute attached to a source component
1204 * class descriptor which is attached to the automatic plugin
1207 * _name: Component class name (C identifier).
1208 * _x: Initialization method (bt_component_class_source_finalize_method).
1210 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1211 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1214 * Defines a finalization method attribute attached to a filter component
1215 * class descriptor which is attached to the automatic plugin
1218 * _name: Component class name (C identifier).
1219 * _x: Initialization method (bt_component_class_filter_finalize_method).
1221 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1222 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1225 * Defines a finalization method attribute attached to a sink component class
1226 * descriptor which is attached to the automatic plugin descriptor.
1228 * _name: Component class name (C identifier).
1229 * _x: Initialization method (bt_component_class_sink_finalize_method).
1231 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1232 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1235 * Defines a query method attribute attached to a source component
1236 * class descriptor which is attached to the automatic plugin
1239 * _name: Component class name (C identifier).
1240 * _x: Initialization method (bt_component_class_source_query_method).
1242 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1243 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1246 * Defines a query method attribute attached to a filter component
1247 * class descriptor which is attached to the automatic plugin
1250 * _name: Component class name (C identifier).
1251 * _x: Initialization method (bt_component_class_filter_query_method).
1253 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1254 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1257 * Defines a query method attribute attached to a sink component
1258 * class descriptor which is attached to the automatic plugin
1261 * _name: Component class name (C identifier).
1262 * _x: Initialization method (bt_component_class_sink_query_method).
1264 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1265 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1268 * Defines an accept input port connection method attribute attached to
1269 * a filter component class descriptor which is attached to the
1270 * automatic plugin descriptor.
1272 * _name: Component class name (C identifier).
1273 * _x: Accept port connection method
1274 * (bt_component_class_filter_accept_input_port_connection_method).
1276 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1277 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1280 * Defines an accept input port connection method attribute attached to
1281 * a sink component class descriptor which is attached to the automatic
1282 * plugin descriptor.
1284 * _name: Component class name (C identifier).
1285 * _x: Accept port connection method
1286 * (bt_component_class_sink_accept_input_port_connection_method).
1288 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1289 BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1292 * Defines an accept output port connection method attribute attached to
1293 * a source component class descriptor which is attached to the
1294 * automatic plugin descriptor.
1296 * _name: Component class name (C identifier).
1297 * _x: Accept port connection method
1298 * (bt_component_class_source_accept_output_port_connection_method).
1300 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1301 BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1304 * Defines an accept output port connection method attribute attached to
1305 * a filter component class descriptor which is attached to the
1306 * automatic plugin descriptor.
1308 * _name: Component class name (C identifier).
1309 * _x: Accept port connection method
1310 * (bt_component_class_filter_accept_output_port_connection_method).
1312 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1313 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1316 * Defines an input port connected method attribute attached to a filter
1317 * component class descriptor which is attached to the automatic plugin
1320 * _name: Component class name (C identifier).
1321 * _x: Port connected (bt_component_class_filter_input_port_connected_method).
1323 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1324 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1327 * Defines an input port connected method attribute attached to a sink
1328 * component class descriptor which is attached to the automatic plugin
1331 * _name: Component class name (C identifier).
1332 * _x: Port connected (bt_component_class_sink_input_port_connected_method).
1334 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1335 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1338 * Defines an output port connected method attribute attached to a source
1339 * component class descriptor which is attached to the automatic plugin
1342 * _name: Component class name (C identifier).
1343 * _x: Port connected (bt_component_class_source_output_port_connected_method).
1345 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1346 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1349 * Defines an output port connected method attribute attached to a filter
1350 * component class descriptor which is attached to the automatic plugin
1353 * _name: Component class name (C identifier).
1354 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
1356 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1357 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1360 * Defines an iterator initialization method attribute attached to a
1361 * source component class descriptor which is attached to the automatic
1362 * plugin descriptor.
1364 * _name: Component class name (C identifier).
1365 * _x: Iterator initialization method
1366 * (bt_component_class_source_message_iterator_init_method).
1368 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1369 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1372 * Defines an iterator finalize method attribute attached to a source
1373 * component class descriptor which is attached to the automatic plugin
1376 * _name: Component class name (C identifier).
1377 * _x: Iterator finalize method
1378 * (bt_component_class_source_message_iterator_finalize_method).
1380 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1381 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1384 * Defines an iterator "seek nanoseconds from origin" method attribute
1385 * attached to a source component class descriptor which is attached to
1386 * the automatic plugin descriptor.
1388 * _name: Component class name (C identifier).
1389 * _x: Iterator "seek nanoseconds from origin" method
1390 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
1392 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1393 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1396 * Defines an iterator "seek beginning" method attribute
1397 * attached to a source component class descriptor which is attached to
1398 * the automatic plugin descriptor.
1400 * _name: Component class name (C identifier).
1401 * _x: Iterator "seek beginning" method
1402 * (bt_component_class_source_message_iterator_seek_beginning_method).
1404 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1405 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1408 * Defines an iterator "can seek nanoseconds from origin" method
1409 * attribute attached to a source component class descriptor which is
1410 * attached to the automatic plugin descriptor.
1412 * _name: Component class name (C identifier).
1413 * _x: Iterator "can seek nanoseconds from origin" method
1414 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
1416 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1417 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1420 * Defines an iterator "can seek beginning" method attribute
1421 * attached to a source component class descriptor which is attached to
1422 * the automatic plugin descriptor.
1424 * _name: Component class name (C identifier).
1425 * _x: Iterator "can seek beginning" method
1426 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
1428 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1429 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1432 * Defines an iterator initialization method attribute attached to a
1433 * filter component class descriptor which is attached to the automatic
1434 * plugin descriptor.
1436 * _name: Component class name (C identifier).
1437 * _x: Iterator initialization method
1438 * (bt_component_class_filter_message_iterator_init_method).
1440 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1441 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1444 * Defines an iterator finalize method attribute attached to a filter
1445 * component class descriptor which is attached to the automatic plugin
1448 * _name: Component class name (C identifier).
1449 * _x: Iterator finalize method
1450 * (bt_component_class_filter_message_iterator_finalize_method).
1452 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1453 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1456 * Defines an iterator "seek nanoseconds from origin" method attribute
1457 * attached to a filter component class descriptor which is attached to
1458 * the automatic plugin descriptor.
1460 * _name: Component class name (C identifier).
1461 * _x: Iterator "seek nanoseconds from origin" method
1462 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
1464 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1465 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1468 * Defines an iterator "seek beginning" method attribute
1469 * attached to a filter component class descriptor which is attached to
1470 * the automatic plugin descriptor.
1472 * _name: Component class name (C identifier).
1473 * _x: Iterator "seek beginning" method
1474 * (bt_component_class_filter_message_iterator_seek_beginning_method).
1476 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1477 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1480 * Defines an iterator "can seek nanoseconds from origin" method
1481 * attribute attached to a filter component class descriptor which is
1482 * attached to the automatic plugin descriptor.
1484 * _name: Component class name (C identifier).
1485 * _x: Iterator "can seek nanoseconds from origin" method
1486 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
1488 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1489 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1492 * Defines an iterator "can seek beginning" method attribute
1493 * attached to a filter component class descriptor which is attached to
1494 * the automatic plugin descriptor.
1496 * _name: Component class name (C identifier).
1497 * _x: Iterator "can seek beginning" method
1498 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
1500 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1501 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1503 #define BT_PLUGIN_MODULE() \
1504 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
1505 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1506 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
1508 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
1509 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1510 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
1512 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
1513 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1514 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
1516 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; \
1517 _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; \
1518 _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; \
1520 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1522 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1524 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1526 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1528 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1530 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1532 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1534 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1536 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1538 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1540 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1542 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1544 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1546 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1548 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1550 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1557 #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */