lib: make g++ happy with plugin-dev.h macros
[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>
d24d5663
PP
36#include <babeltrace2/types.h>
37
4581096d
PP
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
33b34c43
PP
49#ifdef __cplusplus
50extern "C" {
51#endif
52
6ba0b073
PP
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 */
d24d5663
PP
61typedef 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;
9724cce9 66
d24d5663 67typedef bt_plugin_init_func_status (*bt_plugin_init_func)(
a21d1cb8 68 bt_self_plugin *plugin);
33b34c43 69
6ba0b073 70/* Plugin exit function type */
9724cce9 71typedef void (*bt_plugin_exit_func)(void);
33b34c43 72
6ba0b073
PP
73/* Plugin descriptor: describes a single plugin (internal use) */
74struct __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) */
86enum __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,
b6de043b
PP
92 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION = 5,
93};
94
95/* Plugin (user) version */
96struct __bt_plugin_descriptor_version {
97 uint32_t major;
98 uint32_t minor;
99 uint32_t patch;
100 const char *extra;
6ba0b073
PP
101};
102
103/* Plugin attribute (internal use) */
104struct __bt_plugin_descriptor_attribute {
105 /* Plugin descriptor to which to associate this attribute */
106 const struct __bt_plugin_descriptor *plugin_descriptor;
107
6ba0b073
PP
108 /* Name of the attribute's type for debug purposes */
109 const char *type_name;
110
857f4dce
PP
111 /* Attribute's type */
112 enum __bt_plugin_descriptor_attribute_type type;
113
d3e4dcd8 114 /* Attribute's value (depends on attribute's type) */
6ba0b073
PP
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;
b6de043b
PP
130
131 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
132 struct __bt_plugin_descriptor_version version;
6ba0b073
PP
133 } value;
134} __attribute__((packed));
135
136/* Component class descriptor (internal use) */
137struct __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
6ba0b073
PP
144 /* Component class name */
145 const char *name;
146
857f4dce 147 /* Component class type */
4cdfc5e8 148 bt_component_class_type type;
857f4dce 149
d3e4dcd8
PP
150 /* Mandatory methods (depends on component class type) */
151 union {
152 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
153 struct {
d6e69534 154 bt_component_class_source_message_iterator_next_method msg_iter_next;
d3e4dcd8
PP
155 } source;
156
157 /* BT_COMPONENT_CLASS_TYPE_FILTER */
158 struct {
d6e69534 159 bt_component_class_filter_message_iterator_next_method msg_iter_next;
d3e4dcd8
PP
160 } filter;
161
162 /* BT_COMPONENT_CLASS_TYPE_SINK */
163 struct {
0d72b8c3 164 bt_component_class_sink_consume_method consume;
d3e4dcd8
PP
165 } sink;
166 } methods;
6ba0b073
PP
167} __attribute__((packed));
168
169/* Type of a component class attribute (internal use) */
170enum __bt_plugin_component_class_descriptor_attribute_type {
d94d92ac
PP
171 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 0,
172 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP = 1,
2b55df78
PP
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,
6ba0b073
PP
186};
187
188/* Component class attribute (internal use) */
189struct __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
6ba0b073
PP
196 /* Name of the attribute's type for debug purposes */
197 const char *type_name;
198
857f4dce
PP
199 /* Attribute's type */
200 enum __bt_plugin_component_class_descriptor_attribute_type type;
201
d3e4dcd8 202 /* Attribute's value (depends on attribute's type) */
6ba0b073 203 union {
d3e4dcd8 204 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
6ba0b073 205 const char *description;
d3e4dcd8 206
279b3f15
PP
207 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
208 const char *help;
209
2b55df78
PP
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
d3e4dcd8 215 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
0d72b8c3
PP
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;
d3e4dcd8 219
64cadc66 220 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
0d72b8c3
PP
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;
d3e4dcd8 224
a67681c1 225 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
0d72b8c3
PP
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;
d94d92ac 229
d94d92ac 230 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
0d72b8c3
PP
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;
72b913fb 233
d94d92ac 234 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
0d72b8c3
PP
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;
0d8b4d8e 237
5badd463
PP
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
d6e69534
PP
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;
d3eb6e8f 244
d6e69534
PP
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;
7474e7d3
PP
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;
6ba0b073
PP
264 } value;
265} __attribute__((packed));
266
52238017
MJ
267struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void);
268struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void);
269struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
270struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
271struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void);
272struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void);
273struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
274struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
275
6ba0b073
PP
276/*
277 * Variable attributes for a plugin descriptor pointer to be added to
278 * the plugin descriptor section (internal use).
279 */
52238017
MJ
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
6ba0b073
PP
298#define __BT_PLUGIN_DESCRIPTOR_ATTRS \
299 __attribute__((section("__bt_plugin_descriptors"), used))
300
52238017
MJ
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
6ba0b073
PP
312/*
313 * Variable attributes for a plugin attribute pointer to be added to
314 * the plugin attribute section (internal use).
315 */
52238017
MJ
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
6ba0b073
PP
334#define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
335 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
336
52238017
MJ
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
6ba0b073
PP
348/*
349 * Variable attributes for a component class descriptor pointer to be
350 * added to the component class descriptor section (internal use).
351 */
52238017
MJ
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
6ba0b073
PP
370#define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
371 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
372
52238017
MJ
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
6ba0b073
PP
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 */
52238017
MJ
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
6ba0b073
PP
407#define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
408 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
409
52238017
MJ
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
6ba0b073
PP
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 }; \
52238017 440 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
6ba0b073
PP
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, \
6ba0b073 453 .type_name = #_attr_name, \
857f4dce 454 .type = _attr_type, \
8a08b7c0 455 .value = { ._attr_name = _x }, \
6ba0b073 456 }; \
52238017 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
6ba0b073
PP
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
b6de043b
PP
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
d3e4dcd8
PP
522/*
523 * Defines a source component class descriptor with a custom ID.
6ba0b073 524 *
d3eb6e8f
PP
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).
d6e69534
PP
528 * _msg_iter_next_method: Component class's iterator next method
529 * (bt_component_class_source_message_iterator_next_method).
6ba0b073 530 */
d6e69534 531#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
d3e4dcd8 532 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
8a08b7c0
SM
533 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
534 .name = _name, \
535 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
536 .methods = { .source = { .msg_iter_next = _msg_iter_next_method } }, \
537 }; \
52238017 538 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id
d3e4dcd8
PP
539
540/*
541 * Defines a filter component class descriptor with a custom ID.
542 *
d94d92ac
PP
543 * _id: ID (any valid C identifier except `auto`).
544 * _comp_class_id: Component class ID (C identifier).
545 * _name: Component class name (C string).
d6e69534
PP
546 * _msg_iter_next_method: Component class's iterator next method
547 * (bt_component_class_filter_message_iterator_next_method).
d3e4dcd8 548 */
d6e69534 549#define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
d3e4dcd8 550 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
8a08b7c0
SM
551 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
552 .name = _name, \
553 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
554 .methods = { .filter = { .msg_iter_next = _msg_iter_next_method } }, \
555 }; \
52238017 556 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
557
558/*
559 * Defines a sink component class descriptor with a custom ID.
560 *
561 * _id: ID (any valid C identifier except `auto`).
562 * _comp_class_id: Component class ID (C identifier).
563 * _name: Component class name (C string).
564 * _consume_method: Component class's iterator consume method
0d72b8c3 565 * (bt_component_class_sink_consume_method).
d3e4dcd8
PP
566 */
567#define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
568 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
569 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
d3e4dcd8 570 .name = _name, \
857f4dce 571 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
8a08b7c0 572 .methods = { .sink = { .consume = _consume_method } }, \
d3e4dcd8 573 }; \
52238017 574 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
575
576/*
577 * Defines a component class descriptor attribute (generic, internal
578 * use).
579 *
580 * _id: Plugin descriptor ID (C identifier).
581 * _comp_class_id: Component class ID (C identifier).
d3e4dcd8 582 * _type: Component class type (`source`, `filter`, or `sink`).
6ba0b073
PP
583 * _attr_name: Name of the attribute (C identifier).
584 * _attr_type: Type of the attribute
585 * (enum __bt_plugin_descriptor_attribute_type).
586 * _x: Value.
587 */
588#define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
d3e4dcd8
PP
589 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
590 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
6ba0b073 591 .type_name = #_attr_name, \
857f4dce 592 .type = _attr_type, \
8a08b7c0 593 .value = { ._attr_name = _x }, \
6ba0b073 594 }; \
52238017 595 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
596
597/*
d3e4dcd8
PP
598 * Defines a description attribute attached to a specific source
599 * component class descriptor.
6ba0b073
PP
600 *
601 * _id: Plugin descriptor ID (C identifier).
602 * _comp_class_id: Component class descriptor ID (C identifier).
6ba0b073
PP
603 * _x: Description (C string).
604 */
d3e4dcd8
PP
605#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
606 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
607
608/*
609 * Defines a description attribute attached to a specific filter
610 * component class descriptor.
611 *
612 * _id: Plugin descriptor ID (C identifier).
613 * _comp_class_id: Component class descriptor ID (C identifier).
614 * _x: Description (C string).
615 */
616#define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
617 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
618
619/*
620 * Defines a description attribute attached to a specific sink
621 * component class descriptor.
622 *
623 * _id: Plugin descriptor ID (C identifier).
624 * _comp_class_id: Component class descriptor ID (C identifier).
625 * _x: Description (C string).
626 */
627#define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
628 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
629
279b3f15
PP
630/*
631 * Defines a help attribute attached to a specific source component
632 * class descriptor.
633 *
634 * _id: Plugin descriptor ID (C identifier).
635 * _comp_class_id: Component class descriptor ID (C identifier).
636 * _x: Help (C string).
637 */
638#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
639 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
640
641/*
642 * Defines a help attribute attached to a specific filter component
643 * class descriptor.
644 *
645 * _id: Plugin descriptor ID (C identifier).
646 * _comp_class_id: Component class descriptor ID (C identifier).
647 * _x: Help (C string).
648 */
649#define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
650 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
651
652/*
653 * Defines a help attribute attached to a specific sink component class
654 * descriptor.
655 *
656 * _id: Plugin descriptor ID (C identifier).
657 * _comp_class_id: Component class descriptor ID (C identifier).
658 * _x: Help (C string).
659 */
660#define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
661 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
662
d3e4dcd8
PP
663/*
664 * Defines an initialization method attribute attached to a specific
665 * source component class descriptor.
666 *
667 * _id: Plugin descriptor ID (C identifier).
668 * _comp_class_id: Component class descriptor ID (C identifier).
0d72b8c3 669 * _x: Initialization method (bt_component_class_source_init_method).
d3e4dcd8
PP
670 */
671#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
d94d92ac 672 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
d3e4dcd8
PP
673
674/*
675 * Defines an initialization method attribute attached to a specific
676 * filter component class descriptor.
677 *
678 * _id: Plugin descriptor ID (C identifier).
679 * _comp_class_id: Component class descriptor ID (C identifier).
0d72b8c3 680 * _x: Initialization method (bt_component_class_filter_init_method).
d3e4dcd8
PP
681 */
682#define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
d94d92ac 683 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
d3e4dcd8
PP
684
685/*
686 * Defines an initialization method attribute attached to a specific
687 * sink component class descriptor.
688 *
689 * _id: Plugin descriptor ID (C identifier).
690 * _comp_class_id: Component class descriptor ID (C identifier).
0d72b8c3 691 * _x: Initialization method (bt_component_class_sink_init_method).
d3e4dcd8
PP
692 */
693#define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
d94d92ac 694 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
d3e4dcd8 695
2b55df78
PP
696/*
697 * Defines a "get supported MIP versions" attribute attached to a
698 * specific source component class descriptor.
699 *
700 * _id: Plugin descriptor ID (C identifier).
701 * _comp_class_id: Component class descriptor ID (C identifier).
702 * _x: "Get supported MIP versions" method (bt_component_class_source_get_supported_mip_versions_method).
703 */
704#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_WITH_ID(_id, _comp_class_id, _x) \
705 __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)
706
707/*
708 * Defines a "get supported MIP versions" attribute attached to a
709 * specific filter component class descriptor.
710 *
711 * _id: Plugin descriptor ID (C identifier).
712 * _comp_class_id: Component class descriptor ID (C identifier).
713 * _x: "Get supported MIP versions" method (bt_component_class_filter_get_supported_mip_versions_method).
714 */
715#define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_WITH_ID(_id, _comp_class_id, _x) \
716 __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)
717
718/*
719 * Defines a "get supported MIP versions" attribute attached to a
720 * specific sink component class descriptor.
721 *
722 * _id: Plugin descriptor ID (C identifier).
723 * _comp_class_id: Component class descriptor ID (C identifier).
724 * _x: "Get supported MIP versions" method (bt_component_class_sink_get_supported_mip_versions_method).
725 */
726#define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_WITH_ID(_id, _comp_class_id, _x) \
727 __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)
728
d3e4dcd8 729/*
d94d92ac 730 * Defines a finalization method attribute attached to a specific source
d3e4dcd8
PP
731 * component class descriptor.
732 *
733 * _id: Plugin descriptor ID (C identifier).
734 * _comp_class_id: Component class descriptor ID (C identifier).
0d72b8c3 735 * _x: Finalize method (bt_component_class_source_finalize_method).
d3e4dcd8 736 */
64cadc66 737#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
d94d92ac 738 __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
739
740/*
d94d92ac 741 * Defines a finalization method attribute attached to a specific filter
d3e4dcd8
PP
742 * component class descriptor.
743 *
744 * _id: Plugin descriptor ID (C identifier).
745 * _comp_class_id: Component class descriptor ID (C identifier).
0d72b8c3 746 * _x: Finalize method (bt_component_class_filter_finalize_method).
d3e4dcd8 747 */
64cadc66 748#define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
d94d92ac 749 __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
750
751/*
d94d92ac 752 * Defines a finalization method attribute attached to a specific sink
d3e4dcd8
PP
753 * component class descriptor.
754 *
755 * _id: Plugin descriptor ID (C identifier).
756 * _comp_class_id: Component class descriptor ID (C identifier).
0d72b8c3 757 * _x: Finalize method (bt_component_class_sink_finalize_method).
d3e4dcd8 758 */
64cadc66 759#define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
d94d92ac 760 __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 761
8463eac2 762/*
a67681c1 763 * Defines a query method attribute attached to a specific source
8463eac2
PP
764 * component class descriptor.
765 *
766 * _id: Plugin descriptor ID (C identifier).
767 * _comp_class_id: Component class descriptor ID (C identifier).
0d72b8c3 768 * _x: Finalize method (bt_component_class_source_query_method).
8463eac2 769 */
a67681c1 770#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
d94d92ac 771 __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
772
773/*
a67681c1 774 * Defines a query method attribute attached to a specific filter
8463eac2
PP
775 * component class descriptor.
776 *
777 * _id: Plugin descriptor ID (C identifier).
778 * _comp_class_id: Component class descriptor ID (C identifier).
0d72b8c3 779 * _x: Finalize method (bt_component_class_filter_query_method).
8463eac2 780 */
a67681c1 781#define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
d94d92ac 782 __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
783
784/*
a67681c1 785 * Defines a query method attribute attached to a specific sink
8463eac2
PP
786 * component class descriptor.
787 *
788 * _id: Plugin descriptor ID (C identifier).
789 * _comp_class_id: Component class descriptor ID (C identifier).
0d72b8c3 790 * _x: Finalize method (bt_component_class_sink_query_method).
8463eac2 791 */
a67681c1 792#define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
d94d92ac 793 __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 794
d94d92ac
PP
795/*
796 * Defines an input port connected method attribute attached to a
797 * specific filter component class descriptor.
0d8b4d8e
PP
798 *
799 * _id: Plugin descriptor ID (C identifier).
800 * _comp_class_id: Component class descriptor ID (C identifier).
801 * _x: Port connected method
0d72b8c3 802 * (bt_component_class_filter_input_port_connected_method).
0d8b4d8e 803 */
d94d92ac
PP
804#define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
805 __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
806
807/*
d94d92ac
PP
808 * Defines an input port connected method attribute attached to a
809 * specific sink component class descriptor.
0d8b4d8e
PP
810 *
811 * _id: Plugin descriptor ID (C identifier).
812 * _comp_class_id: Component class descriptor ID (C identifier).
813 * _x: Port connected method
0d72b8c3 814 * (bt_component_class_sink_input_port_connected_method).
0d8b4d8e 815 */
d94d92ac
PP
816#define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
817 __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
818
819/*
d94d92ac
PP
820 * Defines an output port connected method attribute attached to a
821 * specific source component class descriptor.
0d8b4d8e
PP
822 *
823 * _id: Plugin descriptor ID (C identifier).
824 * _comp_class_id: Component class descriptor ID (C identifier).
825 * _x: Port connected method
0d72b8c3 826 * (bt_component_class_source_output_port_connected_method).
0d8b4d8e 827 */
d94d92ac
PP
828#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
829 __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 830
72b913fb 831/*
d94d92ac
PP
832 * Defines an output port connected method attribute attached to a
833 * specific filter component class descriptor.
834 *
835 * _id: Plugin descriptor ID (C identifier).
836 * _comp_class_id: Component class descriptor ID (C identifier).
837 * _x: Port connected method
0d72b8c3 838 * (bt_component_class_filter_output_port_connected_method).
d94d92ac
PP
839 */
840#define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
841 __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)
842
5badd463
PP
843/*
844 * Defines a "graph is configured" method attribute attached to a
845 * specific sink component class descriptor.
846 *
847 * _id: Plugin descriptor ID (C identifier).
848 * _comp_class_id: Component class descriptor ID (C identifier).
849 * _x: "Graph is configured" method
850 * (bt_component_class_sink_graph_is_configured_method).
851 */
852#define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
853 __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)
854
d3eb6e8f
PP
855/*
856 * Defines an iterator initialization method attribute attached to a
857 * specific source component class descriptor.
858 *
859 * _id: Plugin descriptor ID (C identifier).
860 * _comp_class_id: Component class descriptor ID (C identifier).
861 * _x: Iterator initialization method
d6e69534 862 * (bt_component_class_source_message_iterator_init_method).
d3eb6e8f 863 */
d6e69534
PP
864#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
865 __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)
d3eb6e8f
PP
866
867/*
64cadc66 868 * Defines an iterator finalize method attribute attached to a specific
d3eb6e8f
PP
869 * source component class descriptor.
870 *
871 * _id: Plugin descriptor ID (C identifier).
872 * _comp_class_id: Component class descriptor ID (C identifier).
64cadc66 873 * _x: Iterator finalize method
d6e69534 874 * (bt_component_class_source_message_iterator_finalize_method).
d3eb6e8f 875 */
d6e69534
PP
876#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
877 __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)
d3eb6e8f 878
7474e7d3
PP
879/*
880 * Defines an iterator "seek nanoseconds from origin" method attribute
881 * attached to a specific source component class descriptor.
882 *
883 * _id: Plugin descriptor ID (C identifier).
884 * _comp_class_id: Component class descriptor ID (C identifier).
885 * _x: Iterator "seek nanoseconds from origin" method
886 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
887 */
888#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
889 __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)
890
891/*
892 * Defines an iterator "seek beginning" method attribute attached to a
893 * specific source component class descriptor.
894 *
895 * _id: Plugin descriptor ID (C identifier).
896 * _comp_class_id: Component class descriptor ID (C identifier).
897 * _x: Iterator "seek beginning" method
898 * (bt_component_class_source_message_iterator_seek_beginning_method).
899 */
900#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
901 __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)
902
903/*
904 * Defines an iterator "can seek nanoseconds from origin" method
905 * attribute attached to a specific source component class descriptor.
906 *
907 * _id: Plugin descriptor ID (C identifier).
908 * _comp_class_id: Component class descriptor ID (C identifier).
909 * _x: Iterator "can seek nanoseconds from origin" method
910 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
911 */
912#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
913 __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)
914
915/*
916 * Defines an iterator "can seek beginning" method attribute attached to a
917 * specific source component class descriptor.
918 *
919 * _id: Plugin descriptor ID (C identifier).
920 * _comp_class_id: Component class descriptor ID (C identifier).
921 * _x: Iterator "can seek beginning" method
922 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
923 */
924#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
925 __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)
926
d3eb6e8f
PP
927/*
928 * Defines an iterator initialization method attribute attached to a
929 * specific filter component class descriptor.
930 *
931 * _id: Plugin descriptor ID (C identifier).
932 * _comp_class_id: Component class descriptor ID (C identifier).
933 * _x: Iterator initialization method
d6e69534 934 * (bt_component_class_filter_message_iterator_init_method).
d3eb6e8f 935 */
d6e69534
PP
936#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
937 __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)
d3eb6e8f
PP
938
939/*
64cadc66 940 * Defines an iterator finalize method attribute attached to a specific
d3eb6e8f
PP
941 * filter component class descriptor.
942 *
943 * _id: Plugin descriptor ID (C identifier).
944 * _comp_class_id: Component class descriptor ID (C identifier).
64cadc66 945 * _x: Iterator finalize method
d6e69534 946 * (bt_component_class_filter_message_iterator_finalize_method).
d3eb6e8f 947 */
d6e69534
PP
948#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
949 __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)
d3eb6e8f 950
7474e7d3
PP
951/*
952 * Defines an iterator "seek nanoseconds from origin" method attribute
953 * attached to a specific filter component class descriptor.
954 *
955 * _id: Plugin descriptor ID (C identifier).
956 * _comp_class_id: Component class descriptor ID (C identifier).
957 * _x: Iterator "seek nanoseconds from origin" method
958 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
959 */
960#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
961 __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)
962
963/*
964 * Defines an iterator "seek beginning" method attribute attached to a
965 * specific filter component class descriptor.
966 *
967 * _id: Plugin descriptor ID (C identifier).
968 * _comp_class_id: Component class descriptor ID (C identifier).
969 * _x: Iterator "seek beginning" method
970 * (bt_component_class_filter_message_iterator_seek_beginning_method).
971 */
972#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
973 __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)
974
975/*
976 * Defines an iterator "can seek nanoseconds from origin" method
977 * attribute attached to a specific filter component class descriptor.
978 *
979 * _id: Plugin descriptor ID (C identifier).
980 * _comp_class_id: Component class descriptor ID (C identifier).
981 * _x: Iterator "can seek nanoseconds from origin" method
982 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
983 */
984#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \
985 __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)
986
987/*
988 * Defines an iterator "can seek beginning" method attribute attached to a
989 * specific filter component class descriptor.
990 *
991 * _id: Plugin descriptor ID (C identifier).
992 * _comp_class_id: Component class descriptor ID (C identifier).
993 * _x: Iterator "can seek beginning" method
994 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
995 */
996#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \
997 __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)
998
6ba0b073
PP
999/*
1000 * Defines a plugin descriptor with an automatic ID.
1001 *
1002 * _name: Plugin's name (C string).
1003 */
1004#define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
1005
1006/*
1007 * Defines a plugin initialization function attribute attached to the
1008 * automatic plugin descriptor.
1009 *
1010 * _x: Initialization function (bt_plugin_init_func).
1011 */
1012#define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
1013
1014 /*
1015 * Defines a plugin exit function attribute attached to the automatic
1016 * plugin descriptor.
1017 *
1018 * _x: Exit function (bt_plugin_exit_func).
1019 */
1020#define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
1021
1022/*
1023 * Defines an author attribute attached to the automatic plugin
1024 * descriptor.
1025 *
1026 * _x: Author (C string).
1027 */
1028#define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
1029
1030/*
1031 * Defines a license attribute attached to the automatic plugin
1032 * descriptor.
1033 *
1034 * _x: License (C string).
1035 */
1036#define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
1037
1038/*
1039 * Defines a description attribute attached to the automatic plugin
1040 * descriptor.
1041 *
1042 * _x: Description (C string).
1043 */
1044#define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
b6de043b
PP
1045
1046/*
1047 * Defines a version attribute attached to the automatic plugin
1048 * descriptor.
1049 *
1050 * _major: Plugin's major version (uint32_t).
1051 * _minor: Plugin's minor version (uint32_t).
1052 * _patch: Plugin's patch version (uint32_t).
1053 * _extra: Plugin's version extra information (C string).
1054 */
1055#define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
6ba0b073
PP
1056
1057/*
d3e4dcd8
PP
1058 * Defines a source component class attached to the automatic plugin
1059 * descriptor. Its ID is the same as its name, hence its name must be a
1060 * C identifier in this version.
1061 *
d3eb6e8f 1062 * _name: Component class name (C identifier).
d6e69534
PP
1063 * _msg_iter_next_method: Component class's iterator next method
1064 * (bt_component_class_source_message_iterator_next_method).
d3e4dcd8 1065 */
d6e69534
PP
1066#define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1067 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
d3e4dcd8
PP
1068
1069/*
1070 * Defines a filter component class attached to the automatic plugin
6ba0b073
PP
1071 * descriptor. Its ID is the same as its name, hence its name must be a
1072 * C identifier in this version.
1073 *
d3eb6e8f 1074 * _name: Component class name (C identifier).
d6e69534
PP
1075 * _msg_iter_next_method: Component class's iterator next method
1076 * (bt_component_class_filter_message_iterator_next_method).
6ba0b073 1077 */
d6e69534
PP
1078#define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _msg_iter_next_method) \
1079 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
6ba0b073
PP
1080
1081/*
d3e4dcd8
PP
1082 * Defines a sink component class attached to the automatic plugin
1083 * descriptor. Its ID is the same as its name, hence its name must be a
1084 * C identifier in this version.
1085 *
1086 * _name: Component class name (C identifier).
1087 * _consume_method: Component class's consume method
0d72b8c3 1088 * (bt_component_class_sink_consume_method).
d3e4dcd8
PP
1089 */
1090#define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
1091 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
1092
1093/*
1094 * Defines a description attribute attached to a source component class
6ba0b073
PP
1095 * descriptor which is attached to the automatic plugin descriptor.
1096 *
d3e4dcd8
PP
1097 * _name: Component class name (C identifier).
1098 * _x: Description (C string).
1099 */
1100#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1101 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1102
1103/*
1104 * Defines a description attribute attached to a filter component class
1105 * descriptor which is attached to the automatic plugin descriptor.
1106 *
1107 * _name: Component class name (C identifier).
1108 * _x: Description (C string).
1109 */
1110#define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1111 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1112
1113/*
1114 * Defines a description attribute attached to a sink component class
1115 * descriptor which is attached to the automatic plugin descriptor.
1116 *
1117 * _name: Component class name (C identifier).
1118 * _x: Description (C string).
1119 */
1120#define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1121 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1122
279b3f15
PP
1123/*
1124 * Defines a help attribute attached to a source component class
1125 * descriptor which is attached to the automatic plugin descriptor.
1126 *
1127 * _name: Component class name (C identifier).
1128 * _x: Help (C string).
1129 */
1130#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1131 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1132
1133/*
1134 * Defines a help attribute attached to a filter component class
1135 * descriptor which is attached to the automatic plugin descriptor.
1136 *
1137 * _name: Component class name (C identifier).
1138 * _x: Help (C string).
1139 */
1140#define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1141 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1142
1143/*
1144 * Defines a help attribute attached to a sink component class
1145 * descriptor which is attached to the automatic plugin descriptor.
1146 *
1147 * _name: Component class name (C identifier).
1148 * _x: Help (C string).
1149 */
1150#define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1151 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1152
d3e4dcd8
PP
1153/*
1154 * Defines an initialization method attribute attached to a source
1155 * component class descriptor which is attached to the automatic plugin
1156 * descriptor.
1157 *
1158 * _name: Component class name (C identifier).
0d72b8c3 1159 * _x: Initialization method (bt_component_class_source_init_method).
d3e4dcd8
PP
1160 */
1161#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1162 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1163
1164/*
1165 * Defines an initialization method attribute attached to a filter
1166 * component 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_filter_init_method).
d3e4dcd8
PP
1171 */
1172#define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1173 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1174
1175/*
1176 * Defines an initialization method attribute attached to a sink
1177 * component 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_sink_init_method).
d3e4dcd8
PP
1182 */
1183#define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1184 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1185
2b55df78
PP
1186/*
1187 * Defines a "get supported MIP versions" method attribute attached to a
1188 * source component class descriptor which is attached to the automatic
1189 * plugin descriptor.
1190 *
1191 * _name: Component class name (C identifier).
1192 * _x: Initialization method (bt_component_class_source_get_supported_mip_versions_method).
1193 */
1194#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _x) \
1195 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _x)
1196
1197/*
1198 * Defines a "get supported MIP versions" method attribute attached to a
1199 * filter component class descriptor which is attached to the automatic
1200 * plugin descriptor.
1201 *
1202 * _name: Component class name (C identifier).
1203 * _x: Initialization method (bt_component_class_filter_get_supported_mip_versions_method).
1204 */
1205#define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _x) \
1206 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _x)
1207
1208/*
1209 * Defines a "get supported MIP versions" method attribute attached to a
1210 * sink component class descriptor which is attached to the automatic
1211 * plugin descriptor.
1212 *
1213 * _name: Component class name (C identifier).
1214 * _x: Initialization method (bt_component_class_sink_get_supported_mip_versions_method).
1215 */
1216#define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _x) \
1217 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _x)
1218
d3e4dcd8 1219/*
d94d92ac 1220 * Defines a finalization method attribute attached to a source component
d3e4dcd8
PP
1221 * class descriptor which is attached to the automatic plugin
1222 * descriptor.
1223 *
1224 * _name: Component class name (C identifier).
0d72b8c3 1225 * _x: Initialization method (bt_component_class_source_finalize_method).
d3e4dcd8 1226 */
64cadc66
PP
1227#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1228 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
d3e4dcd8
PP
1229
1230/*
d94d92ac 1231 * Defines a finalization method attribute attached to a filter component
d3e4dcd8
PP
1232 * class descriptor which is attached to the automatic plugin
1233 * descriptor.
1234 *
1235 * _name: Component class name (C identifier).
0d72b8c3 1236 * _x: Initialization method (bt_component_class_filter_finalize_method).
d3e4dcd8 1237 */
64cadc66
PP
1238#define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1239 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
d3e4dcd8
PP
1240
1241/*
d94d92ac 1242 * Defines a finalization method attribute attached to a sink component class
d3e4dcd8
PP
1243 * descriptor which is attached to the automatic plugin descriptor.
1244 *
1245 * _name: Component class name (C identifier).
0d72b8c3 1246 * _x: Initialization method (bt_component_class_sink_finalize_method).
d3e4dcd8 1247 */
64cadc66
PP
1248#define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1249 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
d3e4dcd8 1250
8463eac2 1251/*
a67681c1 1252 * Defines a query method attribute attached to a source component
8463eac2
PP
1253 * class descriptor which is attached to the automatic plugin
1254 * descriptor.
1255 *
1256 * _name: Component class name (C identifier).
0d72b8c3 1257 * _x: Initialization method (bt_component_class_source_query_method).
8463eac2 1258 */
a67681c1
PP
1259#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1260 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
8463eac2
PP
1261
1262/*
a67681c1 1263 * Defines a query method attribute attached to a filter component
8463eac2
PP
1264 * class descriptor which is attached to the automatic plugin
1265 * descriptor.
1266 *
1267 * _name: Component class name (C identifier).
0d72b8c3 1268 * _x: Initialization method (bt_component_class_filter_query_method).
8463eac2 1269 */
a67681c1
PP
1270#define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1271 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
8463eac2
PP
1272
1273/*
a67681c1 1274 * Defines a query method attribute attached to a sink component
8463eac2
PP
1275 * class descriptor which is attached to the automatic plugin
1276 * descriptor.
1277 *
1278 * _name: Component class name (C identifier).
0d72b8c3 1279 * _x: Initialization method (bt_component_class_sink_query_method).
8463eac2 1280 */
a67681c1
PP
1281#define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1282 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
8463eac2 1283
0d8b4d8e 1284/*
d94d92ac 1285 * Defines an input port connected method attribute attached to a filter
0d8b4d8e
PP
1286 * component class descriptor which is attached to the automatic plugin
1287 * descriptor.
1288 *
1289 * _name: Component class name (C identifier).
0d72b8c3 1290 * _x: Port connected (bt_component_class_filter_input_port_connected_method).
0d8b4d8e 1291 */
d94d92ac
PP
1292#define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1293 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
0d8b4d8e
PP
1294
1295/*
d94d92ac 1296 * Defines an input port connected method attribute attached to a sink
0d8b4d8e
PP
1297 * component class descriptor which is attached to the automatic plugin
1298 * descriptor.
1299 *
1300 * _name: Component class name (C identifier).
0d72b8c3 1301 * _x: Port connected (bt_component_class_sink_input_port_connected_method).
0d8b4d8e 1302 */
d94d92ac
PP
1303#define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1304 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
0d8b4d8e 1305
2d41b99e 1306/*
d94d92ac 1307 * Defines an output port connected method attribute attached to a source
72b913fb
PP
1308 * component class descriptor which is attached to the automatic plugin
1309 * descriptor.
1310 *
1311 * _name: Component class name (C identifier).
0d72b8c3 1312 * _x: Port connected (bt_component_class_source_output_port_connected_method).
72b913fb 1313 */
d94d92ac
PP
1314#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1315 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
72b913fb
PP
1316
1317/*
d94d92ac 1318 * Defines an output port connected method attribute attached to a filter
72b913fb
PP
1319 * component class descriptor which is attached to the automatic plugin
1320 * descriptor.
1321 *
1322 * _name: Component class name (C identifier).
0d72b8c3 1323 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
72b913fb 1324 */
d94d92ac
PP
1325#define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1326 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
72b913fb 1327
5badd463
PP
1328/*
1329 * Defines a "graph is configured" method attribute attached to
1330 * a sink component class descriptor which is attached to the automatic
1331 * plugin descriptor.
1332 *
1333 * _name: Component class name (C identifier).
1334 * _x: "Graph is configured" method
1335 * (bt_component_class_sink_graph_is_configured_method).
1336 */
1337#define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _x) \
1338 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _x)
1339
d3eb6e8f
PP
1340/*
1341 * Defines an iterator initialization method attribute attached to a
1342 * source component class descriptor which is attached to the automatic
1343 * plugin descriptor.
1344 *
1345 * _name: Component class name (C identifier).
1346 * _x: Iterator initialization method
d6e69534 1347 * (bt_component_class_source_message_iterator_init_method).
d3eb6e8f 1348 */
d6e69534
PP
1349#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1350 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
d3eb6e8f
PP
1351
1352/*
64cadc66 1353 * Defines an iterator finalize method attribute attached to a source
d3eb6e8f
PP
1354 * component class descriptor which is attached to the automatic plugin
1355 * descriptor.
1356 *
1357 * _name: Component class name (C identifier).
64cadc66 1358 * _x: Iterator finalize method
d6e69534 1359 * (bt_component_class_source_message_iterator_finalize_method).
d3eb6e8f 1360 */
d6e69534
PP
1361#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1362 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
d3eb6e8f 1363
7474e7d3
PP
1364/*
1365 * Defines an iterator "seek nanoseconds from origin" method attribute
1366 * attached to a source component class descriptor which is attached to
1367 * the automatic plugin descriptor.
1368 *
1369 * _name: Component class name (C identifier).
1370 * _x: Iterator "seek nanoseconds from origin" method
1371 * (bt_component_class_source_message_iterator_seek_ns_from_origin_method).
1372 */
1373#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1374 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1375
1376/*
1377 * Defines an iterator "seek beginning" method attribute
1378 * attached to a source component class descriptor which is attached to
1379 * the automatic plugin descriptor.
1380 *
1381 * _name: Component class name (C identifier).
1382 * _x: Iterator "seek beginning" method
1383 * (bt_component_class_source_message_iterator_seek_beginning_method).
1384 */
1385#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1386 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1387
1388/*
1389 * Defines an iterator "can seek nanoseconds from origin" method
1390 * attribute attached to a source component class descriptor which is
1391 * attached to the automatic plugin descriptor.
1392 *
1393 * _name: Component class name (C identifier).
1394 * _x: Iterator "can seek nanoseconds from origin" method
1395 * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method).
1396 */
1397#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1398 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1399
1400/*
1401 * Defines an iterator "can seek beginning" method attribute
1402 * attached to a source component class descriptor which is attached to
1403 * the automatic plugin descriptor.
1404 *
1405 * _name: Component class name (C identifier).
1406 * _x: Iterator "can seek beginning" method
1407 * (bt_component_class_source_message_iterator_can_seek_beginning_method).
1408 */
1409#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1410 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1411
d3eb6e8f
PP
1412/*
1413 * Defines an iterator initialization method attribute attached to a
1414 * filter component class descriptor which is attached to the automatic
1415 * plugin descriptor.
1416 *
1417 * _name: Component class name (C identifier).
1418 * _x: Iterator initialization method
d6e69534 1419 * (bt_component_class_filter_message_iterator_init_method).
d3eb6e8f 1420 */
d6e69534
PP
1421#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1422 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
d3eb6e8f
PP
1423
1424/*
64cadc66 1425 * Defines an iterator finalize method attribute attached to a filter
d3eb6e8f
PP
1426 * component class descriptor which is attached to the automatic plugin
1427 * descriptor.
1428 *
1429 * _name: Component class name (C identifier).
64cadc66 1430 * _x: Iterator finalize method
d6e69534 1431 * (bt_component_class_filter_message_iterator_finalize_method).
d3eb6e8f 1432 */
d6e69534
PP
1433#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1434 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
d3eb6e8f 1435
7474e7d3
PP
1436/*
1437 * Defines an iterator "seek nanoseconds from origin" method attribute
1438 * attached to a filter component class descriptor which is attached to
1439 * the automatic plugin descriptor.
1440 *
1441 * _name: Component class name (C identifier).
1442 * _x: Iterator "seek nanoseconds from origin" method
1443 * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method).
1444 */
1445#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1446 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1447
1448/*
1449 * Defines an iterator "seek beginning" method attribute
1450 * attached to a filter component class descriptor which is attached to
1451 * the automatic plugin descriptor.
1452 *
1453 * _name: Component class name (C identifier).
1454 * _x: Iterator "seek beginning" method
1455 * (bt_component_class_filter_message_iterator_seek_beginning_method).
1456 */
1457#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \
1458 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1459
1460/*
1461 * Defines an iterator "can seek nanoseconds from origin" method
1462 * attribute attached to a filter component class descriptor which is
1463 * attached to the automatic plugin descriptor.
1464 *
1465 * _name: Component class name (C identifier).
1466 * _x: Iterator "can seek nanoseconds from origin" method
1467 * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method).
1468 */
1469#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \
1470 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x)
1471
1472/*
1473 * Defines an iterator "can seek beginning" method attribute
1474 * attached to a filter component class descriptor which is attached to
1475 * the automatic plugin descriptor.
1476 *
1477 * _name: Component class name (C identifier).
1478 * _x: Iterator "can seek beginning" method
1479 * (bt_component_class_filter_message_iterator_can_seek_beginning_method).
1480 */
1481#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \
1482 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x)
1483
52238017
MJ
1484#define BT_PLUGIN_MODULE() \
1485 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
4581096d
PP
1486 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1487 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
52238017
MJ
1488 \
1489 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
4581096d
PP
1490 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1491 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
52238017
MJ
1492 \
1493 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
4581096d
PP
1494 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1495 _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
1496 \
1497 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
1498 _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; \
1499 _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
1500 \
1501 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1502 { \
1503 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1504 } \
1505 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1506 { \
1507 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1508 } \
1509 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1510 { \
1511 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1512 } \
1513 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1514 { \
1515 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1516 } \
1517 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1518 { \
1519 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1520 } \
1521 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1522 { \
1523 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1524 } \
1525 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1526 { \
1527 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1528 } \
1529 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1530 { \
1531 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1532 }
1533
33b34c43
PP
1534#ifdef __cplusplus
1535}
1536#endif
1537
924dc299 1538#endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */
This page took 0.117962 seconds and 4 git commands to generate.