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