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