lib: remove "accept port" concept
[babeltrace.git] / include / babeltrace2 / plugin / plugin-dev.h
1 #ifndef BABELTRACE_PLUGIN_PLUGIN_DEV_H
2 #define BABELTRACE_PLUGIN_PLUGIN_DEV_H
3
4 /*
5 * This is the header that you need to include for the development of
6 * a Babeltrace plug-in.
7 *
8 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
9 * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included in
19 * all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 * SOFTWARE.
28 */
29
30 #include <stdint.h>
31
32 /* For enum bt_plugin_status */
33 #include <babeltrace2/plugin/plugin-const.h>
34
35 /* For bt_component_class_type */
36 #include <babeltrace2/graph/component-class-const.h>
37
38 /* For component class method type definitions */
39 #include <babeltrace2/graph/component-class-source.h>
40 #include <babeltrace2/graph/component-class-filter.h>
41 #include <babeltrace2/graph/component-class-sink.h>
42
43 /*
44 * _BT_HIDDEN: set the hidden attribute for internal functions
45 * On Windows, symbols are local unless explicitly exported,
46 * see https://gcc.gnu.org/wiki/Visibility
47 */
48 #if defined(_WIN32) || defined(__CYGWIN__)
49 #define _BT_HIDDEN
50 #else
51 #define _BT_HIDDEN __attribute__((visibility("hidden")))
52 #endif
53
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57
58 /*
59 * Plugin interface's version, not synced with Babeltrace's version
60 * (internal use).
61 */
62 #define __BT_PLUGIN_VERSION_MAJOR 1
63 #define __BT_PLUGIN_VERSION_MINOR 0
64
65 /* Plugin initialization function type */
66 typedef enum bt_self_plugin_status {
67 BT_SELF_PLUGIN_STATUS_OK = 0,
68 BT_SELF_PLUGIN_STATUS_NOMEM = -12,
69 BT_SELF_PLUGIN_STATUS_ERROR = -1,
70 } bt_self_plugin_status;
71
72 typedef struct bt_self_plugin bt_self_plugin;
73
74 typedef bt_self_plugin_status (*bt_plugin_init_func)(
75 bt_self_plugin *plugin);
76
77 /* Plugin exit function type */
78 typedef void (*bt_plugin_exit_func)(void);
79
80 /* Plugin descriptor: describes a single plugin (internal use) */
81 struct __bt_plugin_descriptor {
82 /* Plugin's interface major version number */
83 uint32_t major;
84
85 /* Plugin's interface minor version number */
86 uint32_t minor;
87
88 /* Plugin's name */
89 const char *name;
90 } __attribute__((packed));
91
92 /* Type of a plugin attribute (internal use) */
93 enum __bt_plugin_descriptor_attribute_type {
94 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT = 0,
95 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT = 1,
96 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR = 2,
97 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE = 3,
98 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 4,
99 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION = 5,
100 };
101
102 /* Plugin (user) version */
103 struct __bt_plugin_descriptor_version {
104 uint32_t major;
105 uint32_t minor;
106 uint32_t patch;
107 const char *extra;
108 };
109
110 /* Plugin attribute (internal use) */
111 struct __bt_plugin_descriptor_attribute {
112 /* Plugin descriptor to which to associate this attribute */
113 const struct __bt_plugin_descriptor *plugin_descriptor;
114
115 /* Name of the attribute's type for debug purposes */
116 const char *type_name;
117
118 /* Attribute's type */
119 enum __bt_plugin_descriptor_attribute_type type;
120
121 /* Attribute's value (depends on attribute's type) */
122 union {
123 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
124 bt_plugin_init_func init;
125
126 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
127 bt_plugin_exit_func exit;
128
129 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
130 const char *author;
131
132 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
133 const char *license;
134
135 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
136 const char *description;
137
138 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
139 struct __bt_plugin_descriptor_version version;
140 } value;
141 } __attribute__((packed));
142
143 /* Component class descriptor (internal use) */
144 struct __bt_plugin_component_class_descriptor {
145 /*
146 * Plugin descriptor to which to associate this component
147 * class descriptor.
148 */
149 const struct __bt_plugin_descriptor *plugin_descriptor;
150
151 /* Component class name */
152 const char *name;
153
154 /* Component class type */
155 bt_component_class_type type;
156
157 /* Mandatory methods (depends on component class type) */
158 union {
159 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
160 struct {
161 bt_component_class_source_message_iterator_next_method msg_iter_next;
162 } source;
163
164 /* BT_COMPONENT_CLASS_TYPE_FILTER */
165 struct {
166 bt_component_class_filter_message_iterator_next_method msg_iter_next;
167 } filter;
168
169 /* BT_COMPONENT_CLASS_TYPE_SINK */
170 struct {
171 bt_component_class_sink_consume_method consume;
172 } sink;
173 } methods;
174 } __attribute__((packed));
175
176 /* Type of a component class attribute (internal use) */
177 enum __bt_plugin_component_class_descriptor_attribute_type {
178 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 0,
179 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP = 1,
180 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD = 2,
181 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD = 3,
182 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD = 4,
183 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD = 5,
184 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD = 6,
185 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD = 7,
186 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD = 8,
187 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD = 9,
188 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD = 10,
189 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD = 11,
190 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD = 12,
191 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD = 13,
192 };
193
194 /* Component class attribute (internal use) */
195 struct __bt_plugin_component_class_descriptor_attribute {
196 /*
197 * Component class plugin attribute to which to associate this
198 * component class attribute.
199 */
200 const struct __bt_plugin_component_class_descriptor *comp_class_descriptor;
201
202 /* Name of the attribute's type for debug purposes */
203 const char *type_name;
204
205 /* Attribute's type */
206 enum __bt_plugin_component_class_descriptor_attribute_type type;
207
208 /* Attribute's value (depends on attribute's type) */
209 union {
210 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
211 const char *description;
212
213 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
214 const char *help;
215
216 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
217 bt_component_class_source_init_method source_init_method;
218 bt_component_class_filter_init_method filter_init_method;
219 bt_component_class_sink_init_method sink_init_method;
220
221 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
222 bt_component_class_source_finalize_method source_finalize_method;
223 bt_component_class_filter_finalize_method filter_finalize_method;
224 bt_component_class_sink_finalize_method sink_finalize_method;
225
226 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
227 bt_component_class_source_query_method source_query_method;
228 bt_component_class_filter_query_method filter_query_method;
229 bt_component_class_sink_query_method sink_query_method;
230
231 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
232 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method;
233 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method;
234
235 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
236 bt_component_class_source_output_port_connected_method source_output_port_connected_method;
237 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method;
238
239 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */
240 bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method;
241
242 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD */
243 bt_component_class_source_message_iterator_init_method source_msg_iter_init_method;
244 bt_component_class_filter_message_iterator_init_method filter_msg_iter_init_method;
245
246 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
247 bt_component_class_source_message_iterator_finalize_method source_msg_iter_finalize_method;
248 bt_component_class_filter_message_iterator_finalize_method filter_msg_iter_finalize_method;
249
250 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
251 bt_component_class_source_message_iterator_seek_ns_from_origin_method source_msg_iter_seek_ns_from_origin_method;
252 bt_component_class_filter_message_iterator_seek_ns_from_origin_method filter_msg_iter_seek_ns_from_origin_method;
253
254 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
255 bt_component_class_source_message_iterator_seek_beginning_method source_msg_iter_seek_beginning_method;
256 bt_component_class_filter_message_iterator_seek_beginning_method filter_msg_iter_seek_beginning_method;
257
258 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
259 bt_component_class_source_message_iterator_can_seek_ns_from_origin_method source_msg_iter_can_seek_ns_from_origin_method;
260 bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method filter_msg_iter_can_seek_ns_from_origin_method;
261
262 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
263 bt_component_class_source_message_iterator_can_seek_beginning_method source_msg_iter_can_seek_beginning_method;
264 bt_component_class_filter_message_iterator_can_seek_beginning_method filter_msg_iter_can_seek_beginning_method;
265 } value;
266 } __attribute__((packed));
267
268 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void);
269 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void);
270 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
271 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
272 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void);
273 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void);
274 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
275 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
276
277 /*
278 * Variable attributes for a plugin descriptor pointer to be added to
279 * the plugin descriptor section (internal use).
280 */
281 #ifdef __APPLE__
282 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
283 __attribute__((section("__DATA,btp_desc"), used))
284
285 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
286 __start___bt_plugin_descriptors
287
288 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
289 __stop___bt_plugin_descriptors
290
291 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
292 __asm("section$start$__DATA$btp_desc")
293
294 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
295 __asm("section$end$__DATA$btp_desc")
296
297 #else
298
299 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
300 __attribute__((section("__bt_plugin_descriptors"), used))
301
302 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
303 __start___bt_plugin_descriptors
304
305 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
306 __stop___bt_plugin_descriptors
307
308 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
309
310 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
311 #endif
312
313 /*
314 * Variable attributes for a plugin attribute pointer to be added to
315 * the plugin attribute section (internal use).
316 */
317 #ifdef __APPLE__
318 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
319 __attribute__((section("__DATA,btp_desc_att"), used))
320
321 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
322 __start___bt_plugin_descriptor_attributes
323
324 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
325 __stop___bt_plugin_descriptor_attributes
326
327 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
328 __asm("section$start$__DATA$btp_desc_att")
329
330 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
331 __asm("section$end$__DATA$btp_desc_att")
332
333 #else
334
335 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
336 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
337
338 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
339 __start___bt_plugin_descriptor_attributes
340
341 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
342 __stop___bt_plugin_descriptor_attributes
343
344 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
345
346 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
347 #endif
348
349 /*
350 * Variable attributes for a component class descriptor pointer to be
351 * added to the component class descriptor section (internal use).
352 */
353 #ifdef __APPLE__
354 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
355 __attribute__((section("__DATA,btp_cc_desc"), used))
356
357 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
358 __start___bt_plugin_component_class_descriptors
359
360 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
361 __stop___bt_plugin_component_class_descriptors
362
363 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
364 __asm("section$start$__DATA$btp_cc_desc")
365
366 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
367 __asm("section$end$__DATA$btp_cc_desc")
368
369 #else
370
371 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
372 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
373
374 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
375 __start___bt_plugin_component_class_descriptors
376
377 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
378 __stop___bt_plugin_component_class_descriptors
379
380 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
381
382 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
383 #endif
384
385 /*
386 * Variable attributes for a component class descriptor attribute
387 * pointer to be added to the component class descriptor attribute
388 * section (internal use).
389 */
390 #ifdef __APPLE__
391 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
392 __attribute__((section("__DATA,btp_cc_desc_att"), used))
393
394 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
395 __start___bt_plugin_component_class_descriptor_attributes
396
397 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
398 __stop___bt_plugin_component_class_descriptor_attributes
399
400 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
401 __asm("section$start$__DATA$btp_cc_desc_att")
402
403 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
404 __asm("section$end$__DATA$btp_cc_desc_att")
405
406 #else
407
408 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
409 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
410
411 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
412 __start___bt_plugin_component_class_descriptor_attributes
413
414 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
415 __stop___bt_plugin_component_class_descriptor_attributes
416
417 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
418
419 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
420 #endif
421
422 /*
423 * Declares a plugin descriptor pointer variable with a custom ID.
424 *
425 * _id: ID (any valid C identifier except `auto`).
426 */
427 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
428
429 /*
430 * Defines a plugin descriptor with a custom ID.
431 *
432 * _id: ID (any valid C identifier except `auto`).
433 * _name: Plugin's name (C string).
434 */
435 #define BT_PLUGIN_WITH_ID(_id, _name) \
436 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
437 .major = __BT_PLUGIN_VERSION_MAJOR, \
438 .minor = __BT_PLUGIN_VERSION_MINOR, \
439 .name = _name, \
440 }; \
441 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
442
443 /*
444 * Defines a plugin attribute (generic, internal use).
445 *
446 * _attr_name: Name of the attribute (C identifier).
447 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
448 * _id: Plugin descriptor ID (C identifier).
449 * _x: Value.
450 */
451 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
452 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
453 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
454 .type_name = #_attr_name, \
455 .type = _attr_type, \
456 .value._attr_name = _x, \
457 }; \
458 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
459
460 /*
461 * Defines a plugin initialization function attribute attached to a
462 * specific plugin descriptor.
463 *
464 * _id: Plugin descriptor ID (C identifier).
465 * _x: Initialization function (bt_plugin_init_func).
466 */
467 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
468 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
469
470 /*
471 * Defines a plugin exit function attribute attached to a specific
472 * plugin descriptor.
473 *
474 * _id: Plugin descriptor ID (C identifier).
475 * _x: Exit function (bt_plugin_exit_func).
476 */
477 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
478 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
479
480 /*
481 * Defines an author attribute attached to a specific plugin descriptor.
482 *
483 * _id: Plugin descriptor ID (C identifier).
484 * _x: Author (C string).
485 */
486 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
487 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
488
489 /*
490 * Defines a license attribute attached to a specific plugin descriptor.
491 *
492 * _id: Plugin descriptor ID (C identifier).
493 * _x: License (C string).
494 */
495 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
496 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
497
498 /*
499 * Defines a description attribute attached to a specific plugin
500 * descriptor.
501 *
502 * _id: Plugin descriptor ID (C identifier).
503 * _x: Description (C string).
504 */
505 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
506 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
507
508 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
509 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
510
511 /*
512 * Defines a version attribute attached to a specific plugin descriptor.
513 *
514 * _id: Plugin descriptor ID (C identifier).
515 * _major: Plugin's major version (uint32_t).
516 * _minor: Plugin's minor version (uint32_t).
517 * _patch: Plugin's patch version (uint32_t).
518 * _extra: Plugin's version extra information (C string).
519 */
520 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
521 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
522
523 /*
524 * Defines a source component class descriptor with a custom ID.
525 *
526 * _id: ID (any valid C identifier except `auto`).
527 * _comp_class_id: Component class ID (C identifier).
528 * _name: Component class name (C string).
529 * _msg_iter_next_method: Component class's iterator next method
530 * (bt_component_class_source_message_iterator_next_method).
531 */
532 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
533 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
534 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
535 .name = _name, \
536 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
537 .methods.source = { \
538 .msg_iter_next = _msg_iter_next_method, \
539 }, \
540 }; \
541 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
542
543 /*
544 * Defines a filter component class descriptor with a custom ID.
545 *
546 * _id: ID (any valid C identifier except `auto`).
547 * _comp_class_id: Component class ID (C identifier).
548 * _name: Component class name (C string).
549 * _msg_iter_next_method: Component class's iterator next method
550 * (bt_component_class_filter_message_iterator_next_method).
551 */
552 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
553 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
554 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
555 .name = _name, \
556 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
557 .methods.filter = { \
558 .msg_iter_next = _msg_iter_next_method, \
559 }, \
560 }; \
561 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
562
563 /*
564 * Defines a sink component class descriptor with a custom ID.
565 *
566 * _id: ID (any valid C identifier except `auto`).
567 * _comp_class_id: Component class ID (C identifier).
568 * _name: Component class name (C string).
569 * _consume_method: Component class's iterator consume method
570 * (bt_component_class_sink_consume_method).
571 */
572 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
573 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
574 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
575 .name = _name, \
576 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
577 .methods.sink = { \
578 .consume = _consume_method, \
579 }, \
580 }; \
581 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
582
583 /*
584 * Defines a component class descriptor attribute (generic, internal
585 * use).
586 *
587 * _id: Plugin descriptor ID (C identifier).
588 * _comp_class_id: Component class ID (C identifier).
589 * _type: Component class type (`source`, `filter`, or `sink`).
590 * _attr_name: Name of the attribute (C identifier).
591 * _attr_type: Type of the attribute
592 * (enum __bt_plugin_descriptor_attribute_type).
593 * _x: Value.
594 */
595 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
596 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
597 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
598 .type_name = #_attr_name, \
599 .type = _attr_type, \
600 .value._attr_name = _x, \
601 }; \
602 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
603
604 /*
605 * Defines a description attribute attached to a specific source
606 * component class descriptor.
607 *
608 * _id: Plugin descriptor ID (C identifier).
609 * _comp_class_id: Component class descriptor ID (C identifier).
610 * _x: Description (C string).
611 */
612 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
613 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
614
615 /*
616 * Defines a description attribute attached to a specific filter
617 * component class descriptor.
618 *
619 * _id: Plugin descriptor ID (C identifier).
620 * _comp_class_id: Component class descriptor ID (C identifier).
621 * _x: Description (C string).
622 */
623 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
624 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
625
626 /*
627 * Defines a description attribute attached to a specific sink
628 * component class descriptor.
629 *
630 * _id: Plugin descriptor ID (C identifier).
631 * _comp_class_id: Component class descriptor ID (C identifier).
632 * _x: Description (C string).
633 */
634 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
635 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
636
637 /*
638 * Defines a help attribute attached to a specific source component
639 * class descriptor.
640 *
641 * _id: Plugin descriptor ID (C identifier).
642 * _comp_class_id: Component class descriptor ID (C identifier).
643 * _x: Help (C string).
644 */
645 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
646 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
647
648 /*
649 * Defines a help attribute attached to a specific filter component
650 * class descriptor.
651 *
652 * _id: Plugin descriptor ID (C identifier).
653 * _comp_class_id: Component class descriptor ID (C identifier).
654 * _x: Help (C string).
655 */
656 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
657 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
658
659 /*
660 * Defines a help attribute attached to a specific sink component class
661 * descriptor.
662 *
663 * _id: Plugin descriptor ID (C identifier).
664 * _comp_class_id: Component class descriptor ID (C identifier).
665 * _x: Help (C string).
666 */
667 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
668 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
669
670 /*
671 * Defines an initialization method attribute attached to a specific
672 * source component class descriptor.
673 *
674 * _id: Plugin descriptor ID (C identifier).
675 * _comp_class_id: Component class descriptor ID (C identifier).
676 * _x: Initialization method (bt_component_class_source_init_method).
677 */
678 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
679 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
680
681 /*
682 * Defines an initialization method attribute attached to a specific
683 * filter component class descriptor.
684 *
685 * _id: Plugin descriptor ID (C identifier).
686 * _comp_class_id: Component class descriptor ID (C identifier).
687 * _x: Initialization method (bt_component_class_filter_init_method).
688 */
689 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
690 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
691
692 /*
693 * Defines an initialization method attribute attached to a specific
694 * sink component class descriptor.
695 *
696 * _id: Plugin descriptor ID (C identifier).
697 * _comp_class_id: Component class descriptor ID (C identifier).
698 * _x: Initialization method (bt_component_class_sink_init_method).
699 */
700 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
701 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
702
703 /*
704 * Defines a finalization method attribute attached to a specific source
705 * component class descriptor.
706 *
707 * _id: Plugin descriptor ID (C identifier).
708 * _comp_class_id: Component class descriptor ID (C identifier).
709 * _x: Finalize method (bt_component_class_source_finalize_method).
710 */
711 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
712 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
713
714 /*
715 * Defines a finalization method attribute attached to a specific filter
716 * component class descriptor.
717 *
718 * _id: Plugin descriptor ID (C identifier).
719 * _comp_class_id: Component class descriptor ID (C identifier).
720 * _x: Finalize method (bt_component_class_filter_finalize_method).
721 */
722 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
723 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
724
725 /*
726 * Defines a finalization method attribute attached to a specific sink
727 * component class descriptor.
728 *
729 * _id: Plugin descriptor ID (C identifier).
730 * _comp_class_id: Component class descriptor ID (C identifier).
731 * _x: Finalize method (bt_component_class_sink_finalize_method).
732 */
733 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
734 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
735
736 /*
737 * Defines a query method attribute attached to a specific source
738 * component class descriptor.
739 *
740 * _id: Plugin descriptor ID (C identifier).
741 * _comp_class_id: Component class descriptor ID (C identifier).
742 * _x: Finalize method (bt_component_class_source_query_method).
743 */
744 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
745 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
746
747 /*
748 * Defines a query method attribute attached to a specific filter
749 * component class descriptor.
750 *
751 * _id: Plugin descriptor ID (C identifier).
752 * _comp_class_id: Component class descriptor ID (C identifier).
753 * _x: Finalize method (bt_component_class_filter_query_method).
754 */
755 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
756 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
757
758 /*
759 * Defines a query method attribute attached to a specific sink
760 * component class descriptor.
761 *
762 * _id: Plugin descriptor ID (C identifier).
763 * _comp_class_id: Component class descriptor ID (C identifier).
764 * _x: Finalize method (bt_component_class_sink_query_method).
765 */
766 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
767 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
768
769 /*
770 * Defines an input port connected method attribute attached to a
771 * specific filter component class descriptor.
772 *
773 * _id: Plugin descriptor ID (C identifier).
774 * _comp_class_id: Component class descriptor ID (C identifier).
775 * _x: Port connected method
776 * (bt_component_class_filter_input_port_connected_method).
777 */
778 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
779 __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)
780
781 /*
782 * Defines an input port connected method attribute attached to a
783 * specific sink component class descriptor.
784 *
785 * _id: Plugin descriptor ID (C identifier).
786 * _comp_class_id: Component class descriptor ID (C identifier).
787 * _x: Port connected method
788 * (bt_component_class_sink_input_port_connected_method).
789 */
790 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
791 __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)
792
793 /*
794 * Defines an output port connected method attribute attached to a
795 * specific source component class descriptor.
796 *
797 * _id: Plugin descriptor ID (C identifier).
798 * _comp_class_id: Component class descriptor ID (C identifier).
799 * _x: Port connected method
800 * (bt_component_class_source_output_port_connected_method).
801 */
802 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
803 __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)
804
805 /*
806 * Defines an output port connected method attribute attached to a
807 * specific filter component class descriptor.
808 *
809 * _id: Plugin descriptor ID (C identifier).
810 * _comp_class_id: Component class descriptor ID (C identifier).
811 * _x: Port connected method
812 * (bt_component_class_filter_output_port_connected_method).
813 */
814 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
815 __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)
816
817 /*
818 * Defines a "graph is configured" method attribute attached to a
819 * specific sink component class descriptor.
820 *
821 * _id: Plugin descriptor ID (C identifier).
822 * _comp_class_id: Component class descriptor ID (C identifier).
823 * _x: "Graph is configured" method
824 * (bt_component_class_sink_graph_is_configured_method).
825 */
826 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
827 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_graph_is_configured_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD, _id, _comp_class_id, sink, _x)
828
829 /*
830 * Defines an iterator initialization method attribute attached to a
831 * specific source component class descriptor.
832 *
833 * _id: Plugin descriptor ID (C identifier).
834 * _comp_class_id: Component class descriptor ID (C identifier).
835 * _x: Iterator initialization method
836 * (bt_component_class_source_message_iterator_init_method).
837 */
838 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
839 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD, _id, _comp_class_id, source, _x)
840
841 /*
842 * Defines an iterator finalize method attribute attached to a specific
843 * source component class descriptor.
844 *
845 * _id: Plugin descriptor ID (C identifier).
846 * _comp_class_id: Component class descriptor ID (C identifier).
847 * _x: Iterator finalize method
848 * (bt_component_class_source_message_iterator_finalize_method).
849 */
850 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
851 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
852
853 /*
854 * Defines an iterator "seek nanoseconds from origin" method attribute
855 * attached to a specific source component class descriptor.
856 *
857 * _id: Plugin descriptor ID (C identifier).
858 * _comp_class_id: Component class descriptor ID (C identifier).
859 * _x: Iterator "seek nanoseconds from origin" method
860 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
861 */
862 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
863 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, source, _x)
864
865 /*
866 * Defines an iterator "seek beginning" method attribute attached to a
867 * specific source component class descriptor.
868 *
869 * _id: Plugin descriptor ID (C identifier).
870 * _comp_class_id: Component class descriptor ID (C identifier).
871 * _x: Iterator "seek beginning" method
872 * (bt_component_class_source_message_iterator_seek_beginning_method).
873 */
874 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
875 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _id, _comp_class_id, source, _x)
876
877 /*
878 * Defines an iterator "can seek nanoseconds from origin" method
879 * attribute attached to a specific source component class descriptor.
880 *
881 * _id: Plugin descriptor ID (C identifier).
882 * _comp_class_id: Component class descriptor ID (C identifier).
883 * _x: Iterator "can seek nanoseconds from origin" method
884 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
885 */
886 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
887 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, source, _x)
888
889 /*
890 * Defines an iterator "can seek beginning" method attribute attached to a
891 * specific source component class descriptor.
892 *
893 * _id: Plugin descriptor ID (C identifier).
894 * _comp_class_id: Component class descriptor ID (C identifier).
895 * _x: Iterator "can seek beginning" method
896 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
897 */
898 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
899 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _id, _comp_class_id, source, _x)
900
901 /*
902 * Defines an iterator initialization method attribute attached to a
903 * specific filter component class descriptor.
904 *
905 * _id: Plugin descriptor ID (C identifier).
906 * _comp_class_id: Component class descriptor ID (C identifier).
907 * _x: Iterator initialization method
908 * (bt_component_class_filter_message_iterator_init_method).
909 */
910 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
911 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD, _id, _comp_class_id, filter, _x)
912
913 /*
914 * Defines an iterator finalize method attribute attached to a specific
915 * filter component class descriptor.
916 *
917 * _id: Plugin descriptor ID (C identifier).
918 * _comp_class_id: Component class descriptor ID (C identifier).
919 * _x: Iterator finalize method
920 * (bt_component_class_filter_message_iterator_finalize_method).
921 */
922 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
923 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
924
925 /*
926 * Defines an iterator "seek nanoseconds from origin" method attribute
927 * attached to a specific filter component class descriptor.
928 *
929 * _id: Plugin descriptor ID (C identifier).
930 * _comp_class_id: Component class descriptor ID (C identifier).
931 * _x: Iterator "seek nanoseconds from origin" method
932 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
933 */
934 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
935 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, filter, _x)
936
937 /*
938 * Defines an iterator "seek beginning" method attribute attached to a
939 * specific filter component class descriptor.
940 *
941 * _id: Plugin descriptor ID (C identifier).
942 * _comp_class_id: Component class descriptor ID (C identifier).
943 * _x: Iterator "seek beginning" method
944 * (bt_component_class_filter_message_iterator_seek_beginning_method).
945 */
946 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
947 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _id, _comp_class_id, filter, _x)
948
949 /*
950 * Defines an iterator "can seek nanoseconds from origin" method
951 * attribute attached to a specific filter component class descriptor.
952 *
953 * _id: Plugin descriptor ID (C identifier).
954 * _comp_class_id: Component class descriptor ID (C identifier).
955 * _x: Iterator "can seek nanoseconds from origin" method
956 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
957 */
958 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
959 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, filter, _x)
960
961 /*
962 * Defines an iterator "can seek beginning" method attribute attached to a
963 * specific filter component class descriptor.
964 *
965 * _id: Plugin descriptor ID (C identifier).
966 * _comp_class_id: Component class descriptor ID (C identifier).
967 * _x: Iterator "can seek beginning" method
968 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
969 */
970 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
971 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _id, _comp_class_id, filter, _x)
972
973 /*
974 * Defines a plugin descriptor with an automatic ID.
975 *
976 * _name: Plugin's name (C string).
977 */
978 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
979
980 /*
981 * Defines a plugin initialization function attribute attached to the
982 * automatic plugin descriptor.
983 *
984 * _x: Initialization function (bt_plugin_init_func).
985 */
986 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
987
988 /*
989 * Defines a plugin exit function attribute attached to the automatic
990 * plugin descriptor.
991 *
992 * _x: Exit function (bt_plugin_exit_func).
993 */
994 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
995
996 /*
997 * Defines an author attribute attached to the automatic plugin
998 * descriptor.
999 *
1000 * _x: Author (C string).
1001 */
1002 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
1003
1004 /*
1005 * Defines a license attribute attached to the automatic plugin
1006 * descriptor.
1007 *
1008 * _x: License (C string).
1009 */
1010 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
1011
1012 /*
1013 * Defines a description attribute attached to the automatic plugin
1014 * descriptor.
1015 *
1016 * _x: Description (C string).
1017 */
1018 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
1019
1020 /*
1021 * Defines a version attribute attached to the automatic plugin
1022 * descriptor.
1023 *
1024 * _major: Plugin's major version (uint32_t).
1025 * _minor: Plugin's minor version (uint32_t).
1026 * _patch: Plugin's patch version (uint32_t).
1027 * _extra: Plugin's version extra information (C string).
1028 */
1029 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
1030
1031 /*
1032 * Defines a source component class attached to the automatic plugin
1033 * descriptor. Its ID is the same as its name, hence its name must be a
1034 * C identifier in this version.
1035 *
1036 * _name: Component class name (C identifier).
1037 * _msg_iter_next_method: Component class's iterator next method
1038 * (bt_component_class_source_message_iterator_next_method).
1039 */
1040 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1041 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1042
1043 /*
1044 * Defines a filter component class attached to the automatic plugin
1045 * descriptor. Its ID is the same as its name, hence its name must be a
1046 * C identifier in this version.
1047 *
1048 * _name: Component class name (C identifier).
1049 * _msg_iter_next_method: Component class's iterator next method
1050 * (bt_component_class_filter_message_iterator_next_method).
1051 */
1052 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1053 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
1054
1055 /*
1056 * Defines a sink component class attached to the automatic plugin
1057 * descriptor. Its ID is the same as its name, hence its name must be a
1058 * C identifier in this version.
1059 *
1060 * _name: Component class name (C identifier).
1061 * _consume_method: Component class's consume method
1062 * (bt_component_class_sink_consume_method).
1063 */
1064 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1065 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1066
1067 /*
1068 * Defines a description attribute attached to a source component class
1069 * descriptor which is attached to the automatic plugin descriptor.
1070 *
1071 * _name: Component class name (C identifier).
1072 * _x: Description (C string).
1073 */
1074 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1075 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1076
1077 /*
1078 * Defines a description attribute attached to a filter component class
1079 * descriptor which is attached to the automatic plugin descriptor.
1080 *
1081 * _name: Component class name (C identifier).
1082 * _x: Description (C string).
1083 */
1084 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1085 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1086
1087 /*
1088 * Defines a description attribute attached to a sink component class
1089 * descriptor which is attached to the automatic plugin descriptor.
1090 *
1091 * _name: Component class name (C identifier).
1092 * _x: Description (C string).
1093 */
1094 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1095 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1096
1097 /*
1098 * Defines a help attribute attached to a source component class
1099 * descriptor which is attached to the automatic plugin descriptor.
1100 *
1101 * _name: Component class name (C identifier).
1102 * _x: Help (C string).
1103 */
1104 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1105 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1106
1107 /*
1108 * Defines a help attribute attached to a filter component class
1109 * descriptor which is attached to the automatic plugin descriptor.
1110 *
1111 * _name: Component class name (C identifier).
1112 * _x: Help (C string).
1113 */
1114 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1115 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1116
1117 /*
1118 * Defines a help attribute attached to a sink component class
1119 * descriptor which is attached to the automatic plugin descriptor.
1120 *
1121 * _name: Component class name (C identifier).
1122 * _x: Help (C string).
1123 */
1124 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1125 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1126
1127 /*
1128 * Defines an initialization method attribute attached to a source
1129 * component class descriptor which is attached to the automatic plugin
1130 * descriptor.
1131 *
1132 * _name: Component class name (C identifier).
1133 * _x: Initialization method (bt_component_class_source_init_method).
1134 */
1135 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1136 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1137
1138 /*
1139 * Defines an initialization method attribute attached to a filter
1140 * component class descriptor which is attached to the automatic plugin
1141 * descriptor.
1142 *
1143 * _name: Component class name (C identifier).
1144 * _x: Initialization method (bt_component_class_filter_init_method).
1145 */
1146 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1147 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1148
1149 /*
1150 * Defines an initialization method attribute attached to a sink
1151 * component class descriptor which is attached to the automatic plugin
1152 * descriptor.
1153 *
1154 * _name: Component class name (C identifier).
1155 * _x: Initialization method (bt_component_class_sink_init_method).
1156 */
1157 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1158 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1159
1160 /*
1161 * Defines a finalization method attribute attached to a source component
1162 * class descriptor which is attached to the automatic plugin
1163 * descriptor.
1164 *
1165 * _name: Component class name (C identifier).
1166 * _x: Initialization method (bt_component_class_source_finalize_method).
1167 */
1168 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1169 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1170
1171 /*
1172 * Defines a finalization method attribute attached to a filter component
1173 * class descriptor which is attached to the automatic plugin
1174 * descriptor.
1175 *
1176 * _name: Component class name (C identifier).
1177 * _x: Initialization method (bt_component_class_filter_finalize_method).
1178 */
1179 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1180 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1181
1182 /*
1183 * Defines a finalization method attribute attached to a sink component class
1184 * descriptor which is attached to the automatic plugin descriptor.
1185 *
1186 * _name: Component class name (C identifier).
1187 * _x: Initialization method (bt_component_class_sink_finalize_method).
1188 */
1189 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1190 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1191
1192 /*
1193 * Defines a query method attribute attached to a source component
1194 * class descriptor which is attached to the automatic plugin
1195 * descriptor.
1196 *
1197 * _name: Component class name (C identifier).
1198 * _x: Initialization method (bt_component_class_source_query_method).
1199 */
1200 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1201 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1202
1203 /*
1204 * Defines a query method attribute attached to a filter component
1205 * class descriptor which is attached to the automatic plugin
1206 * descriptor.
1207 *
1208 * _name: Component class name (C identifier).
1209 * _x: Initialization method (bt_component_class_filter_query_method).
1210 */
1211 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1212 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1213
1214 /*
1215 * Defines a query method attribute attached to a sink component
1216 * class descriptor which is attached to the automatic plugin
1217 * descriptor.
1218 *
1219 * _name: Component class name (C identifier).
1220 * _x: Initialization method (bt_component_class_sink_query_method).
1221 */
1222 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1223 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1224
1225 /*
1226 * Defines an input port connected method attribute attached to a filter
1227 * component class descriptor which is attached to the automatic plugin
1228 * descriptor.
1229 *
1230 * _name: Component class name (C identifier).
1231 * _x: Port connected (bt_component_class_filter_input_port_connected_method).
1232 */
1233 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1234 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1235
1236 /*
1237 * Defines an input port connected method attribute attached to a sink
1238 * component class descriptor which is attached to the automatic plugin
1239 * descriptor.
1240 *
1241 * _name: Component class name (C identifier).
1242 * _x: Port connected (bt_component_class_sink_input_port_connected_method).
1243 */
1244 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1245 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1246
1247 /*
1248 * Defines an output port connected method attribute attached to a source
1249 * component class descriptor which is attached to the automatic plugin
1250 * descriptor.
1251 *
1252 * _name: Component class name (C identifier).
1253 * _x: Port connected (bt_component_class_source_output_port_connected_method).
1254 */
1255 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1256 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1257
1258 /*
1259 * Defines an output port connected method attribute attached to a filter
1260 * component class descriptor which is attached to the automatic plugin
1261 * descriptor.
1262 *
1263 * _name: Component class name (C identifier).
1264 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
1265 */
1266 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1267 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1268
1269 /*
1270 * Defines a "graph is configured" method attribute attached to
1271 * a sink component class descriptor which is attached to the automatic
1272 * plugin descriptor.
1273 *
1274 * _name: Component class name (C identifier).
1275 * _x: "Graph is configured" method
1276 * (bt_component_class_sink_graph_is_configured_method).
1277 */
1278 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _x) \
1279 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _x)
1280
1281 /*
1282 * Defines an iterator initialization method attribute attached to a
1283 * source component class descriptor which is attached to the automatic
1284 * plugin descriptor.
1285 *
1286 * _name: Component class name (C identifier).
1287 * _x: Iterator initialization method
1288 * (bt_component_class_source_message_iterator_init_method).
1289 */
1290 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1291 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1292
1293 /*
1294 * Defines an iterator finalize method attribute attached to a source
1295 * component class descriptor which is attached to the automatic plugin
1296 * descriptor.
1297 *
1298 * _name: Component class name (C identifier).
1299 * _x: Iterator finalize method
1300 * (bt_component_class_source_message_iterator_finalize_method).
1301 */
1302 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1303 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1304
1305 /*
1306 * Defines an iterator "seek nanoseconds from origin" method attribute
1307 * attached to a source component class descriptor which is attached to
1308 * the automatic plugin descriptor.
1309 *
1310 * _name: Component class name (C identifier).
1311 * _x: Iterator "seek nanoseconds from origin" method
1312 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
1313 */
1314 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1315 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1316
1317 /*
1318 * Defines an iterator "seek beginning" method attribute
1319 * attached to a source component class descriptor which is attached to
1320 * the automatic plugin descriptor.
1321 *
1322 * _name: Component class name (C identifier).
1323 * _x: Iterator "seek beginning" method
1324 * (bt_component_class_source_message_iterator_seek_beginning_method).
1325 */
1326 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1327 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1328
1329 /*
1330 * Defines an iterator "can seek nanoseconds from origin" method
1331 * attribute attached to a source component class descriptor which is
1332 * attached to the automatic plugin descriptor.
1333 *
1334 * _name: Component class name (C identifier).
1335 * _x: Iterator "can seek nanoseconds from origin" method
1336 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
1337 */
1338 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1339 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1340
1341 /*
1342 * Defines an iterator "can seek beginning" method attribute
1343 * attached to a source component class descriptor which is attached to
1344 * the automatic plugin descriptor.
1345 *
1346 * _name: Component class name (C identifier).
1347 * _x: Iterator "can seek beginning" method
1348 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
1349 */
1350 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1351 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1352
1353 /*
1354 * Defines an iterator initialization method attribute attached to a
1355 * filter component class descriptor which is attached to the automatic
1356 * plugin descriptor.
1357 *
1358 * _name: Component class name (C identifier).
1359 * _x: Iterator initialization method
1360 * (bt_component_class_filter_message_iterator_init_method).
1361 */
1362 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1363 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1364
1365 /*
1366 * Defines an iterator finalize method attribute attached to a filter
1367 * component class descriptor which is attached to the automatic plugin
1368 * descriptor.
1369 *
1370 * _name: Component class name (C identifier).
1371 * _x: Iterator finalize method
1372 * (bt_component_class_filter_message_iterator_finalize_method).
1373 */
1374 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1375 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1376
1377 /*
1378 * Defines an iterator "seek nanoseconds from origin" method attribute
1379 * attached to a filter component class descriptor which is attached to
1380 * the automatic plugin descriptor.
1381 *
1382 * _name: Component class name (C identifier).
1383 * _x: Iterator "seek nanoseconds from origin" method
1384 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
1385 */
1386 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1387 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1388
1389 /*
1390 * Defines an iterator "seek beginning" method attribute
1391 * attached to a filter component class descriptor which is attached to
1392 * the automatic plugin descriptor.
1393 *
1394 * _name: Component class name (C identifier).
1395 * _x: Iterator "seek beginning" method
1396 * (bt_component_class_filter_message_iterator_seek_beginning_method).
1397 */
1398 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1399 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1400
1401 /*
1402 * Defines an iterator "can seek nanoseconds from origin" method
1403 * attribute attached to a filter component class descriptor which is
1404 * attached to the automatic plugin descriptor.
1405 *
1406 * _name: Component class name (C identifier).
1407 * _x: Iterator "can seek nanoseconds from origin" method
1408 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
1409 */
1410 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1411 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1412
1413 /*
1414 * Defines an iterator "can seek beginning" method attribute
1415 * attached to a filter component class descriptor which is attached to
1416 * the automatic plugin descriptor.
1417 *
1418 * _name: Component class name (C identifier).
1419 * _x: Iterator "can seek beginning" method
1420 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
1421 */
1422 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1423 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1424
1425 #define BT_PLUGIN_MODULE() \
1426 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
1427 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1428 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
1429 \
1430 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
1431 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1432 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
1433 \
1434 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
1435 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1436 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
1437 \
1438 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; \
1439 _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; \
1440 _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; \
1441 \
1442 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1443 { \
1444 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1445 } \
1446 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1447 { \
1448 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1449 } \
1450 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1451 { \
1452 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1453 } \
1454 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1455 { \
1456 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1457 } \
1458 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1459 { \
1460 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1461 } \
1462 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1463 { \
1464 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1465 } \
1466 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1467 { \
1468 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1469 } \
1470 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1471 { \
1472 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1473 }
1474
1475 #ifdef __cplusplus
1476 }
1477 #endif
1478
1479 #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */
This page took 0.089086 seconds and 5 git commands to generate.