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