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