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