lib: fully configure graph (add components, connect ports), then run
[babeltrace.git] / include / babeltrace / plugin / plugin-dev.h
1 #ifndef BABELTRACE_PLUGIN_PLUGIN_DEV_H
2 #define BABELTRACE_PLUGIN_PLUGIN_DEV_H
3
4 /*
5 * This is the header that you need to include for the development of
6 * a Babeltrace plug-in.
7 *
8 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
9 * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
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
30 #include <stdint.h>
31
32 /* For enum bt_plugin_status */
33 #include <babeltrace/plugin/plugin-const.h>
34
35 /* For bt_component_class_type */
36 #include <babeltrace/graph/component-class-const.h>
37
38 /* For component class method type definitions */
39 #include <babeltrace/graph/component-class-source.h>
40 #include <babeltrace/graph/component-class-filter.h>
41 #include <babeltrace/graph/component-class-sink.h>
42
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
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57
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 */
66 typedef enum bt_self_plugin_status {
67 BT_SELF_PLUGIN_STATUS_OK = 0,
68 BT_SELF_PLUGIN_STATUS_NOMEM = -12,
69 BT_SELF_PLUGIN_STATUS_ERROR = -1,
70 } bt_self_plugin_status;
71
72 typedef struct bt_self_plugin bt_self_plugin;
73
74 typedef bt_self_plugin_status (*bt_plugin_init_func)(
75 bt_self_plugin *plugin);
76
77 /* Plugin exit function type */
78 typedef void (*bt_plugin_exit_func)(void);
79
80 /* Plugin descriptor: describes a single plugin (internal use) */
81 struct __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) */
93 enum __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,
99 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION = 5,
100 };
101
102 /* Plugin (user) version */
103 struct __bt_plugin_descriptor_version {
104 uint32_t major;
105 uint32_t minor;
106 uint32_t patch;
107 const char *extra;
108 };
109
110 /* Plugin attribute (internal use) */
111 struct __bt_plugin_descriptor_attribute {
112 /* Plugin descriptor to which to associate this attribute */
113 const struct __bt_plugin_descriptor *plugin_descriptor;
114
115 /* Name of the attribute's type for debug purposes */
116 const char *type_name;
117
118 /* Attribute's type */
119 enum __bt_plugin_descriptor_attribute_type type;
120
121 /* Attribute's value (depends on attribute's type) */
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;
137
138 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
139 struct __bt_plugin_descriptor_version version;
140 } value;
141 } __attribute__((packed));
142
143 /* Component class descriptor (internal use) */
144 struct __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
151 /* Component class name */
152 const char *name;
153
154 /* Component class type */
155 bt_component_class_type type;
156
157 /* Mandatory methods (depends on component class type) */
158 union {
159 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
160 struct {
161 bt_component_class_source_message_iterator_next_method msg_iter_next;
162 } source;
163
164 /* BT_COMPONENT_CLASS_TYPE_FILTER */
165 struct {
166 bt_component_class_filter_message_iterator_next_method msg_iter_next;
167 } filter;
168
169 /* BT_COMPONENT_CLASS_TYPE_SINK */
170 struct {
171 bt_component_class_sink_consume_method consume;
172 } sink;
173 } methods;
174 } __attribute__((packed));
175
176 /* Type of a component class attribute (internal use) */
177 enum __bt_plugin_component_class_descriptor_attribute_type {
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,
187 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD = 11,
188 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD = 12,
189 };
190
191 /* Component class attribute (internal use) */
192 struct __bt_plugin_component_class_descriptor_attribute {
193 /*
194 * Component class plugin attribute to which to associate this
195 * component class attribute.
196 */
197 const struct __bt_plugin_component_class_descriptor *comp_class_descriptor;
198
199 /* Name of the attribute's type for debug purposes */
200 const char *type_name;
201
202 /* Attribute's type */
203 enum __bt_plugin_component_class_descriptor_attribute_type type;
204
205 /* Attribute's value (depends on attribute's type) */
206 union {
207 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
208 const char *description;
209
210 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
211 const char *help;
212
213 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */
214 bt_component_class_source_init_method source_init_method;
215 bt_component_class_filter_init_method filter_init_method;
216 bt_component_class_sink_init_method sink_init_method;
217
218 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
219 bt_component_class_source_finalize_method source_finalize_method;
220 bt_component_class_filter_finalize_method filter_finalize_method;
221 bt_component_class_sink_finalize_method sink_finalize_method;
222
223 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
224 bt_component_class_source_query_method source_query_method;
225 bt_component_class_filter_query_method filter_query_method;
226 bt_component_class_sink_query_method sink_query_method;
227
228 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD */
229 bt_component_class_filter_accept_input_port_connection_method filter_accept_input_port_connection_method;
230 bt_component_class_sink_accept_input_port_connection_method sink_accept_input_port_connection_method;
231
232 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD */
233 bt_component_class_source_accept_output_port_connection_method source_accept_output_port_connection_method;
234 bt_component_class_filter_accept_output_port_connection_method filter_accept_output_port_connection_method;
235
236 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
237 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method;
238 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method;
239
240 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
241 bt_component_class_source_output_port_connected_method source_output_port_connected_method;
242 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method;
243
244 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD */
245 bt_component_class_source_message_iterator_init_method source_msg_iter_init_method;
246 bt_component_class_filter_message_iterator_init_method filter_msg_iter_init_method;
247
248 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
249 bt_component_class_source_message_iterator_finalize_method source_msg_iter_finalize_method;
250 bt_component_class_filter_message_iterator_finalize_method filter_msg_iter_finalize_method;
251 } value;
252 } __attribute__((packed));
253
254 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void);
255 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void);
256 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
257 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
258 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void);
259 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void);
260 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
261 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
262
263 /*
264 * Variable attributes for a plugin descriptor pointer to be added to
265 * the plugin descriptor section (internal use).
266 */
267 #ifdef __APPLE__
268 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
269 __attribute__((section("__DATA,btp_desc"), used))
270
271 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
272 __start___bt_plugin_descriptors
273
274 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
275 __stop___bt_plugin_descriptors
276
277 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
278 __asm("section$start$__DATA$btp_desc")
279
280 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
281 __asm("section$end$__DATA$btp_desc")
282
283 #else
284
285 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
286 __attribute__((section("__bt_plugin_descriptors"), used))
287
288 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
289 __start___bt_plugin_descriptors
290
291 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
292 __stop___bt_plugin_descriptors
293
294 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
295
296 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
297 #endif
298
299 /*
300 * Variable attributes for a plugin attribute pointer to be added to
301 * the plugin attribute section (internal use).
302 */
303 #ifdef __APPLE__
304 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
305 __attribute__((section("__DATA,btp_desc_att"), used))
306
307 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
308 __start___bt_plugin_descriptor_attributes
309
310 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
311 __stop___bt_plugin_descriptor_attributes
312
313 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
314 __asm("section$start$__DATA$btp_desc_att")
315
316 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
317 __asm("section$end$__DATA$btp_desc_att")
318
319 #else
320
321 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
322 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
323
324 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
325 __start___bt_plugin_descriptor_attributes
326
327 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
328 __stop___bt_plugin_descriptor_attributes
329
330 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
331
332 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
333 #endif
334
335 /*
336 * Variable attributes for a component class descriptor pointer to be
337 * added to the component class descriptor section (internal use).
338 */
339 #ifdef __APPLE__
340 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
341 __attribute__((section("__DATA,btp_cc_desc"), used))
342
343 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
344 __start___bt_plugin_component_class_descriptors
345
346 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
347 __stop___bt_plugin_component_class_descriptors
348
349 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
350 __asm("section$start$__DATA$btp_cc_desc")
351
352 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
353 __asm("section$end$__DATA$btp_cc_desc")
354
355 #else
356
357 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
358 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
359
360 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
361 __start___bt_plugin_component_class_descriptors
362
363 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
364 __stop___bt_plugin_component_class_descriptors
365
366 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
367
368 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
369 #endif
370
371 /*
372 * Variable attributes for a component class descriptor attribute
373 * pointer to be added to the component class descriptor attribute
374 * section (internal use).
375 */
376 #ifdef __APPLE__
377 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
378 __attribute__((section("__DATA,btp_cc_desc_att"), used))
379
380 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
381 __start___bt_plugin_component_class_descriptor_attributes
382
383 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
384 __stop___bt_plugin_component_class_descriptor_attributes
385
386 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
387 __asm("section$start$__DATA$btp_cc_desc_att")
388
389 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
390 __asm("section$end$__DATA$btp_cc_desc_att")
391
392 #else
393
394 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
395 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
396
397 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
398 __start___bt_plugin_component_class_descriptor_attributes
399
400 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
401 __stop___bt_plugin_component_class_descriptor_attributes
402
403 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
404
405 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
406 #endif
407
408 /*
409 * Declares a plugin descriptor pointer variable with a custom ID.
410 *
411 * _id: ID (any valid C identifier except `auto`).
412 */
413 #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id
414
415 /*
416 * Defines a plugin descriptor with a custom ID.
417 *
418 * _id: ID (any valid C identifier except `auto`).
419 * _name: Plugin's name (C string).
420 */
421 #define BT_PLUGIN_WITH_ID(_id, _name) \
422 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
423 .major = __BT_PLUGIN_VERSION_MAJOR, \
424 .minor = __BT_PLUGIN_VERSION_MINOR, \
425 .name = _name, \
426 }; \
427 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
428
429 /*
430 * Defines a plugin attribute (generic, internal use).
431 *
432 * _attr_name: Name of the attribute (C identifier).
433 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
434 * _id: Plugin descriptor ID (C identifier).
435 * _x: Value.
436 */
437 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
438 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
439 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
440 .type_name = #_attr_name, \
441 .type = _attr_type, \
442 .value._attr_name = _x, \
443 }; \
444 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
445
446 /*
447 * Defines a plugin initialization function attribute attached to a
448 * specific plugin descriptor.
449 *
450 * _id: Plugin descriptor ID (C identifier).
451 * _x: Initialization function (bt_plugin_init_func).
452 */
453 #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \
454 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x)
455
456 /*
457 * Defines a plugin exit function attribute attached to a specific
458 * plugin descriptor.
459 *
460 * _id: Plugin descriptor ID (C identifier).
461 * _x: Exit function (bt_plugin_exit_func).
462 */
463 #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \
464 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x)
465
466 /*
467 * Defines an author attribute attached to a specific plugin descriptor.
468 *
469 * _id: Plugin descriptor ID (C identifier).
470 * _x: Author (C string).
471 */
472 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \
473 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x)
474
475 /*
476 * Defines a license attribute attached to a specific plugin descriptor.
477 *
478 * _id: Plugin descriptor ID (C identifier).
479 * _x: License (C string).
480 */
481 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \
482 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x)
483
484 /*
485 * Defines a description attribute attached to a specific plugin
486 * descriptor.
487 *
488 * _id: Plugin descriptor ID (C identifier).
489 * _x: Description (C string).
490 */
491 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \
492 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x)
493
494 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
495 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
496
497 /*
498 * Defines a version attribute attached to a specific plugin descriptor.
499 *
500 * _id: Plugin descriptor ID (C identifier).
501 * _major: Plugin's major version (uint32_t).
502 * _minor: Plugin's minor version (uint32_t).
503 * _patch: Plugin's patch version (uint32_t).
504 * _extra: Plugin's version extra information (C string).
505 */
506 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
507 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
508
509 /*
510 * Defines a source component class descriptor with a custom ID.
511 *
512 * _id: ID (any valid C identifier except `auto`).
513 * _comp_class_id: Component class ID (C identifier).
514 * _name: Component class name (C string).
515 * _msg_iter_next_method: Component class's iterator next method
516 * (bt_component_class_source_message_iterator_next_method).
517 */
518 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
519 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
520 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
521 .name = _name, \
522 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
523 .methods.source = { \
524 .msg_iter_next = _msg_iter_next_method, \
525 }, \
526 }; \
527 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
528
529 /*
530 * Defines a filter component class descriptor with a custom ID.
531 *
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).
535 * _msg_iter_next_method: Component class's iterator next method
536 * (bt_component_class_filter_message_iterator_next_method).
537 */
538 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \
539 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
540 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
541 .name = _name, \
542 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
543 .methods.filter = { \
544 .msg_iter_next = _msg_iter_next_method, \
545 }, \
546 }; \
547 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
548
549 /*
550 * Defines a sink component class descriptor with a custom ID.
551 *
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).
555 * _consume_method: Component class's iterator consume method
556 * (bt_component_class_sink_consume_method).
557 */
558 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \
559 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \
560 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
561 .name = _name, \
562 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
563 .methods.sink = { \
564 .consume = _consume_method, \
565 }, \
566 }; \
567 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
568
569 /*
570 * Defines a component class descriptor attribute (generic, internal
571 * use).
572 *
573 * _id: Plugin descriptor ID (C identifier).
574 * _comp_class_id: Component class ID (C identifier).
575 * _type: Component class type (`source`, `filter`, or `sink`).
576 * _attr_name: Name of the attribute (C identifier).
577 * _attr_type: Type of the attribute
578 * (enum __bt_plugin_descriptor_attribute_type).
579 * _x: Value.
580 */
581 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \
582 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \
583 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \
584 .type_name = #_attr_name, \
585 .type = _attr_type, \
586 .value._attr_name = _x, \
587 }; \
588 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
589
590 /*
591 * Defines a description attribute attached to a specific source
592 * component class descriptor.
593 *
594 * _id: Plugin descriptor ID (C identifier).
595 * _comp_class_id: Component class descriptor ID (C identifier).
596 * _x: Description (C string).
597 */
598 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
599 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x)
600
601 /*
602 * Defines a description attribute attached to a specific filter
603 * component class descriptor.
604 *
605 * _id: Plugin descriptor ID (C identifier).
606 * _comp_class_id: Component class descriptor ID (C identifier).
607 * _x: Description (C string).
608 */
609 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
610 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x)
611
612 /*
613 * Defines a description attribute attached to a specific sink
614 * component class descriptor.
615 *
616 * _id: Plugin descriptor ID (C identifier).
617 * _comp_class_id: Component class descriptor ID (C identifier).
618 * _x: Description (C string).
619 */
620 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \
621 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x)
622
623 /*
624 * Defines a help attribute attached to a specific source component
625 * class descriptor.
626 *
627 * _id: Plugin descriptor ID (C identifier).
628 * _comp_class_id: Component class descriptor ID (C identifier).
629 * _x: Help (C string).
630 */
631 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
632 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x)
633
634 /*
635 * Defines a help attribute attached to a specific filter component
636 * class descriptor.
637 *
638 * _id: Plugin descriptor ID (C identifier).
639 * _comp_class_id: Component class descriptor ID (C identifier).
640 * _x: Help (C string).
641 */
642 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
643 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x)
644
645 /*
646 * Defines a help attribute attached to a specific sink component class
647 * descriptor.
648 *
649 * _id: Plugin descriptor ID (C identifier).
650 * _comp_class_id: Component class descriptor ID (C identifier).
651 * _x: Help (C string).
652 */
653 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \
654 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x)
655
656 /*
657 * Defines an initialization method attribute attached to a specific
658 * source component class descriptor.
659 *
660 * _id: Plugin descriptor ID (C identifier).
661 * _comp_class_id: Component class descriptor ID (C identifier).
662 * _x: Initialization method (bt_component_class_source_init_method).
663 */
664 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
665 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x)
666
667 /*
668 * Defines an initialization method attribute attached to a specific
669 * filter component class descriptor.
670 *
671 * _id: Plugin descriptor ID (C identifier).
672 * _comp_class_id: Component class descriptor ID (C identifier).
673 * _x: Initialization method (bt_component_class_filter_init_method).
674 */
675 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
676 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x)
677
678 /*
679 * Defines an initialization method attribute attached to a specific
680 * sink component class descriptor.
681 *
682 * _id: Plugin descriptor ID (C identifier).
683 * _comp_class_id: Component class descriptor ID (C identifier).
684 * _x: Initialization method (bt_component_class_sink_init_method).
685 */
686 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
687 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x)
688
689 /*
690 * Defines a finalization method attribute attached to a specific source
691 * component class descriptor.
692 *
693 * _id: Plugin descriptor ID (C identifier).
694 * _comp_class_id: Component class descriptor ID (C identifier).
695 * _x: Finalize method (bt_component_class_source_finalize_method).
696 */
697 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
698 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x)
699
700 /*
701 * Defines a finalization method attribute attached to a specific filter
702 * component class descriptor.
703 *
704 * _id: Plugin descriptor ID (C identifier).
705 * _comp_class_id: Component class descriptor ID (C identifier).
706 * _x: Finalize method (bt_component_class_filter_finalize_method).
707 */
708 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
709 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x)
710
711 /*
712 * Defines a finalization method attribute attached to a specific sink
713 * component class descriptor.
714 *
715 * _id: Plugin descriptor ID (C identifier).
716 * _comp_class_id: Component class descriptor ID (C identifier).
717 * _x: Finalize method (bt_component_class_sink_finalize_method).
718 */
719 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
720 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x)
721
722 /*
723 * Defines a query method attribute attached to a specific source
724 * component class descriptor.
725 *
726 * _id: Plugin descriptor ID (C identifier).
727 * _comp_class_id: Component class descriptor ID (C identifier).
728 * _x: Finalize method (bt_component_class_source_query_method).
729 */
730 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
731 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x)
732
733 /*
734 * Defines a query method attribute attached to a specific filter
735 * component class descriptor.
736 *
737 * _id: Plugin descriptor ID (C identifier).
738 * _comp_class_id: Component class descriptor ID (C identifier).
739 * _x: Finalize method (bt_component_class_filter_query_method).
740 */
741 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
742 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x)
743
744 /*
745 * Defines a query method attribute attached to a specific sink
746 * component class descriptor.
747 *
748 * _id: Plugin descriptor ID (C identifier).
749 * _comp_class_id: Component class descriptor ID (C identifier).
750 * _x: Finalize method (bt_component_class_sink_query_method).
751 */
752 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \
753 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x)
754
755 /*
756 * Defines an accept input port connection method attribute attached to
757 * a specific filter component class descriptor.
758 *
759 * _id: Plugin descriptor ID (C identifier).
760 * _comp_class_id: Component class descriptor ID (C identifier).
761 * _x: Accept port connection method
762 * (bt_component_class_filter_accept_input_port_connection_method).
763 */
764 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
765 __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)
766
767 /*
768 * Defines an accept input port connection method attribute attached to
769 * a specific sink component class descriptor.
770 *
771 * _id: Plugin descriptor ID (C identifier).
772 * _comp_class_id: Component class descriptor ID (C identifier).
773 * _x: Accept port connection method
774 * (bt_component_class_sink_accept_input_port_connection_method).
775 */
776 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
777 __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)
778
779 /*
780 * Defines an accept output port connection method attribute attached to
781 * a specific source component class descriptor.
782 *
783 * _id: Plugin descriptor ID (C identifier).
784 * _comp_class_id: Component class descriptor ID (C identifier).
785 * _x: Accept port connection method
786 * (bt_component_class_source_accept_output_port_connection_method).
787 */
788 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
789 __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)
790
791 /*
792 * Defines an accept output port connection method attribute attached to
793 * a specific filter component class descriptor.
794 *
795 * _id: Plugin descriptor ID (C identifier).
796 * _comp_class_id: Component class descriptor ID (C identifier).
797 * _x: Accept port connection method
798 * (bt_component_class_filter_accept_output_port_connection_method).
799 */
800 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
801 __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)
802
803 /*
804 * Defines an input port connected method attribute attached to a
805 * specific filter component class descriptor.
806 *
807 * _id: Plugin descriptor ID (C identifier).
808 * _comp_class_id: Component class descriptor ID (C identifier).
809 * _x: Port connected method
810 * (bt_component_class_filter_input_port_connected_method).
811 */
812 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
813 __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)
814
815 /*
816 * Defines an input port connected method attribute attached to a
817 * specific sink component class descriptor.
818 *
819 * _id: Plugin descriptor ID (C identifier).
820 * _comp_class_id: Component class descriptor ID (C identifier).
821 * _x: Port connected method
822 * (bt_component_class_sink_input_port_connected_method).
823 */
824 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
825 __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)
826
827 /*
828 * Defines an output port connected method attribute attached to a
829 * specific source component class descriptor.
830 *
831 * _id: Plugin descriptor ID (C identifier).
832 * _comp_class_id: Component class descriptor ID (C identifier).
833 * _x: Port connected method
834 * (bt_component_class_source_output_port_connected_method).
835 */
836 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
837 __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)
838
839 /*
840 * Defines an output port connected method attribute attached to a
841 * specific filter component class descriptor.
842 *
843 * _id: Plugin descriptor ID (C identifier).
844 * _comp_class_id: Component class descriptor ID (C identifier).
845 * _x: Port connected method
846 * (bt_component_class_filter_output_port_connected_method).
847 */
848 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
849 __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)
850
851 /*
852 * Defines an iterator initialization method attribute attached to a
853 * specific source component class descriptor.
854 *
855 * _id: Plugin descriptor ID (C identifier).
856 * _comp_class_id: Component class descriptor ID (C identifier).
857 * _x: Iterator initialization method
858 * (bt_component_class_source_message_iterator_init_method).
859 */
860 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
861 __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)
862
863 /*
864 * Defines an iterator finalize method attribute attached to a specific
865 * source component class descriptor.
866 *
867 * _id: Plugin descriptor ID (C identifier).
868 * _comp_class_id: Component class descriptor ID (C identifier).
869 * _x: Iterator finalize method
870 * (bt_component_class_source_message_iterator_finalize_method).
871 */
872 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
873 __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)
874
875 /*
876 * Defines an iterator initialization method attribute attached to a
877 * specific filter component class descriptor.
878 *
879 * _id: Plugin descriptor ID (C identifier).
880 * _comp_class_id: Component class descriptor ID (C identifier).
881 * _x: Iterator initialization method
882 * (bt_component_class_filter_message_iterator_init_method).
883 */
884 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \
885 __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)
886
887 /*
888 * Defines an iterator finalize method attribute attached to a specific
889 * filter component class descriptor.
890 *
891 * _id: Plugin descriptor ID (C identifier).
892 * _comp_class_id: Component class descriptor ID (C identifier).
893 * _x: Iterator finalize method
894 * (bt_component_class_filter_message_iterator_finalize_method).
895 */
896 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \
897 __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)
898
899 /*
900 * Defines a plugin descriptor with an automatic ID.
901 *
902 * _name: Plugin's name (C string).
903 */
904 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
905
906 /*
907 * Defines a plugin initialization function attribute attached to the
908 * automatic plugin descriptor.
909 *
910 * _x: Initialization function (bt_plugin_init_func).
911 */
912 #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x)
913
914 /*
915 * Defines a plugin exit function attribute attached to the automatic
916 * plugin descriptor.
917 *
918 * _x: Exit function (bt_plugin_exit_func).
919 */
920 #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x)
921
922 /*
923 * Defines an author attribute attached to the automatic plugin
924 * descriptor.
925 *
926 * _x: Author (C string).
927 */
928 #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x)
929
930 /*
931 * Defines a license attribute attached to the automatic plugin
932 * descriptor.
933 *
934 * _x: License (C string).
935 */
936 #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x)
937
938 /*
939 * Defines a description attribute attached to the automatic plugin
940 * descriptor.
941 *
942 * _x: Description (C string).
943 */
944 #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x)
945
946 /*
947 * Defines a version attribute attached to the automatic plugin
948 * descriptor.
949 *
950 * _major: Plugin's major version (uint32_t).
951 * _minor: Plugin's minor version (uint32_t).
952 * _patch: Plugin's patch version (uint32_t).
953 * _extra: Plugin's version extra information (C string).
954 */
955 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
956
957 /*
958 * Defines a source component class attached to the automatic plugin
959 * descriptor. Its ID is the same as its name, hence its name must be a
960 * C identifier in this version.
961 *
962 * _name: Component class name (C identifier).
963 * _msg_iter_next_method: Component class's iterator next method
964 * (bt_component_class_source_message_iterator_next_method).
965 */
966 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _msg_iter_next_method) \
967 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
968
969 /*
970 * Defines a filter component class attached to the automatic plugin
971 * descriptor. Its ID is the same as its name, hence its name must be a
972 * C identifier in this version.
973 *
974 * _name: Component class name (C identifier).
975 * _msg_iter_next_method: Component class's iterator next method
976 * (bt_component_class_filter_message_iterator_next_method).
977 */
978 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _msg_iter_next_method) \
979 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method)
980
981 /*
982 * Defines a sink component class attached to the automatic plugin
983 * descriptor. Its ID is the same as its name, hence its name must be a
984 * C identifier in this version.
985 *
986 * _name: Component class name (C identifier).
987 * _consume_method: Component class's consume method
988 * (bt_component_class_sink_consume_method).
989 */
990 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
991 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
992
993 /*
994 * Defines a description attribute attached to a source component class
995 * descriptor which is attached to the automatic plugin descriptor.
996 *
997 * _name: Component class name (C identifier).
998 * _x: Description (C string).
999 */
1000 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1001 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1002
1003 /*
1004 * Defines a description attribute attached to a filter component class
1005 * descriptor which is attached to the automatic plugin descriptor.
1006 *
1007 * _name: Component class name (C identifier).
1008 * _x: Description (C string).
1009 */
1010 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1011 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1012
1013 /*
1014 * Defines a description attribute attached to a sink component class
1015 * descriptor which is attached to the automatic plugin descriptor.
1016 *
1017 * _name: Component class name (C identifier).
1018 * _x: Description (C string).
1019 */
1020 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \
1021 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x)
1022
1023 /*
1024 * Defines a help attribute attached to a source component class
1025 * descriptor which is attached to the automatic plugin descriptor.
1026 *
1027 * _name: Component class name (C identifier).
1028 * _x: Help (C string).
1029 */
1030 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \
1031 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1032
1033 /*
1034 * Defines a help attribute attached to a filter component class
1035 * descriptor which is attached to the automatic plugin descriptor.
1036 *
1037 * _name: Component class name (C identifier).
1038 * _x: Help (C string).
1039 */
1040 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \
1041 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1042
1043 /*
1044 * Defines a help attribute attached to a sink component class
1045 * descriptor which is attached to the automatic plugin descriptor.
1046 *
1047 * _name: Component class name (C identifier).
1048 * _x: Help (C string).
1049 */
1050 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \
1051 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x)
1052
1053 /*
1054 * Defines an initialization method attribute attached to a source
1055 * component class descriptor which is attached to the automatic plugin
1056 * descriptor.
1057 *
1058 * _name: Component class name (C identifier).
1059 * _x: Initialization method (bt_component_class_source_init_method).
1060 */
1061 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1062 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1063
1064 /*
1065 * Defines an initialization method attribute attached to a filter
1066 * component class descriptor which is attached to the automatic plugin
1067 * descriptor.
1068 *
1069 * _name: Component class name (C identifier).
1070 * _x: Initialization method (bt_component_class_filter_init_method).
1071 */
1072 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1073 BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1074
1075 /*
1076 * Defines an initialization method attribute attached to a sink
1077 * component class descriptor which is attached to the automatic plugin
1078 * descriptor.
1079 *
1080 * _name: Component class name (C identifier).
1081 * _x: Initialization method (bt_component_class_sink_init_method).
1082 */
1083 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \
1084 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x)
1085
1086 /*
1087 * Defines a finalization method attribute attached to a source component
1088 * class descriptor which is attached to the automatic plugin
1089 * descriptor.
1090 *
1091 * _name: Component class name (C identifier).
1092 * _x: Initialization method (bt_component_class_source_finalize_method).
1093 */
1094 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1095 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1096
1097 /*
1098 * Defines a finalization method attribute attached to a filter component
1099 * class descriptor which is attached to the automatic plugin
1100 * descriptor.
1101 *
1102 * _name: Component class name (C identifier).
1103 * _x: Initialization method (bt_component_class_filter_finalize_method).
1104 */
1105 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1106 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1107
1108 /*
1109 * Defines a finalization method attribute attached to a sink component class
1110 * descriptor which is attached to the automatic plugin descriptor.
1111 *
1112 * _name: Component class name (C identifier).
1113 * _x: Initialization method (bt_component_class_sink_finalize_method).
1114 */
1115 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \
1116 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1117
1118 /*
1119 * Defines a query method attribute attached to a source component
1120 * class descriptor which is attached to the automatic plugin
1121 * descriptor.
1122 *
1123 * _name: Component class name (C identifier).
1124 * _x: Initialization method (bt_component_class_source_query_method).
1125 */
1126 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1127 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1128
1129 /*
1130 * Defines a query method attribute attached to a filter component
1131 * class descriptor which is attached to the automatic plugin
1132 * descriptor.
1133 *
1134 * _name: Component class name (C identifier).
1135 * _x: Initialization method (bt_component_class_filter_query_method).
1136 */
1137 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1138 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1139
1140 /*
1141 * Defines a query method attribute attached to a sink component
1142 * class descriptor which is attached to the automatic plugin
1143 * descriptor.
1144 *
1145 * _name: Component class name (C identifier).
1146 * _x: Initialization method (bt_component_class_sink_query_method).
1147 */
1148 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \
1149 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x)
1150
1151 /*
1152 * Defines an accept input port connection method attribute attached to
1153 * a filter component class descriptor which is attached to the
1154 * automatic plugin descriptor.
1155 *
1156 * _name: Component class name (C identifier).
1157 * _x: Accept port connection method
1158 * (bt_component_class_filter_accept_input_port_connection_method).
1159 */
1160 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1161 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1162
1163 /*
1164 * Defines an accept input port connection method attribute attached to
1165 * a sink component class descriptor which is attached to the automatic
1166 * plugin descriptor.
1167 *
1168 * _name: Component class name (C identifier).
1169 * _x: Accept port connection method
1170 * (bt_component_class_sink_accept_input_port_connection_method).
1171 */
1172 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \
1173 BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1174
1175 /*
1176 * Defines an accept output port connection method attribute attached to
1177 * a source component class descriptor which is attached to the
1178 * automatic plugin descriptor.
1179 *
1180 * _name: Component class name (C identifier).
1181 * _x: Accept port connection method
1182 * (bt_component_class_source_accept_output_port_connection_method).
1183 */
1184 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1185 BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1186
1187 /*
1188 * Defines an accept output port connection method attribute attached to
1189 * a filter component class descriptor which is attached to the
1190 * automatic plugin descriptor.
1191 *
1192 * _name: Component class name (C identifier).
1193 * _x: Accept port connection method
1194 * (bt_component_class_filter_accept_output_port_connection_method).
1195 */
1196 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \
1197 BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
1198
1199 /*
1200 * Defines an input port connected method attribute attached to a filter
1201 * component class descriptor which is attached to the automatic plugin
1202 * descriptor.
1203 *
1204 * _name: Component class name (C identifier).
1205 * _x: Port connected (bt_component_class_filter_input_port_connected_method).
1206 */
1207 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1208 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1209
1210 /*
1211 * Defines an input port connected method attribute attached to a sink
1212 * component class descriptor which is attached to the automatic plugin
1213 * descriptor.
1214 *
1215 * _name: Component class name (C identifier).
1216 * _x: Port connected (bt_component_class_sink_input_port_connected_method).
1217 */
1218 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \
1219 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1220
1221 /*
1222 * Defines an output port connected method attribute attached to a source
1223 * component class descriptor which is attached to the automatic plugin
1224 * descriptor.
1225 *
1226 * _name: Component class name (C identifier).
1227 * _x: Port connected (bt_component_class_source_output_port_connected_method).
1228 */
1229 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1230 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1231
1232 /*
1233 * Defines an output port connected method attribute attached to a filter
1234 * component class descriptor which is attached to the automatic plugin
1235 * descriptor.
1236 *
1237 * _name: Component class name (C identifier).
1238 * _x: Port connected (bt_component_class_filter_output_port_connected_method).
1239 */
1240 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \
1241 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
1242
1243 /*
1244 * Defines an iterator initialization method attribute attached to a
1245 * source component class descriptor which is attached to the automatic
1246 * plugin descriptor.
1247 *
1248 * _name: Component class name (C identifier).
1249 * _x: Iterator initialization method
1250 * (bt_component_class_source_message_iterator_init_method).
1251 */
1252 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1253 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1254
1255 /*
1256 * Defines an iterator finalize method attribute attached to a source
1257 * component class descriptor which is attached to the automatic plugin
1258 * descriptor.
1259 *
1260 * _name: Component class name (C identifier).
1261 * _x: Iterator finalize method
1262 * (bt_component_class_source_message_iterator_finalize_method).
1263 */
1264 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1265 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1266
1267 /*
1268 * Defines an iterator initialization method attribute attached to a
1269 * filter component class descriptor which is attached to the automatic
1270 * plugin descriptor.
1271 *
1272 * _name: Component class name (C identifier).
1273 * _x: Iterator initialization method
1274 * (bt_component_class_filter_message_iterator_init_method).
1275 */
1276 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \
1277 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x)
1278
1279 /*
1280 * Defines an iterator finalize method attribute attached to a filter
1281 * component class descriptor which is attached to the automatic plugin
1282 * descriptor.
1283 *
1284 * _name: Component class name (C identifier).
1285 * _x: Iterator finalize method
1286 * (bt_component_class_filter_message_iterator_finalize_method).
1287 */
1288 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \
1289 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x)
1290
1291 #define BT_PLUGIN_MODULE() \
1292 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
1293 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
1294 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
1295 \
1296 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
1297 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
1298 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
1299 \
1300 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
1301 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
1302 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
1303 \
1304 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; \
1305 _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; \
1306 _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; \
1307 \
1308 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
1309 { \
1310 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
1311 } \
1312 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
1313 { \
1314 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
1315 } \
1316 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
1317 { \
1318 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1319 } \
1320 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
1321 { \
1322 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1323 } \
1324 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
1325 { \
1326 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
1327 } \
1328 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
1329 { \
1330 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
1331 } \
1332 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
1333 { \
1334 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
1335 } \
1336 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
1337 { \
1338 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
1339 }
1340
1341 #ifdef __cplusplus
1342 }
1343 #endif
1344
1345 #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */
This page took 0.087565 seconds and 4 git commands to generate.