1 #ifndef BABELTRACE_PLUGIN_PLUGIN_DEV_H
2 #define BABELTRACE_PLUGIN_PLUGIN_DEV_H
5 * BabelTrace - Babeltrace Plug-in Development API
7 * This is the header that you need to include for the development of
8 * a Babeltrace plug-in.
10 * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
11 * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
13 * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
15 * Permission is hereby granted, free of charge, to any person obtaining a copy
16 * of this software and associated documentation files (the "Software"), to deal
17 * in the Software without restriction, including without limitation the rights
18 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19 * copies of the Software, and to permit persons to whom the Software is
20 * furnished to do so, subject to the following conditions:
22 * The above copyright notice and this permission notice shall be included in
23 * all copies or substantial portions of the Software.
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35 #include <babeltrace/plugin/plugin.h>
36 #include <babeltrace/graph/component-class.h>
37 #include <babeltrace/graph/component-class-source.h>
38 #include <babeltrace/graph/component-class-filter.h>
39 #include <babeltrace/graph/component-class-sink.h>
46 * Plugin interface's version, not synced with Babeltrace's version
49 #define __BT_PLUGIN_VERSION_MAJOR 1
50 #define __BT_PLUGIN_VERSION_MINOR 0
52 /* Plugin initialization function type */
53 typedef enum bt_plugin_status (*bt_plugin_init_func
)(
54 struct bt_plugin
*plugin
);
56 /* Plugin exit function type */
57 typedef enum bt_plugin_status (*bt_plugin_exit_func
)(void);
60 * Function to call from a plugin's initialization function to add a
61 * component class to a plugin object.
63 extern enum bt_plugin_status
bt_plugin_add_component_class(
64 struct bt_plugin
*plugin
,
65 struct bt_component_class
*component_class
);
67 /* Plugin descriptor: describes a single plugin (internal use) */
68 struct __bt_plugin_descriptor
{
69 /* Plugin's interface major version number */
72 /* Plugin's interface minor version number */
77 } __attribute__((packed
));
79 /* Type of a plugin attribute (internal use) */
80 enum __bt_plugin_descriptor_attribute_type
{
81 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
82 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
83 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
84 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
85 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
86 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
89 /* Plugin (user) version */
90 struct __bt_plugin_descriptor_version
{
97 /* Plugin attribute (internal use) */
98 struct __bt_plugin_descriptor_attribute
{
99 /* Plugin descriptor to which to associate this attribute */
100 const struct __bt_plugin_descriptor
*plugin_descriptor
;
102 /* Name of the attribute's type for debug purposes */
103 const char *type_name
;
105 /* Attribute's type */
106 enum __bt_plugin_descriptor_attribute_type type
;
108 /* Attribute's value (depends on attribute's type) */
110 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
111 bt_plugin_init_func init
;
113 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
114 bt_plugin_exit_func exit
;
116 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
119 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
122 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
123 const char *description
;
125 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
126 struct __bt_plugin_descriptor_version version
;
128 } __attribute__((packed
));
130 /* Component class descriptor (internal use) */
131 struct __bt_plugin_component_class_descriptor
{
133 * Plugin descriptor to which to associate this component
136 const struct __bt_plugin_descriptor
*plugin_descriptor
;
138 /* Component class name */
141 /* Component class type */
142 enum bt_component_class_type type
;
144 /* Mandatory methods (depends on component class type) */
146 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
148 bt_component_class_notification_iterator_next_method notif_iter_next
;
151 /* BT_COMPONENT_CLASS_TYPE_FILTER */
153 bt_component_class_notification_iterator_next_method notif_iter_next
;
156 /* BT_COMPONENT_CLASS_TYPE_SINK */
158 bt_component_class_sink_consume_method consume
;
161 } __attribute__((packed
));
163 /* Type of a component class attribute (internal use) */
164 enum __bt_plugin_component_class_descriptor_attribute_type
{
165 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
166 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
167 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD
= 2,
168 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 3,
169 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 4,
170 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD
= 5,
171 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD
= 7,
172 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD
= 8,
173 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD
= 9,
174 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD
= 10,
175 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD
= 11,
178 /* Component class attribute (internal use) */
179 struct __bt_plugin_component_class_descriptor_attribute
{
181 * Component class plugin attribute to which to associate this
182 * component class attribute.
184 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
186 /* Name of the attribute's type for debug purposes */
187 const char *type_name
;
189 /* Attribute's type */
190 enum __bt_plugin_component_class_descriptor_attribute_type type
;
192 /* Attribute's value (depends on attribute's type) */
194 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
195 const char *description
;
197 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
200 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
201 bt_component_class_init_method init_method
;
203 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
204 bt_component_class_finalize_method finalize_method
;
206 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
207 bt_component_class_query_method query_method
;
209 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD */
210 bt_component_class_accept_port_connection_method accept_port_connection_method
;
212 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD */
213 bt_component_class_port_connected_method port_connected_method
;
215 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD */
216 bt_component_class_port_disconnected_method port_disconnected_method
;
218 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD */
219 bt_component_class_notification_iterator_init_method notif_iter_init_method
;
221 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD */
222 bt_component_class_notification_iterator_finalize_method notif_iter_finalize_method
;
224 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD */
225 bt_component_class_notification_iterator_seek_time_method notif_iter_seek_time_method
;
227 } __attribute__((packed
));
230 * Variable attributes for a plugin descriptor pointer to be added to
231 * the plugin descriptor section (internal use).
233 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
234 __attribute__((section("__bt_plugin_descriptors"), used))
237 * Variable attributes for a plugin attribute pointer to be added to
238 * the plugin attribute section (internal use).
240 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
241 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
244 * Variable attributes for a component class descriptor pointer to be
245 * added to the component class descriptor section (internal use).
247 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
248 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
251 * Variable attributes for a component class descriptor attribute
252 * pointer to be added to the component class descriptor attribute
253 * section (internal use).
255 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
256 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
259 * Declares a plugin descriptor pointer variable with a custom ID.
261 * _id: ID (any valid C identifier except `auto`).
263 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
266 * Defines a plugin descriptor with a custom ID.
268 * _id: ID (any valid C identifier except `auto`).
269 * _name: Plugin's name (C string).
271 #define BT_PLUGIN_WITH_ID(_id, _name) \
272 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
273 .major = __BT_PLUGIN_VERSION_MAJOR, \
274 .minor = __BT_PLUGIN_VERSION_MINOR, \
277 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id; \
278 extern struct __bt_plugin_descriptor const *__start___bt_plugin_descriptors; \
279 extern struct __bt_plugin_descriptor const *__stop___bt_plugin_descriptors
282 * Defines a plugin attribute (generic, internal use).
284 * _attr_name: Name of the attribute (C identifier).
285 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
286 * _id: Plugin descriptor ID (C identifier).
289 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
290 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
291 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
292 .type_name = #_attr_name, \
293 .type = _attr_type, \
294 .value._attr_name = _x, \
296 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; \
297 extern struct __bt_plugin_descriptor_attribute const *__start___bt_plugin_descriptor_attributes; \
298 extern struct __bt_plugin_descriptor_attribute const *__stop___bt_plugin_descriptor_attributes
301 * Defines a plugin initialization function attribute attached to a
302 * specific plugin descriptor.
304 * _id: Plugin descriptor ID (C identifier).
305 * _x: Initialization function (bt_plugin_init_func).
307 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
308 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
311 * Defines a plugin exit function attribute attached to a specific
314 * _id: Plugin descriptor ID (C identifier).
315 * _x: Exit function (bt_plugin_exit_func).
317 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
318 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
321 * Defines an author attribute attached to a specific plugin descriptor.
323 * _id: Plugin descriptor ID (C identifier).
324 * _x: Author (C string).
326 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
327 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
330 * Defines a license attribute attached to a specific plugin descriptor.
332 * _id: Plugin descriptor ID (C identifier).
333 * _x: License (C string).
335 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
336 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
339 * Defines a description attribute attached to a specific plugin
342 * _id: Plugin descriptor ID (C identifier).
343 * _x: Description (C string).
345 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
346 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
348 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
349 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
352 * Defines a version attribute attached to a specific plugin descriptor.
354 * _id: Plugin descriptor ID (C identifier).
355 * _major: Plugin's major version (uint32_t).
356 * _minor: Plugin's minor version (uint32_t).
357 * _patch: Plugin's patch version (uint32_t).
358 * _extra: Plugin's version extra information (C string).
360 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
361 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
364 * Declaration of start and stop symbols of component class descriptors
367 #define __BT_PLUGIN_DECL_COMPONENT_CLASS_DESCRIPTORS_SECTION_START_STOP \
368 extern struct __bt_plugin_component_class_descriptor const *__start___bt_plugin_component_class_descriptors; \
369 extern struct __bt_plugin_component_class_descriptor const *__stop___bt_plugin_component_class_descriptors
372 * Defines a source component class descriptor with a custom ID.
374 * _id: ID (any valid C identifier except `auto`).
375 * _comp_class_id: Component class ID (C identifier).
376 * _name: Component class name (C string).
377 * _notif_iter_next_method: Component class's iterator next method
378 * (bt_component_class_notification_iterator_next_method).
380 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_next_method) \
381 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
382 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
384 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
385 .methods.source = { \
386 .notif_iter_next = _notif_iter_next_method, \
389 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; \
390 __BT_PLUGIN_DECL_COMPONENT_CLASS_DESCRIPTORS_SECTION_START_STOP
393 * Defines a filter component class descriptor with a custom ID.
395 * _id: ID (any valid C identifier except `auto`).
396 * _comp_class_id: Component class ID (C identifier).
397 * _name: Component class name (C string).
398 * _notif_iter_next_method: Component class's iterator next method
399 * (bt_component_class_notification_iterator_next_method).
401 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_next_method) \
402 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
403 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
405 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
406 .methods.filter = { \
407 .notif_iter_next = _notif_iter_next_method, \
410 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; \
411 __BT_PLUGIN_DECL_COMPONENT_CLASS_DESCRIPTORS_SECTION_START_STOP
414 * Defines a sink component class descriptor with a custom ID.
416 * _id: ID (any valid C identifier except `auto`).
417 * _comp_class_id: Component class ID (C identifier).
418 * _name: Component class name (C string).
419 * _consume_method: Component class's iterator consume method
420 * (bt_component_class_sink_consume_method).
422 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
423 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
424 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
426 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
428 .consume = _consume_method, \
431 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; \
432 __BT_PLUGIN_DECL_COMPONENT_CLASS_DESCRIPTORS_SECTION_START_STOP
435 * Defines a component class descriptor attribute (generic, internal
438 * _id: Plugin descriptor ID (C identifier).
439 * _comp_class_id: Component class ID (C identifier).
440 * _type: Component class type (`source`, `filter`, or `sink`).
441 * _attr_name: Name of the attribute (C identifier).
442 * _attr_type: Type of the attribute
443 * (enum __bt_plugin_descriptor_attribute_type).
446 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
447 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
448 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
449 .type_name = #_attr_name, \
450 .type = _attr_type, \
451 .value._attr_name = _x, \
453 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; \
454 extern struct __bt_plugin_component_class_descriptor_attribute const *__start___bt_plugin_component_class_descriptor_attributes; \
455 extern struct __bt_plugin_component_class_descriptor_attribute const *__stop___bt_plugin_component_class_descriptor_attributes
458 * Defines a description attribute attached to a specific source
459 * component class descriptor.
461 * _id: Plugin descriptor ID (C identifier).
462 * _comp_class_id: Component class descriptor ID (C identifier).
463 * _x: Description (C string).
465 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
466 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
469 * Defines a description attribute attached to a specific filter
470 * component class descriptor.
472 * _id: Plugin descriptor ID (C identifier).
473 * _comp_class_id: Component class descriptor ID (C identifier).
474 * _x: Description (C string).
476 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
477 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
480 * Defines a description attribute attached to a specific sink
481 * component class descriptor.
483 * _id: Plugin descriptor ID (C identifier).
484 * _comp_class_id: Component class descriptor ID (C identifier).
485 * _x: Description (C string).
487 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
488 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
491 * Defines a help attribute attached to a specific source component
494 * _id: Plugin descriptor ID (C identifier).
495 * _comp_class_id: Component class descriptor ID (C identifier).
496 * _x: Help (C string).
498 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
499 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
502 * Defines a help attribute attached to a specific filter component
505 * _id: Plugin descriptor ID (C identifier).
506 * _comp_class_id: Component class descriptor ID (C identifier).
507 * _x: Help (C string).
509 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
510 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
513 * Defines a help attribute attached to a specific sink component class
516 * _id: Plugin descriptor ID (C identifier).
517 * _comp_class_id: Component class descriptor ID (C identifier).
518 * _x: Help (C string).
520 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
521 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
524 * Defines an initialization method attribute attached to a specific
525 * source component class descriptor.
527 * _id: Plugin descriptor ID (C identifier).
528 * _comp_class_id: Component class descriptor ID (C identifier).
529 * _x: Initialization method (bt_component_class_init_method).
531 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
532 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
535 * Defines an initialization method attribute attached to a specific
536 * filter component class descriptor.
538 * _id: Plugin descriptor ID (C identifier).
539 * _comp_class_id: Component class descriptor ID (C identifier).
540 * _x: Initialization method (bt_component_class_init_method).
542 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
543 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
546 * Defines an initialization method attribute attached to a specific
547 * sink component class descriptor.
549 * _id: Plugin descriptor ID (C identifier).
550 * _comp_class_id: Component class descriptor ID (C identifier).
551 * _x: Initialization method (bt_component_class_init_method).
553 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
554 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
557 * Defines a finalize method attribute attached to a specific source
558 * component class descriptor.
560 * _id: Plugin descriptor ID (C identifier).
561 * _comp_class_id: Component class descriptor ID (C identifier).
562 * _x: Finalize method (bt_component_class_finalize_method).
564 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
565 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
568 * Defines a finalize method attribute attached to a specific filter
569 * component class descriptor.
571 * _id: Plugin descriptor ID (C identifier).
572 * _comp_class_id: Component class descriptor ID (C identifier).
573 * _x: Finalize method (bt_component_class_finalize_method).
575 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
576 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
579 * Defines a finalize method attribute attached to a specific sink
580 * component class descriptor.
582 * _id: Plugin descriptor ID (C identifier).
583 * _comp_class_id: Component class descriptor ID (C identifier).
584 * _x: Finalize method (bt_component_class_finalize_method).
586 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
587 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
590 * Defines a query method attribute attached to a specific source
591 * component class descriptor.
593 * _id: Plugin descriptor ID (C identifier).
594 * _comp_class_id: Component class descriptor ID (C identifier).
595 * _x: Finalize method (bt_component_class_query_method).
597 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
598 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
601 * Defines a query method attribute attached to a specific filter
602 * component class descriptor.
604 * _id: Plugin descriptor ID (C identifier).
605 * _comp_class_id: Component class descriptor ID (C identifier).
606 * _x: Finalize method (bt_component_class_query_method).
608 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
609 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
612 * Defines a query method attribute attached to a specific sink
613 * component class descriptor.
615 * _id: Plugin descriptor ID (C identifier).
616 * _comp_class_id: Component class descriptor ID (C identifier).
617 * _x: Finalize method (bt_component_class_query_method).
619 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
620 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
623 * Defines an accept port connection method attribute attached to a
624 * specific source component class descriptor.
626 * _id: Plugin descriptor ID (C identifier).
627 * _comp_class_id: Component class descriptor ID (C identifier).
628 * _x: Accept port connection method
629 * (bt_component_class_accept_port_connection_method).
631 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
632 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(accept_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD, _id, _comp_class_id, source, _x)
635 * Defines an accept port connection method attribute attached to a
636 * specific filter component class descriptor.
638 * _id: Plugin descriptor ID (C identifier).
639 * _comp_class_id: Component class descriptor ID (C identifier).
640 * _x: Accept port connection method
641 * (bt_component_class_accept_port_connection_method).
643 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
644 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(accept_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD, _id, _comp_class_id, filter, _x)
647 * Defines an accept port connection method attribute attached to a
648 * specific sink component class descriptor.
650 * _id: Plugin descriptor ID (C identifier).
651 * _comp_class_id: Component class descriptor ID (C identifier).
652 * _x: Accept port connection method
653 * (bt_component_class_accept_port_connection_method).
655 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
656 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(accept_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD, _id, _comp_class_id, sink, _x)
659 * Defines a port connected method attribute attached to a specific
660 * source component class descriptor.
662 * _id: Plugin descriptor ID (C identifier).
663 * _comp_class_id: Component class descriptor ID (C identifier).
664 * _x: Port connected method
665 * (bt_component_class_port_connected_method).
667 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
668 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD, _id, _comp_class_id, source, _x)
671 * Defines a port connected method attribute attached to a specific
672 * filter component class descriptor.
674 * _id: Plugin descriptor ID (C identifier).
675 * _comp_class_id: Component class descriptor ID (C identifier).
676 * _x: Port connected method
677 * (bt_component_class_port_connected_method).
679 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
680 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD, _id, _comp_class_id, filter, _x)
683 * Defines a port connected method attribute attached to a specific
684 * sink component class descriptor.
686 * _id: Plugin descriptor ID (C identifier).
687 * _comp_class_id: Component class descriptor ID (C identifier).
688 * _x: Port connected method
689 * (bt_component_class_port_connected_method).
691 #define BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
692 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD, _id, _comp_class_id, sink, _x)
695 * Defines a port disconnected method attribute attached to a specific
696 * source component class descriptor.
698 * _id: Plugin descriptor ID (C identifier).
699 * _comp_class_id: Component class descriptor ID (C identifier).
700 * _x: Port disconnected method
701 * (bt_component_class_port_disconnected_method).
703 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
704 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, source, _x)
707 * Defines a port disconnected method attribute attached to a specific
708 * filter component class descriptor.
710 * _id: Plugin descriptor ID (C identifier).
711 * _comp_class_id: Component class descriptor ID (C identifier).
712 * _x: Port disconnected method
713 * (bt_component_class_port_disconnected_method).
715 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
716 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, filter, _x)
719 * Defines a port disconnected method attribute attached to a specific
720 * sink component class descriptor.
722 * _id: Plugin descriptor ID (C identifier).
723 * _comp_class_id: Component class descriptor ID (C identifier).
724 * _x: Port disconnected method
725 * (bt_component_class_port_disconnected_method).
727 #define BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
728 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, sink, _x)
731 * Defines an iterator initialization method attribute attached to a
732 * specific source component class descriptor.
734 * _id: Plugin descriptor ID (C identifier).
735 * _comp_class_id: Component class descriptor ID (C identifier).
736 * _x: Iterator initialization method
737 * (bt_component_class_notification_iterator_init_method).
739 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
740 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD, _id, _comp_class_id, source, _x)
743 * Defines an iterator finalize method attribute attached to a specific
744 * source component class descriptor.
746 * _id: Plugin descriptor ID (C identifier).
747 * _comp_class_id: Component class descriptor ID (C identifier).
748 * _x: Iterator finalize method
749 * (bt_component_class_notification_iterator_finalize_method).
751 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
752 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
755 * Defines an iterator seek time method attribute attached to a specific
756 * source component class descriptor.
758 * _id: Plugin descriptor ID (C identifier).
759 * _comp_class_id: Component class descriptor ID (C identifier).
760 * _x: Iterator seek time method
761 * (bt_component_class_notification_iterator_seek_time_method).
763 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD_WITH_ID(_id, _comp_class_id, _x) \
764 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_seek_time_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD, _id, _comp_class_id, source, _x)
767 * Defines an iterator initialization method attribute attached to a
768 * specific filter component class descriptor.
770 * _id: Plugin descriptor ID (C identifier).
771 * _comp_class_id: Component class descriptor ID (C identifier).
772 * _x: Iterator initialization method
773 * (bt_component_class_notification_iterator_init_method).
775 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
776 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD, _id, _comp_class_id, filter, _x)
779 * Defines an iterator finalize method attribute attached to a specific
780 * filter component class descriptor.
782 * _id: Plugin descriptor ID (C identifier).
783 * _comp_class_id: Component class descriptor ID (C identifier).
784 * _x: Iterator finalize method
785 * (bt_component_class_notification_iterator_finalize_method).
787 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
788 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
791 * Defines an iterator seek time method attribute attached to a specific
792 * filter component class descriptor.
794 * _id: Plugin descriptor ID (C identifier).
795 * _comp_class_id: Component class descriptor ID (C identifier).
796 * _x: Iterator seek time method
797 * (bt_component_class_notification_iterator_seek_time_method).
799 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD_WITH_ID(_id, _comp_class_id, _x) \
800 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_seek_time_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD, _id, _comp_class_id, filter, _x)
803 * Defines a plugin descriptor with an automatic ID.
805 * _name: Plugin's name (C string).
807 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
810 * Defines a plugin initialization function attribute attached to the
811 * automatic plugin descriptor.
813 * _x: Initialization function (bt_plugin_init_func).
815 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
818 * Defines a plugin exit function attribute attached to the automatic
821 * _x: Exit function (bt_plugin_exit_func).
823 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
826 * Defines an author attribute attached to the automatic plugin
829 * _x: Author (C string).
831 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
834 * Defines a license attribute attached to the automatic plugin
837 * _x: License (C string).
839 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
842 * Defines a description attribute attached to the automatic plugin
845 * _x: Description (C string).
847 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
850 * Defines a version attribute attached to the automatic plugin
853 * _major: Plugin's major version (uint32_t).
854 * _minor: Plugin's minor version (uint32_t).
855 * _patch: Plugin's patch version (uint32_t).
856 * _extra: Plugin's version extra information (C string).
858 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
861 * Defines a source component class attached to the automatic plugin
862 * descriptor. Its ID is the same as its name, hence its name must be a
863 * C identifier in this version.
865 * _name: Component class name (C identifier).
866 * _notif_iter_next_method: Component class's iterator next method
867 * (bt_component_class_notification_iterator_next_method).
869 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _notif_iter_next_method) \
870 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_next_method)
873 * Defines a filter component class attached to the automatic plugin
874 * descriptor. Its ID is the same as its name, hence its name must be a
875 * C identifier in this version.
877 * _name: Component class name (C identifier).
878 * _notif_iter_next_method: Component class's iterator next method
879 * (bt_component_class_notification_iterator_next_method).
881 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _notif_iter_next_method) \
882 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_next_method)
885 * Defines a sink component class attached to the automatic plugin
886 * descriptor. Its ID is the same as its name, hence its name must be a
887 * C identifier in this version.
889 * _name: Component class name (C identifier).
890 * _consume_method: Component class's consume method
891 * (bt_component_class_sink_consume_method).
893 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
894 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
897 * Defines a description attribute attached to a source component class
898 * descriptor which is attached to the automatic plugin descriptor.
900 * _name: Component class name (C identifier).
901 * _x: Description (C string).
903 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
904 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
907 * Defines a description attribute attached to a filter component class
908 * descriptor which is attached to the automatic plugin descriptor.
910 * _name: Component class name (C identifier).
911 * _x: Description (C string).
913 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
914 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
917 * Defines a description attribute attached to a sink component class
918 * descriptor which is attached to the automatic plugin descriptor.
920 * _name: Component class name (C identifier).
921 * _x: Description (C string).
923 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
924 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
927 * Defines a help attribute attached to a source component class
928 * descriptor which is attached to the automatic plugin descriptor.
930 * _name: Component class name (C identifier).
931 * _x: Help (C string).
933 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
934 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
937 * Defines a help attribute attached to a filter component class
938 * descriptor which is attached to the automatic plugin descriptor.
940 * _name: Component class name (C identifier).
941 * _x: Help (C string).
943 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
944 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
947 * Defines a help attribute attached to a sink component class
948 * descriptor which is attached to the automatic plugin descriptor.
950 * _name: Component class name (C identifier).
951 * _x: Help (C string).
953 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
954 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
957 * Defines an initialization method attribute attached to a source
958 * component class descriptor which is attached to the automatic plugin
961 * _name: Component class name (C identifier).
962 * _x: Initialization method (bt_component_class_init_method).
964 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
965 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
968 * Defines an initialization method attribute attached to a filter
969 * component class descriptor which is attached to the automatic plugin
972 * _name: Component class name (C identifier).
973 * _x: Initialization method (bt_component_class_init_method).
975 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
976 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
979 * Defines an initialization method attribute attached to a sink
980 * component class descriptor which is attached to the automatic plugin
983 * _name: Component class name (C identifier).
984 * _x: Initialization method (bt_component_class_init_method).
986 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
987 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
990 * Defines a finalize method attribute attached to a source component
991 * class descriptor which is attached to the automatic plugin
994 * _name: Component class name (C identifier).
995 * _x: Initialization method (bt_component_class_finalize_method).
997 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
998 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1001 * Defines a finalize method attribute attached to a filter component
1002 * class descriptor which is attached to the automatic plugin
1005 * _name: Component class name (C identifier).
1006 * _x: Initialization method (bt_component_class_finalize_method).
1008 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1009 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1012 * Defines a finalize method attribute attached to a sink component class
1013 * descriptor which is attached to the automatic plugin descriptor.
1015 * _name: Component class name (C identifier).
1016 * _x: Initialization method (bt_component_class_finalize_method).
1018 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1019 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1022 * Defines a query method attribute attached to a source component
1023 * class descriptor which is attached to the automatic plugin
1026 * _name: Component class name (C identifier).
1027 * _x: Initialization method (bt_component_class_query_method).
1029 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1030 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1033 * Defines a query method attribute attached to a filter component
1034 * class descriptor which is attached to the automatic plugin
1037 * _name: Component class name (C identifier).
1038 * _x: Initialization method (bt_component_class_query_method).
1040 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1041 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1044 * Defines a query method attribute attached to a sink component
1045 * class descriptor which is attached to the automatic plugin
1048 * _name: Component class name (C identifier).
1049 * _x: Initialization method (bt_component_class_query_method).
1051 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1052 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1055 * Defines an accept port connection method attribute attached to a
1056 * source component class descriptor which is attached to the automatic
1057 * plugin descriptor.
1059 * _name: Component class name (C identifier).
1060 * _x: Accept port connection method
1061 * (bt_component_class_accept_port_connection_method).
1063 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD(_name, _x) \
1064 BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1067 * Defines an accept port connection method attribute attached to a
1068 * filter component class descriptor which is attached to the automatic
1069 * plugin descriptor.
1071 * _name: Component class name (C identifier).
1072 * _x: Accept port connection method
1073 * (bt_component_class_accept_port_connection_method).
1075 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD(_name, _x) \
1076 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1079 * Defines an accept port connection method attribute attached to a sink
1080 * component class descriptor which is attached to the automatic plugin
1083 * _name: Component class name (C identifier).
1084 * _x: Accept port connection method
1085 * (bt_component_class_accept_port_connection_method).
1087 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD(_name, _x) \
1088 BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1091 * Defines a port connected method attribute attached to a source
1092 * component class descriptor which is attached to the automatic plugin
1095 * _name: Component class name (C identifier).
1096 * _x: Port connected (bt_component_class_port_connected_method).
1098 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_CONNECTED_METHOD(_name, _x) \
1099 BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1102 * Defines a port connected method attribute attached to a filter
1103 * component class descriptor which is attached to the automatic plugin
1106 * _name: Component class name (C identifier).
1107 * _x: Port connected (bt_component_class_port_connected_method).
1109 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_CONNECTED_METHOD(_name, _x) \
1110 BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1113 * Defines a port connected method attribute attached to a sink
1114 * component class descriptor which is attached to the automatic plugin
1117 * _name: Component class name (C identifier).
1118 * _x: Port connected (bt_component_class_port_connected_method).
1120 #define BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD(_name, _x) \
1121 BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1124 * Defines a port disconnected method attribute attached to a source
1125 * component class descriptor which is attached to the automatic plugin
1128 * _name: Component class name (C identifier).
1129 * _x: Port disconnected (bt_component_class_port_disconnected_method).
1131 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD(_name, _x) \
1132 BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1135 * Defines a port disconnected method attribute attached to a filter
1136 * component class descriptor which is attached to the automatic plugin
1139 * _name: Component class name (C identifier).
1140 * _x: Port disconnected (bt_component_class_port_disconnected_method).
1142 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD(_name, _x) \
1143 BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1146 * Defines a port disconnected method attribute attached to a sink
1147 * component class descriptor which is attached to the automatic plugin
1150 * _name: Component class name (C identifier).
1151 * _x: Port disconnected (bt_component_class_port_disconnected_method).
1153 #define BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD(_name, _x) \
1154 BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x)
1157 * Defines an iterator initialization method attribute attached to a
1158 * source component class descriptor which is attached to the automatic
1159 * plugin descriptor.
1161 * _name: Component class name (C identifier).
1162 * _x: Iterator initialization method
1163 * (bt_component_class_notification_iterator_init_method).
1165 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(_name, _x) \
1166 BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1169 * Defines an iterator finalize method attribute attached to a source
1170 * component class descriptor which is attached to the automatic plugin
1173 * _name: Component class name (C identifier).
1174 * _x: Iterator finalize method
1175 * (bt_component_class_notification_iterator_finalize_method).
1177 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD(_name, _x) \
1178 BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1181 * Defines an iterator seek time method attribute attached to a source
1182 * component class descriptor which is attached to the automatic plugin
1185 * _name: Component class name (C identifier).
1186 * _x: Iterator seek time method
1187 * (bt_component_class_notification_iterator_seek_time_method).
1189 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD(_name, _x) \
1190 BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD_WITH_ID(auto, _name, _x)
1193 * Defines an iterator initialization method attribute attached to a
1194 * filter component class descriptor which is attached to the automatic
1195 * plugin descriptor.
1197 * _name: Component class name (C identifier).
1198 * _x: Iterator initialization method
1199 * (bt_component_class_notification_iterator_init_method).
1201 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(_name, _x) \
1202 BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1205 * Defines an iterator finalize method attribute attached to a filter
1206 * component class descriptor which is attached to the automatic plugin
1209 * _name: Component class name (C identifier).
1210 * _x: Iterator finalize method
1211 * (bt_component_class_notification_iterator_finalize_method).
1213 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD(_name, _x) \
1214 BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1217 * Defines an iterator seek time method attribute attached to a filter
1218 * component class descriptor which is attached to the automatic plugin
1221 * _name: Component class name (C identifier).
1222 * _x: Iterator seek time method
1223 * (bt_component_class_notification_iterator_seek_time_method).
1225 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD(_name, _x) \
1226 BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD_WITH_ID(auto, _name, _x)
1232 #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */