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