1 #ifndef BABELTRACE2_PLUGIN_PLUGIN_DEV_H
2 #define BABELTRACE2_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
30 #ifndef __BT_IN_BABELTRACE_H
31 # error "Please include <babeltrace2/babeltrace.h> instead."
36 #include <babeltrace2/graph/component-class-const.h>
37 #include <babeltrace2/graph/component-class-source.h>
38 #include <babeltrace2/graph/component-class-filter.h>
39 #include <babeltrace2/graph/component-class-sink.h>
40 #include <babeltrace2/types.h>
43 * _BT_HIDDEN: set the hidden attribute for internal functions
44 * On Windows, symbols are local unless explicitly exported,
45 * see https://gcc.gnu.org/wiki/Visibility
47 #if defined(_WIN32) || defined(__CYGWIN__)
50 #define _BT_HIDDEN __attribute__((visibility("hidden")))
58 * Plugin interface's version, not synced with Babeltrace's version
61 #define __BT_PLUGIN_VERSION_MAJOR 1
62 #define __BT_PLUGIN_VERSION_MINOR 0
64 /* Plugin initialization function type */
65 typedef enum bt_plugin_init_func_status
{
66 BT_PLUGIN_INIT_FUNC_STATUS_OK
= __BT_FUNC_STATUS_OK
,
67 BT_PLUGIN_INIT_FUNC_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
68 BT_PLUGIN_INIT_FUNC_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
69 } bt_plugin_init_func_status
;
71 typedef bt_plugin_init_func_status (*bt_plugin_init_func
)(
72 bt_self_plugin
*plugin
);
74 /* Plugin exit function type */
75 typedef void (*bt_plugin_exit_func
)(void);
77 /* Plugin descriptor: describes a single plugin (internal use) */
78 struct __bt_plugin_descriptor
{
79 /* Plugin's interface major version number */
82 /* Plugin's interface minor version number */
87 } __attribute__((packed
));
89 /* Type of a plugin attribute (internal use) */
90 enum __bt_plugin_descriptor_attribute_type
{
91 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
92 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
93 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
94 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
95 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
96 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
99 /* Plugin (user) version */
100 struct __bt_plugin_descriptor_version
{
107 /* Plugin attribute (internal use) */
108 struct __bt_plugin_descriptor_attribute
{
109 /* Plugin descriptor to which to associate this attribute */
110 const struct __bt_plugin_descriptor
*plugin_descriptor
;
112 /* Name of the attribute's type for debug purposes */
113 const char *type_name
;
115 /* Attribute's type */
116 enum __bt_plugin_descriptor_attribute_type type
;
118 /* Attribute's value (depends on attribute's type) */
120 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
121 bt_plugin_init_func init
;
123 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
124 bt_plugin_exit_func exit
;
126 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
129 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
132 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
133 const char *description
;
135 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
136 struct __bt_plugin_descriptor_version version
;
138 } __attribute__((packed
));
140 /* Component class descriptor (internal use) */
141 struct __bt_plugin_component_class_descriptor
{
143 * Plugin descriptor to which to associate this component
146 const struct __bt_plugin_descriptor
*plugin_descriptor
;
148 /* Component class name */
151 /* Component class type */
152 bt_component_class_type type
;
154 /* Mandatory methods (depends on component class type) */
156 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
158 bt_component_class_source_message_iterator_next_method msg_iter_next
;
161 /* BT_COMPONENT_CLASS_TYPE_FILTER */
163 bt_component_class_filter_message_iterator_next_method msg_iter_next
;
166 /* BT_COMPONENT_CLASS_TYPE_SINK */
168 bt_component_class_sink_consume_method consume
;
171 } __attribute__((packed
));
173 /* Type of a component class attribute (internal use) */
174 enum __bt_plugin_component_class_descriptor_attribute_type
{
175 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
176 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
177 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD
= 2,
178 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 3,
179 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 4,
180 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 5,
181 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 6,
182 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD
= 7,
183 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD
= 8,
184 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 9,
185 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD
= 10,
186 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD
= 11,
187 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD
= 12,
188 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD
= 13,
191 /* Component class attribute (internal use) */
192 struct __bt_plugin_component_class_descriptor_attribute
{
194 * Component class plugin attribute to which to associate this
195 * component class attribute.
197 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
199 /* Name of the attribute's type for debug purposes */
200 const char *type_name
;
202 /* Attribute's type */
203 enum __bt_plugin_component_class_descriptor_attribute_type type
;
205 /* Attribute's value (depends on attribute's type) */
207 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
208 const char *description
;
210 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
213 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
214 bt_component_class_source_init_method source_init_method
;
215 bt_component_class_filter_init_method filter_init_method
;
216 bt_component_class_sink_init_method sink_init_method
;
218 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
219 bt_component_class_source_finalize_method source_finalize_method
;
220 bt_component_class_filter_finalize_method filter_finalize_method
;
221 bt_component_class_sink_finalize_method sink_finalize_method
;
223 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
224 bt_component_class_source_query_method source_query_method
;
225 bt_component_class_filter_query_method filter_query_method
;
226 bt_component_class_sink_query_method sink_query_method
;
228 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
229 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
230 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
232 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
233 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
234 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
236 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */
237 bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method
;
239 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD */
240 bt_component_class_source_message_iterator_init_method source_msg_iter_init_method
;
241 bt_component_class_filter_message_iterator_init_method filter_msg_iter_init_method
;
243 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
244 bt_component_class_source_message_iterator_finalize_method source_msg_iter_finalize_method
;
245 bt_component_class_filter_message_iterator_finalize_method filter_msg_iter_finalize_method
;
247 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
248 bt_component_class_source_message_iterator_seek_ns_from_origin_method source_msg_iter_seek_ns_from_origin_method
;
249 bt_component_class_filter_message_iterator_seek_ns_from_origin_method filter_msg_iter_seek_ns_from_origin_method
;
251 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
252 bt_component_class_source_message_iterator_seek_beginning_method source_msg_iter_seek_beginning_method
;
253 bt_component_class_filter_message_iterator_seek_beginning_method filter_msg_iter_seek_beginning_method
;
255 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
256 bt_component_class_source_message_iterator_can_seek_ns_from_origin_method source_msg_iter_can_seek_ns_from_origin_method
;
257 bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method filter_msg_iter_can_seek_ns_from_origin_method
;
259 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
260 bt_component_class_source_message_iterator_can_seek_beginning_method source_msg_iter_can_seek_beginning_method
;
261 bt_component_class_filter_message_iterator_can_seek_beginning_method filter_msg_iter_can_seek_beginning_method
;
263 } __attribute__((packed
));
265 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
266 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
267 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
268 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
269 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
270 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
271 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
272 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
275 * Variable attributes for a plugin descriptor pointer to be added to
276 * the plugin descriptor section (internal use).
279 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
280 __attribute__((section("__DATA,btp_desc"), used))
282 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
283 __start___bt_plugin_descriptors
285 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
286 __stop___bt_plugin_descriptors
288 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
289 __asm("section$start$__DATA$btp_desc")
291 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
292 __asm("section$end$__DATA$btp_desc")
296 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
297 __attribute__((section("__bt_plugin_descriptors"), used))
299 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
300 __start___bt_plugin_descriptors
302 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
303 __stop___bt_plugin_descriptors
305 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
307 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
311 * Variable attributes for a plugin attribute pointer to be added to
312 * the plugin attribute section (internal use).
315 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
316 __attribute__((section("__DATA,btp_desc_att"), used))
318 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
319 __start___bt_plugin_descriptor_attributes
321 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
322 __stop___bt_plugin_descriptor_attributes
324 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
325 __asm("section$start$__DATA$btp_desc_att")
327 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
328 __asm("section$end$__DATA$btp_desc_att")
332 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
333 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
335 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
336 __start___bt_plugin_descriptor_attributes
338 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
339 __stop___bt_plugin_descriptor_attributes
341 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
343 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
347 * Variable attributes for a component class descriptor pointer to be
348 * added to the component class descriptor section (internal use).
351 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
352 __attribute__((section("__DATA,btp_cc_desc"), used))
354 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
355 __start___bt_plugin_component_class_descriptors
357 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
358 __stop___bt_plugin_component_class_descriptors
360 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
361 __asm("section$start$__DATA$btp_cc_desc")
363 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
364 __asm("section$end$__DATA$btp_cc_desc")
368 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
369 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
371 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
372 __start___bt_plugin_component_class_descriptors
374 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
375 __stop___bt_plugin_component_class_descriptors
377 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
379 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
383 * Variable attributes for a component class descriptor attribute
384 * pointer to be added to the component class descriptor attribute
385 * section (internal use).
388 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
389 __attribute__((section("__DATA,btp_cc_desc_att"), used))
391 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
392 __start___bt_plugin_component_class_descriptor_attributes
394 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
395 __stop___bt_plugin_component_class_descriptor_attributes
397 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
398 __asm("section$start$__DATA$btp_cc_desc_att")
400 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
401 __asm("section$end$__DATA$btp_cc_desc_att")
405 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
406 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
408 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
409 __start___bt_plugin_component_class_descriptor_attributes
411 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
412 __stop___bt_plugin_component_class_descriptor_attributes
414 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
416 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
420 * Declares a plugin descriptor pointer variable with a custom ID.
422 * _id: ID (any valid C identifier except `auto`).
424 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
427 * Defines a plugin descriptor with a custom ID.
429 * _id: ID (any valid C identifier except `auto`).
430 * _name: Plugin's name (C string).
432 #define BT_PLUGIN_WITH_ID(_id, _name) \
433 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
434 .major = __BT_PLUGIN_VERSION_MAJOR, \
435 .minor = __BT_PLUGIN_VERSION_MINOR, \
438 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
441 * Defines a plugin attribute (generic, internal use).
443 * _attr_name: Name of the attribute (C identifier).
444 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
445 * _id: Plugin descriptor ID (C identifier).
448 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
449 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
450 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
451 .type_name = #_attr_name, \
452 .type = _attr_type, \
453 .value._attr_name = _x, \
455 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
458 * Defines a plugin initialization function attribute attached to a
459 * specific plugin descriptor.
461 * _id: Plugin descriptor ID (C identifier).
462 * _x: Initialization function (bt_plugin_init_func).
464 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
465 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
468 * Defines a plugin exit function attribute attached to a specific
471 * _id: Plugin descriptor ID (C identifier).
472 * _x: Exit function (bt_plugin_exit_func).
474 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
475 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
478 * Defines an author attribute attached to a specific plugin descriptor.
480 * _id: Plugin descriptor ID (C identifier).
481 * _x: Author (C string).
483 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
484 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
487 * Defines a license attribute attached to a specific plugin descriptor.
489 * _id: Plugin descriptor ID (C identifier).
490 * _x: License (C string).
492 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
493 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
496 * Defines a description attribute attached to a specific plugin
499 * _id: Plugin descriptor ID (C identifier).
500 * _x: Description (C string).
502 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
503 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
505 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
506 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
509 * Defines a version attribute attached to a specific plugin descriptor.
511 * _id: Plugin descriptor ID (C identifier).
512 * _major: Plugin's major version (uint32_t).
513 * _minor: Plugin's minor version (uint32_t).
514 * _patch: Plugin's patch version (uint32_t).
515 * _extra: Plugin's version extra information (C string).
517 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
518 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
521 * Defines a source component class descriptor with a custom ID.
523 * _id: ID (any valid C identifier except `auto`).
524 * _comp_class_id: Component class ID (C identifier).
525 * _name: Component class name (C string).
526 * _msg_iter_next_method: Component class's iterator next method
527 * (bt_component_class_source_message_iterator_next_method).
529 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
530 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
531 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
533 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
534 .methods.source = { \
535 .msg_iter_next = _msg_iter_next_method, \
538 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
541 * Defines a filter component class descriptor with a custom ID.
543 * _id: ID (any valid C identifier except `auto`).
544 * _comp_class_id: Component class ID (C identifier).
545 * _name: Component class name (C string).
546 * _msg_iter_next_method: Component class's iterator next method
547 * (bt_component_class_filter_message_iterator_next_method).
549 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
550 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
551 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
553 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
554 .methods.filter = { \
555 .msg_iter_next = _msg_iter_next_method, \
558 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
561 * Defines a sink component class descriptor with a custom ID.
563 * _id: ID (any valid C identifier except `auto`).
564 * _comp_class_id: Component class ID (C identifier).
565 * _name: Component class name (C string).
566 * _consume_method: Component class's iterator consume method
567 * (bt_component_class_sink_consume_method).
569 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
570 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
571 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
573 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
575 .consume = _consume_method, \
578 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
581 * Defines a component class descriptor attribute (generic, internal
584 * _id: Plugin descriptor ID (C identifier).
585 * _comp_class_id: Component class ID (C identifier).
586 * _type: Component class type (`source`, `filter`, or `sink`).
587 * _attr_name: Name of the attribute (C identifier).
588 * _attr_type: Type of the attribute
589 * (enum __bt_plugin_descriptor_attribute_type).
592 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
593 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
594 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
595 .type_name = #_attr_name, \
596 .type = _attr_type, \
597 .value._attr_name = _x, \
599 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
602 * Defines a description attribute attached to a specific source
603 * component class descriptor.
605 * _id: Plugin descriptor ID (C identifier).
606 * _comp_class_id: Component class descriptor ID (C identifier).
607 * _x: Description (C string).
609 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
610 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
613 * Defines a description attribute attached to a specific filter
614 * component class descriptor.
616 * _id: Plugin descriptor ID (C identifier).
617 * _comp_class_id: Component class descriptor ID (C identifier).
618 * _x: Description (C string).
620 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
621 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
624 * Defines a description attribute attached to a specific sink
625 * component class descriptor.
627 * _id: Plugin descriptor ID (C identifier).
628 * _comp_class_id: Component class descriptor ID (C identifier).
629 * _x: Description (C string).
631 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
632 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
635 * Defines a help attribute attached to a specific source component
638 * _id: Plugin descriptor ID (C identifier).
639 * _comp_class_id: Component class descriptor ID (C identifier).
640 * _x: Help (C string).
642 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
643 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
646 * Defines a help attribute attached to a specific filter component
649 * _id: Plugin descriptor ID (C identifier).
650 * _comp_class_id: Component class descriptor ID (C identifier).
651 * _x: Help (C string).
653 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
654 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
657 * Defines a help attribute attached to a specific sink component class
660 * _id: Plugin descriptor ID (C identifier).
661 * _comp_class_id: Component class descriptor ID (C identifier).
662 * _x: Help (C string).
664 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
665 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
668 * Defines an initialization method attribute attached to a specific
669 * source component class descriptor.
671 * _id: Plugin descriptor ID (C identifier).
672 * _comp_class_id: Component class descriptor ID (C identifier).
673 * _x: Initialization method (bt_component_class_source_init_method).
675 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
676 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
679 * Defines an initialization method attribute attached to a specific
680 * filter component class descriptor.
682 * _id: Plugin descriptor ID (C identifier).
683 * _comp_class_id: Component class descriptor ID (C identifier).
684 * _x: Initialization method (bt_component_class_filter_init_method).
686 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
687 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
690 * Defines an initialization method attribute attached to a specific
691 * sink component class descriptor.
693 * _id: Plugin descriptor ID (C identifier).
694 * _comp_class_id: Component class descriptor ID (C identifier).
695 * _x: Initialization method (bt_component_class_sink_init_method).
697 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
698 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
701 * Defines a finalization method attribute attached to a specific source
702 * component class descriptor.
704 * _id: Plugin descriptor ID (C identifier).
705 * _comp_class_id: Component class descriptor ID (C identifier).
706 * _x: Finalize method (bt_component_class_source_finalize_method).
708 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
709 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
712 * Defines a finalization method attribute attached to a specific filter
713 * component class descriptor.
715 * _id: Plugin descriptor ID (C identifier).
716 * _comp_class_id: Component class descriptor ID (C identifier).
717 * _x: Finalize method (bt_component_class_filter_finalize_method).
719 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
720 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
723 * Defines a finalization method attribute attached to a specific sink
724 * component class descriptor.
726 * _id: Plugin descriptor ID (C identifier).
727 * _comp_class_id: Component class descriptor ID (C identifier).
728 * _x: Finalize method (bt_component_class_sink_finalize_method).
730 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
731 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
734 * Defines a query method attribute attached to a specific source
735 * component class descriptor.
737 * _id: Plugin descriptor ID (C identifier).
738 * _comp_class_id: Component class descriptor ID (C identifier).
739 * _x: Finalize method (bt_component_class_source_query_method).
741 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
742 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
745 * Defines a query method attribute attached to a specific filter
746 * component class descriptor.
748 * _id: Plugin descriptor ID (C identifier).
749 * _comp_class_id: Component class descriptor ID (C identifier).
750 * _x: Finalize method (bt_component_class_filter_query_method).
752 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
753 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
756 * Defines a query method attribute attached to a specific sink
757 * component class descriptor.
759 * _id: Plugin descriptor ID (C identifier).
760 * _comp_class_id: Component class descriptor ID (C identifier).
761 * _x: Finalize method (bt_component_class_sink_query_method).
763 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
764 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
767 * Defines an input port connected method attribute attached to a
768 * specific filter component class descriptor.
770 * _id: Plugin descriptor ID (C identifier).
771 * _comp_class_id: Component class descriptor ID (C identifier).
772 * _x: Port connected method
773 * (bt_component_class_filter_input_port_connected_method).
775 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
776 __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)
779 * Defines an input port connected method attribute attached to a
780 * specific sink component class descriptor.
782 * _id: Plugin descriptor ID (C identifier).
783 * _comp_class_id: Component class descriptor ID (C identifier).
784 * _x: Port connected method
785 * (bt_component_class_sink_input_port_connected_method).
787 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
788 __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)
791 * Defines an output port connected method attribute attached to a
792 * specific source component class descriptor.
794 * _id: Plugin descriptor ID (C identifier).
795 * _comp_class_id: Component class descriptor ID (C identifier).
796 * _x: Port connected method
797 * (bt_component_class_source_output_port_connected_method).
799 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
800 __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)
803 * Defines an output port connected method attribute attached to a
804 * specific filter component class descriptor.
806 * _id: Plugin descriptor ID (C identifier).
807 * _comp_class_id: Component class descriptor ID (C identifier).
808 * _x: Port connected method
809 * (bt_component_class_filter_output_port_connected_method).
811 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
812 __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)
815 * Defines a "graph is configured" method attribute attached to a
816 * specific sink component class descriptor.
818 * _id: Plugin descriptor ID (C identifier).
819 * _comp_class_id: Component class descriptor ID (C identifier).
820 * _x: "Graph is configured" method
821 * (bt_component_class_sink_graph_is_configured_method).
823 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
824 __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)
827 * Defines an iterator initialization method attribute attached to a
828 * specific source component class descriptor.
830 * _id: Plugin descriptor ID (C identifier).
831 * _comp_class_id: Component class descriptor ID (C identifier).
832 * _x: Iterator initialization method
833 * (bt_component_class_source_message_iterator_init_method).
835 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
836 __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)
839 * Defines an iterator finalize method attribute attached to a specific
840 * source component class descriptor.
842 * _id: Plugin descriptor ID (C identifier).
843 * _comp_class_id: Component class descriptor ID (C identifier).
844 * _x: Iterator finalize method
845 * (bt_component_class_source_message_iterator_finalize_method).
847 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
848 __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)
851 * Defines an iterator "seek nanoseconds from origin" method attribute
852 * attached to a specific source component class descriptor.
854 * _id: Plugin descriptor ID (C identifier).
855 * _comp_class_id: Component class descriptor ID (C identifier).
856 * _x: Iterator "seek nanoseconds from origin" method
857 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
859 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
860 __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)
863 * Defines an iterator "seek beginning" method attribute attached to a
864 * specific source component class descriptor.
866 * _id: Plugin descriptor ID (C identifier).
867 * _comp_class_id: Component class descriptor ID (C identifier).
868 * _x: Iterator "seek beginning" method
869 * (bt_component_class_source_message_iterator_seek_beginning_method).
871 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
872 __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)
875 * Defines an iterator "can seek nanoseconds from origin" method
876 * attribute attached to a specific source component class descriptor.
878 * _id: Plugin descriptor ID (C identifier).
879 * _comp_class_id: Component class descriptor ID (C identifier).
880 * _x: Iterator "can seek nanoseconds from origin" method
881 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
883 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
884 __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)
887 * Defines an iterator "can seek beginning" method attribute attached to a
888 * specific source component class descriptor.
890 * _id: Plugin descriptor ID (C identifier).
891 * _comp_class_id: Component class descriptor ID (C identifier).
892 * _x: Iterator "can seek beginning" method
893 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
895 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
896 __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)
899 * Defines an iterator initialization method attribute attached to a
900 * specific filter component class descriptor.
902 * _id: Plugin descriptor ID (C identifier).
903 * _comp_class_id: Component class descriptor ID (C identifier).
904 * _x: Iterator initialization method
905 * (bt_component_class_filter_message_iterator_init_method).
907 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
908 __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)
911 * Defines an iterator finalize method attribute attached to a specific
912 * filter component class descriptor.
914 * _id: Plugin descriptor ID (C identifier).
915 * _comp_class_id: Component class descriptor ID (C identifier).
916 * _x: Iterator finalize method
917 * (bt_component_class_filter_message_iterator_finalize_method).
919 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
920 __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)
923 * Defines an iterator "seek nanoseconds from origin" method attribute
924 * attached to a specific filter component class descriptor.
926 * _id: Plugin descriptor ID (C identifier).
927 * _comp_class_id: Component class descriptor ID (C identifier).
928 * _x: Iterator "seek nanoseconds from origin" method
929 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
931 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
932 __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)
935 * Defines an iterator "seek beginning" method attribute attached to a
936 * specific filter component class descriptor.
938 * _id: Plugin descriptor ID (C identifier).
939 * _comp_class_id: Component class descriptor ID (C identifier).
940 * _x: Iterator "seek beginning" method
941 * (bt_component_class_filter_message_iterator_seek_beginning_method).
943 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
944 __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)
947 * Defines an iterator "can seek nanoseconds from origin" method
948 * attribute attached to a specific filter component class descriptor.
950 * _id: Plugin descriptor ID (C identifier).
951 * _comp_class_id: Component class descriptor ID (C identifier).
952 * _x: Iterator "can seek nanoseconds from origin" method
953 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
955 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
956 __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)
959 * Defines an iterator "can seek beginning" method attribute attached to a
960 * specific filter component class descriptor.
962 * _id: Plugin descriptor ID (C identifier).
963 * _comp_class_id: Component class descriptor ID (C identifier).
964 * _x: Iterator "can seek beginning" method
965 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
967 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
968 __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)
971 * Defines a plugin descriptor with an automatic ID.
973 * _name: Plugin's name (C string).
975 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
978 * Defines a plugin initialization function attribute attached to the
979 * automatic plugin descriptor.
981 * _x: Initialization function (bt_plugin_init_func).
983 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
986 * Defines a plugin exit function attribute attached to the automatic
989 * _x: Exit function (bt_plugin_exit_func).
991 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
994 * Defines an author attribute attached to the automatic plugin
997 * _x: Author (C string).
999 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
1002 * Defines a license attribute attached to the automatic plugin
1005 * _x: License (C string).
1007 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
1010 * Defines a description attribute attached to the automatic plugin
1013 * _x: Description (C string).
1015 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
1018 * Defines a version attribute attached to the automatic plugin
1021 * _major: Plugin's major version (uint32_t).
1022 * _minor: Plugin's minor version (uint32_t).
1023 * _patch: Plugin's patch version (uint32_t).
1024 * _extra: Plugin's version extra information (C string).
1026 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
1029 * Defines a source component class attached to the automatic plugin
1030 * descriptor. Its ID is the same as its name, hence its name must be a
1031 * C identifier in this version.
1033 * _name: Component class name (C identifier).
1034 * _msg_iter_next_method: Component class's iterator next method
1035 * (bt_component_class_source_message_iterator_next_method).
1037 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1038 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1041 * Defines a filter component class attached to the automatic plugin
1042 * descriptor. Its ID is the same as its name, hence its name must be a
1043 * C identifier in this version.
1045 * _name: Component class name (C identifier).
1046 * _msg_iter_next_method: Component class's iterator next method
1047 * (bt_component_class_filter_message_iterator_next_method).
1049 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1050 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1053 * Defines a sink component class attached to the automatic plugin
1054 * descriptor. Its ID is the same as its name, hence its name must be a
1055 * C identifier in this version.
1057 * _name: Component class name (C identifier).
1058 * _consume_method: Component class's consume method
1059 * (bt_component_class_sink_consume_method).
1061 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1062 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1065 * Defines a description attribute attached to a source component class
1066 * descriptor which is attached to the automatic plugin descriptor.
1068 * _name: Component class name (C identifier).
1069 * _x: Description (C string).
1071 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1072 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1075 * Defines a description attribute attached to a filter component class
1076 * descriptor which is attached to the automatic plugin descriptor.
1078 * _name: Component class name (C identifier).
1079 * _x: Description (C string).
1081 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1082 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1085 * Defines a description attribute attached to a sink component class
1086 * descriptor which is attached to the automatic plugin descriptor.
1088 * _name: Component class name (C identifier).
1089 * _x: Description (C string).
1091 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1092 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1095 * Defines a help attribute attached to a source component class
1096 * descriptor which is attached to the automatic plugin descriptor.
1098 * _name: Component class name (C identifier).
1099 * _x: Help (C string).
1101 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1102 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1105 * Defines a help attribute attached to a filter component class
1106 * descriptor which is attached to the automatic plugin descriptor.
1108 * _name: Component class name (C identifier).
1109 * _x: Help (C string).
1111 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1112 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1115 * Defines a help attribute attached to a sink component class
1116 * descriptor which is attached to the automatic plugin descriptor.
1118 * _name: Component class name (C identifier).
1119 * _x: Help (C string).
1121 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1122 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1125 * Defines an initialization method attribute attached to a source
1126 * component class descriptor which is attached to the automatic plugin
1129 * _name: Component class name (C identifier).
1130 * _x: Initialization method (bt_component_class_source_init_method).
1132 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1133 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1136 * Defines an initialization method attribute attached to a filter
1137 * component class descriptor which is attached to the automatic plugin
1140 * _name: Component class name (C identifier).
1141 * _x: Initialization method (bt_component_class_filter_init_method).
1143 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1144 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1147 * Defines an initialization method attribute attached to a sink
1148 * component class descriptor which is attached to the automatic plugin
1151 * _name: Component class name (C identifier).
1152 * _x: Initialization method (bt_component_class_sink_init_method).
1154 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1155 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1158 * Defines a finalization method attribute attached to a source component
1159 * class descriptor which is attached to the automatic plugin
1162 * _name: Component class name (C identifier).
1163 * _x: Initialization method (bt_component_class_source_finalize_method).
1165 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1166 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1169 * Defines a finalization method attribute attached to a filter component
1170 * class descriptor which is attached to the automatic plugin
1173 * _name: Component class name (C identifier).
1174 * _x: Initialization method (bt_component_class_filter_finalize_method).
1176 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1177 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1180 * Defines a finalization method attribute attached to a sink component class
1181 * descriptor which is attached to the automatic plugin descriptor.
1183 * _name: Component class name (C identifier).
1184 * _x: Initialization method (bt_component_class_sink_finalize_method).
1186 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1187 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1190 * Defines a query method attribute attached to a source component
1191 * class descriptor which is attached to the automatic plugin
1194 * _name: Component class name (C identifier).
1195 * _x: Initialization method (bt_component_class_source_query_method).
1197 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1198 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1201 * Defines a query method attribute attached to a filter component
1202 * class descriptor which is attached to the automatic plugin
1205 * _name: Component class name (C identifier).
1206 * _x: Initialization method (bt_component_class_filter_query_method).
1208 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1209 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1212 * Defines a query method attribute attached to a sink component
1213 * class descriptor which is attached to the automatic plugin
1216 * _name: Component class name (C identifier).
1217 * _x: Initialization method (bt_component_class_sink_query_method).
1219 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1220 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1223 * Defines an input port connected method attribute attached to a filter
1224 * component class descriptor which is attached to the automatic plugin
1227 * _name: Component class name (C identifier).
1228 * _x: Port connected (bt_component_class_filter_input_port_connected_method).
1230 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1231 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1234 * Defines an input port connected method attribute attached to a sink
1235 * component class descriptor which is attached to the automatic plugin
1238 * _name: Component class name (C identifier).
1239 * _x: Port connected (bt_component_class_sink_input_port_connected_method).
1241 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1242 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1245 * Defines an output port connected method attribute attached to a source
1246 * component class descriptor which is attached to the automatic plugin
1249 * _name: Component class name (C identifier).
1250 * _x: Port connected (bt_component_class_source_output_port_connected_method).
1252 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1253 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1256 * Defines an output port connected method attribute attached to a filter
1257 * component class descriptor which is attached to the automatic plugin
1260 * _name: Component class name (C identifier).
1261 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
1263 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1264 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1267 * Defines a "graph is configured" method attribute attached to
1268 * a sink component class descriptor which is attached to the automatic
1269 * plugin descriptor.
1271 * _name: Component class name (C identifier).
1272 * _x: "Graph is configured" method
1273 * (bt_component_class_sink_graph_is_configured_method).
1275 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _x) \
1276 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _x)
1279 * Defines an iterator initialization method attribute attached to a
1280 * source component class descriptor which is attached to the automatic
1281 * plugin descriptor.
1283 * _name: Component class name (C identifier).
1284 * _x: Iterator initialization method
1285 * (bt_component_class_source_message_iterator_init_method).
1287 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1288 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1291 * Defines an iterator finalize method attribute attached to a source
1292 * component class descriptor which is attached to the automatic plugin
1295 * _name: Component class name (C identifier).
1296 * _x: Iterator finalize method
1297 * (bt_component_class_source_message_iterator_finalize_method).
1299 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1300 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1303 * Defines an iterator "seek nanoseconds from origin" method attribute
1304 * attached to a source component class descriptor which is attached to
1305 * the automatic plugin descriptor.
1307 * _name: Component class name (C identifier).
1308 * _x: Iterator "seek nanoseconds from origin" method
1309 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
1311 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1312 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1315 * Defines an iterator "seek beginning" method attribute
1316 * attached to a source component class descriptor which is attached to
1317 * the automatic plugin descriptor.
1319 * _name: Component class name (C identifier).
1320 * _x: Iterator "seek beginning" method
1321 * (bt_component_class_source_message_iterator_seek_beginning_method).
1323 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1324 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1327 * Defines an iterator "can seek nanoseconds from origin" method
1328 * attribute attached to a source component class descriptor which is
1329 * attached to the automatic plugin descriptor.
1331 * _name: Component class name (C identifier).
1332 * _x: Iterator "can seek nanoseconds from origin" method
1333 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
1335 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1336 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1339 * Defines an iterator "can seek beginning" method attribute
1340 * attached to a source component class descriptor which is attached to
1341 * the automatic plugin descriptor.
1343 * _name: Component class name (C identifier).
1344 * _x: Iterator "can seek beginning" method
1345 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
1347 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1348 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1351 * Defines an iterator initialization method attribute attached to a
1352 * filter component class descriptor which is attached to the automatic
1353 * plugin descriptor.
1355 * _name: Component class name (C identifier).
1356 * _x: Iterator initialization method
1357 * (bt_component_class_filter_message_iterator_init_method).
1359 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1360 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1363 * Defines an iterator finalize method attribute attached to a filter
1364 * component class descriptor which is attached to the automatic plugin
1367 * _name: Component class name (C identifier).
1368 * _x: Iterator finalize method
1369 * (bt_component_class_filter_message_iterator_finalize_method).
1371 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1372 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1375 * Defines an iterator "seek nanoseconds from origin" method attribute
1376 * attached to a filter component class descriptor which is attached to
1377 * the automatic plugin descriptor.
1379 * _name: Component class name (C identifier).
1380 * _x: Iterator "seek nanoseconds from origin" method
1381 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
1383 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1384 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1387 * Defines an iterator "seek beginning" method attribute
1388 * attached to a filter component class descriptor which is attached to
1389 * the automatic plugin descriptor.
1391 * _name: Component class name (C identifier).
1392 * _x: Iterator "seek beginning" method
1393 * (bt_component_class_filter_message_iterator_seek_beginning_method).
1395 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1396 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1399 * Defines an iterator "can seek nanoseconds from origin" method
1400 * attribute attached to a filter component class descriptor which is
1401 * attached to the automatic plugin descriptor.
1403 * _name: Component class name (C identifier).
1404 * _x: Iterator "can seek nanoseconds from origin" method
1405 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
1407 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1408 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1411 * Defines an iterator "can seek beginning" method attribute
1412 * attached to a filter component class descriptor which is attached to
1413 * the automatic plugin descriptor.
1415 * _name: Component class name (C identifier).
1416 * _x: Iterator "can seek beginning" method
1417 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
1419 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1420 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1422 #define BT_PLUGIN_MODULE() \
1423 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
1424 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1425 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
1427 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
1428 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1429 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
1431 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
1432 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1433 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
1435 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; \
1436 _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; \
1437 _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; \
1439 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1441 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1443 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1445 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1447 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1449 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1451 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1453 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1455 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1457 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1459 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1461 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1463 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1465 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1467 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1469 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1476 #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */