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