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