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