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 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
11 * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
13 * Permission is hereby granted, free of charge, to any person obtaining a copy
14 * of this software and associated documentation files (the "Software"), to deal
15 * in the Software without restriction, including without limitation the rights
16 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17 * copies of the Software, and to permit persons to whom the Software is
18 * furnished to do so, subject to the following conditions:
20 * The above copyright notice and this permission notice shall be included in
21 * all copies or substantial portions of the Software.
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
34 /* For enum bt_plugin_status */
35 #include <babeltrace/plugin/plugin.h>
37 /* For private component class method type definitions */
38 #include <babeltrace/graph/private-component-class-source.h>
39 #include <babeltrace/graph/private-component-class-filter.h>
40 #include <babeltrace/graph/private-component-class-sink.h>
43 * _BT_HIDDEN: set the hidden attribute for internal functions
44 * On Windows, symbols are local unless explicitly exported,
45 * see https://gcc.gnu.org/wiki/Visibility
47 #if defined(_WIN32) || defined(__CYGWIN__)
50 #define _BT_HIDDEN __attribute__((visibility("hidden")))
58 * Plugin interface's version, not synced with Babeltrace's version
61 #define __BT_PLUGIN_VERSION_MAJOR 1
62 #define __BT_PLUGIN_VERSION_MINOR 0
64 /* Plugin initialization function type */
65 typedef enum bt_plugin_status (*bt_plugin_init_func
)(
66 struct bt_plugin
*plugin
);
68 /* Plugin exit function type */
69 typedef enum bt_plugin_status (*bt_plugin_exit_func
)(void);
71 /* Plugin descriptor: describes a single plugin (internal use) */
72 struct __bt_plugin_descriptor
{
73 /* Plugin's interface major version number */
76 /* Plugin's interface minor version number */
81 } __attribute__((packed
));
83 /* Type of a plugin attribute (internal use) */
84 enum __bt_plugin_descriptor_attribute_type
{
85 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
86 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
87 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
88 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
89 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
90 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
93 /* Plugin (user) version */
94 struct __bt_plugin_descriptor_version
{
101 /* Plugin attribute (internal use) */
102 struct __bt_plugin_descriptor_attribute
{
103 /* Plugin descriptor to which to associate this attribute */
104 const struct __bt_plugin_descriptor
*plugin_descriptor
;
106 /* Name of the attribute's type for debug purposes */
107 const char *type_name
;
109 /* Attribute's type */
110 enum __bt_plugin_descriptor_attribute_type type
;
112 /* Attribute's value (depends on attribute's type) */
114 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
115 bt_plugin_init_func init
;
117 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
118 bt_plugin_exit_func exit
;
120 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
123 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
126 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
127 const char *description
;
129 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
130 struct __bt_plugin_descriptor_version version
;
132 } __attribute__((packed
));
134 /* Component class descriptor (internal use) */
135 struct __bt_plugin_component_class_descriptor
{
137 * Plugin descriptor to which to associate this component
140 const struct __bt_plugin_descriptor
*plugin_descriptor
;
142 /* Component class name */
145 /* Component class type */
146 enum bt_component_class_type type
;
148 /* Mandatory methods (depends on component class type) */
150 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
152 bt_private_component_class_source_notification_iterator_next_method notif_iter_next
;
155 /* BT_COMPONENT_CLASS_TYPE_FILTER */
157 bt_private_component_class_filter_notification_iterator_next_method notif_iter_next
;
160 /* BT_COMPONENT_CLASS_TYPE_SINK */
162 bt_private_component_class_sink_consume_method consume
;
165 } __attribute__((packed
));
167 /* Type of a component class attribute (internal use) */
168 enum __bt_plugin_component_class_descriptor_attribute_type
{
169 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
170 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
171 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD
= 2,
172 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 3,
173 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 4,
174 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD
= 5,
175 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD
= 6,
176 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 7,
177 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 8,
178 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD
= 9,
179 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD
= 10,
180 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD
= 11,
181 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD
= 12,
184 /* Component class attribute (internal use) */
185 struct __bt_plugin_component_class_descriptor_attribute
{
187 * Component class plugin attribute to which to associate this
188 * component class attribute.
190 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
192 /* Name of the attribute's type for debug purposes */
193 const char *type_name
;
195 /* Attribute's type */
196 enum __bt_plugin_component_class_descriptor_attribute_type type
;
198 /* Attribute's value (depends on attribute's type) */
200 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
201 const char *description
;
203 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
206 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
207 bt_private_component_class_source_init_method source_init_method
;
208 bt_private_component_class_filter_init_method filter_init_method
;
209 bt_private_component_class_sink_init_method sink_init_method
;
211 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
212 bt_private_component_class_source_finalize_method source_finalize_method
;
213 bt_private_component_class_filter_finalize_method filter_finalize_method
;
214 bt_private_component_class_sink_finalize_method sink_finalize_method
;
216 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
217 bt_private_component_class_source_query_method source_query_method
;
218 bt_private_component_class_filter_query_method filter_query_method
;
219 bt_private_component_class_sink_query_method sink_query_method
;
221 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD */
222 bt_private_component_class_filter_accept_input_port_connection_method filter_accept_input_port_connection_method
;
223 bt_private_component_class_sink_accept_input_port_connection_method sink_accept_input_port_connection_method
;
225 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD */
226 bt_private_component_class_source_accept_output_port_connection_method source_accept_output_port_connection_method
;
227 bt_private_component_class_filter_accept_output_port_connection_method filter_accept_output_port_connection_method
;
229 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
230 bt_private_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
231 bt_private_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
233 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
234 bt_private_component_class_source_output_port_connected_method source_output_port_connected_method
;
235 bt_private_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
237 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD */
238 bt_private_component_class_filter_input_port_disconnected_method filter_input_port_disconnected_method
;
239 bt_private_component_class_sink_input_port_disconnected_method sink_input_port_disconnected_method
;
241 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD */
242 bt_private_component_class_source_output_port_disconnected_method source_output_port_disconnected_method
;
243 bt_private_component_class_filter_output_port_disconnected_method filter_output_port_disconnected_method
;
245 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD */
246 bt_private_component_class_source_notification_iterator_init_method source_notif_iter_init_method
;
247 bt_private_component_class_filter_notification_iterator_init_method filter_notif_iter_init_method
;
249 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD */
250 bt_private_component_class_source_notification_iterator_finalize_method source_notif_iter_finalize_method
;
251 bt_private_component_class_filter_notification_iterator_finalize_method filter_notif_iter_finalize_method
;
253 } __attribute__((packed
));
255 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
256 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
257 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
258 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
259 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
260 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
261 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
262 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
265 * Variable attributes for a plugin descriptor pointer to be added to
266 * the plugin descriptor section (internal use).
269 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
270 __attribute__((section("__DATA,btp_desc"), used))
272 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
273 __start___bt_plugin_descriptors
275 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
276 __stop___bt_plugin_descriptors
278 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
279 __asm("section$start$__DATA$btp_desc")
281 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
282 __asm("section$end$__DATA$btp_desc")
286 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
287 __attribute__((section("__bt_plugin_descriptors"), used))
289 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
290 __start___bt_plugin_descriptors
292 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
293 __stop___bt_plugin_descriptors
295 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
297 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
301 * Variable attributes for a plugin attribute pointer to be added to
302 * the plugin attribute section (internal use).
305 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
306 __attribute__((section("__DATA,btp_desc_att"), used))
308 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
309 __start___bt_plugin_descriptor_attributes
311 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
312 __stop___bt_plugin_descriptor_attributes
314 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
315 __asm("section$start$__DATA$btp_desc_att")
317 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
318 __asm("section$end$__DATA$btp_desc_att")
322 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
323 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
325 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
326 __start___bt_plugin_descriptor_attributes
328 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
329 __stop___bt_plugin_descriptor_attributes
331 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
333 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
337 * Variable attributes for a component class descriptor pointer to be
338 * added to the component class descriptor section (internal use).
341 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
342 __attribute__((section("__DATA,btp_cc_desc"), used))
344 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
345 __start___bt_plugin_component_class_descriptors
347 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
348 __stop___bt_plugin_component_class_descriptors
350 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
351 __asm("section$start$__DATA$btp_cc_desc")
353 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
354 __asm("section$end$__DATA$btp_cc_desc")
358 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
359 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
361 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
362 __start___bt_plugin_component_class_descriptors
364 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
365 __stop___bt_plugin_component_class_descriptors
367 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
369 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
373 * Variable attributes for a component class descriptor attribute
374 * pointer to be added to the component class descriptor attribute
375 * section (internal use).
378 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
379 __attribute__((section("__DATA,btp_cc_desc_att"), used))
381 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
382 __start___bt_plugin_component_class_descriptor_attributes
384 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
385 __stop___bt_plugin_component_class_descriptor_attributes
387 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
388 __asm("section$start$__DATA$btp_cc_desc_att")
390 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
391 __asm("section$end$__DATA$btp_cc_desc_att")
395 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
396 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
398 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
399 __start___bt_plugin_component_class_descriptor_attributes
401 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
402 __stop___bt_plugin_component_class_descriptor_attributes
404 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
406 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
410 * Declares a plugin descriptor pointer variable with a custom ID.
412 * _id: ID (any valid C identifier except `auto`).
414 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
417 * Defines a plugin descriptor with a custom ID.
419 * _id: ID (any valid C identifier except `auto`).
420 * _name: Plugin's name (C string).
422 #define BT_PLUGIN_WITH_ID(_id, _name) \
423 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
424 .major = __BT_PLUGIN_VERSION_MAJOR, \
425 .minor = __BT_PLUGIN_VERSION_MINOR, \
428 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
431 * Defines a plugin attribute (generic, internal use).
433 * _attr_name: Name of the attribute (C identifier).
434 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
435 * _id: Plugin descriptor ID (C identifier).
438 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
439 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
440 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
441 .type_name = #_attr_name, \
442 .type = _attr_type, \
443 .value._attr_name = _x, \
445 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
448 * Defines a plugin initialization function attribute attached to a
449 * specific plugin descriptor.
451 * _id: Plugin descriptor ID (C identifier).
452 * _x: Initialization function (bt_plugin_init_func).
454 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
455 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
458 * Defines a plugin exit function attribute attached to a specific
461 * _id: Plugin descriptor ID (C identifier).
462 * _x: Exit function (bt_plugin_exit_func).
464 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
465 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
468 * Defines an author attribute attached to a specific plugin descriptor.
470 * _id: Plugin descriptor ID (C identifier).
471 * _x: Author (C string).
473 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
474 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
477 * Defines a license attribute attached to a specific plugin descriptor.
479 * _id: Plugin descriptor ID (C identifier).
480 * _x: License (C string).
482 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
483 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
486 * Defines a description attribute attached to a specific plugin
489 * _id: Plugin descriptor ID (C identifier).
490 * _x: Description (C string).
492 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
493 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
495 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
496 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
499 * Defines a version attribute attached to a specific plugin descriptor.
501 * _id: Plugin descriptor ID (C identifier).
502 * _major: Plugin's major version (uint32_t).
503 * _minor: Plugin's minor version (uint32_t).
504 * _patch: Plugin's patch version (uint32_t).
505 * _extra: Plugin's version extra information (C string).
507 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
508 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
511 * Defines a source component class descriptor with a custom ID.
513 * _id: ID (any valid C identifier except `auto`).
514 * _comp_class_id: Component class ID (C identifier).
515 * _name: Component class name (C string).
516 * _notif_iter_next_method: Component class's iterator next method
517 * (bt_private_component_class_source_notification_iterator_next_method).
519 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_next_method) \
520 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
521 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
523 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
524 .methods.source = { \
525 .notif_iter_next = _notif_iter_next_method, \
528 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
531 * Defines a filter component class descriptor with a custom ID.
533 * _id: ID (any valid C identifier except `auto`).
534 * _comp_class_id: Component class ID (C identifier).
535 * _name: Component class name (C string).
536 * _notif_iter_next_method: Component class's iterator next method
537 * (bt_private_component_class_filter_notification_iterator_next_method).
539 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_next_method) \
540 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
541 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
543 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
544 .methods.filter = { \
545 .notif_iter_next = _notif_iter_next_method, \
548 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
551 * Defines a sink component class descriptor with a custom ID.
553 * _id: ID (any valid C identifier except `auto`).
554 * _comp_class_id: Component class ID (C identifier).
555 * _name: Component class name (C string).
556 * _consume_method: Component class's iterator consume method
557 * (bt_private_component_class_sink_consume_method).
559 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
560 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
561 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
563 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
565 .consume = _consume_method, \
568 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
571 * Defines a component class descriptor attribute (generic, internal
574 * _id: Plugin descriptor ID (C identifier).
575 * _comp_class_id: Component class ID (C identifier).
576 * _type: Component class type (`source`, `filter`, or `sink`).
577 * _attr_name: Name of the attribute (C identifier).
578 * _attr_type: Type of the attribute
579 * (enum __bt_plugin_descriptor_attribute_type).
582 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
583 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
584 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
585 .type_name = #_attr_name, \
586 .type = _attr_type, \
587 .value._attr_name = _x, \
589 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
592 * Defines a description attribute attached to a specific source
593 * component class descriptor.
595 * _id: Plugin descriptor ID (C identifier).
596 * _comp_class_id: Component class descriptor ID (C identifier).
597 * _x: Description (C string).
599 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
600 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
603 * Defines a description attribute attached to a specific filter
604 * component class descriptor.
606 * _id: Plugin descriptor ID (C identifier).
607 * _comp_class_id: Component class descriptor ID (C identifier).
608 * _x: Description (C string).
610 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
611 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
614 * Defines a description attribute attached to a specific sink
615 * component class descriptor.
617 * _id: Plugin descriptor ID (C identifier).
618 * _comp_class_id: Component class descriptor ID (C identifier).
619 * _x: Description (C string).
621 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
622 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
625 * Defines a help attribute attached to a specific source component
628 * _id: Plugin descriptor ID (C identifier).
629 * _comp_class_id: Component class descriptor ID (C identifier).
630 * _x: Help (C string).
632 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
633 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
636 * Defines a help attribute attached to a specific filter component
639 * _id: Plugin descriptor ID (C identifier).
640 * _comp_class_id: Component class descriptor ID (C identifier).
641 * _x: Help (C string).
643 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
644 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
647 * Defines a help attribute attached to a specific sink component class
650 * _id: Plugin descriptor ID (C identifier).
651 * _comp_class_id: Component class descriptor ID (C identifier).
652 * _x: Help (C string).
654 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
655 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
658 * Defines an initialization method attribute attached to a specific
659 * source component class descriptor.
661 * _id: Plugin descriptor ID (C identifier).
662 * _comp_class_id: Component class descriptor ID (C identifier).
663 * _x: Initialization method (bt_private_component_class_source_init_method).
665 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
666 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
669 * Defines an initialization method attribute attached to a specific
670 * filter component class descriptor.
672 * _id: Plugin descriptor ID (C identifier).
673 * _comp_class_id: Component class descriptor ID (C identifier).
674 * _x: Initialization method (bt_private_component_class_filter_init_method).
676 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
677 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
680 * Defines an initialization method attribute attached to a specific
681 * sink component class descriptor.
683 * _id: Plugin descriptor ID (C identifier).
684 * _comp_class_id: Component class descriptor ID (C identifier).
685 * _x: Initialization method (bt_private_component_class_sink_init_method).
687 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
688 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
691 * Defines a finalization method attribute attached to a specific source
692 * component class descriptor.
694 * _id: Plugin descriptor ID (C identifier).
695 * _comp_class_id: Component class descriptor ID (C identifier).
696 * _x: Finalize method (bt_private_component_class_source_finalize_method).
698 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
699 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
702 * Defines a finalization method attribute attached to a specific filter
703 * component class descriptor.
705 * _id: Plugin descriptor ID (C identifier).
706 * _comp_class_id: Component class descriptor ID (C identifier).
707 * _x: Finalize method (bt_private_component_class_filter_finalize_method).
709 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
710 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
713 * Defines a finalization method attribute attached to a specific sink
714 * component class descriptor.
716 * _id: Plugin descriptor ID (C identifier).
717 * _comp_class_id: Component class descriptor ID (C identifier).
718 * _x: Finalize method (bt_private_component_class_sink_finalize_method).
720 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
721 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
724 * Defines a query method attribute attached to a specific source
725 * component class descriptor.
727 * _id: Plugin descriptor ID (C identifier).
728 * _comp_class_id: Component class descriptor ID (C identifier).
729 * _x: Finalize method (bt_private_component_class_source_query_method).
731 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
732 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
735 * Defines a query method attribute attached to a specific filter
736 * component class descriptor.
738 * _id: Plugin descriptor ID (C identifier).
739 * _comp_class_id: Component class descriptor ID (C identifier).
740 * _x: Finalize method (bt_private_component_class_filter_query_method).
742 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
743 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
746 * Defines a query method attribute attached to a specific sink
747 * component class descriptor.
749 * _id: Plugin descriptor ID (C identifier).
750 * _comp_class_id: Component class descriptor ID (C identifier).
751 * _x: Finalize method (bt_private_component_class_sink_query_method).
753 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
754 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
757 * Defines an accept input port connection method attribute attached to
758 * a specific filter component class descriptor.
760 * _id: Plugin descriptor ID (C identifier).
761 * _comp_class_id: Component class descriptor ID (C identifier).
762 * _x: Accept port connection method
763 * (bt_private_component_class_filter_accept_input_port_connection_method).
765 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
766 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_accept_input_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, filter, _x)
769 * Defines an accept input port connection method attribute attached to
770 * a specific sink component class descriptor.
772 * _id: Plugin descriptor ID (C identifier).
773 * _comp_class_id: Component class descriptor ID (C identifier).
774 * _x: Accept port connection method
775 * (bt_private_component_class_sink_accept_input_port_connection_method).
777 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
778 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_accept_input_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, sink, _x)
781 * Defines an accept output port connection method attribute attached to
782 * a specific source component class descriptor.
784 * _id: Plugin descriptor ID (C identifier).
785 * _comp_class_id: Component class descriptor ID (C identifier).
786 * _x: Accept port connection method
787 * (bt_private_component_class_source_accept_output_port_connection_method).
789 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
790 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_accept_output_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, source, _x)
793 * Defines an accept output port connection method attribute attached to
794 * a specific filter component class descriptor.
796 * _id: Plugin descriptor ID (C identifier).
797 * _comp_class_id: Component class descriptor ID (C identifier).
798 * _x: Accept port connection method
799 * (bt_private_component_class_filter_accept_output_port_connection_method).
801 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
802 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_accept_output_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, filter, _x)
805 * Defines an input port connected method attribute attached to a
806 * specific filter component class descriptor.
808 * _id: Plugin descriptor ID (C identifier).
809 * _comp_class_id: Component class descriptor ID (C identifier).
810 * _x: Port connected method
811 * (bt_private_component_class_filter_input_port_connected_method).
813 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
814 __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)
817 * Defines an input port connected method attribute attached to a
818 * specific sink component class descriptor.
820 * _id: Plugin descriptor ID (C identifier).
821 * _comp_class_id: Component class descriptor ID (C identifier).
822 * _x: Port connected method
823 * (bt_private_component_class_sink_input_port_connected_method).
825 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
826 __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)
829 * Defines an output port connected method attribute attached to a
830 * specific source component class descriptor.
832 * _id: Plugin descriptor ID (C identifier).
833 * _comp_class_id: Component class descriptor ID (C identifier).
834 * _x: Port connected method
835 * (bt_private_component_class_source_output_port_connected_method).
837 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
838 __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)
841 * Defines an output port connected method attribute attached to a
842 * specific filter component class descriptor.
844 * _id: Plugin descriptor ID (C identifier).
845 * _comp_class_id: Component class descriptor ID (C identifier).
846 * _x: Port connected method
847 * (bt_private_component_class_filter_output_port_connected_method).
849 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
850 __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)
853 * Defines an input port disconnected method attribute attached to a
854 * specific filter component class descriptor.
856 * _id: Plugin descriptor ID (C identifier).
857 * _comp_class_id: Component class descriptor ID (C identifier).
858 * _x: Port disconnected method
859 * (bt_private_component_class_filter_input_port_disconnected_method).
861 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
862 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_input_port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, filter, _x)
865 * Defines an input port disconnected method attribute attached to a
866 * specific sink component class descriptor.
868 * _id: Plugin descriptor ID (C identifier).
869 * _comp_class_id: Component class descriptor ID (C identifier).
870 * _x: Port disconnected method
871 * (bt_private_component_class_sink_input_port_disconnected_method).
873 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
874 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_input_port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, sink, _x)
877 * Defines an output port disconnected method attribute attached to a
878 * specific source component class descriptor.
880 * _id: Plugin descriptor ID (C identifier).
881 * _comp_class_id: Component class descriptor ID (C identifier).
882 * _x: Port disconnected method
883 * (bt_private_component_class_source_output_port_disconnected_method).
885 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
886 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_output_port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, source, _x)
889 * Defines an output port disconnected method attribute attached to a
890 * specific filter component class descriptor.
892 * _id: Plugin descriptor ID (C identifier).
893 * _comp_class_id: Component class descriptor ID (C identifier).
894 * _x: Port disconnected method
895 * (bt_private_component_class_filter_output_port_disconnected_method).
897 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
898 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_output_port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, filter, _x)
901 * Defines an iterator initialization method attribute attached to a
902 * specific source component class descriptor.
904 * _id: Plugin descriptor ID (C identifier).
905 * _comp_class_id: Component class descriptor ID (C identifier).
906 * _x: Iterator initialization method
907 * (bt_private_component_class_source_notification_iterator_init_method).
909 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
910 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_notif_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD, _id, _comp_class_id, source, _x)
913 * Defines an iterator finalize method attribute attached to a specific
914 * source component class descriptor.
916 * _id: Plugin descriptor ID (C identifier).
917 * _comp_class_id: Component class descriptor ID (C identifier).
918 * _x: Iterator finalize method
919 * (bt_private_component_class_source_notification_iterator_finalize_method).
921 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
922 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_notif_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
925 * Defines an iterator initialization method attribute attached to a
926 * specific filter component class descriptor.
928 * _id: Plugin descriptor ID (C identifier).
929 * _comp_class_id: Component class descriptor ID (C identifier).
930 * _x: Iterator initialization method
931 * (bt_private_component_class_filter_notification_iterator_init_method).
933 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
934 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_notif_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD, _id, _comp_class_id, filter, _x)
937 * Defines an iterator finalize method attribute attached to a specific
938 * filter component class descriptor.
940 * _id: Plugin descriptor ID (C identifier).
941 * _comp_class_id: Component class descriptor ID (C identifier).
942 * _x: Iterator finalize method
943 * (bt_private_component_class_filter_notification_iterator_finalize_method).
945 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
946 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_notif_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
949 * Defines a plugin descriptor with an automatic ID.
951 * _name: Plugin's name (C string).
953 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
956 * Defines a plugin initialization function attribute attached to the
957 * automatic plugin descriptor.
959 * _x: Initialization function (bt_plugin_init_func).
961 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
964 * Defines a plugin exit function attribute attached to the automatic
967 * _x: Exit function (bt_plugin_exit_func).
969 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
972 * Defines an author attribute attached to the automatic plugin
975 * _x: Author (C string).
977 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
980 * Defines a license attribute attached to the automatic plugin
983 * _x: License (C string).
985 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
988 * Defines a description attribute attached to the automatic plugin
991 * _x: Description (C string).
993 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
996 * Defines a version attribute attached to the automatic plugin
999 * _major: Plugin's major version (uint32_t).
1000 * _minor: Plugin's minor version (uint32_t).
1001 * _patch: Plugin's patch version (uint32_t).
1002 * _extra: Plugin's version extra information (C string).
1004 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
1007 * Defines a source component class attached to the automatic plugin
1008 * descriptor. Its ID is the same as its name, hence its name must be a
1009 * C identifier in this version.
1011 * _name: Component class name (C identifier).
1012 * _notif_iter_next_method: Component class's iterator next method
1013 * (bt_private_component_class_source_notification_iterator_next_method).
1015 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _notif_iter_next_method) \
1016 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_next_method)
1019 * Defines a filter component class attached to the automatic plugin
1020 * descriptor. Its ID is the same as its name, hence its name must be a
1021 * C identifier in this version.
1023 * _name: Component class name (C identifier).
1024 * _notif_iter_next_method: Component class's iterator next method
1025 * (bt_private_component_class_filter_notification_iterator_next_method).
1027 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _notif_iter_next_method) \
1028 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_next_method)
1031 * Defines a sink component class attached to the automatic plugin
1032 * descriptor. Its ID is the same as its name, hence its name must be a
1033 * C identifier in this version.
1035 * _name: Component class name (C identifier).
1036 * _consume_method: Component class's consume method
1037 * (bt_private_component_class_sink_consume_method).
1039 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1040 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1043 * Defines a description attribute attached to a source component class
1044 * descriptor which is attached to the automatic plugin descriptor.
1046 * _name: Component class name (C identifier).
1047 * _x: Description (C string).
1049 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1050 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1053 * Defines a description attribute attached to a filter component class
1054 * descriptor which is attached to the automatic plugin descriptor.
1056 * _name: Component class name (C identifier).
1057 * _x: Description (C string).
1059 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1060 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1063 * Defines a description attribute attached to a sink component class
1064 * descriptor which is attached to the automatic plugin descriptor.
1066 * _name: Component class name (C identifier).
1067 * _x: Description (C string).
1069 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1070 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1073 * Defines a help attribute attached to a source component class
1074 * descriptor which is attached to the automatic plugin descriptor.
1076 * _name: Component class name (C identifier).
1077 * _x: Help (C string).
1079 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1080 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1083 * Defines a help attribute attached to a filter component class
1084 * descriptor which is attached to the automatic plugin descriptor.
1086 * _name: Component class name (C identifier).
1087 * _x: Help (C string).
1089 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1090 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1093 * Defines a help attribute attached to a sink component class
1094 * descriptor which is attached to the automatic plugin descriptor.
1096 * _name: Component class name (C identifier).
1097 * _x: Help (C string).
1099 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1100 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1103 * Defines an initialization method attribute attached to a source
1104 * component class descriptor which is attached to the automatic plugin
1107 * _name: Component class name (C identifier).
1108 * _x: Initialization method (bt_private_component_class_source_init_method).
1110 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1111 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1114 * Defines an initialization method attribute attached to a filter
1115 * component class descriptor which is attached to the automatic plugin
1118 * _name: Component class name (C identifier).
1119 * _x: Initialization method (bt_private_component_class_filter_init_method).
1121 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1122 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1125 * Defines an initialization method attribute attached to a sink
1126 * component class descriptor which is attached to the automatic plugin
1129 * _name: Component class name (C identifier).
1130 * _x: Initialization method (bt_private_component_class_sink_init_method).
1132 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1133 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1136 * Defines a finalization method attribute attached to a source component
1137 * class descriptor which is attached to the automatic plugin
1140 * _name: Component class name (C identifier).
1141 * _x: Initialization method (bt_private_component_class_source_finalize_method).
1143 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1144 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1147 * Defines a finalization method attribute attached to a filter component
1148 * class descriptor which is attached to the automatic plugin
1151 * _name: Component class name (C identifier).
1152 * _x: Initialization method (bt_private_component_class_filter_finalize_method).
1154 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1155 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1158 * Defines a finalization method attribute attached to a sink component class
1159 * descriptor which is attached to the automatic plugin descriptor.
1161 * _name: Component class name (C identifier).
1162 * _x: Initialization method (bt_private_component_class_sink_finalize_method).
1164 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1165 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1168 * Defines a query method attribute attached to a source component
1169 * class descriptor which is attached to the automatic plugin
1172 * _name: Component class name (C identifier).
1173 * _x: Initialization method (bt_private_component_class_source_query_method).
1175 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1176 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1179 * Defines a query method attribute attached to a filter component
1180 * class descriptor which is attached to the automatic plugin
1183 * _name: Component class name (C identifier).
1184 * _x: Initialization method (bt_private_component_class_filter_query_method).
1186 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1187 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1190 * Defines a query method attribute attached to a sink component
1191 * class descriptor which is attached to the automatic plugin
1194 * _name: Component class name (C identifier).
1195 * _x: Initialization method (bt_private_component_class_sink_query_method).
1197 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1198 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1201 * Defines an accept input port connection method attribute attached to
1202 * a filter component class descriptor which is attached to the
1203 * automatic plugin descriptor.
1205 * _name: Component class name (C identifier).
1206 * _x: Accept port connection method
1207 * (bt_private_component_class_filter_accept_input_port_connection_method).
1209 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1210 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1213 * Defines an accept input port connection method attribute attached to
1214 * a sink component class descriptor which is attached to the automatic
1215 * plugin descriptor.
1217 * _name: Component class name (C identifier).
1218 * _x: Accept port connection method
1219 * (bt_private_component_class_sink_accept_input_port_connection_method).
1221 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1222 BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1225 * Defines an accept output port connection method attribute attached to
1226 * a source component class descriptor which is attached to the
1227 * automatic plugin descriptor.
1229 * _name: Component class name (C identifier).
1230 * _x: Accept port connection method
1231 * (bt_private_component_class_source_accept_output_port_connection_method).
1233 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1234 BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1237 * Defines an accept output port connection method attribute attached to
1238 * a filter component class descriptor which is attached to the
1239 * automatic plugin descriptor.
1241 * _name: Component class name (C identifier).
1242 * _x: Accept port connection method
1243 * (bt_private_component_class_filter_accept_output_port_connection_method).
1245 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1246 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1249 * Defines an input port connected method attribute attached to a filter
1250 * component class descriptor which is attached to the automatic plugin
1253 * _name: Component class name (C identifier).
1254 * _x: Port connected (bt_private_component_class_filter_input_port_connected_method).
1256 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1257 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1260 * Defines an input port connected method attribute attached to a sink
1261 * component class descriptor which is attached to the automatic plugin
1264 * _name: Component class name (C identifier).
1265 * _x: Port connected (bt_private_component_class_sink_input_port_connected_method).
1267 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1268 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1271 * Defines an output port connected method attribute attached to a source
1272 * component class descriptor which is attached to the automatic plugin
1275 * _name: Component class name (C identifier).
1276 * _x: Port connected (bt_private_component_class_source_output_port_connected_method).
1278 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1279 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1282 * Defines an output port connected method attribute attached to a filter
1283 * component class descriptor which is attached to the automatic plugin
1286 * _name: Component class name (C identifier).
1287 * _x: Port connected (bt_private_component_class_filter_output_port_connected_method).
1289 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1290 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1293 * Defines an input port disconnected method attribute attached to a
1294 * filter component class descriptor which is attached to the automatic
1295 * plugin descriptor.
1297 * _name: Component class name (C identifier).
1298 * _x: Port disconnected (bt_private_component_class_filter_input_port_disconnected_method).
1300 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1301 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1304 * Defines an input port disconnected method attribute attached to a
1305 * sink component class descriptor which is attached to the automatic
1306 * plugin descriptor.
1308 * _name: Component class name (C identifier).
1309 * _x: Port disconnected (bt_private_component_class_sink_input_port_disconnected_method).
1311 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1312 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1315 * Defines an output port disconnected method attribute attached to a
1316 * source component class descriptor which is attached to the automatic
1317 * plugin descriptor.
1319 * _name: Component class name (C identifier).
1320 * _x: Port disconnected (bt_private_component_class_source_output_port_disconnected_method).
1322 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1323 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1326 * Defines an output port disconnected method attribute attached to a
1327 * filter component class descriptor which is attached to the automatic
1328 * plugin descriptor.
1330 * _name: Component class name (C identifier).
1331 * _x: Port disconnected (bt_private_component_class_filter_output_port_disconnected_method).
1333 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD(_name, _x) \
1334 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1337 * Defines an iterator initialization method attribute attached to a
1338 * source component class descriptor which is attached to the automatic
1339 * plugin descriptor.
1341 * _name: Component class name (C identifier).
1342 * _x: Iterator initialization method
1343 * (bt_private_component_class_source_notification_iterator_init_method).
1345 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(_name, _x) \
1346 BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1349 * Defines an iterator finalize method attribute attached to a source
1350 * component class descriptor which is attached to the automatic plugin
1353 * _name: Component class name (C identifier).
1354 * _x: Iterator finalize method
1355 * (bt_private_component_class_source_notification_iterator_finalize_method).
1357 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD(_name, _x) \
1358 BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1361 * Defines an iterator initialization method attribute attached to a
1362 * filter component class descriptor which is attached to the automatic
1363 * plugin descriptor.
1365 * _name: Component class name (C identifier).
1366 * _x: Iterator initialization method
1367 * (bt_private_component_class_filter_notification_iterator_init_method).
1369 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(_name, _x) \
1370 BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1373 * Defines an iterator finalize method attribute attached to a filter
1374 * component class descriptor which is attached to the automatic plugin
1377 * _name: Component class name (C identifier).
1378 * _x: Iterator finalize method
1379 * (bt_private_component_class_filter_notification_iterator_finalize_method).
1381 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD(_name, _x) \
1382 BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1384 #define BT_PLUGIN_MODULE() \
1385 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
1386 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1387 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
1389 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
1390 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1391 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
1393 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
1394 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1395 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
1397 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; \
1398 _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; \
1399 _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; \
1401 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1403 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1405 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1407 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1409 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1411 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1413 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1415 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1417 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1419 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1421 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1423 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1425 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1427 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1429 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1431 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1438 #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */