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 | * | |
d94d92ac | 8 | * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com> |
e2f7325d | 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> |
9d408fca PP |
31 | |
32 | /* For enum bt_plugin_status */ | |
92fed4e1 | 33 | #include <babeltrace/plugin/plugin-const.h> |
9d408fca | 34 | |
4cdfc5e8 | 35 | /* For bt_component_class_type */ |
0d72b8c3 PP |
36 | #include <babeltrace/graph/component-class-const.h> |
37 | ||
38 | /* For component class method type definitions */ | |
4cdfc5e8 PP |
39 | #include <babeltrace/graph/component-class-source.h> |
40 | #include <babeltrace/graph/component-class-filter.h> | |
41 | #include <babeltrace/graph/component-class-sink.h> | |
33b34c43 | 42 | |
4581096d 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 */ | |
4cdfc5e8 | 66 | typedef enum bt_self_plugin_status { |
a21d1cb8 PP |
67 | BT_SELF_PLUGIN_STATUS_OK = 0, |
68 | BT_SELF_PLUGIN_STATUS_NOMEM = -12, | |
69 | BT_SELF_PLUGIN_STATUS_ERROR = -1, | |
4cdfc5e8 | 70 | } bt_self_plugin_status; |
9724cce9 | 71 | |
a21d1cb8 PP |
72 | typedef struct bt_self_plugin bt_self_plugin; |
73 | ||
4cdfc5e8 | 74 | typedef bt_self_plugin_status (*bt_plugin_init_func)( |
a21d1cb8 | 75 | bt_self_plugin *plugin); |
33b34c43 | 76 | |
6ba0b073 | 77 | /* Plugin exit function type */ |
9724cce9 | 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 */ |
4cdfc5e8 | 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 { | |
d6e69534 | 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 { | |
d6e69534 | 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 { | |
0d72b8c3 | 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 { | |
d94d92ac 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, | |
183 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD = 5, | |
184 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD = 6, | |
185 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD = 7, | |
186 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD = 8, | |
5badd463 PP |
187 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD = 9, |
188 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD = 10, | |
189 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD = 11, | |
190 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD = 12, | |
191 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD = 13, | |
192 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD = 14, | |
193 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD = 15, | |
6ba0b073 PP |
194 | }; |
195 | ||
196 | /* Component class attribute (internal use) */ | |
197 | struct __bt_plugin_component_class_descriptor_attribute { | |
198 | /* | |
199 | * Component class plugin attribute to which to associate this | |
200 | * component class attribute. | |
201 | */ | |
202 | const struct __bt_plugin_component_class_descriptor *comp_class_descriptor; | |
203 | ||
6ba0b073 PP |
204 | /* Name of the attribute's type for debug purposes */ |
205 | const char *type_name; | |
206 | ||
857f4dce PP |
207 | /* Attribute's type */ |
208 | enum __bt_plugin_component_class_descriptor_attribute_type type; | |
209 | ||
d3e4dcd8 | 210 | /* Attribute's value (depends on attribute's type) */ |
6ba0b073 | 211 | union { |
d3e4dcd8 | 212 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */ |
6ba0b073 | 213 | const char *description; |
d3e4dcd8 | 214 | |
279b3f15 PP |
215 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */ |
216 | const char *help; | |
217 | ||
d3e4dcd8 | 218 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */ |
0d72b8c3 PP |
219 | bt_component_class_source_init_method source_init_method; |
220 | bt_component_class_filter_init_method filter_init_method; | |
221 | bt_component_class_sink_init_method sink_init_method; | |
d3e4dcd8 | 222 | |
64cadc66 | 223 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */ |
0d72b8c3 PP |
224 | bt_component_class_source_finalize_method source_finalize_method; |
225 | bt_component_class_filter_finalize_method filter_finalize_method; | |
226 | bt_component_class_sink_finalize_method sink_finalize_method; | |
d3e4dcd8 | 227 | |
a67681c1 | 228 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */ |
0d72b8c3 PP |
229 | bt_component_class_source_query_method source_query_method; |
230 | bt_component_class_filter_query_method filter_query_method; | |
231 | bt_component_class_sink_query_method sink_query_method; | |
d94d92ac PP |
232 | |
233 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD */ | |
0d72b8c3 PP |
234 | bt_component_class_filter_accept_input_port_connection_method filter_accept_input_port_connection_method; |
235 | bt_component_class_sink_accept_input_port_connection_method sink_accept_input_port_connection_method; | |
d94d92ac PP |
236 | |
237 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD */ | |
0d72b8c3 PP |
238 | bt_component_class_source_accept_output_port_connection_method source_accept_output_port_connection_method; |
239 | bt_component_class_filter_accept_output_port_connection_method filter_accept_output_port_connection_method; | |
8463eac2 | 240 | |
d94d92ac | 241 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */ |
0d72b8c3 PP |
242 | bt_component_class_filter_input_port_connected_method filter_input_port_connected_method; |
243 | bt_component_class_sink_input_port_connected_method sink_input_port_connected_method; | |
72b913fb | 244 | |
d94d92ac | 245 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */ |
0d72b8c3 PP |
246 | bt_component_class_source_output_port_connected_method source_output_port_connected_method; |
247 | bt_component_class_filter_output_port_connected_method filter_output_port_connected_method; | |
0d8b4d8e | 248 | |
5badd463 PP |
249 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */ |
250 | bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method; | |
251 | ||
d6e69534 PP |
252 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD */ |
253 | bt_component_class_source_message_iterator_init_method source_msg_iter_init_method; | |
254 | bt_component_class_filter_message_iterator_init_method filter_msg_iter_init_method; | |
d3eb6e8f | 255 | |
d6e69534 PP |
256 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */ |
257 | bt_component_class_source_message_iterator_finalize_method source_msg_iter_finalize_method; | |
258 | bt_component_class_filter_message_iterator_finalize_method filter_msg_iter_finalize_method; | |
7474e7d3 PP |
259 | |
260 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */ | |
261 | bt_component_class_source_message_iterator_seek_ns_from_origin_method source_msg_iter_seek_ns_from_origin_method; | |
262 | bt_component_class_filter_message_iterator_seek_ns_from_origin_method filter_msg_iter_seek_ns_from_origin_method; | |
263 | ||
264 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */ | |
265 | bt_component_class_source_message_iterator_seek_beginning_method source_msg_iter_seek_beginning_method; | |
266 | bt_component_class_filter_message_iterator_seek_beginning_method filter_msg_iter_seek_beginning_method; | |
267 | ||
268 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */ | |
269 | bt_component_class_source_message_iterator_can_seek_ns_from_origin_method source_msg_iter_can_seek_ns_from_origin_method; | |
270 | bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method filter_msg_iter_can_seek_ns_from_origin_method; | |
271 | ||
272 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */ | |
273 | bt_component_class_source_message_iterator_can_seek_beginning_method source_msg_iter_can_seek_beginning_method; | |
274 | bt_component_class_filter_message_iterator_can_seek_beginning_method filter_msg_iter_can_seek_beginning_method; | |
6ba0b073 PP |
275 | } value; |
276 | } __attribute__((packed)); | |
277 | ||
52238017 MJ |
278 | struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void); |
279 | struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void); | |
280 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void); | |
281 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void); | |
282 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void); | |
283 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void); | |
284 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void); | |
285 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void); | |
286 | ||
6ba0b073 PP |
287 | /* |
288 | * Variable attributes for a plugin descriptor pointer to be added to | |
289 | * the plugin descriptor section (internal use). | |
290 | */ | |
52238017 MJ |
291 | #ifdef __APPLE__ |
292 | #define __BT_PLUGIN_DESCRIPTOR_ATTRS \ | |
293 | __attribute__((section("__DATA,btp_desc"), used)) | |
294 | ||
295 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \ | |
296 | __start___bt_plugin_descriptors | |
297 | ||
298 | #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \ | |
299 | __stop___bt_plugin_descriptors | |
300 | ||
301 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \ | |
302 | __asm("section$start$__DATA$btp_desc") | |
303 | ||
304 | #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \ | |
305 | __asm("section$end$__DATA$btp_desc") | |
306 | ||
307 | #else | |
308 | ||
6ba0b073 PP |
309 | #define __BT_PLUGIN_DESCRIPTOR_ATTRS \ |
310 | __attribute__((section("__bt_plugin_descriptors"), used)) | |
311 | ||
52238017 MJ |
312 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \ |
313 | __start___bt_plugin_descriptors | |
314 | ||
315 | #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \ | |
316 | __stop___bt_plugin_descriptors | |
317 | ||
318 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA | |
319 | ||
320 | #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA | |
321 | #endif | |
322 | ||
6ba0b073 PP |
323 | /* |
324 | * Variable attributes for a plugin attribute pointer to be added to | |
325 | * the plugin attribute section (internal use). | |
326 | */ | |
52238017 MJ |
327 | #ifdef __APPLE__ |
328 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \ | |
329 | __attribute__((section("__DATA,btp_desc_att"), used)) | |
330 | ||
331 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ | |
332 | __start___bt_plugin_descriptor_attributes | |
333 | ||
334 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ | |
335 | __stop___bt_plugin_descriptor_attributes | |
336 | ||
337 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \ | |
338 | __asm("section$start$__DATA$btp_desc_att") | |
339 | ||
340 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \ | |
341 | __asm("section$end$__DATA$btp_desc_att") | |
342 | ||
343 | #else | |
344 | ||
6ba0b073 PP |
345 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
346 | __attribute__((section("__bt_plugin_descriptor_attributes"), used)) | |
347 | ||
52238017 MJ |
348 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ |
349 | __start___bt_plugin_descriptor_attributes | |
350 | ||
351 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ | |
352 | __stop___bt_plugin_descriptor_attributes | |
353 | ||
354 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA | |
355 | ||
356 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA | |
357 | #endif | |
358 | ||
6ba0b073 PP |
359 | /* |
360 | * Variable attributes for a component class descriptor pointer to be | |
361 | * added to the component class descriptor section (internal use). | |
362 | */ | |
52238017 MJ |
363 | #ifdef __APPLE__ |
364 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \ | |
365 | __attribute__((section("__DATA,btp_cc_desc"), used)) | |
366 | ||
367 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \ | |
368 | __start___bt_plugin_component_class_descriptors | |
369 | ||
370 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \ | |
371 | __stop___bt_plugin_component_class_descriptors | |
372 | ||
373 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \ | |
374 | __asm("section$start$__DATA$btp_cc_desc") | |
375 | ||
376 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \ | |
377 | __asm("section$end$__DATA$btp_cc_desc") | |
378 | ||
379 | #else | |
380 | ||
6ba0b073 PP |
381 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \ |
382 | __attribute__((section("__bt_plugin_component_class_descriptors"), used)) | |
383 | ||
52238017 MJ |
384 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \ |
385 | __start___bt_plugin_component_class_descriptors | |
386 | ||
387 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \ | |
388 | __stop___bt_plugin_component_class_descriptors | |
389 | ||
390 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA | |
391 | ||
392 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA | |
393 | #endif | |
394 | ||
6ba0b073 PP |
395 | /* |
396 | * Variable attributes for a component class descriptor attribute | |
397 | * pointer to be added to the component class descriptor attribute | |
398 | * section (internal use). | |
399 | */ | |
52238017 MJ |
400 | #ifdef __APPLE__ |
401 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \ | |
402 | __attribute__((section("__DATA,btp_cc_desc_att"), used)) | |
403 | ||
404 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ | |
405 | __start___bt_plugin_component_class_descriptor_attributes | |
406 | ||
407 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ | |
408 | __stop___bt_plugin_component_class_descriptor_attributes | |
409 | ||
410 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \ | |
411 | __asm("section$start$__DATA$btp_cc_desc_att") | |
412 | ||
413 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \ | |
414 | __asm("section$end$__DATA$btp_cc_desc_att") | |
415 | ||
416 | #else | |
417 | ||
6ba0b073 PP |
418 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
419 | __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) | |
420 | ||
52238017 MJ |
421 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ |
422 | __start___bt_plugin_component_class_descriptor_attributes | |
423 | ||
424 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ | |
425 | __stop___bt_plugin_component_class_descriptor_attributes | |
426 | ||
427 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA | |
428 | ||
429 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA | |
430 | #endif | |
431 | ||
6ba0b073 PP |
432 | /* |
433 | * Declares a plugin descriptor pointer variable with a custom ID. | |
434 | * | |
435 | * _id: ID (any valid C identifier except `auto`). | |
436 | */ | |
437 | #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id | |
438 | ||
439 | /* | |
440 | * Defines a plugin descriptor with a custom ID. | |
441 | * | |
442 | * _id: ID (any valid C identifier except `auto`). | |
443 | * _name: Plugin's name (C string). | |
444 | */ | |
445 | #define BT_PLUGIN_WITH_ID(_id, _name) \ | |
446 | struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \ | |
447 | .major = __BT_PLUGIN_VERSION_MAJOR, \ | |
448 | .minor = __BT_PLUGIN_VERSION_MINOR, \ | |
449 | .name = _name, \ | |
450 | }; \ | |
52238017 | 451 | static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id |
6ba0b073 PP |
452 | |
453 | /* | |
454 | * Defines a plugin attribute (generic, internal use). | |
455 | * | |
456 | * _attr_name: Name of the attribute (C identifier). | |
457 | * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type). | |
458 | * _id: Plugin descriptor ID (C identifier). | |
459 | * _x: Value. | |
460 | */ | |
461 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \ | |
462 | static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \ | |
463 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ | |
6ba0b073 | 464 | .type_name = #_attr_name, \ |
857f4dce | 465 | .type = _attr_type, \ |
6ba0b073 PP |
466 | .value._attr_name = _x, \ |
467 | }; \ | |
52238017 | 468 | 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 |
469 | |
470 | /* | |
471 | * Defines a plugin initialization function attribute attached to a | |
472 | * specific plugin descriptor. | |
473 | * | |
474 | * _id: Plugin descriptor ID (C identifier). | |
475 | * _x: Initialization function (bt_plugin_init_func). | |
476 | */ | |
477 | #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \ | |
478 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x) | |
479 | ||
480 | /* | |
481 | * Defines a plugin exit function attribute attached to a specific | |
482 | * plugin descriptor. | |
483 | * | |
484 | * _id: Plugin descriptor ID (C identifier). | |
485 | * _x: Exit function (bt_plugin_exit_func). | |
486 | */ | |
487 | #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \ | |
488 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x) | |
489 | ||
490 | /* | |
491 | * Defines an author attribute attached to a specific plugin descriptor. | |
492 | * | |
493 | * _id: Plugin descriptor ID (C identifier). | |
494 | * _x: Author (C string). | |
495 | */ | |
496 | #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \ | |
497 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x) | |
498 | ||
499 | /* | |
500 | * Defines a license attribute attached to a specific plugin descriptor. | |
501 | * | |
502 | * _id: Plugin descriptor ID (C identifier). | |
503 | * _x: License (C string). | |
504 | */ | |
505 | #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \ | |
506 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x) | |
507 | ||
508 | /* | |
509 | * Defines a description attribute attached to a specific plugin | |
510 | * descriptor. | |
511 | * | |
512 | * _id: Plugin descriptor ID (C identifier). | |
513 | * _x: Description (C string). | |
514 | */ | |
515 | #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \ | |
516 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x) | |
517 | ||
b6de043b PP |
518 | #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \ |
519 | {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,} | |
520 | ||
521 | /* | |
522 | * Defines a version attribute attached to a specific plugin descriptor. | |
523 | * | |
524 | * _id: Plugin descriptor ID (C identifier). | |
525 | * _major: Plugin's major version (uint32_t). | |
526 | * _minor: Plugin's minor version (uint32_t). | |
527 | * _patch: Plugin's patch version (uint32_t). | |
528 | * _extra: Plugin's version extra information (C string). | |
529 | */ | |
530 | #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \ | |
531 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra)) | |
532 | ||
d3e4dcd8 PP |
533 | /* |
534 | * Defines a source component class descriptor with a custom ID. | |
6ba0b073 | 535 | * |
d3eb6e8f PP |
536 | * _id: ID (any valid C identifier except `auto`). |
537 | * _comp_class_id: Component class ID (C identifier). | |
538 | * _name: Component class name (C string). | |
d6e69534 PP |
539 | * _msg_iter_next_method: Component class's iterator next method |
540 | * (bt_component_class_source_message_iterator_next_method). | |
6ba0b073 | 541 | */ |
d6e69534 | 542 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \ |
d3e4dcd8 | 543 | static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \ |
6ba0b073 | 544 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ |
6ba0b073 | 545 | .name = _name, \ |
857f4dce | 546 | .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \ |
d3e4dcd8 | 547 | .methods.source = { \ |
d6e69534 | 548 | .msg_iter_next = _msg_iter_next_method, \ |
d3e4dcd8 | 549 | }, \ |
6ba0b073 | 550 | }; \ |
52238017 | 551 | 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 |
552 | |
553 | /* | |
554 | * Defines a filter component class descriptor with a custom ID. | |
555 | * | |
d94d92ac PP |
556 | * _id: ID (any valid C identifier except `auto`). |
557 | * _comp_class_id: Component class ID (C identifier). | |
558 | * _name: Component class name (C string). | |
d6e69534 PP |
559 | * _msg_iter_next_method: Component class's iterator next method |
560 | * (bt_component_class_filter_message_iterator_next_method). | |
d3e4dcd8 | 561 | */ |
d6e69534 | 562 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \ |
d3e4dcd8 PP |
563 | static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \ |
564 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ | |
d3e4dcd8 | 565 | .name = _name, \ |
857f4dce | 566 | .type = BT_COMPONENT_CLASS_TYPE_FILTER, \ |
d3e4dcd8 | 567 | .methods.filter = { \ |
d6e69534 | 568 | .msg_iter_next = _msg_iter_next_method, \ |
d3e4dcd8 PP |
569 | }, \ |
570 | }; \ | |
52238017 | 571 | 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 |
572 | |
573 | /* | |
574 | * Defines a sink component class descriptor with a custom ID. | |
575 | * | |
576 | * _id: ID (any valid C identifier except `auto`). | |
577 | * _comp_class_id: Component class ID (C identifier). | |
578 | * _name: Component class name (C string). | |
579 | * _consume_method: Component class's iterator consume method | |
0d72b8c3 | 580 | * (bt_component_class_sink_consume_method). |
d3e4dcd8 PP |
581 | */ |
582 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \ | |
583 | static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \ | |
584 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ | |
d3e4dcd8 | 585 | .name = _name, \ |
857f4dce | 586 | .type = BT_COMPONENT_CLASS_TYPE_SINK, \ |
d3e4dcd8 PP |
587 | .methods.sink = { \ |
588 | .consume = _consume_method, \ | |
589 | }, \ | |
590 | }; \ | |
52238017 | 591 | 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 |
592 | |
593 | /* | |
594 | * Defines a component class descriptor attribute (generic, internal | |
595 | * use). | |
596 | * | |
597 | * _id: Plugin descriptor ID (C identifier). | |
598 | * _comp_class_id: Component class ID (C identifier). | |
d3e4dcd8 | 599 | * _type: Component class type (`source`, `filter`, or `sink`). |
6ba0b073 PP |
600 | * _attr_name: Name of the attribute (C identifier). |
601 | * _attr_type: Type of the attribute | |
602 | * (enum __bt_plugin_descriptor_attribute_type). | |
603 | * _x: Value. | |
604 | */ | |
605 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \ | |
d3e4dcd8 PP |
606 | static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \ |
607 | .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \ | |
6ba0b073 | 608 | .type_name = #_attr_name, \ |
857f4dce | 609 | .type = _attr_type, \ |
d3e4dcd8 | 610 | .value._attr_name = _x, \ |
6ba0b073 | 611 | }; \ |
52238017 | 612 | 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 |
613 | |
614 | /* | |
d3e4dcd8 PP |
615 | * Defines a description attribute attached to a specific source |
616 | * component class descriptor. | |
6ba0b073 PP |
617 | * |
618 | * _id: Plugin descriptor ID (C identifier). | |
619 | * _comp_class_id: Component class descriptor ID (C identifier). | |
6ba0b073 PP |
620 | * _x: Description (C string). |
621 | */ | |
d3e4dcd8 PP |
622 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \ |
623 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x) | |
624 | ||
625 | /* | |
626 | * Defines a description attribute attached to a specific filter | |
627 | * component class descriptor. | |
628 | * | |
629 | * _id: Plugin descriptor ID (C identifier). | |
630 | * _comp_class_id: Component class descriptor ID (C identifier). | |
631 | * _x: Description (C string). | |
632 | */ | |
633 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \ | |
634 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x) | |
635 | ||
636 | /* | |
637 | * Defines a description attribute attached to a specific sink | |
638 | * component class descriptor. | |
639 | * | |
640 | * _id: Plugin descriptor ID (C identifier). | |
641 | * _comp_class_id: Component class descriptor ID (C identifier). | |
642 | * _x: Description (C string). | |
643 | */ | |
644 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \ | |
645 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x) | |
646 | ||
279b3f15 PP |
647 | /* |
648 | * Defines a help attribute attached to a specific source component | |
649 | * class descriptor. | |
650 | * | |
651 | * _id: Plugin descriptor ID (C identifier). | |
652 | * _comp_class_id: Component class descriptor ID (C identifier). | |
653 | * _x: Help (C string). | |
654 | */ | |
655 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \ | |
656 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x) | |
657 | ||
658 | /* | |
659 | * Defines a help attribute attached to a specific filter component | |
660 | * class descriptor. | |
661 | * | |
662 | * _id: Plugin descriptor ID (C identifier). | |
663 | * _comp_class_id: Component class descriptor ID (C identifier). | |
664 | * _x: Help (C string). | |
665 | */ | |
666 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \ | |
667 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x) | |
668 | ||
669 | /* | |
670 | * Defines a help attribute attached to a specific sink component class | |
671 | * descriptor. | |
672 | * | |
673 | * _id: Plugin descriptor ID (C identifier). | |
674 | * _comp_class_id: Component class descriptor ID (C identifier). | |
675 | * _x: Help (C string). | |
676 | */ | |
677 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \ | |
678 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x) | |
679 | ||
d3e4dcd8 PP |
680 | /* |
681 | * Defines an initialization method attribute attached to a specific | |
682 | * source component class descriptor. | |
683 | * | |
684 | * _id: Plugin descriptor ID (C identifier). | |
685 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 686 | * _x: Initialization method (bt_component_class_source_init_method). |
d3e4dcd8 PP |
687 | */ |
688 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
d94d92ac | 689 | __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 |
690 | |
691 | /* | |
692 | * Defines an initialization method attribute attached to a specific | |
693 | * filter component class descriptor. | |
694 | * | |
695 | * _id: Plugin descriptor ID (C identifier). | |
696 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 697 | * _x: Initialization method (bt_component_class_filter_init_method). |
d3e4dcd8 PP |
698 | */ |
699 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
d94d92ac | 700 | __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 |
701 | |
702 | /* | |
703 | * Defines an initialization method attribute attached to a specific | |
704 | * sink component class descriptor. | |
705 | * | |
706 | * _id: Plugin descriptor ID (C identifier). | |
707 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 708 | * _x: Initialization method (bt_component_class_sink_init_method). |
d3e4dcd8 PP |
709 | */ |
710 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
d94d92ac | 711 | __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 |
712 | |
713 | /* | |
d94d92ac | 714 | * Defines a finalization method attribute attached to a specific source |
d3e4dcd8 PP |
715 | * component class descriptor. |
716 | * | |
717 | * _id: Plugin descriptor ID (C identifier). | |
718 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 719 | * _x: Finalize method (bt_component_class_source_finalize_method). |
d3e4dcd8 | 720 | */ |
64cadc66 | 721 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
d94d92ac | 722 | __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 |
723 | |
724 | /* | |
d94d92ac | 725 | * Defines a finalization method attribute attached to a specific filter |
d3e4dcd8 PP |
726 | * component class descriptor. |
727 | * | |
728 | * _id: Plugin descriptor ID (C identifier). | |
729 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 730 | * _x: Finalize method (bt_component_class_filter_finalize_method). |
d3e4dcd8 | 731 | */ |
64cadc66 | 732 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
d94d92ac | 733 | __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 |
734 | |
735 | /* | |
d94d92ac | 736 | * Defines a finalization method attribute attached to a specific sink |
d3e4dcd8 PP |
737 | * component class descriptor. |
738 | * | |
739 | * _id: Plugin descriptor ID (C identifier). | |
740 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 741 | * _x: Finalize method (bt_component_class_sink_finalize_method). |
d3e4dcd8 | 742 | */ |
64cadc66 | 743 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
d94d92ac | 744 | __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 | 745 | |
8463eac2 | 746 | /* |
a67681c1 | 747 | * Defines a query method attribute attached to a specific source |
8463eac2 PP |
748 | * component class descriptor. |
749 | * | |
750 | * _id: Plugin descriptor ID (C identifier). | |
751 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 752 | * _x: Finalize method (bt_component_class_source_query_method). |
8463eac2 | 753 | */ |
a67681c1 | 754 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
d94d92ac | 755 | __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 |
756 | |
757 | /* | |
a67681c1 | 758 | * Defines a query method attribute attached to a specific filter |
8463eac2 PP |
759 | * component class descriptor. |
760 | * | |
761 | * _id: Plugin descriptor ID (C identifier). | |
762 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 763 | * _x: Finalize method (bt_component_class_filter_query_method). |
8463eac2 | 764 | */ |
a67681c1 | 765 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
d94d92ac | 766 | __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 |
767 | |
768 | /* | |
a67681c1 | 769 | * Defines a query method attribute attached to a specific sink |
8463eac2 PP |
770 | * component class descriptor. |
771 | * | |
772 | * _id: Plugin descriptor ID (C identifier). | |
773 | * _comp_class_id: Component class descriptor ID (C identifier). | |
0d72b8c3 | 774 | * _x: Finalize method (bt_component_class_sink_query_method). |
8463eac2 | 775 | */ |
a67681c1 | 776 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
d94d92ac | 777 | __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 | 778 | |
d3e4dcd8 | 779 | /* |
d94d92ac PP |
780 | * Defines an accept input port connection method attribute attached to |
781 | * a specific filter component class descriptor. | |
72b913fb PP |
782 | * |
783 | * _id: Plugin descriptor ID (C identifier). | |
784 | * _comp_class_id: Component class descriptor ID (C identifier). | |
785 | * _x: Accept port connection method | |
0d72b8c3 | 786 | * (bt_component_class_filter_accept_input_port_connection_method). |
72b913fb | 787 | */ |
d94d92ac PP |
788 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
789 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_accept_input_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, filter, _x) | |
72b913fb PP |
790 | |
791 | /* | |
d94d92ac PP |
792 | * Defines an accept input port connection method attribute attached to |
793 | * a specific sink component class descriptor. | |
72b913fb PP |
794 | * |
795 | * _id: Plugin descriptor ID (C identifier). | |
796 | * _comp_class_id: Component class descriptor ID (C identifier). | |
797 | * _x: Accept port connection method | |
0d72b8c3 | 798 | * (bt_component_class_sink_accept_input_port_connection_method). |
72b913fb | 799 | */ |
d94d92ac PP |
800 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
801 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_accept_input_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, sink, _x) | |
72b913fb PP |
802 | |
803 | /* | |
d94d92ac PP |
804 | * Defines an accept output port connection method attribute attached to |
805 | * a specific source component class descriptor. | |
72b913fb PP |
806 | * |
807 | * _id: Plugin descriptor ID (C identifier). | |
808 | * _comp_class_id: Component class descriptor ID (C identifier). | |
809 | * _x: Accept port connection method | |
0d72b8c3 | 810 | * (bt_component_class_source_accept_output_port_connection_method). |
72b913fb | 811 | */ |
d94d92ac PP |
812 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
813 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_accept_output_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, source, _x) | |
72b913fb | 814 | |
0d8b4d8e | 815 | /* |
d94d92ac PP |
816 | * Defines an accept output port connection method attribute attached to |
817 | * a specific filter component class descriptor. | |
818 | * | |
819 | * _id: Plugin descriptor ID (C identifier). | |
820 | * _comp_class_id: Component class descriptor ID (C identifier). | |
821 | * _x: Accept port connection method | |
0d72b8c3 | 822 | * (bt_component_class_filter_accept_output_port_connection_method). |
d94d92ac PP |
823 | */ |
824 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
825 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_accept_output_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, filter, _x) | |
826 | ||
827 | /* | |
828 | * Defines an input port connected method attribute attached to a | |
829 | * specific filter component class descriptor. | |
0d8b4d8e PP |
830 | * |
831 | * _id: Plugin descriptor ID (C identifier). | |
832 | * _comp_class_id: Component class descriptor ID (C identifier). | |
833 | * _x: Port connected method | |
0d72b8c3 | 834 | * (bt_component_class_filter_input_port_connected_method). |
0d8b4d8e | 835 | */ |
d94d92ac PP |
836 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
837 | __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 |
838 | |
839 | /* | |
d94d92ac PP |
840 | * Defines an input port connected method attribute attached to a |
841 | * specific sink component class descriptor. | |
0d8b4d8e PP |
842 | * |
843 | * _id: Plugin descriptor ID (C identifier). | |
844 | * _comp_class_id: Component class descriptor ID (C identifier). | |
845 | * _x: Port connected method | |
0d72b8c3 | 846 | * (bt_component_class_sink_input_port_connected_method). |
0d8b4d8e | 847 | */ |
d94d92ac PP |
848 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
849 | __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 |
850 | |
851 | /* | |
d94d92ac PP |
852 | * Defines an output port connected method attribute attached to a |
853 | * specific source component class descriptor. | |
0d8b4d8e PP |
854 | * |
855 | * _id: Plugin descriptor ID (C identifier). | |
856 | * _comp_class_id: Component class descriptor ID (C identifier). | |
857 | * _x: Port connected method | |
0d72b8c3 | 858 | * (bt_component_class_source_output_port_connected_method). |
0d8b4d8e | 859 | */ |
d94d92ac PP |
860 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
861 | __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 | 862 | |
72b913fb | 863 | /* |
d94d92ac PP |
864 | * Defines an output port connected method attribute attached to a |
865 | * specific filter component class descriptor. | |
866 | * | |
867 | * _id: Plugin descriptor ID (C identifier). | |
868 | * _comp_class_id: Component class descriptor ID (C identifier). | |
869 | * _x: Port connected method | |
0d72b8c3 | 870 | * (bt_component_class_filter_output_port_connected_method). |
d94d92ac PP |
871 | */ |
872 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
873 | __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) | |
874 | ||
5badd463 PP |
875 | /* |
876 | * Defines a "graph is configured" method attribute attached to a | |
877 | * specific sink component class descriptor. | |
878 | * | |
879 | * _id: Plugin descriptor ID (C identifier). | |
880 | * _comp_class_id: Component class descriptor ID (C identifier). | |
881 | * _x: "Graph is configured" method | |
882 | * (bt_component_class_sink_graph_is_configured_method). | |
883 | */ | |
884 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
885 | __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) | |
886 | ||
d3eb6e8f PP |
887 | /* |
888 | * Defines an iterator initialization method attribute attached to a | |
889 | * specific source component class descriptor. | |
890 | * | |
891 | * _id: Plugin descriptor ID (C identifier). | |
892 | * _comp_class_id: Component class descriptor ID (C identifier). | |
893 | * _x: Iterator initialization method | |
d6e69534 | 894 | * (bt_component_class_source_message_iterator_init_method). |
d3eb6e8f | 895 | */ |
d6e69534 PP |
896 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
897 | __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 |
898 | |
899 | /* | |
64cadc66 | 900 | * Defines an iterator finalize method attribute attached to a specific |
d3eb6e8f PP |
901 | * source component class descriptor. |
902 | * | |
903 | * _id: Plugin descriptor ID (C identifier). | |
904 | * _comp_class_id: Component class descriptor ID (C identifier). | |
64cadc66 | 905 | * _x: Iterator finalize method |
d6e69534 | 906 | * (bt_component_class_source_message_iterator_finalize_method). |
d3eb6e8f | 907 | */ |
d6e69534 PP |
908 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
909 | __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 | 910 | |
7474e7d3 PP |
911 | /* |
912 | * Defines an iterator "seek nanoseconds from origin" method attribute | |
913 | * attached to a specific source component class descriptor. | |
914 | * | |
915 | * _id: Plugin descriptor ID (C identifier). | |
916 | * _comp_class_id: Component class descriptor ID (C identifier). | |
917 | * _x: Iterator "seek nanoseconds from origin" method | |
918 | * (bt_component_class_source_message_iterator_seek_ns_from_origin_method). | |
919 | */ | |
920 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
921 | __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) | |
922 | ||
923 | /* | |
924 | * Defines an iterator "seek beginning" method attribute attached to a | |
925 | * specific source component class descriptor. | |
926 | * | |
927 | * _id: Plugin descriptor ID (C identifier). | |
928 | * _comp_class_id: Component class descriptor ID (C identifier). | |
929 | * _x: Iterator "seek beginning" method | |
930 | * (bt_component_class_source_message_iterator_seek_beginning_method). | |
931 | */ | |
932 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
933 | __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) | |
934 | ||
935 | /* | |
936 | * Defines an iterator "can seek nanoseconds from origin" method | |
937 | * attribute attached to a specific source component class descriptor. | |
938 | * | |
939 | * _id: Plugin descriptor ID (C identifier). | |
940 | * _comp_class_id: Component class descriptor ID (C identifier). | |
941 | * _x: Iterator "can seek nanoseconds from origin" method | |
942 | * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method). | |
943 | */ | |
944 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
945 | __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) | |
946 | ||
947 | /* | |
948 | * Defines an iterator "can seek beginning" method attribute attached to a | |
949 | * specific source component class descriptor. | |
950 | * | |
951 | * _id: Plugin descriptor ID (C identifier). | |
952 | * _comp_class_id: Component class descriptor ID (C identifier). | |
953 | * _x: Iterator "can seek beginning" method | |
954 | * (bt_component_class_source_message_iterator_can_seek_beginning_method). | |
955 | */ | |
956 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
957 | __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) | |
958 | ||
d3eb6e8f PP |
959 | /* |
960 | * Defines an iterator initialization method attribute attached to a | |
961 | * specific filter component class descriptor. | |
962 | * | |
963 | * _id: Plugin descriptor ID (C identifier). | |
964 | * _comp_class_id: Component class descriptor ID (C identifier). | |
965 | * _x: Iterator initialization method | |
d6e69534 | 966 | * (bt_component_class_filter_message_iterator_init_method). |
d3eb6e8f | 967 | */ |
d6e69534 PP |
968 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
969 | __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 |
970 | |
971 | /* | |
64cadc66 | 972 | * Defines an iterator finalize method attribute attached to a specific |
d3eb6e8f PP |
973 | * filter component class descriptor. |
974 | * | |
975 | * _id: Plugin descriptor ID (C identifier). | |
976 | * _comp_class_id: Component class descriptor ID (C identifier). | |
64cadc66 | 977 | * _x: Iterator finalize method |
d6e69534 | 978 | * (bt_component_class_filter_message_iterator_finalize_method). |
d3eb6e8f | 979 | */ |
d6e69534 PP |
980 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
981 | __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 | 982 | |
7474e7d3 PP |
983 | /* |
984 | * Defines an iterator "seek nanoseconds from origin" method attribute | |
985 | * attached to a specific filter component class descriptor. | |
986 | * | |
987 | * _id: Plugin descriptor ID (C identifier). | |
988 | * _comp_class_id: Component class descriptor ID (C identifier). | |
989 | * _x: Iterator "seek nanoseconds from origin" method | |
990 | * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method). | |
991 | */ | |
992 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
993 | __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) | |
994 | ||
995 | /* | |
996 | * Defines an iterator "seek beginning" method attribute attached to a | |
997 | * specific filter component class descriptor. | |
998 | * | |
999 | * _id: Plugin descriptor ID (C identifier). | |
1000 | * _comp_class_id: Component class descriptor ID (C identifier). | |
1001 | * _x: Iterator "seek beginning" method | |
1002 | * (bt_component_class_filter_message_iterator_seek_beginning_method). | |
1003 | */ | |
1004 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
1005 | __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) | |
1006 | ||
1007 | /* | |
1008 | * Defines an iterator "can seek nanoseconds from origin" method | |
1009 | * attribute attached to a specific filter component class descriptor. | |
1010 | * | |
1011 | * _id: Plugin descriptor ID (C identifier). | |
1012 | * _comp_class_id: Component class descriptor ID (C identifier). | |
1013 | * _x: Iterator "can seek nanoseconds from origin" method | |
1014 | * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method). | |
1015 | */ | |
1016 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
1017 | __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) | |
1018 | ||
1019 | /* | |
1020 | * Defines an iterator "can seek beginning" method attribute attached to a | |
1021 | * specific filter component class descriptor. | |
1022 | * | |
1023 | * _id: Plugin descriptor ID (C identifier). | |
1024 | * _comp_class_id: Component class descriptor ID (C identifier). | |
1025 | * _x: Iterator "can seek beginning" method | |
1026 | * (bt_component_class_filter_message_iterator_can_seek_beginning_method). | |
1027 | */ | |
1028 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
1029 | __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) | |
1030 | ||
6ba0b073 PP |
1031 | /* |
1032 | * Defines a plugin descriptor with an automatic ID. | |
1033 | * | |
1034 | * _name: Plugin's name (C string). | |
1035 | */ | |
1036 | #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name) | |
1037 | ||
1038 | /* | |
1039 | * Defines a plugin initialization function attribute attached to the | |
1040 | * automatic plugin descriptor. | |
1041 | * | |
1042 | * _x: Initialization function (bt_plugin_init_func). | |
1043 | */ | |
1044 | #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x) | |
1045 | ||
1046 | /* | |
1047 | * Defines a plugin exit function attribute attached to the automatic | |
1048 | * plugin descriptor. | |
1049 | * | |
1050 | * _x: Exit function (bt_plugin_exit_func). | |
1051 | */ | |
1052 | #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x) | |
1053 | ||
1054 | /* | |
1055 | * Defines an author attribute attached to the automatic plugin | |
1056 | * descriptor. | |
1057 | * | |
1058 | * _x: Author (C string). | |
1059 | */ | |
1060 | #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x) | |
1061 | ||
1062 | /* | |
1063 | * Defines a license attribute attached to the automatic plugin | |
1064 | * descriptor. | |
1065 | * | |
1066 | * _x: License (C string). | |
1067 | */ | |
1068 | #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x) | |
1069 | ||
1070 | /* | |
1071 | * Defines a description attribute attached to the automatic plugin | |
1072 | * descriptor. | |
1073 | * | |
1074 | * _x: Description (C string). | |
1075 | */ | |
1076 | #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x) | |
b6de043b PP |
1077 | |
1078 | /* | |
1079 | * Defines a version attribute attached to the automatic plugin | |
1080 | * descriptor. | |
1081 | * | |
1082 | * _major: Plugin's major version (uint32_t). | |
1083 | * _minor: Plugin's minor version (uint32_t). | |
1084 | * _patch: Plugin's patch version (uint32_t). | |
1085 | * _extra: Plugin's version extra information (C string). | |
1086 | */ | |
1087 | #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra) | |
6ba0b073 PP |
1088 | |
1089 | /* | |
d3e4dcd8 PP |
1090 | * Defines a source component class attached to the automatic plugin |
1091 | * descriptor. Its ID is the same as its name, hence its name must be a | |
1092 | * C identifier in this version. | |
1093 | * | |
d3eb6e8f | 1094 | * _name: Component class name (C identifier). |
d6e69534 PP |
1095 | * _msg_iter_next_method: Component class's iterator next method |
1096 | * (bt_component_class_source_message_iterator_next_method). | |
d3e4dcd8 | 1097 | */ |
d6e69534 PP |
1098 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _msg_iter_next_method) \ |
1099 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method) | |
d3e4dcd8 PP |
1100 | |
1101 | /* | |
1102 | * Defines a filter component class attached to the automatic plugin | |
6ba0b073 PP |
1103 | * descriptor. Its ID is the same as its name, hence its name must be a |
1104 | * C identifier in this version. | |
1105 | * | |
d3eb6e8f | 1106 | * _name: Component class name (C identifier). |
d6e69534 PP |
1107 | * _msg_iter_next_method: Component class's iterator next method |
1108 | * (bt_component_class_filter_message_iterator_next_method). | |
6ba0b073 | 1109 | */ |
d6e69534 PP |
1110 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _msg_iter_next_method) \ |
1111 | BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _msg_iter_next_method) | |
6ba0b073 PP |
1112 | |
1113 | /* | |
d3e4dcd8 PP |
1114 | * Defines a sink component class attached to the automatic plugin |
1115 | * descriptor. Its ID is the same as its name, hence its name must be a | |
1116 | * C identifier in this version. | |
1117 | * | |
1118 | * _name: Component class name (C identifier). | |
1119 | * _consume_method: Component class's consume method | |
0d72b8c3 | 1120 | * (bt_component_class_sink_consume_method). |
d3e4dcd8 PP |
1121 | */ |
1122 | #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \ | |
1123 | BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method) | |
1124 | ||
1125 | /* | |
1126 | * Defines a description attribute attached to a source component class | |
6ba0b073 PP |
1127 | * descriptor which is attached to the automatic plugin descriptor. |
1128 | * | |
d3e4dcd8 PP |
1129 | * _name: Component class name (C identifier). |
1130 | * _x: Description (C string). | |
1131 | */ | |
1132 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \ | |
1133 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x) | |
1134 | ||
1135 | /* | |
1136 | * Defines a description attribute attached to a filter component class | |
1137 | * descriptor which is attached to the automatic plugin descriptor. | |
1138 | * | |
1139 | * _name: Component class name (C identifier). | |
1140 | * _x: Description (C string). | |
1141 | */ | |
1142 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \ | |
1143 | BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x) | |
1144 | ||
1145 | /* | |
1146 | * Defines a description attribute attached to a sink component class | |
1147 | * descriptor which is attached to the automatic plugin descriptor. | |
1148 | * | |
1149 | * _name: Component class name (C identifier). | |
1150 | * _x: Description (C string). | |
1151 | */ | |
1152 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \ | |
1153 | BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x) | |
1154 | ||
279b3f15 PP |
1155 | /* |
1156 | * Defines a help attribute attached to a source component class | |
1157 | * descriptor which is attached to the automatic plugin descriptor. | |
1158 | * | |
1159 | * _name: Component class name (C identifier). | |
1160 | * _x: Help (C string). | |
1161 | */ | |
1162 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \ | |
1163 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x) | |
1164 | ||
1165 | /* | |
1166 | * Defines a help attribute attached to a filter component class | |
1167 | * descriptor which is attached to the automatic plugin descriptor. | |
1168 | * | |
1169 | * _name: Component class name (C identifier). | |
1170 | * _x: Help (C string). | |
1171 | */ | |
1172 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \ | |
1173 | BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x) | |
1174 | ||
1175 | /* | |
1176 | * Defines a help attribute attached to a sink component class | |
1177 | * descriptor which is attached to the automatic plugin descriptor. | |
1178 | * | |
1179 | * _name: Component class name (C identifier). | |
1180 | * _x: Help (C string). | |
1181 | */ | |
1182 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \ | |
1183 | BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x) | |
1184 | ||
d3e4dcd8 PP |
1185 | /* |
1186 | * Defines an initialization method attribute attached to a source | |
1187 | * component class descriptor which is attached to the automatic plugin | |
1188 | * descriptor. | |
1189 | * | |
1190 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1191 | * _x: Initialization method (bt_component_class_source_init_method). |
d3e4dcd8 PP |
1192 | */ |
1193 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ | |
1194 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) | |
1195 | ||
1196 | /* | |
1197 | * Defines an initialization method attribute attached to a filter | |
1198 | * component class descriptor which is attached to the automatic plugin | |
1199 | * descriptor. | |
1200 | * | |
1201 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1202 | * _x: Initialization method (bt_component_class_filter_init_method). |
d3e4dcd8 PP |
1203 | */ |
1204 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ | |
1205 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) | |
1206 | ||
1207 | /* | |
1208 | * Defines an initialization method attribute attached to a sink | |
1209 | * component class descriptor which is attached to the automatic plugin | |
1210 | * descriptor. | |
1211 | * | |
1212 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1213 | * _x: Initialization method (bt_component_class_sink_init_method). |
d3e4dcd8 PP |
1214 | */ |
1215 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ | |
1216 | BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) | |
1217 | ||
1218 | /* | |
d94d92ac | 1219 | * Defines a finalization method attribute attached to a source component |
d3e4dcd8 PP |
1220 | * class descriptor which is attached to the automatic plugin |
1221 | * descriptor. | |
1222 | * | |
1223 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1224 | * _x: Initialization method (bt_component_class_source_finalize_method). |
d3e4dcd8 | 1225 | */ |
64cadc66 PP |
1226 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \ |
1227 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3e4dcd8 PP |
1228 | |
1229 | /* | |
d94d92ac | 1230 | * Defines a finalization method attribute attached to a filter component |
d3e4dcd8 PP |
1231 | * class descriptor which is attached to the automatic plugin |
1232 | * descriptor. | |
1233 | * | |
1234 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1235 | * _x: Initialization method (bt_component_class_filter_finalize_method). |
d3e4dcd8 | 1236 | */ |
64cadc66 PP |
1237 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \ |
1238 | BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3e4dcd8 PP |
1239 | |
1240 | /* | |
d94d92ac | 1241 | * Defines a finalization method attribute attached to a sink component class |
d3e4dcd8 PP |
1242 | * descriptor which is attached to the automatic plugin descriptor. |
1243 | * | |
1244 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1245 | * _x: Initialization method (bt_component_class_sink_finalize_method). |
d3e4dcd8 | 1246 | */ |
64cadc66 PP |
1247 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \ |
1248 | BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3e4dcd8 | 1249 | |
8463eac2 | 1250 | /* |
a67681c1 | 1251 | * Defines a query method attribute attached to a source component |
8463eac2 PP |
1252 | * class descriptor which is attached to the automatic plugin |
1253 | * descriptor. | |
1254 | * | |
1255 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1256 | * _x: Initialization method (bt_component_class_source_query_method). |
8463eac2 | 1257 | */ |
a67681c1 PP |
1258 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
1259 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) | |
8463eac2 PP |
1260 | |
1261 | /* | |
a67681c1 | 1262 | * Defines a query method attribute attached to a filter component |
8463eac2 PP |
1263 | * class descriptor which is attached to the automatic plugin |
1264 | * descriptor. | |
1265 | * | |
1266 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1267 | * _x: Initialization method (bt_component_class_filter_query_method). |
8463eac2 | 1268 | */ |
a67681c1 PP |
1269 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
1270 | BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) | |
8463eac2 PP |
1271 | |
1272 | /* | |
a67681c1 | 1273 | * Defines a query method attribute attached to a sink component |
8463eac2 PP |
1274 | * class descriptor which is attached to the automatic plugin |
1275 | * descriptor. | |
1276 | * | |
1277 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1278 | * _x: Initialization method (bt_component_class_sink_query_method). |
8463eac2 | 1279 | */ |
a67681c1 PP |
1280 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
1281 | BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) | |
8463eac2 | 1282 | |
d3e4dcd8 | 1283 | /* |
d94d92ac PP |
1284 | * Defines an accept input port connection method attribute attached to |
1285 | * a filter component class descriptor which is attached to the | |
1286 | * automatic plugin descriptor. | |
72b913fb PP |
1287 | * |
1288 | * _name: Component class name (C identifier). | |
1289 | * _x: Accept port connection method | |
0d72b8c3 | 1290 | * (bt_component_class_filter_accept_input_port_connection_method). |
72b913fb | 1291 | */ |
d94d92ac PP |
1292 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \ |
1293 | BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) | |
72b913fb PP |
1294 | |
1295 | /* | |
d94d92ac PP |
1296 | * Defines an accept input port connection method attribute attached to |
1297 | * a sink component class descriptor which is attached to the automatic | |
72b913fb | 1298 | * plugin descriptor. |
d3e4dcd8 PP |
1299 | * |
1300 | * _name: Component class name (C identifier). | |
72b913fb | 1301 | * _x: Accept port connection method |
0d72b8c3 | 1302 | * (bt_component_class_sink_accept_input_port_connection_method). |
d3e4dcd8 | 1303 | */ |
d94d92ac PP |
1304 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \ |
1305 | BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) | |
d3e4dcd8 PP |
1306 | |
1307 | /* | |
d94d92ac PP |
1308 | * Defines an accept output port connection method attribute attached to |
1309 | * a source component class descriptor which is attached to the | |
1310 | * automatic plugin descriptor. | |
2d41b99e JG |
1311 | * |
1312 | * _name: Component class name (C identifier). | |
72b913fb | 1313 | * _x: Accept port connection method |
0d72b8c3 | 1314 | * (bt_component_class_source_accept_output_port_connection_method). |
2d41b99e | 1315 | */ |
d94d92ac PP |
1316 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \ |
1317 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) | |
2d41b99e | 1318 | |
0d8b4d8e | 1319 | /* |
d94d92ac PP |
1320 | * Defines an accept output port connection method attribute attached to |
1321 | * a filter component class descriptor which is attached to the | |
1322 | * automatic plugin descriptor. | |
0d8b4d8e PP |
1323 | * |
1324 | * _name: Component class name (C identifier). | |
d94d92ac | 1325 | * _x: Accept port connection method |
0d72b8c3 | 1326 | * (bt_component_class_filter_accept_output_port_connection_method). |
0d8b4d8e | 1327 | */ |
d94d92ac PP |
1328 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \ |
1329 | BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) | |
0d8b4d8e PP |
1330 | |
1331 | /* | |
d94d92ac | 1332 | * Defines an input port connected method attribute attached to a filter |
0d8b4d8e PP |
1333 | * component class descriptor which is attached to the automatic plugin |
1334 | * descriptor. | |
1335 | * | |
1336 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1337 | * _x: Port connected (bt_component_class_filter_input_port_connected_method). |
0d8b4d8e | 1338 | */ |
d94d92ac PP |
1339 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \ |
1340 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
0d8b4d8e PP |
1341 | |
1342 | /* | |
d94d92ac | 1343 | * Defines an input port connected method attribute attached to a sink |
0d8b4d8e PP |
1344 | * component class descriptor which is attached to the automatic plugin |
1345 | * descriptor. | |
1346 | * | |
1347 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1348 | * _x: Port connected (bt_component_class_sink_input_port_connected_method). |
0d8b4d8e | 1349 | */ |
d94d92ac PP |
1350 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _x) \ |
1351 | BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
0d8b4d8e | 1352 | |
2d41b99e | 1353 | /* |
d94d92ac | 1354 | * Defines an output port connected method attribute attached to a source |
72b913fb PP |
1355 | * component class descriptor which is attached to the automatic plugin |
1356 | * descriptor. | |
1357 | * | |
1358 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1359 | * _x: Port connected (bt_component_class_source_output_port_connected_method). |
72b913fb | 1360 | */ |
d94d92ac PP |
1361 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \ |
1362 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
72b913fb PP |
1363 | |
1364 | /* | |
d94d92ac | 1365 | * Defines an output port connected method attribute attached to a filter |
72b913fb PP |
1366 | * component class descriptor which is attached to the automatic plugin |
1367 | * descriptor. | |
1368 | * | |
1369 | * _name: Component class name (C identifier). | |
0d72b8c3 | 1370 | * _x: Port connected (bt_component_class_filter_output_port_connected_method). |
72b913fb | 1371 | */ |
d94d92ac PP |
1372 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _x) \ |
1373 | BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
72b913fb | 1374 | |
5badd463 PP |
1375 | /* |
1376 | * Defines a "graph is configured" method attribute attached to | |
1377 | * a sink component class descriptor which is attached to the automatic | |
1378 | * plugin descriptor. | |
1379 | * | |
1380 | * _name: Component class name (C identifier). | |
1381 | * _x: "Graph is configured" method | |
1382 | * (bt_component_class_sink_graph_is_configured_method). | |
1383 | */ | |
1384 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _x) \ | |
1385 | BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _x) | |
1386 | ||
d3eb6e8f PP |
1387 | /* |
1388 | * Defines an iterator initialization method attribute attached to a | |
1389 | * source component class descriptor which is attached to the automatic | |
1390 | * plugin descriptor. | |
1391 | * | |
1392 | * _name: Component class name (C identifier). | |
1393 | * _x: Iterator initialization method | |
d6e69534 | 1394 | * (bt_component_class_source_message_iterator_init_method). |
d3eb6e8f | 1395 | */ |
d6e69534 PP |
1396 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \ |
1397 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x) | |
d3eb6e8f PP |
1398 | |
1399 | /* | |
64cadc66 | 1400 | * Defines an iterator finalize method attribute attached to a source |
d3eb6e8f PP |
1401 | * component class descriptor which is attached to the automatic plugin |
1402 | * descriptor. | |
1403 | * | |
1404 | * _name: Component class name (C identifier). | |
64cadc66 | 1405 | * _x: Iterator finalize method |
d6e69534 | 1406 | * (bt_component_class_source_message_iterator_finalize_method). |
d3eb6e8f | 1407 | */ |
d6e69534 PP |
1408 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \ |
1409 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3eb6e8f | 1410 | |
7474e7d3 PP |
1411 | /* |
1412 | * Defines an iterator "seek nanoseconds from origin" method attribute | |
1413 | * attached to a source component class descriptor which is attached to | |
1414 | * the automatic plugin descriptor. | |
1415 | * | |
1416 | * _name: Component class name (C identifier). | |
1417 | * _x: Iterator "seek nanoseconds from origin" method | |
1418 | * (bt_component_class_source_message_iterator_seek_ns_from_origin_method). | |
1419 | */ | |
1420 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \ | |
1421 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x) | |
1422 | ||
1423 | /* | |
1424 | * Defines an iterator "seek beginning" method attribute | |
1425 | * attached to a source component class descriptor which is attached to | |
1426 | * the automatic plugin descriptor. | |
1427 | * | |
1428 | * _name: Component class name (C identifier). | |
1429 | * _x: Iterator "seek beginning" method | |
1430 | * (bt_component_class_source_message_iterator_seek_beginning_method). | |
1431 | */ | |
1432 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \ | |
1433 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x) | |
1434 | ||
1435 | /* | |
1436 | * Defines an iterator "can seek nanoseconds from origin" method | |
1437 | * attribute attached to a source component class descriptor which is | |
1438 | * attached to the automatic plugin descriptor. | |
1439 | * | |
1440 | * _name: Component class name (C identifier). | |
1441 | * _x: Iterator "can seek nanoseconds from origin" method | |
1442 | * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method). | |
1443 | */ | |
1444 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \ | |
1445 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x) | |
1446 | ||
1447 | /* | |
1448 | * Defines an iterator "can seek beginning" method attribute | |
1449 | * attached to a source component class descriptor which is attached to | |
1450 | * the automatic plugin descriptor. | |
1451 | * | |
1452 | * _name: Component class name (C identifier). | |
1453 | * _x: Iterator "can seek beginning" method | |
1454 | * (bt_component_class_source_message_iterator_can_seek_beginning_method). | |
1455 | */ | |
1456 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \ | |
1457 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x) | |
1458 | ||
d3eb6e8f PP |
1459 | /* |
1460 | * Defines an iterator initialization method attribute attached to a | |
1461 | * filter component class descriptor which is attached to the automatic | |
1462 | * plugin descriptor. | |
1463 | * | |
1464 | * _name: Component class name (C identifier). | |
1465 | * _x: Iterator initialization method | |
d6e69534 | 1466 | * (bt_component_class_filter_message_iterator_init_method). |
d3eb6e8f | 1467 | */ |
d6e69534 PP |
1468 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \ |
1469 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x) | |
d3eb6e8f PP |
1470 | |
1471 | /* | |
64cadc66 | 1472 | * Defines an iterator finalize method attribute attached to a filter |
d3eb6e8f PP |
1473 | * component class descriptor which is attached to the automatic plugin |
1474 | * descriptor. | |
1475 | * | |
1476 | * _name: Component class name (C identifier). | |
64cadc66 | 1477 | * _x: Iterator finalize method |
d6e69534 | 1478 | * (bt_component_class_filter_message_iterator_finalize_method). |
d3eb6e8f | 1479 | */ |
d6e69534 PP |
1480 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(_name, _x) \ |
1481 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3eb6e8f | 1482 | |
7474e7d3 PP |
1483 | /* |
1484 | * Defines an iterator "seek nanoseconds from origin" method attribute | |
1485 | * attached to a filter component class descriptor which is attached to | |
1486 | * the automatic plugin descriptor. | |
1487 | * | |
1488 | * _name: Component class name (C identifier). | |
1489 | * _x: Iterator "seek nanoseconds from origin" method | |
1490 | * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method). | |
1491 | */ | |
1492 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \ | |
1493 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x) | |
1494 | ||
1495 | /* | |
1496 | * Defines an iterator "seek beginning" method attribute | |
1497 | * attached to a filter component class descriptor which is attached to | |
1498 | * the automatic plugin descriptor. | |
1499 | * | |
1500 | * _name: Component class name (C identifier). | |
1501 | * _x: Iterator "seek beginning" method | |
1502 | * (bt_component_class_filter_message_iterator_seek_beginning_method). | |
1503 | */ | |
1504 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \ | |
1505 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x) | |
1506 | ||
1507 | /* | |
1508 | * Defines an iterator "can seek nanoseconds from origin" method | |
1509 | * attribute attached to a filter component class descriptor which is | |
1510 | * attached to the automatic plugin descriptor. | |
1511 | * | |
1512 | * _name: Component class name (C identifier). | |
1513 | * _x: Iterator "can seek nanoseconds from origin" method | |
1514 | * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method). | |
1515 | */ | |
1516 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \ | |
1517 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x) | |
1518 | ||
1519 | /* | |
1520 | * Defines an iterator "can seek beginning" method attribute | |
1521 | * attached to a filter component class descriptor which is attached to | |
1522 | * the automatic plugin descriptor. | |
1523 | * | |
1524 | * _name: Component class name (C identifier). | |
1525 | * _x: Iterator "can seek beginning" method | |
1526 | * (bt_component_class_filter_message_iterator_can_seek_beginning_method). | |
1527 | */ | |
1528 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \ | |
1529 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x) | |
1530 | ||
52238017 MJ |
1531 | #define BT_PLUGIN_MODULE() \ |
1532 | static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \ | |
4581096d PP |
1533 | _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \ |
1534 | _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \ | |
52238017 MJ |
1535 | \ |
1536 | static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \ | |
4581096d PP |
1537 | _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \ |
1538 | _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \ | |
52238017 MJ |
1539 | \ |
1540 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \ | |
4581096d PP |
1541 | _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \ |
1542 | _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \ | |
52238017 MJ |
1543 | \ |
1544 | static struct __bt_plugin_component_class_descriptor_attribute const * const __bt_plugin_component_class_descriptor_attribute_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \ | |
4581096d PP |
1545 | _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; \ |
1546 | _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor_attribute const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \ | |
52238017 MJ |
1547 | \ |
1548 | struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \ | |
1549 | { \ | |
1550 | return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \ | |
1551 | } \ | |
1552 | struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \ | |
1553 | { \ | |
1554 | return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \ | |
1555 | } \ | |
1556 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \ | |
1557 | { \ | |
1558 | return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \ | |
1559 | } \ | |
1560 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \ | |
1561 | { \ | |
1562 | return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \ | |
1563 | } \ | |
1564 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \ | |
1565 | { \ | |
1566 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \ | |
1567 | } \ | |
1568 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \ | |
1569 | { \ | |
1570 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \ | |
1571 | } \ | |
1572 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \ | |
1573 | { \ | |
1574 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \ | |
1575 | } \ | |
1576 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \ | |
1577 | { \ | |
1578 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \ | |
1579 | } | |
1580 | ||
33b34c43 PP |
1581 | #ifdef __cplusplus |
1582 | } | |
1583 | #endif | |
1584 | ||
1585 | #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */ |