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