1 #ifndef BABELTRACE2_PLUGIN_PLUGIN_DEV_H
2 #define BABELTRACE2_PLUGIN_PLUGIN_DEV_H
5 * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26 #ifndef __BT_IN_BABELTRACE_H
27 # error "Please include <babeltrace2/babeltrace.h> instead."
32 #include <babeltrace2/graph/component-class-const.h>
33 #include <babeltrace2/graph/component-class-source.h>
34 #include <babeltrace2/graph/component-class-filter.h>
35 #include <babeltrace2/graph/component-class-sink.h>
36 #include <babeltrace2/types.h>
39 * _BT_HIDDEN: set the hidden attribute for internal functions
40 * On Windows, symbols are local unless explicitly exported,
41 * see https://gcc.gnu.org/wiki/Visibility
43 #if defined(_WIN32) || defined(__CYGWIN__)
46 #define _BT_HIDDEN __attribute__((visibility("hidden")))
54 * Plugin interface's version, not synced with Babeltrace's version
57 #define __BT_PLUGIN_VERSION_MAJOR 1
58 #define __BT_PLUGIN_VERSION_MINOR 0
60 /* Plugin initialization function type */
61 typedef enum bt_plugin_init_func_status
{
62 BT_PLUGIN_INIT_FUNC_STATUS_OK
= __BT_FUNC_STATUS_OK
,
63 BT_PLUGIN_INIT_FUNC_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
64 BT_PLUGIN_INIT_FUNC_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
65 } bt_plugin_init_func_status
;
67 typedef bt_plugin_init_func_status (*bt_plugin_init_func
)(
68 bt_self_plugin
*plugin
);
70 /* Plugin exit function type */
71 typedef void (*bt_plugin_exit_func
)(void);
73 /* Plugin descriptor: describes a single plugin (internal use) */
74 struct __bt_plugin_descriptor
{
75 /* Plugin's interface major version number */
78 /* Plugin's interface minor version number */
83 } __attribute__((packed
));
85 /* Type of a plugin attribute (internal use) */
86 enum __bt_plugin_descriptor_attribute_type
{
87 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
88 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
89 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
90 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
91 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
92 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
95 /* Plugin (user) version */
96 struct __bt_plugin_descriptor_version
{
103 /* Plugin attribute (internal use) */
104 struct __bt_plugin_descriptor_attribute
{
105 /* Plugin descriptor to which to associate this attribute */
106 const struct __bt_plugin_descriptor
*plugin_descriptor
;
108 /* Name of the attribute's type for debug purposes */
109 const char *type_name
;
111 /* Attribute's type */
112 enum __bt_plugin_descriptor_attribute_type type
;
114 /* Attribute's value (depends on attribute's type) */
116 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
117 bt_plugin_init_func init
;
119 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
120 bt_plugin_exit_func exit
;
122 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
125 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
128 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
129 const char *description
;
131 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
132 struct __bt_plugin_descriptor_version version
;
134 } __attribute__((packed
));
136 /* Component class descriptor (internal use) */
137 struct __bt_plugin_component_class_descriptor
{
139 * Plugin descriptor to which to associate this component
142 const struct __bt_plugin_descriptor
*plugin_descriptor
;
144 /* Component class name */
147 /* Component class type */
148 bt_component_class_type type
;
150 /* Mandatory methods (depends on component class type) */
152 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
154 bt_component_class_source_message_iterator_next_method msg_iter_next
;
157 /* BT_COMPONENT_CLASS_TYPE_FILTER */
159 bt_component_class_filter_message_iterator_next_method msg_iter_next
;
162 /* BT_COMPONENT_CLASS_TYPE_SINK */
164 bt_component_class_sink_consume_method consume
;
167 } __attribute__((packed
));
169 /* Type of a component class attribute (internal use) */
170 enum __bt_plugin_component_class_descriptor_attribute_type
{
171 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
172 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
173 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD
= 2,
174 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD
= 3,
175 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 4,
176 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 5,
177 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 6,
178 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 7,
179 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD
= 8,
180 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD
= 9,
181 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 10,
182 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD
= 11,
183 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD
= 12,
184 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD
= 13,
185 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD
= 14,
188 /* Component class attribute (internal use) */
189 struct __bt_plugin_component_class_descriptor_attribute
{
191 * Component class plugin attribute to which to associate this
192 * component class attribute.
194 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
196 /* Name of the attribute's type for debug purposes */
197 const char *type_name
;
199 /* Attribute's type */
200 enum __bt_plugin_component_class_descriptor_attribute_type type
;
202 /* Attribute's value (depends on attribute's type) */
204 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
205 const char *description
;
207 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
210 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD */
211 bt_component_class_source_get_supported_mip_versions_method source_get_supported_mip_versions_method
;
212 bt_component_class_filter_get_supported_mip_versions_method filter_get_supported_mip_versions_method
;
213 bt_component_class_sink_get_supported_mip_versions_method sink_get_supported_mip_versions_method
;
215 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
216 bt_component_class_source_init_method source_init_method
;
217 bt_component_class_filter_init_method filter_init_method
;
218 bt_component_class_sink_init_method sink_init_method
;
220 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
221 bt_component_class_source_finalize_method source_finalize_method
;
222 bt_component_class_filter_finalize_method filter_finalize_method
;
223 bt_component_class_sink_finalize_method sink_finalize_method
;
225 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
226 bt_component_class_source_query_method source_query_method
;
227 bt_component_class_filter_query_method filter_query_method
;
228 bt_component_class_sink_query_method sink_query_method
;
230 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
231 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
232 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
234 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
235 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
236 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
238 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */
239 bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method
;
241 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD */
242 bt_component_class_source_message_iterator_init_method source_msg_iter_init_method
;
243 bt_component_class_filter_message_iterator_init_method filter_msg_iter_init_method
;
245 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
246 bt_component_class_source_message_iterator_finalize_method source_msg_iter_finalize_method
;
247 bt_component_class_filter_message_iterator_finalize_method filter_msg_iter_finalize_method
;
249 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
250 bt_component_class_source_message_iterator_seek_ns_from_origin_method source_msg_iter_seek_ns_from_origin_method
;
251 bt_component_class_filter_message_iterator_seek_ns_from_origin_method filter_msg_iter_seek_ns_from_origin_method
;
253 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
254 bt_component_class_source_message_iterator_seek_beginning_method source_msg_iter_seek_beginning_method
;
255 bt_component_class_filter_message_iterator_seek_beginning_method filter_msg_iter_seek_beginning_method
;
257 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
258 bt_component_class_source_message_iterator_can_seek_ns_from_origin_method source_msg_iter_can_seek_ns_from_origin_method
;
259 bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method filter_msg_iter_can_seek_ns_from_origin_method
;
261 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
262 bt_component_class_source_message_iterator_can_seek_beginning_method source_msg_iter_can_seek_beginning_method
;
263 bt_component_class_filter_message_iterator_can_seek_beginning_method filter_msg_iter_can_seek_beginning_method
;
265 } __attribute__((packed
));
267 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
268 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
269 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
270 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
271 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
272 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
273 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
274 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
277 * Variable attributes for a plugin descriptor pointer to be added to
278 * the plugin descriptor section (internal use).
281 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
282 __attribute__((section("__DATA,btp_desc"), used))
284 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
285 __start___bt_plugin_descriptors
287 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
288 __stop___bt_plugin_descriptors
290 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
291 __asm("section$start$__DATA$btp_desc")
293 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
294 __asm("section$end$__DATA$btp_desc")
298 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
299 __attribute__((section("__bt_plugin_descriptors"), used))
301 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
302 __start___bt_plugin_descriptors
304 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
305 __stop___bt_plugin_descriptors
307 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
309 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
313 * Variable attributes for a plugin attribute pointer to be added to
314 * the plugin attribute section (internal use).
317 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
318 __attribute__((section("__DATA,btp_desc_att"), used))
320 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
321 __start___bt_plugin_descriptor_attributes
323 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
324 __stop___bt_plugin_descriptor_attributes
326 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
327 __asm("section$start$__DATA$btp_desc_att")
329 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
330 __asm("section$end$__DATA$btp_desc_att")
334 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
335 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
337 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
338 __start___bt_plugin_descriptor_attributes
340 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
341 __stop___bt_plugin_descriptor_attributes
343 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
345 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
349 * Variable attributes for a component class descriptor pointer to be
350 * added to the component class descriptor section (internal use).
353 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
354 __attribute__((section("__DATA,btp_cc_desc"), used))
356 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
357 __start___bt_plugin_component_class_descriptors
359 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
360 __stop___bt_plugin_component_class_descriptors
362 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
363 __asm("section$start$__DATA$btp_cc_desc")
365 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
366 __asm("section$end$__DATA$btp_cc_desc")
370 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
371 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
373 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
374 __start___bt_plugin_component_class_descriptors
376 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
377 __stop___bt_plugin_component_class_descriptors
379 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
381 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
385 * Variable attributes for a component class descriptor attribute
386 * pointer to be added to the component class descriptor attribute
387 * section (internal use).
390 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
391 __attribute__((section("__DATA,btp_cc_desc_att"), used))
393 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
394 __start___bt_plugin_component_class_descriptor_attributes
396 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
397 __stop___bt_plugin_component_class_descriptor_attributes
399 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
400 __asm("section$start$__DATA$btp_cc_desc_att")
402 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
403 __asm("section$end$__DATA$btp_cc_desc_att")
407 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
408 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
410 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
411 __start___bt_plugin_component_class_descriptor_attributes
413 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
414 __stop___bt_plugin_component_class_descriptor_attributes
416 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
418 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
422 * Declares a plugin descriptor pointer variable with a custom ID.
424 * _id: ID (any valid C identifier except `auto`).
426 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
429 * Defines a plugin descriptor with a custom ID.
431 * _id: ID (any valid C identifier except `auto`).
432 * _name: Plugin's name (C string).
434 #define BT_PLUGIN_WITH_ID(_id, _name) \
435 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
436 .major = __BT_PLUGIN_VERSION_MAJOR, \
437 .minor = __BT_PLUGIN_VERSION_MINOR, \
440 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
443 * Defines a plugin attribute (generic, internal use).
445 * _attr_name: Name of the attribute (C identifier).
446 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
447 * _id: Plugin descriptor ID (C identifier).
450 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
451 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
452 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
453 .type_name = #_attr_name, \
454 .type = _attr_type, \
455 .value._attr_name = _x, \
457 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
460 * Defines a plugin initialization function attribute attached to a
461 * specific plugin descriptor.
463 * _id: Plugin descriptor ID (C identifier).
464 * _x: Initialization function (bt_plugin_init_func).
466 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
467 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
470 * Defines a plugin exit function attribute attached to a specific
473 * _id: Plugin descriptor ID (C identifier).
474 * _x: Exit function (bt_plugin_exit_func).
476 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
477 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
480 * Defines an author attribute attached to a specific plugin descriptor.
482 * _id: Plugin descriptor ID (C identifier).
483 * _x: Author (C string).
485 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
486 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
489 * Defines a license attribute attached to a specific plugin descriptor.
491 * _id: Plugin descriptor ID (C identifier).
492 * _x: License (C string).
494 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
495 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
498 * Defines a description attribute attached to a specific plugin
501 * _id: Plugin descriptor ID (C identifier).
502 * _x: Description (C string).
504 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
505 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
507 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
508 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
511 * Defines a version attribute attached to a specific plugin descriptor.
513 * _id: Plugin descriptor ID (C identifier).
514 * _major: Plugin's major version (uint32_t).
515 * _minor: Plugin's minor version (uint32_t).
516 * _patch: Plugin's patch version (uint32_t).
517 * _extra: Plugin's version extra information (C string).
519 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
520 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
523 * Defines a source component class descriptor with a custom ID.
525 * _id: ID (any valid C identifier except `auto`).
526 * _comp_class_id: Component class ID (C identifier).
527 * _name: Component class name (C string).
528 * _msg_iter_next_method: Component class's iterator next method
529 * (bt_component_class_source_message_iterator_next_method).
531 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
532 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
533 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
535 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
536 .methods.source = { \
537 .msg_iter_next = _msg_iter_next_method, \
540 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
543 * Defines a filter component class descriptor with a custom ID.
545 * _id: ID (any valid C identifier except `auto`).
546 * _comp_class_id: Component class ID (C identifier).
547 * _name: Component class name (C string).
548 * _msg_iter_next_method: Component class's iterator next method
549 * (bt_component_class_filter_message_iterator_next_method).
551 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
552 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
553 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
555 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
556 .methods.filter = { \
557 .msg_iter_next = _msg_iter_next_method, \
560 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
563 * Defines a sink component class descriptor with a custom ID.
565 * _id: ID (any valid C identifier except `auto`).
566 * _comp_class_id: Component class ID (C identifier).
567 * _name: Component class name (C string).
568 * _consume_method: Component class's iterator consume method
569 * (bt_component_class_sink_consume_method).
571 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
572 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
573 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
575 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
577 .consume = _consume_method, \
580 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
583 * Defines a component class descriptor attribute (generic, internal
586 * _id: Plugin descriptor ID (C identifier).
587 * _comp_class_id: Component class ID (C identifier).
588 * _type: Component class type (`source`, `filter`, or `sink`).
589 * _attr_name: Name of the attribute (C identifier).
590 * _attr_type: Type of the attribute
591 * (enum __bt_plugin_descriptor_attribute_type).
594 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
595 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
596 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
597 .type_name = #_attr_name, \
598 .type = _attr_type, \
599 .value._attr_name = _x, \
601 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
604 * Defines a description attribute attached to a specific source
605 * component class descriptor.
607 * _id: Plugin descriptor ID (C identifier).
608 * _comp_class_id: Component class descriptor ID (C identifier).
609 * _x: Description (C string).
611 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
612 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
615 * Defines a description attribute attached to a specific filter
616 * component class descriptor.
618 * _id: Plugin descriptor ID (C identifier).
619 * _comp_class_id: Component class descriptor ID (C identifier).
620 * _x: Description (C string).
622 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
623 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
626 * Defines a description attribute attached to a specific sink
627 * component class descriptor.
629 * _id: Plugin descriptor ID (C identifier).
630 * _comp_class_id: Component class descriptor ID (C identifier).
631 * _x: Description (C string).
633 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
634 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
637 * Defines a help attribute attached to a specific source component
640 * _id: Plugin descriptor ID (C identifier).
641 * _comp_class_id: Component class descriptor ID (C identifier).
642 * _x: Help (C string).
644 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
645 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
648 * Defines a help attribute attached to a specific filter component
651 * _id: Plugin descriptor ID (C identifier).
652 * _comp_class_id: Component class descriptor ID (C identifier).
653 * _x: Help (C string).
655 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
656 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
659 * Defines a help attribute attached to a specific sink component class
662 * _id: Plugin descriptor ID (C identifier).
663 * _comp_class_id: Component class descriptor ID (C identifier).
664 * _x: Help (C string).
666 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
667 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
670 * Defines an initialization method attribute attached to a specific
671 * source component class descriptor.
673 * _id: Plugin descriptor ID (C identifier).
674 * _comp_class_id: Component class descriptor ID (C identifier).
675 * _x: Initialization method (bt_component_class_source_init_method).
677 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
678 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
681 * Defines an initialization method attribute attached to a specific
682 * filter component class descriptor.
684 * _id: Plugin descriptor ID (C identifier).
685 * _comp_class_id: Component class descriptor ID (C identifier).
686 * _x: Initialization method (bt_component_class_filter_init_method).
688 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
689 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
692 * Defines an initialization method attribute attached to a specific
693 * sink component class descriptor.
695 * _id: Plugin descriptor ID (C identifier).
696 * _comp_class_id: Component class descriptor ID (C identifier).
697 * _x: Initialization method (bt_component_class_sink_init_method).
699 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
700 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
703 * Defines a "get supported MIP versions" attribute attached to a
704 * specific source component class descriptor.
706 * _id: Plugin descriptor ID (C identifier).
707 * _comp_class_id: Component class descriptor ID (C identifier).
708 * _x: "Get supported MIP versions" method (bt_component_class_source_get_supported_mip_versions_method).
710 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_WITH_ID(_id, _comp_class_id, _x) \
711 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS, _id, _comp_class_id, source, _x)
714 * Defines a "get supported MIP versions" attribute attached to a
715 * specific filter component class descriptor.
717 * _id: Plugin descriptor ID (C identifier).
718 * _comp_class_id: Component class descriptor ID (C identifier).
719 * _x: "Get supported MIP versions" method (bt_component_class_filter_get_supported_mip_versions_method).
721 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_WITH_ID(_id, _comp_class_id, _x) \
722 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS, _id, _comp_class_id, filter, _x)
725 * Defines a "get supported MIP versions" attribute attached to a
726 * specific sink component class descriptor.
728 * _id: Plugin descriptor ID (C identifier).
729 * _comp_class_id: Component class descriptor ID (C identifier).
730 * _x: "Get supported MIP versions" method (bt_component_class_sink_get_supported_mip_versions_method).
732 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_WITH_ID(_id, _comp_class_id, _x) \
733 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS, _id, _comp_class_id, sink, _x)
736 * Defines a finalization method attribute attached to a specific source
737 * component class descriptor.
739 * _id: Plugin descriptor ID (C identifier).
740 * _comp_class_id: Component class descriptor ID (C identifier).
741 * _x: Finalize method (bt_component_class_source_finalize_method).
743 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
744 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
747 * Defines a finalization method attribute attached to a specific filter
748 * component class descriptor.
750 * _id: Plugin descriptor ID (C identifier).
751 * _comp_class_id: Component class descriptor ID (C identifier).
752 * _x: Finalize method (bt_component_class_filter_finalize_method).
754 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
755 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
758 * Defines a finalization method attribute attached to a specific sink
759 * component class descriptor.
761 * _id: Plugin descriptor ID (C identifier).
762 * _comp_class_id: Component class descriptor ID (C identifier).
763 * _x: Finalize method (bt_component_class_sink_finalize_method).
765 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
766 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
769 * Defines a query method attribute attached to a specific source
770 * component class descriptor.
772 * _id: Plugin descriptor ID (C identifier).
773 * _comp_class_id: Component class descriptor ID (C identifier).
774 * _x: Finalize method (bt_component_class_source_query_method).
776 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
777 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
780 * Defines a query method attribute attached to a specific filter
781 * component class descriptor.
783 * _id: Plugin descriptor ID (C identifier).
784 * _comp_class_id: Component class descriptor ID (C identifier).
785 * _x: Finalize method (bt_component_class_filter_query_method).
787 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
788 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
791 * Defines a query method attribute attached to a specific sink
792 * component class descriptor.
794 * _id: Plugin descriptor ID (C identifier).
795 * _comp_class_id: Component class descriptor ID (C identifier).
796 * _x: Finalize method (bt_component_class_sink_query_method).
798 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
799 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
802 * Defines an input port connected method attribute attached to a
803 * specific filter component class descriptor.
805 * _id: Plugin descriptor ID (C identifier).
806 * _comp_class_id: Component class descriptor ID (C identifier).
807 * _x: Port connected method
808 * (bt_component_class_filter_input_port_connected_method).
810 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
811 __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)
814 * Defines an input port connected method attribute attached to a
815 * specific sink component class descriptor.
817 * _id: Plugin descriptor ID (C identifier).
818 * _comp_class_id: Component class descriptor ID (C identifier).
819 * _x: Port connected method
820 * (bt_component_class_sink_input_port_connected_method).
822 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
823 __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)
826 * Defines an output port connected method attribute attached to a
827 * specific source component class descriptor.
829 * _id: Plugin descriptor ID (C identifier).
830 * _comp_class_id: Component class descriptor ID (C identifier).
831 * _x: Port connected method
832 * (bt_component_class_source_output_port_connected_method).
834 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
835 __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)
838 * Defines an output port connected method attribute attached to a
839 * specific filter component class descriptor.
841 * _id: Plugin descriptor ID (C identifier).
842 * _comp_class_id: Component class descriptor ID (C identifier).
843 * _x: Port connected method
844 * (bt_component_class_filter_output_port_connected_method).
846 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
847 __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)
850 * Defines a "graph is configured" method attribute attached to a
851 * specific sink component class descriptor.
853 * _id: Plugin descriptor ID (C identifier).
854 * _comp_class_id: Component class descriptor ID (C identifier).
855 * _x: "Graph is configured" method
856 * (bt_component_class_sink_graph_is_configured_method).
858 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
859 __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)
862 * Defines an iterator initialization method attribute attached to a
863 * specific source component class descriptor.
865 * _id: Plugin descriptor ID (C identifier).
866 * _comp_class_id: Component class descriptor ID (C identifier).
867 * _x: Iterator initialization method
868 * (bt_component_class_source_message_iterator_init_method).
870 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
871 __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)
874 * Defines an iterator finalize method attribute attached to a specific
875 * source component class descriptor.
877 * _id: Plugin descriptor ID (C identifier).
878 * _comp_class_id: Component class descriptor ID (C identifier).
879 * _x: Iterator finalize method
880 * (bt_component_class_source_message_iterator_finalize_method).
882 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
883 __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)
886 * Defines an iterator "seek nanoseconds from origin" method attribute
887 * attached to a specific source component class descriptor.
889 * _id: Plugin descriptor ID (C identifier).
890 * _comp_class_id: Component class descriptor ID (C identifier).
891 * _x: Iterator "seek nanoseconds from origin" method
892 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
894 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
895 __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)
898 * Defines an iterator "seek beginning" method attribute attached to a
899 * specific source component class descriptor.
901 * _id: Plugin descriptor ID (C identifier).
902 * _comp_class_id: Component class descriptor ID (C identifier).
903 * _x: Iterator "seek beginning" method
904 * (bt_component_class_source_message_iterator_seek_beginning_method).
906 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
907 __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)
910 * Defines an iterator "can seek nanoseconds from origin" method
911 * attribute attached to a specific source component class descriptor.
913 * _id: Plugin descriptor ID (C identifier).
914 * _comp_class_id: Component class descriptor ID (C identifier).
915 * _x: Iterator "can seek nanoseconds from origin" method
916 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
918 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
919 __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)
922 * Defines an iterator "can seek beginning" method attribute attached to a
923 * specific source component class descriptor.
925 * _id: Plugin descriptor ID (C identifier).
926 * _comp_class_id: Component class descriptor ID (C identifier).
927 * _x: Iterator "can seek beginning" method
928 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
930 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
931 __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)
934 * Defines an iterator initialization method attribute attached to a
935 * specific filter component class descriptor.
937 * _id: Plugin descriptor ID (C identifier).
938 * _comp_class_id: Component class descriptor ID (C identifier).
939 * _x: Iterator initialization method
940 * (bt_component_class_filter_message_iterator_init_method).
942 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
943 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD, _id, _comp_class_id, filter, _x)
946 * Defines an iterator finalize method attribute attached to a specific
947 * filter component class descriptor.
949 * _id: Plugin descriptor ID (C identifier).
950 * _comp_class_id: Component class descriptor ID (C identifier).
951 * _x: Iterator finalize method
952 * (bt_component_class_filter_message_iterator_finalize_method).
954 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
955 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
958 * Defines an iterator "seek nanoseconds from origin" method attribute
959 * attached to a specific filter component class descriptor.
961 * _id: Plugin descriptor ID (C identifier).
962 * _comp_class_id: Component class descriptor ID (C identifier).
963 * _x: Iterator "seek nanoseconds from origin" method
964 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
966 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
967 __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)
970 * Defines an iterator "seek beginning" method attribute attached to a
971 * specific filter component class descriptor.
973 * _id: Plugin descriptor ID (C identifier).
974 * _comp_class_id: Component class descriptor ID (C identifier).
975 * _x: Iterator "seek beginning" method
976 * (bt_component_class_filter_message_iterator_seek_beginning_method).
978 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
979 __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)
982 * Defines an iterator "can seek nanoseconds from origin" method
983 * attribute attached to a specific filter component class descriptor.
985 * _id: Plugin descriptor ID (C identifier).
986 * _comp_class_id: Component class descriptor ID (C identifier).
987 * _x: Iterator "can seek nanoseconds from origin" method
988 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
990 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
991 __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)
994 * Defines an iterator "can seek beginning" method attribute attached to a
995 * specific filter component class descriptor.
997 * _id: Plugin descriptor ID (C identifier).
998 * _comp_class_id: Component class descriptor ID (C identifier).
999 * _x: Iterator "can seek beginning" method
1000 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
1002 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
1003 __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)
1006 * Defines a plugin descriptor with an automatic ID.
1008 * _name: Plugin's name (C string).
1010 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
1013 * Defines a plugin initialization function attribute attached to the
1014 * automatic plugin descriptor.
1016 * _x: Initialization function (bt_plugin_init_func).
1018 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
1021 * Defines a plugin exit function attribute attached to the automatic
1022 * plugin descriptor.
1024 * _x: Exit function (bt_plugin_exit_func).
1026 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
1029 * Defines an author attribute attached to the automatic plugin
1032 * _x: Author (C string).
1034 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
1037 * Defines a license attribute attached to the automatic plugin
1040 * _x: License (C string).
1042 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
1045 * Defines a description attribute attached to the automatic plugin
1048 * _x: Description (C string).
1050 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
1053 * Defines a version attribute attached to the automatic plugin
1056 * _major: Plugin's major version (uint32_t).
1057 * _minor: Plugin's minor version (uint32_t).
1058 * _patch: Plugin's patch version (uint32_t).
1059 * _extra: Plugin's version extra information (C string).
1061 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
1064 * Defines a source component class attached to the automatic plugin
1065 * descriptor. Its ID is the same as its name, hence its name must be a
1066 * C identifier in this version.
1068 * _name: Component class name (C identifier).
1069 * _msg_iter_next_method: Component class's iterator next method
1070 * (bt_component_class_source_message_iterator_next_method).
1072 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1073 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1076 * Defines a filter component class attached to the automatic plugin
1077 * descriptor. Its ID is the same as its name, hence its name must be a
1078 * C identifier in this version.
1080 * _name: Component class name (C identifier).
1081 * _msg_iter_next_method: Component class's iterator next method
1082 * (bt_component_class_filter_message_iterator_next_method).
1084 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1085 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1088 * Defines a sink component class attached to the automatic plugin
1089 * descriptor. Its ID is the same as its name, hence its name must be a
1090 * C identifier in this version.
1092 * _name: Component class name (C identifier).
1093 * _consume_method: Component class's consume method
1094 * (bt_component_class_sink_consume_method).
1096 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1097 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1100 * Defines a description attribute attached to a source component class
1101 * descriptor which is attached to the automatic plugin descriptor.
1103 * _name: Component class name (C identifier).
1104 * _x: Description (C string).
1106 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1107 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1110 * Defines a description attribute attached to a filter component class
1111 * descriptor which is attached to the automatic plugin descriptor.
1113 * _name: Component class name (C identifier).
1114 * _x: Description (C string).
1116 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1117 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1120 * Defines a description attribute attached to a sink component class
1121 * descriptor which is attached to the automatic plugin descriptor.
1123 * _name: Component class name (C identifier).
1124 * _x: Description (C string).
1126 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1127 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1130 * Defines a help attribute attached to a source component class
1131 * descriptor which is attached to the automatic plugin descriptor.
1133 * _name: Component class name (C identifier).
1134 * _x: Help (C string).
1136 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1137 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1140 * Defines a help attribute attached to a filter component class
1141 * descriptor which is attached to the automatic plugin descriptor.
1143 * _name: Component class name (C identifier).
1144 * _x: Help (C string).
1146 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1147 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1150 * Defines a help attribute attached to a sink component class
1151 * descriptor which is attached to the automatic plugin descriptor.
1153 * _name: Component class name (C identifier).
1154 * _x: Help (C string).
1156 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1157 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1160 * Defines an initialization method attribute attached to a source
1161 * component class descriptor which is attached to the automatic plugin
1164 * _name: Component class name (C identifier).
1165 * _x: Initialization method (bt_component_class_source_init_method).
1167 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1168 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1171 * Defines an initialization method attribute attached to a filter
1172 * component class descriptor which is attached to the automatic plugin
1175 * _name: Component class name (C identifier).
1176 * _x: Initialization method (bt_component_class_filter_init_method).
1178 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1179 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1182 * Defines an initialization method attribute attached to a sink
1183 * component class descriptor which is attached to the automatic plugin
1186 * _name: Component class name (C identifier).
1187 * _x: Initialization method (bt_component_class_sink_init_method).
1189 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1190 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1193 * Defines a "get supported MIP versions" method attribute attached to a
1194 * source component class descriptor which is attached to the automatic
1195 * plugin descriptor.
1197 * _name: Component class name (C identifier).
1198 * _x: Initialization method (bt_component_class_source_get_supported_mip_versions_method).
1200 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _x) \
1201 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _x)
1204 * Defines a "get supported MIP versions" method attribute attached to a
1205 * filter component class descriptor which is attached to the automatic
1206 * plugin descriptor.
1208 * _name: Component class name (C identifier).
1209 * _x: Initialization method (bt_component_class_filter_get_supported_mip_versions_method).
1211 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _x) \
1212 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _x)
1215 * Defines a "get supported MIP versions" method attribute attached to a
1216 * sink component class descriptor which is attached to the automatic
1217 * plugin descriptor.
1219 * _name: Component class name (C identifier).
1220 * _x: Initialization method (bt_component_class_sink_get_supported_mip_versions_method).
1222 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _x) \
1223 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _x)
1226 * Defines a finalization method attribute attached to a source component
1227 * class descriptor which is attached to the automatic plugin
1230 * _name: Component class name (C identifier).
1231 * _x: Initialization method (bt_component_class_source_finalize_method).
1233 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1234 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1237 * Defines a finalization method attribute attached to a filter component
1238 * class descriptor which is attached to the automatic plugin
1241 * _name: Component class name (C identifier).
1242 * _x: Initialization method (bt_component_class_filter_finalize_method).
1244 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1245 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1248 * Defines a finalization method attribute attached to a sink component class
1249 * descriptor which is attached to the automatic plugin descriptor.
1251 * _name: Component class name (C identifier).
1252 * _x: Initialization method (bt_component_class_sink_finalize_method).
1254 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1255 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1258 * Defines a query method attribute attached to a source component
1259 * class descriptor which is attached to the automatic plugin
1262 * _name: Component class name (C identifier).
1263 * _x: Initialization method (bt_component_class_source_query_method).
1265 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1266 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1269 * Defines a query method attribute attached to a filter component
1270 * class descriptor which is attached to the automatic plugin
1273 * _name: Component class name (C identifier).
1274 * _x: Initialization method (bt_component_class_filter_query_method).
1276 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1277 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1280 * Defines a query method attribute attached to a sink component
1281 * class descriptor which is attached to the automatic plugin
1284 * _name: Component class name (C identifier).
1285 * _x: Initialization method (bt_component_class_sink_query_method).
1287 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1288 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1291 * Defines an input port connected method attribute attached to a filter
1292 * component class descriptor which is attached to the automatic plugin
1295 * _name: Component class name (C identifier).
1296 * _x: Port connected (bt_component_class_filter_input_port_connected_method).
1298 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1299 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1302 * Defines an input port connected method attribute attached to a sink
1303 * component class descriptor which is attached to the automatic plugin
1306 * _name: Component class name (C identifier).
1307 * _x: Port connected (bt_component_class_sink_input_port_connected_method).
1309 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1310 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1313 * Defines an output port connected method attribute attached to a source
1314 * component class descriptor which is attached to the automatic plugin
1317 * _name: Component class name (C identifier).
1318 * _x: Port connected (bt_component_class_source_output_port_connected_method).
1320 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1321 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1324 * Defines an output port connected method attribute attached to a filter
1325 * component class descriptor which is attached to the automatic plugin
1328 * _name: Component class name (C identifier).
1329 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
1331 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1332 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1335 * Defines a "graph is configured" method attribute attached to
1336 * a sink component class descriptor which is attached to the automatic
1337 * plugin descriptor.
1339 * _name: Component class name (C identifier).
1340 * _x: "Graph is configured" method
1341 * (bt_component_class_sink_graph_is_configured_method).
1343 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _x) \
1344 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _x)
1347 * Defines an iterator initialization method attribute attached to a
1348 * source component class descriptor which is attached to the automatic
1349 * plugin descriptor.
1351 * _name: Component class name (C identifier).
1352 * _x: Iterator initialization method
1353 * (bt_component_class_source_message_iterator_init_method).
1355 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1356 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1359 * Defines an iterator finalize method attribute attached to a source
1360 * component class descriptor which is attached to the automatic plugin
1363 * _name: Component class name (C identifier).
1364 * _x: Iterator finalize method
1365 * (bt_component_class_source_message_iterator_finalize_method).
1367 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1368 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1371 * Defines an iterator "seek nanoseconds from origin" method attribute
1372 * attached to a source component class descriptor which is attached to
1373 * the automatic plugin descriptor.
1375 * _name: Component class name (C identifier).
1376 * _x: Iterator "seek nanoseconds from origin" method
1377 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
1379 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1380 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1383 * Defines an iterator "seek beginning" method attribute
1384 * attached to a source component class descriptor which is attached to
1385 * the automatic plugin descriptor.
1387 * _name: Component class name (C identifier).
1388 * _x: Iterator "seek beginning" method
1389 * (bt_component_class_source_message_iterator_seek_beginning_method).
1391 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1392 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1395 * Defines an iterator "can seek nanoseconds from origin" method
1396 * attribute attached to a source component class descriptor which is
1397 * attached to the automatic plugin descriptor.
1399 * _name: Component class name (C identifier).
1400 * _x: Iterator "can seek nanoseconds from origin" method
1401 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
1403 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1404 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1407 * Defines an iterator "can seek beginning" method attribute
1408 * attached to a source component class descriptor which is attached to
1409 * the automatic plugin descriptor.
1411 * _name: Component class name (C identifier).
1412 * _x: Iterator "can seek beginning" method
1413 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
1415 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1416 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1419 * Defines an iterator initialization method attribute attached to a
1420 * filter component class descriptor which is attached to the automatic
1421 * plugin descriptor.
1423 * _name: Component class name (C identifier).
1424 * _x: Iterator initialization method
1425 * (bt_component_class_filter_message_iterator_init_method).
1427 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1428 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1431 * Defines an iterator finalize method attribute attached to a filter
1432 * component class descriptor which is attached to the automatic plugin
1435 * _name: Component class name (C identifier).
1436 * _x: Iterator finalize method
1437 * (bt_component_class_filter_message_iterator_finalize_method).
1439 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1440 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1443 * Defines an iterator "seek nanoseconds from origin" method attribute
1444 * attached to a filter component class descriptor which is attached to
1445 * the automatic plugin descriptor.
1447 * _name: Component class name (C identifier).
1448 * _x: Iterator "seek nanoseconds from origin" method
1449 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
1451 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1452 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1455 * Defines an iterator "seek beginning" method attribute
1456 * attached to a filter component class descriptor which is attached to
1457 * the automatic plugin descriptor.
1459 * _name: Component class name (C identifier).
1460 * _x: Iterator "seek beginning" method
1461 * (bt_component_class_filter_message_iterator_seek_beginning_method).
1463 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1464 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1467 * Defines an iterator "can seek nanoseconds from origin" method
1468 * attribute attached to a filter component class descriptor which is
1469 * attached to the automatic plugin descriptor.
1471 * _name: Component class name (C identifier).
1472 * _x: Iterator "can seek nanoseconds from origin" method
1473 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
1475 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1476 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1479 * Defines an iterator "can seek beginning" method attribute
1480 * attached to a filter component class descriptor which is attached to
1481 * the automatic plugin descriptor.
1483 * _name: Component class name (C identifier).
1484 * _x: Iterator "can seek beginning" method
1485 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
1487 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1488 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1490 #define BT_PLUGIN_MODULE() \
1491 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
1492 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1493 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
1495 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
1496 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1497 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
1499 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
1500 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1501 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
1503 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; \
1504 _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; \
1505 _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; \
1507 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1509 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1511 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1513 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1515 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1517 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1519 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1521 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1523 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1525 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1527 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1529 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1531 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1533 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1535 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1537 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1544 #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */