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