Commit | Line | Data |
---|---|---|
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 |
55 | extern "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 | 66 | typedef 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 |
72 | typedef struct bt_self_plugin bt_self_plugin; |
73 | ||
4cdfc5e8 | 74 | typedef bt_self_plugin_status (*bt_plugin_init_func)( |
a21d1cb8 | 75 | bt_self_plugin *plugin); |
33b34c43 | 76 | |
6ba0b073 | 77 | /* Plugin exit function type */ |
9724cce9 | 78 | typedef void (*bt_plugin_exit_func)(void); |
33b34c43 | 79 | |
6ba0b073 PP |
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, | |
b6de043b PP |
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; | |
6ba0b073 PP |
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 | ||
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) */ | |
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 | ||
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) */ | |
177 | enum __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, | |
d6e69534 PP |
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, | |
6ba0b073 PP |
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 | ||
6ba0b073 PP |
199 | /* Name of the attribute's type for debug purposes */ |
200 | const char *type_name; | |
201 | ||
857f4dce PP |
202 | /* Attribute's type */ |
203 | enum __bt_plugin_component_class_descriptor_attribute_type type; | |
204 | ||
d3e4dcd8 | 205 | /* Attribute's value (depends on attribute's type) */ |
6ba0b073 | 206 | union { |
d3e4dcd8 | 207 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */ |
6ba0b073 | 208 | const char *description; |
d3e4dcd8 | 209 | |
279b3f15 PP |
210 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */ |
211 | const char *help; | |
212 | ||
d3e4dcd8 | 213 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */ |
0d72b8c3 PP |
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; | |
d3e4dcd8 | 217 | |
64cadc66 | 218 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */ |
0d72b8c3 PP |
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; | |
d3e4dcd8 | 222 | |
a67681c1 | 223 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */ |
0d72b8c3 PP |
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; | |
d94d92ac PP |
227 | |
228 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD */ | |
0d72b8c3 PP |
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; | |
d94d92ac PP |
231 | |
232 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD */ | |
0d72b8c3 PP |
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; | |
8463eac2 | 235 | |
d94d92ac | 236 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */ |
0d72b8c3 PP |
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; | |
72b913fb | 239 | |
d94d92ac | 240 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */ |
0d72b8c3 PP |
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; | |
0d8b4d8e | 243 | |
d6e69534 PP |
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; | |
d3eb6e8f | 247 | |
d6e69534 PP |
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; | |
6ba0b073 PP |
251 | } value; |
252 | } __attribute__((packed)); | |
253 | ||
52238017 MJ |
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 | ||
6ba0b073 PP |
263 | /* |
264 | * Variable attributes for a plugin descriptor pointer to be added to | |
265 | * the plugin descriptor section (internal use). | |
266 | */ | |
52238017 MJ |
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 | ||
6ba0b073 PP |
285 | #define __BT_PLUGIN_DESCRIPTOR_ATTRS \ |
286 | __attribute__((section("__bt_plugin_descriptors"), used)) | |
287 | ||
52238017 MJ |
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 | ||
6ba0b073 PP |
299 | /* |
300 | * Variable attributes for a plugin attribute pointer to be added to | |
301 | * the plugin attribute section (internal use). | |
302 | */ | |
52238017 MJ |
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 | ||
6ba0b073 PP |
321 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
322 | __attribute__((section("__bt_plugin_descriptor_attributes"), used)) | |
323 | ||
52238017 MJ |
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 | ||
6ba0b073 PP |
335 | /* |
336 | * Variable attributes for a component class descriptor pointer to be | |
337 | * added to the component class descriptor section (internal use). | |
338 | */ | |
52238017 MJ |
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 | ||
6ba0b073 PP |
357 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \ |
358 | __attribute__((section("__bt_plugin_component_class_descriptors"), used)) | |
359 | ||
52238017 MJ |
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 | ||
6ba0b073 PP |
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 | */ | |
52238017 MJ |
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 | ||
6ba0b073 PP |
394 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
395 | __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) | |
396 | ||
52238017 MJ |
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 | ||
6ba0b073 PP |
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 | }; \ | |
52238017 | 427 | static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id |
6ba0b073 PP |
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, \ | |
6ba0b073 | 440 | .type_name = #_attr_name, \ |
857f4dce | 441 | .type = _attr_type, \ |
6ba0b073 PP |
442 | .value._attr_name = _x, \ |
443 | }; \ | |
52238017 | 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 |
6ba0b073 PP |
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 | ||
b6de043b PP |
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 | ||
d3e4dcd8 PP |
509 | /* |
510 | * Defines a source component class descriptor with a custom ID. | |
6ba0b073 | 511 | * |
d3eb6e8f PP |
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). | |
d6e69534 PP |
515 | * _msg_iter_next_method: Component class's iterator next method |
516 | * (bt_component_class_source_message_iterator_next_method). | |
6ba0b073 | 517 | */ |
d6e69534 | 518 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \ |
d3e4dcd8 | 519 | static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \ |
6ba0b073 | 520 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ |
6ba0b073 | 521 | .name = _name, \ |
857f4dce | 522 | .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \ |
d3e4dcd8 | 523 | .methods.source = { \ |
d6e69534 | 524 | .msg_iter_next = _msg_iter_next_method, \ |
d3e4dcd8 | 525 | }, \ |
6ba0b073 | 526 | }; \ |
52238017 | 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 |
d3e4dcd8 PP |
528 | |
529 | /* | |
530 | * Defines a filter component class descriptor with a custom ID. | |
531 | * | |
d94d92ac 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_filter_message_iterator_next_method). | |
d3e4dcd8 | 537 | */ |
d6e69534 | 538 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \ |
d3e4dcd8 PP |
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, \ | |
d3e4dcd8 | 541 | .name = _name, \ |
857f4dce | 542 | .type = BT_COMPONENT_CLASS_TYPE_FILTER, \ |
d3e4dcd8 | 543 | .methods.filter = { \ |
d6e69534 | 544 | .msg_iter_next = _msg_iter_next_method, \ |
d3e4dcd8 PP |
545 | }, \ |
546 | }; \ | |
52238017 | 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 |
d3e4dcd8 PP |
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 | |
0d72b8c3 | 556 | * (bt_component_class_sink_consume_method). |
d3e4dcd8 PP |
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, \ | |
d3e4dcd8 | 561 | .name = _name, \ |
857f4dce | 562 | .type = BT_COMPONENT_CLASS_TYPE_SINK, \ |
d3e4dcd8 PP |
563 | .methods.sink = { \ |
564 | .consume = _consume_method, \ | |
565 | }, \ | |
566 | }; \ | |
52238017 | 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 |
6ba0b073 PP |
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). | |
d3e4dcd8 | 575 | * _type: Component class type (`source`, `filter`, or `sink`). |
6ba0b073 PP |
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) \ | |
d3e4dcd8 PP |
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, \ | |
6ba0b073 | 584 | .type_name = #_attr_name, \ |
857f4dce | 585 | .type = _attr_type, \ |
d3e4dcd8 | 586 | .value._attr_name = _x, \ |
6ba0b073 | 587 | }; \ |
52238017 | 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 |
6ba0b073 PP |
589 | |
590 | /* | |
d3e4dcd8 PP |
591 | * Defines a description attribute attached to a specific source |
592 | * component class descriptor. | |
6ba0b073 PP |
593 | * |
594 | * _id: Plugin descriptor ID (C identifier). | |
595 | * _comp_class_id: Component class descriptor ID (C identifier). | |
6ba0b073 PP |
596 | * _x: Description (C string). |
597 | */ | |
d3e4dcd8 PP |
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 | ||
279b3f15 PP |
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 | ||
d3e4dcd8 PP |
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). | |
0d72b8c3 | 662 | * _x: Initialization method (bt_component_class_source_init_method). |
d3e4dcd8 PP |
663 | */ |
664 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
d94d92ac | 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) |
d3e4dcd8 PP |
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). | |
0d72b8c3 | 673 | * _x: Initialization method (bt_component_class_filter_init_method). |
d3e4dcd8 PP |
674 | */ |
675 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
d94d92ac | 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) |
d3e4dcd8 PP |
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). | |
0d72b8c3 | 684 | * _x: Initialization method (bt_component_class_sink_init_method). |
d3e4dcd8 PP |
685 | */ |
686 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
d94d92ac | 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) |
d3e4dcd8 PP |
688 | |
689 | /* | |
d94d92ac | 690 | * Defines a finalization method attribute attached to a specific source |
d3e4dcd8 PP |
691 | * component class descriptor. |
692 | * | |
693 | * _id: Plugin descriptor ID (C identifier). | |
694 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 695 | * _x: Finalize method (bt_component_class_source_finalize_method). |
d3e4dcd8 | 696 | */ |
64cadc66 | 697 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
d94d92ac | 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) |
d3e4dcd8 PP |
699 | |
700 | /* | |
d94d92ac | 701 | * Defines a finalization method attribute attached to a specific filter |
d3e4dcd8 PP |
702 | * component class descriptor. |
703 | * | |
704 | * _id: Plugin descriptor ID (C identifier). | |
705 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 706 | * _x: Finalize method (bt_component_class_filter_finalize_method). |
d3e4dcd8 | 707 | */ |
64cadc66 | 708 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
d94d92ac | 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) |
d3e4dcd8 PP |
710 | |
711 | /* | |
d94d92ac | 712 | * Defines a finalization method attribute attached to a specific sink |
d3e4dcd8 PP |
713 | * component class descriptor. |
714 | * | |
715 | * _id: Plugin descriptor ID (C identifier). | |
716 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 717 | * _x: Finalize method (bt_component_class_sink_finalize_method). |
d3e4dcd8 | 718 | */ |
64cadc66 | 719 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
d94d92ac | 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) |
d3e4dcd8 | 721 | |
8463eac2 | 722 | /* |
a67681c1 | 723 | * Defines a query method attribute attached to a specific source |
8463eac2 PP |
724 | * component class descriptor. |
725 | * | |
726 | * _id: Plugin descriptor ID (C identifier). | |
727 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 728 | * _x: Finalize method (bt_component_class_source_query_method). |
8463eac2 | 729 | */ |
a67681c1 | 730 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
d94d92ac | 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) |
8463eac2 PP |
732 | |
733 | /* | |
a67681c1 | 734 | * Defines a query method attribute attached to a specific filter |
8463eac2 PP |
735 | * component class descriptor. |
736 | * | |
737 | * _id: Plugin descriptor ID (C identifier). | |
738 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 739 | * _x: Finalize method (bt_component_class_filter_query_method). |
8463eac2 | 740 | */ |
a67681c1 | 741 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
d94d92ac | 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) |
8463eac2 PP |
743 | |
744 | /* | |
a67681c1 | 745 | * Defines a query method attribute attached to a specific sink |
8463eac2 PP |
746 | * component class descriptor. |
747 | * | |
748 | * _id: Plugin descriptor ID (C identifier). | |
749 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 750 | * _x: Finalize method (bt_component_class_sink_query_method). |
8463eac2 | 751 | */ |
a67681c1 | 752 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
d94d92ac | 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) |
8463eac2 | 754 | |
d3e4dcd8 | 755 | /* |
d94d92ac PP |
756 | * Defines an accept input port connection method attribute attached to |
757 | * a specific filter component class descriptor. | |
72b913fb PP |
758 | * |
759 | * _id: Plugin descriptor ID (C identifier). | |
760 | * _comp_class_id: Component class descriptor ID (C identifier). | |
761 | * _x: Accept port connection method | |
0d72b8c3 | 762 | * (bt_component_class_filter_accept_input_port_connection_method). |
72b913fb | 763 | */ |
d94d92ac PP |
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) | |
72b913fb PP |
766 | |
767 | /* | |
d94d92ac PP |
768 | * Defines an accept input port connection method attribute attached to |
769 | * a specific sink component class descriptor. | |
72b913fb PP |
770 | * |
771 | * _id: Plugin descriptor ID (C identifier). | |
772 | * _comp_class_id: Component class descriptor ID (C identifier). | |
773 | * _x: Accept port connection method | |
0d72b8c3 | 774 | * (bt_component_class_sink_accept_input_port_connection_method). |
72b913fb | 775 | */ |
d94d92ac PP |
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) | |
72b913fb PP |
778 | |
779 | /* | |
d94d92ac PP |
780 | * Defines an accept output port connection method attribute attached to |
781 | * a specific source component class descriptor. | |
72b913fb PP |
782 | * |
783 | * _id: Plugin descriptor ID (C identifier). | |
784 | * _comp_class_id: Component class descriptor ID (C identifier). | |
785 | * _x: Accept port connection method | |
0d72b8c3 | 786 | * (bt_component_class_source_accept_output_port_connection_method). |
72b913fb | 787 | */ |
d94d92ac PP |
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) | |
72b913fb | 790 | |
0d8b4d8e | 791 | /* |
d94d92ac PP |
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 | |
0d72b8c3 | 798 | * (bt_component_class_filter_accept_output_port_connection_method). |
d94d92ac PP |
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. | |
0d8b4d8e PP |
806 | * |
807 | * _id: Plugin descriptor ID (C identifier). | |
808 | * _comp_class_id: Component class descriptor ID (C identifier). | |
809 | * _x: Port connected method | |
0d72b8c3 | 810 | * (bt_component_class_filter_input_port_connected_method). |
0d8b4d8e | 811 | */ |
d94d92ac PP |
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) | |
0d8b4d8e PP |
814 | |
815 | /* | |
d94d92ac PP |
816 | * Defines an input port connected method attribute attached to a |
817 | * specific sink component class descriptor. | |
0d8b4d8e PP |
818 | * |
819 | * _id: Plugin descriptor ID (C identifier). | |
820 | * _comp_class_id: Component class descriptor ID (C identifier). | |
821 | * _x: Port connected method | |
0d72b8c3 | 822 | * (bt_component_class_sink_input_port_connected_method). |
0d8b4d8e | 823 | */ |
d94d92ac PP |
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) | |
0d8b4d8e PP |
826 | |
827 | /* | |
d94d92ac PP |
828 | * Defines an output port connected method attribute attached to a |
829 | * specific source component class descriptor. | |
0d8b4d8e PP |
830 | * |
831 | * _id: Plugin descriptor ID (C identifier). | |
832 | * _comp_class_id: Component class descriptor ID (C identifier). | |
833 | * _x: Port connected method | |
0d72b8c3 | 834 | * (bt_component_class_source_output_port_connected_method). |
0d8b4d8e | 835 | */ |
d94d92ac PP |
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) | |
0d8b4d8e | 838 | |
72b913fb | 839 | /* |
d94d92ac PP |
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 | |
0d72b8c3 | 846 | * (bt_component_class_filter_output_port_connected_method). |
d94d92ac PP |
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 | ||
d3eb6e8f PP |
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 | |
d6e69534 | 858 | * (bt_component_class_source_message_iterator_init_method). |
d3eb6e8f | 859 | */ |
d6e69534 PP |
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) | |
d3eb6e8f PP |
862 | |
863 | /* | |
64cadc66 | 864 | * Defines an iterator finalize method attribute attached to a specific |
d3eb6e8f PP |
865 | * source component class descriptor. |
866 | * | |
867 | * _id: Plugin descriptor ID (C identifier). | |
868 | * _comp_class_id: Component class descriptor ID (C identifier). | |
64cadc66 | 869 | * _x: Iterator finalize method |
d6e69534 | 870 | * (bt_component_class_source_message_iterator_finalize_method). |
d3eb6e8f | 871 | */ |
d6e69534 PP |
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) | |
d3eb6e8f | 874 | |
d3eb6e8f PP |
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 | |
d6e69534 | 882 | * (bt_component_class_filter_message_iterator_init_method). |
d3eb6e8f | 883 | */ |
d6e69534 PP |
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) | |
d3eb6e8f PP |
886 | |
887 | /* | |
64cadc66 | 888 | * Defines an iterator finalize method attribute attached to a specific |
d3eb6e8f PP |
889 | * filter component class descriptor. |
890 | * | |
891 | * _id: Plugin descriptor ID (C identifier). | |
892 | * _comp_class_id: Component class descriptor ID (C identifier). | |
64cadc66 | 893 | * _x: Iterator finalize method |
d6e69534 | 894 | * (bt_component_class_filter_message_iterator_finalize_method). |
d3eb6e8f | 895 | */ |
d6e69534 PP |
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) | |
d3eb6e8f | 898 | |
6ba0b073 PP |
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) | |
b6de043b PP |
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) | |
6ba0b073 PP |
956 | |
957 | /* | |
d3e4dcd8 PP |
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 | * | |
d3eb6e8f | 962 | * _name: Component class name (C identifier). |
d6e69534 PP |
963 | * _msg_iter_next_method: Component class's iterator next method |
964 | * (bt_component_class_source_message_iterator_next_method). | |
d3e4dcd8 | 965 | */ |
d6e69534 PP |
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) | |
d3e4dcd8 PP |
968 | |
969 | /* | |
970 | * Defines a filter component class attached to the automatic plugin | |
6ba0b073 PP |
971 | * descriptor. Its ID is the same as its name, hence its name must be a |
972 | * C identifier in this version. | |
973 | * | |
d3eb6e8f | 974 | * _name: Component class name (C identifier). |
d6e69534 PP |
975 | * _msg_iter_next_method: Component class's iterator next method |
976 | * (bt_component_class_filter_message_iterator_next_method). | |
6ba0b073 | 977 | */ |
d6e69534 PP |
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) | |
6ba0b073 PP |
980 | |
981 | /* | |
d3e4dcd8 PP |
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 | |
0d72b8c3 | 988 | * (bt_component_class_sink_consume_method). |
d3e4dcd8 PP |
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 | |
6ba0b073 PP |
995 | * descriptor which is attached to the automatic plugin descriptor. |
996 | * | |
d3e4dcd8 PP |
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 | ||
279b3f15 PP |
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 | ||
d3e4dcd8 PP |
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). | |
0d72b8c3 | 1059 | * _x: Initialization method (bt_component_class_source_init_method). |
d3e4dcd8 PP |
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). | |
0d72b8c3 | 1070 | * _x: Initialization method (bt_component_class_filter_init_method). |
d3e4dcd8 PP |
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). | |
0d72b8c3 | 1081 | * _x: Initialization method (bt_component_class_sink_init_method). |
d3e4dcd8 PP |
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 | /* | |
d94d92ac | 1087 | * Defines a finalization method attribute attached to a source component |
d3e4dcd8 PP |
1088 | * class descriptor which is attached to the automatic plugin |
1089 | * descriptor. | |
1090 | * | |
1091 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1092 | * _x: Initialization method (bt_component_class_source_finalize_method). |
d3e4dcd8 | 1093 | */ |
64cadc66 PP |
1094 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \ |
1095 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3e4dcd8 PP |
1096 | |
1097 | /* | |
d94d92ac | 1098 | * Defines a finalization method attribute attached to a filter component |
d3e4dcd8 PP |
1099 | * class descriptor which is attached to the automatic plugin |
1100 | * descriptor. | |
1101 | * | |
1102 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1103 | * _x: Initialization method (bt_component_class_filter_finalize_method). |
d3e4dcd8 | 1104 | */ |
64cadc66 PP |
1105 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \ |
1106 | BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3e4dcd8 PP |
1107 | |
1108 | /* | |
d94d92ac | 1109 | * Defines a finalization method attribute attached to a sink component class |
d3e4dcd8 PP |
1110 | * descriptor which is attached to the automatic plugin descriptor. |
1111 | * | |
1112 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1113 | * _x: Initialization method (bt_component_class_sink_finalize_method). |
d3e4dcd8 | 1114 | */ |
64cadc66 PP |
1115 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \ |
1116 | BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3e4dcd8 | 1117 | |
8463eac2 | 1118 | /* |
a67681c1 | 1119 | * Defines a query method attribute attached to a source component |
8463eac2 PP |
1120 | * class descriptor which is attached to the automatic plugin |
1121 | * descriptor. | |
1122 | * | |
1123 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1124 | * _x: Initialization method (bt_component_class_source_query_method). |
8463eac2 | 1125 | */ |
a67681c1 PP |
1126 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
1127 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) | |
8463eac2 PP |
1128 | |
1129 | /* | |
a67681c1 | 1130 | * Defines a query method attribute attached to a filter component |
8463eac2 PP |
1131 | * class descriptor which is attached to the automatic plugin |
1132 | * descriptor. | |
1133 | * | |
1134 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1135 | * _x: Initialization method (bt_component_class_filter_query_method). |
8463eac2 | 1136 | */ |
a67681c1 PP |
1137 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
1138 | BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) | |
8463eac2 PP |
1139 | |
1140 | /* | |
a67681c1 | 1141 | * Defines a query method attribute attached to a sink component |
8463eac2 PP |
1142 | * class descriptor which is attached to the automatic plugin |
1143 | * descriptor. | |
1144 | * | |
1145 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1146 | * _x: Initialization method (bt_component_class_sink_query_method). |
8463eac2 | 1147 | */ |
a67681c1 PP |
1148 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
1149 | BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) | |
8463eac2 | 1150 | |
d3e4dcd8 | 1151 | /* |
d94d92ac PP |
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. | |
72b913fb PP |
1155 | * |
1156 | * _name: Component class name (C identifier). | |
1157 | * _x: Accept port connection method | |
0d72b8c3 | 1158 | * (bt_component_class_filter_accept_input_port_connection_method). |
72b913fb | 1159 | */ |
d94d92ac PP |
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) | |
72b913fb PP |
1162 | |
1163 | /* | |
d94d92ac PP |
1164 | * Defines an accept input port connection method attribute attached to |
1165 | * a sink component class descriptor which is attached to the automatic | |
72b913fb | 1166 | * plugin descriptor. |
d3e4dcd8 PP |
1167 | * |
1168 | * _name: Component class name (C identifier). | |
72b913fb | 1169 | * _x: Accept port connection method |
0d72b8c3 | 1170 | * (bt_component_class_sink_accept_input_port_connection_method). |
d3e4dcd8 | 1171 | */ |
d94d92ac PP |
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) | |
d3e4dcd8 PP |
1174 | |
1175 | /* | |
d94d92ac PP |
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. | |
2d41b99e JG |
1179 | * |
1180 | * _name: Component class name (C identifier). | |
72b913fb | 1181 | * _x: Accept port connection method |
0d72b8c3 | 1182 | * (bt_component_class_source_accept_output_port_connection_method). |
2d41b99e | 1183 | */ |
d94d92ac PP |
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) | |
2d41b99e | 1186 | |
0d8b4d8e | 1187 | /* |
d94d92ac PP |
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. | |
0d8b4d8e PP |
1191 | * |
1192 | * _name: Component class name (C identifier). | |
d94d92ac | 1193 | * _x: Accept port connection method |
0d72b8c3 | 1194 | * (bt_component_class_filter_accept_output_port_connection_method). |
0d8b4d8e | 1195 | */ |
d94d92ac PP |
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) | |
0d8b4d8e PP |
1198 | |
1199 | /* | |
d94d92ac | 1200 | * Defines an input port connected method attribute attached to a filter |
0d8b4d8e PP |
1201 | * component class descriptor which is attached to the automatic plugin |
1202 | * descriptor. | |
1203 | * | |
1204 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1205 | * _x: Port connected (bt_component_class_filter_input_port_connected_method). |
0d8b4d8e | 1206 | */ |
d94d92ac PP |
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) | |
0d8b4d8e PP |
1209 | |
1210 | /* | |
d94d92ac | 1211 | * Defines an input port connected method attribute attached to a sink |
0d8b4d8e PP |
1212 | * component class descriptor which is attached to the automatic plugin |
1213 | * descriptor. | |
1214 | * | |
1215 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1216 | * _x: Port connected (bt_component_class_sink_input_port_connected_method). |
0d8b4d8e | 1217 | */ |
d94d92ac PP |
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) | |
0d8b4d8e | 1220 | |
2d41b99e | 1221 | /* |
d94d92ac | 1222 | * Defines an output port connected method attribute attached to a source |
72b913fb PP |
1223 | * component class descriptor which is attached to the automatic plugin |
1224 | * descriptor. | |
1225 | * | |
1226 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1227 | * _x: Port connected (bt_component_class_source_output_port_connected_method). |
72b913fb | 1228 | */ |
d94d92ac PP |
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) | |
72b913fb PP |
1231 | |
1232 | /* | |
d94d92ac | 1233 | * Defines an output port connected method attribute attached to a filter |
72b913fb PP |
1234 | * component class descriptor which is attached to the automatic plugin |
1235 | * descriptor. | |
1236 | * | |
1237 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1238 | * _x: Port connected (bt_component_class_filter_output_port_connected_method). |
72b913fb | 1239 | */ |
d94d92ac PP |
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) | |
72b913fb | 1242 | |
d3eb6e8f PP |
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 | |
d6e69534 | 1250 | * (bt_component_class_source_message_iterator_init_method). |
d3eb6e8f | 1251 | */ |
d6e69534 PP |
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) | |
d3eb6e8f PP |
1254 | |
1255 | /* | |
64cadc66 | 1256 | * Defines an iterator finalize method attribute attached to a source |
d3eb6e8f PP |
1257 | * component class descriptor which is attached to the automatic plugin |
1258 | * descriptor. | |
1259 | * | |
1260 | * _name: Component class name (C identifier). | |
64cadc66 | 1261 | * _x: Iterator finalize method |
d6e69534 | 1262 | * (bt_component_class_source_message_iterator_finalize_method). |
d3eb6e8f | 1263 | */ |
d6e69534 PP |
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) | |
d3eb6e8f | 1266 | |
d3eb6e8f PP |
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 | |
d6e69534 | 1274 | * (bt_component_class_filter_message_iterator_init_method). |
d3eb6e8f | 1275 | */ |
d6e69534 PP |
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) | |
d3eb6e8f PP |
1278 | |
1279 | /* | |
64cadc66 | 1280 | * Defines an iterator finalize method attribute attached to a filter |
d3eb6e8f PP |
1281 | * component class descriptor which is attached to the automatic plugin |
1282 | * descriptor. | |
1283 | * | |
1284 | * _name: Component class name (C identifier). | |
64cadc66 | 1285 | * _x: Iterator finalize method |
d6e69534 | 1286 | * (bt_component_class_filter_message_iterator_finalize_method). |
d3eb6e8f | 1287 | */ |
d6e69534 PP |
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) | |
d3eb6e8f | 1290 | |
52238017 MJ |
1291 | #define BT_PLUGIN_MODULE() \ |
1292 | static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \ | |
4581096d PP |
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; \ | |
52238017 MJ |
1295 | \ |
1296 | static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \ | |
4581096d PP |
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; \ | |
52238017 MJ |
1299 | \ |
1300 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \ | |
4581096d PP |
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; \ | |
52238017 MJ |
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; \ | |
4581096d PP |
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; \ | |
52238017 MJ |
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 | ||
33b34c43 PP |
1341 | #ifdef __cplusplus |
1342 | } | |
1343 | #endif | |
1344 | ||
1345 | #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */ |