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