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 bt_component_class_type */
33 #include <babeltrace2/graph/component-class-const.h>
35 /* For component class method type definitions */
36 #include <babeltrace2/graph/component-class-source.h>
37 #include <babeltrace2/graph/component-class-filter.h>
38 #include <babeltrace2/graph/component-class-sink.h>
40 /* For bt_self_plugin */
41 #include <babeltrace2/types.h>
43 /* For __BT_FUNC_STATUS_* */
44 #define __BT_FUNC_STATUS_ENABLE
45 #include <babeltrace2/func-status.h>
46 #undef __BT_FUNC_STATUS_ENABLE
49 * _BT_HIDDEN: set the hidden attribute for internal functions
50 * On Windows, symbols are local unless explicitly exported,
51 * see https://gcc.gnu.org/wiki/Visibility
53 #if defined(_WIN32) || defined(__CYGWIN__)
56 #define _BT_HIDDEN __attribute__((visibility("hidden")))
64 * Plugin interface's version, not synced with Babeltrace's version
67 #define __BT_PLUGIN_VERSION_MAJOR 1
68 #define __BT_PLUGIN_VERSION_MINOR 0
70 /* Plugin initialization function type */
71 typedef enum bt_plugin_init_func_status
{
72 BT_PLUGIN_INIT_FUNC_STATUS_OK
= __BT_FUNC_STATUS_OK
,
73 BT_PLUGIN_INIT_FUNC_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
74 BT_PLUGIN_INIT_FUNC_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
75 } bt_plugin_init_func_status
;
77 typedef bt_plugin_init_func_status (*bt_plugin_init_func
)(
78 bt_self_plugin
*plugin
);
80 /* Plugin exit function type */
81 typedef void (*bt_plugin_exit_func
)(void);
83 /* Plugin descriptor: describes a single plugin (internal use) */
84 struct __bt_plugin_descriptor
{
85 /* Plugin's interface major version number */
88 /* Plugin's interface minor version number */
93 } __attribute__((packed
));
95 /* Type of a plugin attribute (internal use) */
96 enum __bt_plugin_descriptor_attribute_type
{
97 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
98 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
99 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
100 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
101 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
102 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
105 /* Plugin (user) version */
106 struct __bt_plugin_descriptor_version
{
113 /* Plugin attribute (internal use) */
114 struct __bt_plugin_descriptor_attribute
{
115 /* Plugin descriptor to which to associate this attribute */
116 const struct __bt_plugin_descriptor
*plugin_descriptor
;
118 /* Name of the attribute's type for debug purposes */
119 const char *type_name
;
121 /* Attribute's type */
122 enum __bt_plugin_descriptor_attribute_type type
;
124 /* Attribute's value (depends on attribute's type) */
126 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
127 bt_plugin_init_func init
;
129 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
130 bt_plugin_exit_func exit
;
132 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
135 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
138 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
139 const char *description
;
141 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
142 struct __bt_plugin_descriptor_version version
;
144 } __attribute__((packed
));
146 /* Component class descriptor (internal use) */
147 struct __bt_plugin_component_class_descriptor
{
149 * Plugin descriptor to which to associate this component
152 const struct __bt_plugin_descriptor
*plugin_descriptor
;
154 /* Component class name */
157 /* Component class type */
158 bt_component_class_type type
;
160 /* Mandatory methods (depends on component class type) */
162 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
164 bt_component_class_source_message_iterator_next_method msg_iter_next
;
167 /* BT_COMPONENT_CLASS_TYPE_FILTER */
169 bt_component_class_filter_message_iterator_next_method msg_iter_next
;
172 /* BT_COMPONENT_CLASS_TYPE_SINK */
174 bt_component_class_sink_consume_method consume
;
177 } __attribute__((packed
));
179 /* Type of a component class attribute (internal use) */
180 enum __bt_plugin_component_class_descriptor_attribute_type
{
181 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
182 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
183 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD
= 2,
184 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 3,
185 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 4,
186 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 5,
187 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 6,
188 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD
= 7,
189 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD
= 8,
190 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 9,
191 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD
= 10,
192 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD
= 11,
193 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD
= 12,
194 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD
= 13,
197 /* Component class attribute (internal use) */
198 struct __bt_plugin_component_class_descriptor_attribute
{
200 * Component class plugin attribute to which to associate this
201 * component class attribute.
203 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
205 /* Name of the attribute's type for debug purposes */
206 const char *type_name
;
208 /* Attribute's type */
209 enum __bt_plugin_component_class_descriptor_attribute_type type
;
211 /* Attribute's value (depends on attribute's type) */
213 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
214 const char *description
;
216 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
219 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
220 bt_component_class_source_init_method source_init_method
;
221 bt_component_class_filter_init_method filter_init_method
;
222 bt_component_class_sink_init_method sink_init_method
;
224 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
225 bt_component_class_source_finalize_method source_finalize_method
;
226 bt_component_class_filter_finalize_method filter_finalize_method
;
227 bt_component_class_sink_finalize_method sink_finalize_method
;
229 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
230 bt_component_class_source_query_method source_query_method
;
231 bt_component_class_filter_query_method filter_query_method
;
232 bt_component_class_sink_query_method sink_query_method
;
234 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
235 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
236 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
238 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
239 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
240 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
242 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */
243 bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method
;
245 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD */
246 bt_component_class_source_message_iterator_init_method source_msg_iter_init_method
;
247 bt_component_class_filter_message_iterator_init_method filter_msg_iter_init_method
;
249 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
250 bt_component_class_source_message_iterator_finalize_method source_msg_iter_finalize_method
;
251 bt_component_class_filter_message_iterator_finalize_method filter_msg_iter_finalize_method
;
253 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
254 bt_component_class_source_message_iterator_seek_ns_from_origin_method source_msg_iter_seek_ns_from_origin_method
;
255 bt_component_class_filter_message_iterator_seek_ns_from_origin_method filter_msg_iter_seek_ns_from_origin_method
;
257 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
258 bt_component_class_source_message_iterator_seek_beginning_method source_msg_iter_seek_beginning_method
;
259 bt_component_class_filter_message_iterator_seek_beginning_method filter_msg_iter_seek_beginning_method
;
261 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
262 bt_component_class_source_message_iterator_can_seek_ns_from_origin_method source_msg_iter_can_seek_ns_from_origin_method
;
263 bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method filter_msg_iter_can_seek_ns_from_origin_method
;
265 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
266 bt_component_class_source_message_iterator_can_seek_beginning_method source_msg_iter_can_seek_beginning_method
;
267 bt_component_class_filter_message_iterator_can_seek_beginning_method filter_msg_iter_can_seek_beginning_method
;
269 } __attribute__((packed
));
271 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
272 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
273 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
274 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
275 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
276 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
277 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
278 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
281 * Variable attributes for a plugin descriptor pointer to be added to
282 * the plugin descriptor section (internal use).
285 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
286 __attribute__((section("__DATA,btp_desc"), used))
288 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
289 __start___bt_plugin_descriptors
291 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
292 __stop___bt_plugin_descriptors
294 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
295 __asm("section$start$__DATA$btp_desc")
297 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
298 __asm("section$end$__DATA$btp_desc")
302 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
303 __attribute__((section("__bt_plugin_descriptors"), used))
305 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
306 __start___bt_plugin_descriptors
308 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
309 __stop___bt_plugin_descriptors
311 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
313 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
317 * Variable attributes for a plugin attribute pointer to be added to
318 * the plugin attribute section (internal use).
321 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
322 __attribute__((section("__DATA,btp_desc_att"), used))
324 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
325 __start___bt_plugin_descriptor_attributes
327 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
328 __stop___bt_plugin_descriptor_attributes
330 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
331 __asm("section$start$__DATA$btp_desc_att")
333 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
334 __asm("section$end$__DATA$btp_desc_att")
338 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
339 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
341 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
342 __start___bt_plugin_descriptor_attributes
344 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
345 __stop___bt_plugin_descriptor_attributes
347 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
349 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
353 * Variable attributes for a component class descriptor pointer to be
354 * added to the component class descriptor section (internal use).
357 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
358 __attribute__((section("__DATA,btp_cc_desc"), used))
360 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
361 __start___bt_plugin_component_class_descriptors
363 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
364 __stop___bt_plugin_component_class_descriptors
366 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
367 __asm("section$start$__DATA$btp_cc_desc")
369 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
370 __asm("section$end$__DATA$btp_cc_desc")
374 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
375 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
377 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
378 __start___bt_plugin_component_class_descriptors
380 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
381 __stop___bt_plugin_component_class_descriptors
383 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
385 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
389 * Variable attributes for a component class descriptor attribute
390 * pointer to be added to the component class descriptor attribute
391 * section (internal use).
394 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
395 __attribute__((section("__DATA,btp_cc_desc_att"), used))
397 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
398 __start___bt_plugin_component_class_descriptor_attributes
400 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
401 __stop___bt_plugin_component_class_descriptor_attributes
403 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
404 __asm("section$start$__DATA$btp_cc_desc_att")
406 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
407 __asm("section$end$__DATA$btp_cc_desc_att")
411 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
412 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
414 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
415 __start___bt_plugin_component_class_descriptor_attributes
417 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
418 __stop___bt_plugin_component_class_descriptor_attributes
420 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
422 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
426 * Declares a plugin descriptor pointer variable with a custom ID.
428 * _id: ID (any valid C identifier except `auto`).
430 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
433 * Defines a plugin descriptor with a custom ID.
435 * _id: ID (any valid C identifier except `auto`).
436 * _name: Plugin's name (C string).
438 #define BT_PLUGIN_WITH_ID(_id, _name) \
439 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
440 .major = __BT_PLUGIN_VERSION_MAJOR, \
441 .minor = __BT_PLUGIN_VERSION_MINOR, \
444 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
447 * Defines a plugin attribute (generic, internal use).
449 * _attr_name: Name of the attribute (C identifier).
450 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
451 * _id: Plugin descriptor ID (C identifier).
454 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
455 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
456 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
457 .type_name = #_attr_name, \
458 .type = _attr_type, \
459 .value._attr_name = _x, \
461 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
464 * Defines a plugin initialization function attribute attached to a
465 * specific plugin descriptor.
467 * _id: Plugin descriptor ID (C identifier).
468 * _x: Initialization function (bt_plugin_init_func).
470 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
471 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
474 * Defines a plugin exit function attribute attached to a specific
477 * _id: Plugin descriptor ID (C identifier).
478 * _x: Exit function (bt_plugin_exit_func).
480 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
481 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
484 * Defines an author attribute attached to a specific plugin descriptor.
486 * _id: Plugin descriptor ID (C identifier).
487 * _x: Author (C string).
489 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
490 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
493 * Defines a license attribute attached to a specific plugin descriptor.
495 * _id: Plugin descriptor ID (C identifier).
496 * _x: License (C string).
498 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
499 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
502 * Defines a description attribute attached to a specific plugin
505 * _id: Plugin descriptor ID (C identifier).
506 * _x: Description (C string).
508 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
509 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
511 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
512 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
515 * Defines a version attribute attached to a specific plugin descriptor.
517 * _id: Plugin descriptor ID (C identifier).
518 * _major: Plugin's major version (uint32_t).
519 * _minor: Plugin's minor version (uint32_t).
520 * _patch: Plugin's patch version (uint32_t).
521 * _extra: Plugin's version extra information (C string).
523 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
524 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
527 * Defines a source component class descriptor with a custom ID.
529 * _id: ID (any valid C identifier except `auto`).
530 * _comp_class_id: Component class ID (C identifier).
531 * _name: Component class name (C string).
532 * _msg_iter_next_method: Component class's iterator next method
533 * (bt_component_class_source_message_iterator_next_method).
535 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
536 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
537 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
539 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
540 .methods.source = { \
541 .msg_iter_next = _msg_iter_next_method, \
544 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
547 * Defines a filter component class descriptor with a custom ID.
549 * _id: ID (any valid C identifier except `auto`).
550 * _comp_class_id: Component class ID (C identifier).
551 * _name: Component class name (C string).
552 * _msg_iter_next_method: Component class's iterator next method
553 * (bt_component_class_filter_message_iterator_next_method).
555 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
556 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
557 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
559 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
560 .methods.filter = { \
561 .msg_iter_next = _msg_iter_next_method, \
564 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
567 * Defines a sink component class descriptor with a custom ID.
569 * _id: ID (any valid C identifier except `auto`).
570 * _comp_class_id: Component class ID (C identifier).
571 * _name: Component class name (C string).
572 * _consume_method: Component class's iterator consume method
573 * (bt_component_class_sink_consume_method).
575 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
576 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
577 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
579 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
581 .consume = _consume_method, \
584 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
587 * Defines a component class descriptor attribute (generic, internal
590 * _id: Plugin descriptor ID (C identifier).
591 * _comp_class_id: Component class ID (C identifier).
592 * _type: Component class type (`source`, `filter`, or `sink`).
593 * _attr_name: Name of the attribute (C identifier).
594 * _attr_type: Type of the attribute
595 * (enum __bt_plugin_descriptor_attribute_type).
598 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
599 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
600 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
601 .type_name = #_attr_name, \
602 .type = _attr_type, \
603 .value._attr_name = _x, \
605 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
608 * Defines a description attribute attached to a specific source
609 * component class descriptor.
611 * _id: Plugin descriptor ID (C identifier).
612 * _comp_class_id: Component class descriptor ID (C identifier).
613 * _x: Description (C string).
615 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
616 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
619 * Defines a description attribute attached to a specific filter
620 * component class descriptor.
622 * _id: Plugin descriptor ID (C identifier).
623 * _comp_class_id: Component class descriptor ID (C identifier).
624 * _x: Description (C string).
626 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
627 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
630 * Defines a description attribute attached to a specific sink
631 * component class descriptor.
633 * _id: Plugin descriptor ID (C identifier).
634 * _comp_class_id: Component class descriptor ID (C identifier).
635 * _x: Description (C string).
637 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
638 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
641 * Defines a help attribute attached to a specific source component
644 * _id: Plugin descriptor ID (C identifier).
645 * _comp_class_id: Component class descriptor ID (C identifier).
646 * _x: Help (C string).
648 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
649 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
652 * Defines a help attribute attached to a specific filter component
655 * _id: Plugin descriptor ID (C identifier).
656 * _comp_class_id: Component class descriptor ID (C identifier).
657 * _x: Help (C string).
659 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
660 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
663 * Defines a help attribute attached to a specific sink component class
666 * _id: Plugin descriptor ID (C identifier).
667 * _comp_class_id: Component class descriptor ID (C identifier).
668 * _x: Help (C string).
670 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
671 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
674 * Defines an initialization method attribute attached to a specific
675 * source component class descriptor.
677 * _id: Plugin descriptor ID (C identifier).
678 * _comp_class_id: Component class descriptor ID (C identifier).
679 * _x: Initialization method (bt_component_class_source_init_method).
681 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
682 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
685 * Defines an initialization method attribute attached to a specific
686 * filter component class descriptor.
688 * _id: Plugin descriptor ID (C identifier).
689 * _comp_class_id: Component class descriptor ID (C identifier).
690 * _x: Initialization method (bt_component_class_filter_init_method).
692 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
693 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
696 * Defines an initialization method attribute attached to a specific
697 * sink component class descriptor.
699 * _id: Plugin descriptor ID (C identifier).
700 * _comp_class_id: Component class descriptor ID (C identifier).
701 * _x: Initialization method (bt_component_class_sink_init_method).
703 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
704 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
707 * Defines a finalization method attribute attached to a specific source
708 * component class descriptor.
710 * _id: Plugin descriptor ID (C identifier).
711 * _comp_class_id: Component class descriptor ID (C identifier).
712 * _x: Finalize method (bt_component_class_source_finalize_method).
714 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
715 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
718 * Defines a finalization method attribute attached to a specific filter
719 * component class descriptor.
721 * _id: Plugin descriptor ID (C identifier).
722 * _comp_class_id: Component class descriptor ID (C identifier).
723 * _x: Finalize method (bt_component_class_filter_finalize_method).
725 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
726 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
729 * Defines a finalization method attribute attached to a specific sink
730 * component class descriptor.
732 * _id: Plugin descriptor ID (C identifier).
733 * _comp_class_id: Component class descriptor ID (C identifier).
734 * _x: Finalize method (bt_component_class_sink_finalize_method).
736 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
737 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
740 * Defines a query method attribute attached to a specific source
741 * component class descriptor.
743 * _id: Plugin descriptor ID (C identifier).
744 * _comp_class_id: Component class descriptor ID (C identifier).
745 * _x: Finalize method (bt_component_class_source_query_method).
747 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
748 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
751 * Defines a query method attribute attached to a specific filter
752 * component class descriptor.
754 * _id: Plugin descriptor ID (C identifier).
755 * _comp_class_id: Component class descriptor ID (C identifier).
756 * _x: Finalize method (bt_component_class_filter_query_method).
758 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
759 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
762 * Defines a query method attribute attached to a specific sink
763 * component class descriptor.
765 * _id: Plugin descriptor ID (C identifier).
766 * _comp_class_id: Component class descriptor ID (C identifier).
767 * _x: Finalize method (bt_component_class_sink_query_method).
769 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
770 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
773 * Defines an input port connected method attribute attached to a
774 * specific filter component class descriptor.
776 * _id: Plugin descriptor ID (C identifier).
777 * _comp_class_id: Component class descriptor ID (C identifier).
778 * _x: Port connected method
779 * (bt_component_class_filter_input_port_connected_method).
781 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
782 __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)
785 * Defines an input port connected method attribute attached to a
786 * specific sink component class descriptor.
788 * _id: Plugin descriptor ID (C identifier).
789 * _comp_class_id: Component class descriptor ID (C identifier).
790 * _x: Port connected method
791 * (bt_component_class_sink_input_port_connected_method).
793 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
794 __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)
797 * Defines an output port connected method attribute attached to a
798 * specific source component class descriptor.
800 * _id: Plugin descriptor ID (C identifier).
801 * _comp_class_id: Component class descriptor ID (C identifier).
802 * _x: Port connected method
803 * (bt_component_class_source_output_port_connected_method).
805 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
806 __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)
809 * Defines an output port connected method attribute attached to a
810 * specific filter component class descriptor.
812 * _id: Plugin descriptor ID (C identifier).
813 * _comp_class_id: Component class descriptor ID (C identifier).
814 * _x: Port connected method
815 * (bt_component_class_filter_output_port_connected_method).
817 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
818 __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)
821 * Defines a "graph is configured" method attribute attached to a
822 * specific sink component class descriptor.
824 * _id: Plugin descriptor ID (C identifier).
825 * _comp_class_id: Component class descriptor ID (C identifier).
826 * _x: "Graph is configured" method
827 * (bt_component_class_sink_graph_is_configured_method).
829 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
830 __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)
833 * Defines an iterator initialization method attribute attached to a
834 * specific source component class descriptor.
836 * _id: Plugin descriptor ID (C identifier).
837 * _comp_class_id: Component class descriptor ID (C identifier).
838 * _x: Iterator initialization method
839 * (bt_component_class_source_message_iterator_init_method).
841 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
842 __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)
845 * Defines an iterator finalize method attribute attached to a specific
846 * source component class descriptor.
848 * _id: Plugin descriptor ID (C identifier).
849 * _comp_class_id: Component class descriptor ID (C identifier).
850 * _x: Iterator finalize method
851 * (bt_component_class_source_message_iterator_finalize_method).
853 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
854 __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)
857 * Defines an iterator "seek nanoseconds from origin" method attribute
858 * attached to a specific source component class descriptor.
860 * _id: Plugin descriptor ID (C identifier).
861 * _comp_class_id: Component class descriptor ID (C identifier).
862 * _x: Iterator "seek nanoseconds from origin" method
863 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
865 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
866 __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)
869 * Defines an iterator "seek beginning" method attribute attached to a
870 * specific source component class descriptor.
872 * _id: Plugin descriptor ID (C identifier).
873 * _comp_class_id: Component class descriptor ID (C identifier).
874 * _x: Iterator "seek beginning" method
875 * (bt_component_class_source_message_iterator_seek_beginning_method).
877 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
878 __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)
881 * Defines an iterator "can seek nanoseconds from origin" method
882 * attribute attached to a specific source component class descriptor.
884 * _id: Plugin descriptor ID (C identifier).
885 * _comp_class_id: Component class descriptor ID (C identifier).
886 * _x: Iterator "can seek nanoseconds from origin" method
887 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
889 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
890 __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)
893 * Defines an iterator "can seek beginning" method attribute attached to a
894 * specific source component class descriptor.
896 * _id: Plugin descriptor ID (C identifier).
897 * _comp_class_id: Component class descriptor ID (C identifier).
898 * _x: Iterator "can seek beginning" method
899 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
901 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
902 __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)
905 * Defines an iterator initialization method attribute attached to a
906 * specific filter component class descriptor.
908 * _id: Plugin descriptor ID (C identifier).
909 * _comp_class_id: Component class descriptor ID (C identifier).
910 * _x: Iterator initialization method
911 * (bt_component_class_filter_message_iterator_init_method).
913 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
914 __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)
917 * Defines an iterator finalize method attribute attached to a specific
918 * filter component class descriptor.
920 * _id: Plugin descriptor ID (C identifier).
921 * _comp_class_id: Component class descriptor ID (C identifier).
922 * _x: Iterator finalize method
923 * (bt_component_class_filter_message_iterator_finalize_method).
925 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
926 __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)
929 * Defines an iterator "seek nanoseconds from origin" method attribute
930 * attached to a specific filter component class descriptor.
932 * _id: Plugin descriptor ID (C identifier).
933 * _comp_class_id: Component class descriptor ID (C identifier).
934 * _x: Iterator "seek nanoseconds from origin" method
935 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
937 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
938 __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)
941 * Defines an iterator "seek beginning" method attribute attached to a
942 * specific filter component class descriptor.
944 * _id: Plugin descriptor ID (C identifier).
945 * _comp_class_id: Component class descriptor ID (C identifier).
946 * _x: Iterator "seek beginning" method
947 * (bt_component_class_filter_message_iterator_seek_beginning_method).
949 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
950 __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)
953 * Defines an iterator "can seek nanoseconds from origin" method
954 * attribute attached to a specific filter component class descriptor.
956 * _id: Plugin descriptor ID (C identifier).
957 * _comp_class_id: Component class descriptor ID (C identifier).
958 * _x: Iterator "can seek nanoseconds from origin" method
959 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
961 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
962 __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)
965 * Defines an iterator "can seek beginning" method attribute attached to a
966 * specific filter component class descriptor.
968 * _id: Plugin descriptor ID (C identifier).
969 * _comp_class_id: Component class descriptor ID (C identifier).
970 * _x: Iterator "can seek beginning" method
971 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
973 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
974 __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)
977 * Defines a plugin descriptor with an automatic ID.
979 * _name: Plugin's name (C string).
981 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
984 * Defines a plugin initialization function attribute attached to the
985 * automatic plugin descriptor.
987 * _x: Initialization function (bt_plugin_init_func).
989 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
992 * Defines a plugin exit function attribute attached to the automatic
995 * _x: Exit function (bt_plugin_exit_func).
997 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
1000 * Defines an author attribute attached to the automatic plugin
1003 * _x: Author (C string).
1005 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
1008 * Defines a license attribute attached to the automatic plugin
1011 * _x: License (C string).
1013 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
1016 * Defines a description attribute attached to the automatic plugin
1019 * _x: Description (C string).
1021 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
1024 * Defines a version attribute attached to the automatic plugin
1027 * _major: Plugin's major version (uint32_t).
1028 * _minor: Plugin's minor version (uint32_t).
1029 * _patch: Plugin's patch version (uint32_t).
1030 * _extra: Plugin's version extra information (C string).
1032 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
1035 * Defines a source component class attached to the automatic plugin
1036 * descriptor. Its ID is the same as its name, hence its name must be a
1037 * C identifier in this version.
1039 * _name: Component class name (C identifier).
1040 * _msg_iter_next_method: Component class's iterator next method
1041 * (bt_component_class_source_message_iterator_next_method).
1043 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1044 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1047 * Defines a filter component class attached to the automatic plugin
1048 * descriptor. Its ID is the same as its name, hence its name must be a
1049 * C identifier in this version.
1051 * _name: Component class name (C identifier).
1052 * _msg_iter_next_method: Component class's iterator next method
1053 * (bt_component_class_filter_message_iterator_next_method).
1055 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1056 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1059 * Defines a sink component class attached to the automatic plugin
1060 * descriptor. Its ID is the same as its name, hence its name must be a
1061 * C identifier in this version.
1063 * _name: Component class name (C identifier).
1064 * _consume_method: Component class's consume method
1065 * (bt_component_class_sink_consume_method).
1067 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1068 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1071 * Defines a description attribute attached to a source component class
1072 * descriptor which is attached to the automatic plugin descriptor.
1074 * _name: Component class name (C identifier).
1075 * _x: Description (C string).
1077 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1078 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1081 * Defines a description attribute attached to a filter component class
1082 * descriptor which is attached to the automatic plugin descriptor.
1084 * _name: Component class name (C identifier).
1085 * _x: Description (C string).
1087 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1088 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1091 * Defines a description attribute attached to a sink component class
1092 * descriptor which is attached to the automatic plugin descriptor.
1094 * _name: Component class name (C identifier).
1095 * _x: Description (C string).
1097 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1098 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1101 * Defines a help attribute attached to a source component class
1102 * descriptor which is attached to the automatic plugin descriptor.
1104 * _name: Component class name (C identifier).
1105 * _x: Help (C string).
1107 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1108 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1111 * Defines a help attribute attached to a filter component class
1112 * descriptor which is attached to the automatic plugin descriptor.
1114 * _name: Component class name (C identifier).
1115 * _x: Help (C string).
1117 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1118 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1121 * Defines a help attribute attached to a sink component class
1122 * descriptor which is attached to the automatic plugin descriptor.
1124 * _name: Component class name (C identifier).
1125 * _x: Help (C string).
1127 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1128 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1131 * Defines an initialization method attribute attached to a source
1132 * component class descriptor which is attached to the automatic plugin
1135 * _name: Component class name (C identifier).
1136 * _x: Initialization method (bt_component_class_source_init_method).
1138 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1139 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1142 * Defines an initialization method attribute attached to a filter
1143 * component class descriptor which is attached to the automatic plugin
1146 * _name: Component class name (C identifier).
1147 * _x: Initialization method (bt_component_class_filter_init_method).
1149 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1150 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1153 * Defines an initialization method attribute attached to a sink
1154 * component class descriptor which is attached to the automatic plugin
1157 * _name: Component class name (C identifier).
1158 * _x: Initialization method (bt_component_class_sink_init_method).
1160 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1161 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1164 * Defines a finalization method attribute attached to a source component
1165 * class descriptor which is attached to the automatic plugin
1168 * _name: Component class name (C identifier).
1169 * _x: Initialization method (bt_component_class_source_finalize_method).
1171 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1172 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1175 * Defines a finalization method attribute attached to a filter component
1176 * class descriptor which is attached to the automatic plugin
1179 * _name: Component class name (C identifier).
1180 * _x: Initialization method (bt_component_class_filter_finalize_method).
1182 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1183 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1186 * Defines a finalization method attribute attached to a sink component class
1187 * descriptor which is attached to the automatic plugin descriptor.
1189 * _name: Component class name (C identifier).
1190 * _x: Initialization method (bt_component_class_sink_finalize_method).
1192 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1193 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1196 * Defines a query method attribute attached to a source component
1197 * class descriptor which is attached to the automatic plugin
1200 * _name: Component class name (C identifier).
1201 * _x: Initialization method (bt_component_class_source_query_method).
1203 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1204 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1207 * Defines a query method attribute attached to a filter component
1208 * class descriptor which is attached to the automatic plugin
1211 * _name: Component class name (C identifier).
1212 * _x: Initialization method (bt_component_class_filter_query_method).
1214 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1215 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1218 * Defines a query method attribute attached to a sink component
1219 * class descriptor which is attached to the automatic plugin
1222 * _name: Component class name (C identifier).
1223 * _x: Initialization method (bt_component_class_sink_query_method).
1225 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1226 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1229 * Defines an input port connected method attribute attached to a filter
1230 * component class descriptor which is attached to the automatic plugin
1233 * _name: Component class name (C identifier).
1234 * _x: Port connected (bt_component_class_filter_input_port_connected_method).
1236 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1237 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1240 * Defines an input port connected method attribute attached to a sink
1241 * component class descriptor which is attached to the automatic plugin
1244 * _name: Component class name (C identifier).
1245 * _x: Port connected (bt_component_class_sink_input_port_connected_method).
1247 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1248 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1251 * Defines an output port connected method attribute attached to a source
1252 * component class descriptor which is attached to the automatic plugin
1255 * _name: Component class name (C identifier).
1256 * _x: Port connected (bt_component_class_source_output_port_connected_method).
1258 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1259 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1262 * Defines an output port connected method attribute attached to a filter
1263 * component class descriptor which is attached to the automatic plugin
1266 * _name: Component class name (C identifier).
1267 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
1269 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1270 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1273 * Defines a "graph is configured" method attribute attached to
1274 * a sink component class descriptor which is attached to the automatic
1275 * plugin descriptor.
1277 * _name: Component class name (C identifier).
1278 * _x: "Graph is configured" method
1279 * (bt_component_class_sink_graph_is_configured_method).
1281 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _x) \
1282 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _x)
1285 * Defines an iterator initialization method attribute attached to a
1286 * source component class descriptor which is attached to the automatic
1287 * plugin descriptor.
1289 * _name: Component class name (C identifier).
1290 * _x: Iterator initialization method
1291 * (bt_component_class_source_message_iterator_init_method).
1293 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1294 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1297 * Defines an iterator finalize method attribute attached to a source
1298 * component class descriptor which is attached to the automatic plugin
1301 * _name: Component class name (C identifier).
1302 * _x: Iterator finalize method
1303 * (bt_component_class_source_message_iterator_finalize_method).
1305 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1306 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1309 * Defines an iterator "seek nanoseconds from origin" method attribute
1310 * attached to a source component class descriptor which is attached to
1311 * the automatic plugin descriptor.
1313 * _name: Component class name (C identifier).
1314 * _x: Iterator "seek nanoseconds from origin" method
1315 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
1317 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1318 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1321 * Defines an iterator "seek beginning" method attribute
1322 * attached to a source component class descriptor which is attached to
1323 * the automatic plugin descriptor.
1325 * _name: Component class name (C identifier).
1326 * _x: Iterator "seek beginning" method
1327 * (bt_component_class_source_message_iterator_seek_beginning_method).
1329 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1330 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1333 * Defines an iterator "can seek nanoseconds from origin" method
1334 * attribute attached to a source component class descriptor which is
1335 * attached to the automatic plugin descriptor.
1337 * _name: Component class name (C identifier).
1338 * _x: Iterator "can seek nanoseconds from origin" method
1339 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
1341 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1342 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1345 * Defines an iterator "can seek beginning" method attribute
1346 * attached to a source component class descriptor which is attached to
1347 * the automatic plugin descriptor.
1349 * _name: Component class name (C identifier).
1350 * _x: Iterator "can seek beginning" method
1351 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
1353 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1354 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1357 * Defines an iterator initialization method attribute attached to a
1358 * filter component class descriptor which is attached to the automatic
1359 * plugin descriptor.
1361 * _name: Component class name (C identifier).
1362 * _x: Iterator initialization method
1363 * (bt_component_class_filter_message_iterator_init_method).
1365 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1366 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1369 * Defines an iterator finalize method attribute attached to a filter
1370 * component class descriptor which is attached to the automatic plugin
1373 * _name: Component class name (C identifier).
1374 * _x: Iterator finalize method
1375 * (bt_component_class_filter_message_iterator_finalize_method).
1377 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1378 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1381 * Defines an iterator "seek nanoseconds from origin" method attribute
1382 * attached to a filter component class descriptor which is attached to
1383 * the automatic plugin descriptor.
1385 * _name: Component class name (C identifier).
1386 * _x: Iterator "seek nanoseconds from origin" method
1387 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
1389 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1390 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1393 * Defines an iterator "seek beginning" method attribute
1394 * attached to a filter component class descriptor which is attached to
1395 * the automatic plugin descriptor.
1397 * _name: Component class name (C identifier).
1398 * _x: Iterator "seek beginning" method
1399 * (bt_component_class_filter_message_iterator_seek_beginning_method).
1401 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1402 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1405 * Defines an iterator "can seek nanoseconds from origin" method
1406 * attribute attached to a filter component class descriptor which is
1407 * attached to the automatic plugin descriptor.
1409 * _name: Component class name (C identifier).
1410 * _x: Iterator "can seek nanoseconds from origin" method
1411 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
1413 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1414 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1417 * Defines an iterator "can seek beginning" method attribute
1418 * attached to a filter component class descriptor which is attached to
1419 * the automatic plugin descriptor.
1421 * _name: Component class name (C identifier).
1422 * _x: Iterator "can seek beginning" method
1423 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
1425 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1426 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1428 #define BT_PLUGIN_MODULE() \
1429 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
1430 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1431 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
1433 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
1434 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1435 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
1437 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
1438 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1439 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
1441 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; \
1442 _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; \
1443 _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; \
1445 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1447 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1449 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1451 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1453 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1455 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1457 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1459 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1461 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1463 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1465 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1467 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1469 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1471 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1473 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1475 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1482 #include <babeltrace2/undef-func-status.h>
1484 #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */