Commit | Line | Data |
---|---|---|
33b34c43 PP |
1 | #ifndef BABELTRACE_PLUGIN_PLUGIN_DEV_H |
2 | #define BABELTRACE_PLUGIN_PLUGIN_DEV_H | |
3 | ||
4 | /* | |
6ba0b073 | 5 | * BabelTrace - Babeltrace Plug-in Development API |
33b34c43 PP |
6 | * |
7 | * This is the header that you need to include for the development of | |
8 | * a Babeltrace plug-in. | |
9 | * | |
10 | * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
11 | * Copyright 2017 Philippe Proulx <pproulx@efficios.com> | |
12 | * | |
13 | * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
14 | * | |
15 | * Permission is hereby granted, free of charge, to any person obtaining a copy | |
16 | * of this software and associated documentation files (the "Software"), to deal | |
17 | * in the Software without restriction, including without limitation the rights | |
18 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
19 | * copies of the Software, and to permit persons to whom the Software is | |
20 | * furnished to do so, subject to the following conditions: | |
21 | * | |
22 | * The above copyright notice and this permission notice shall be included in | |
23 | * all copies or substantial portions of the Software. | |
24 | * | |
25 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
26 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
27 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
28 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
29 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
30 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
31 | * SOFTWARE. | |
32 | */ | |
33 | ||
6ba0b073 | 34 | #include <stdint.h> |
33b34c43 | 35 | #include <babeltrace/plugin/plugin.h> |
b2e0c907 PP |
36 | #include <babeltrace/graph/component-class.h> |
37 | #include <babeltrace/graph/component-class-source.h> | |
38 | #include <babeltrace/graph/component-class-filter.h> | |
39 | #include <babeltrace/graph/component-class-sink.h> | |
33b34c43 PP |
40 | |
41 | #ifdef __cplusplus | |
42 | extern "C" { | |
43 | #endif | |
44 | ||
6ba0b073 PP |
45 | /* |
46 | * Plugin interface's version, not synced with Babeltrace's version | |
47 | * (internal use). | |
48 | */ | |
49 | #define __BT_PLUGIN_VERSION_MAJOR 1 | |
50 | #define __BT_PLUGIN_VERSION_MINOR 0 | |
51 | ||
52 | /* Plugin initialization function type */ | |
33b34c43 PP |
53 | typedef enum bt_plugin_status (*bt_plugin_init_func)( |
54 | struct bt_plugin *plugin); | |
55 | ||
6ba0b073 | 56 | /* Plugin exit function type */ |
33b34c43 PP |
57 | typedef enum bt_plugin_status (*bt_plugin_exit_func)(void); |
58 | ||
6ba0b073 PP |
59 | /* |
60 | * Function to call from a plugin's initialization function to add a | |
61 | * component class to a plugin object. | |
62 | */ | |
33b34c43 PP |
63 | extern enum bt_plugin_status bt_plugin_add_component_class( |
64 | struct bt_plugin *plugin, | |
65 | struct bt_component_class *component_class); | |
66 | ||
6ba0b073 PP |
67 | /* Plugin descriptor: describes a single plugin (internal use) */ |
68 | struct __bt_plugin_descriptor { | |
69 | /* Plugin's interface major version number */ | |
70 | uint32_t major; | |
71 | ||
72 | /* Plugin's interface minor version number */ | |
73 | uint32_t minor; | |
74 | ||
75 | /* Plugin's name */ | |
76 | const char *name; | |
77 | } __attribute__((packed)); | |
78 | ||
79 | /* Type of a plugin attribute (internal use) */ | |
80 | enum __bt_plugin_descriptor_attribute_type { | |
81 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT = 0, | |
82 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT = 1, | |
83 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR = 2, | |
84 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE = 3, | |
85 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 4, | |
b6de043b PP |
86 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION = 5, |
87 | }; | |
88 | ||
89 | /* Plugin (user) version */ | |
90 | struct __bt_plugin_descriptor_version { | |
91 | uint32_t major; | |
92 | uint32_t minor; | |
93 | uint32_t patch; | |
94 | const char *extra; | |
6ba0b073 PP |
95 | }; |
96 | ||
97 | /* Plugin attribute (internal use) */ | |
98 | struct __bt_plugin_descriptor_attribute { | |
99 | /* Plugin descriptor to which to associate this attribute */ | |
100 | const struct __bt_plugin_descriptor *plugin_descriptor; | |
101 | ||
6ba0b073 PP |
102 | /* Name of the attribute's type for debug purposes */ |
103 | const char *type_name; | |
104 | ||
857f4dce PP |
105 | /* Attribute's type */ |
106 | enum __bt_plugin_descriptor_attribute_type type; | |
107 | ||
d3e4dcd8 | 108 | /* Attribute's value (depends on attribute's type) */ |
6ba0b073 PP |
109 | union { |
110 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */ | |
111 | bt_plugin_init_func init; | |
112 | ||
113 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */ | |
114 | bt_plugin_exit_func exit; | |
115 | ||
116 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */ | |
117 | const char *author; | |
118 | ||
119 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */ | |
120 | const char *license; | |
121 | ||
122 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */ | |
123 | const char *description; | |
b6de043b PP |
124 | |
125 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */ | |
126 | struct __bt_plugin_descriptor_version version; | |
6ba0b073 PP |
127 | } value; |
128 | } __attribute__((packed)); | |
129 | ||
130 | /* Component class descriptor (internal use) */ | |
131 | struct __bt_plugin_component_class_descriptor { | |
132 | /* | |
133 | * Plugin descriptor to which to associate this component | |
134 | * class descriptor. | |
135 | */ | |
136 | const struct __bt_plugin_descriptor *plugin_descriptor; | |
137 | ||
6ba0b073 PP |
138 | /* Component class name */ |
139 | const char *name; | |
140 | ||
857f4dce PP |
141 | /* Component class type */ |
142 | enum bt_component_class_type type; | |
143 | ||
d3e4dcd8 PP |
144 | /* Mandatory methods (depends on component class type) */ |
145 | union { | |
146 | /* BT_COMPONENT_CLASS_TYPE_SOURCE */ | |
147 | struct { | |
d3eb6e8f | 148 | bt_component_class_notification_iterator_next_method notif_iter_next; |
d3e4dcd8 PP |
149 | } source; |
150 | ||
151 | /* BT_COMPONENT_CLASS_TYPE_FILTER */ | |
152 | struct { | |
d3eb6e8f | 153 | bt_component_class_notification_iterator_next_method notif_iter_next; |
d3e4dcd8 PP |
154 | } filter; |
155 | ||
156 | /* BT_COMPONENT_CLASS_TYPE_SINK */ | |
157 | struct { | |
158 | bt_component_class_sink_consume_method consume; | |
159 | } sink; | |
160 | } methods; | |
6ba0b073 PP |
161 | } __attribute__((packed)); |
162 | ||
163 | /* Type of a component class attribute (internal use) */ | |
164 | enum __bt_plugin_component_class_descriptor_attribute_type { | |
72b913fb PP |
165 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 0, |
166 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP = 1, | |
167 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD = 2, | |
64cadc66 | 168 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD = 3, |
72b913fb PP |
169 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD = 4, |
170 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD = 5, | |
0d8b4d8e PP |
171 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD = 7, |
172 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD = 8, | |
173 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD = 9, | |
174 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD = 10, | |
175 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD = 11, | |
6ba0b073 PP |
176 | }; |
177 | ||
178 | /* Component class attribute (internal use) */ | |
179 | struct __bt_plugin_component_class_descriptor_attribute { | |
180 | /* | |
181 | * Component class plugin attribute to which to associate this | |
182 | * component class attribute. | |
183 | */ | |
184 | const struct __bt_plugin_component_class_descriptor *comp_class_descriptor; | |
185 | ||
6ba0b073 PP |
186 | /* Name of the attribute's type for debug purposes */ |
187 | const char *type_name; | |
188 | ||
857f4dce PP |
189 | /* Attribute's type */ |
190 | enum __bt_plugin_component_class_descriptor_attribute_type type; | |
191 | ||
d3e4dcd8 | 192 | /* Attribute's value (depends on attribute's type) */ |
6ba0b073 | 193 | union { |
d3e4dcd8 | 194 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */ |
6ba0b073 | 195 | const char *description; |
d3e4dcd8 | 196 | |
279b3f15 PP |
197 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */ |
198 | const char *help; | |
199 | ||
d3e4dcd8 PP |
200 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */ |
201 | bt_component_class_init_method init_method; | |
202 | ||
64cadc66 PP |
203 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */ |
204 | bt_component_class_finalize_method finalize_method; | |
d3e4dcd8 | 205 | |
a67681c1 PP |
206 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */ |
207 | bt_component_class_query_method query_method; | |
8463eac2 | 208 | |
72b913fb PP |
209 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD */ |
210 | bt_component_class_accept_port_connection_method accept_port_connection_method; | |
211 | ||
0d8b4d8e PP |
212 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD */ |
213 | bt_component_class_port_connected_method port_connected_method; | |
214 | ||
72b913fb PP |
215 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD */ |
216 | bt_component_class_port_disconnected_method port_disconnected_method; | |
d3eb6e8f PP |
217 | |
218 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD */ | |
219 | bt_component_class_notification_iterator_init_method notif_iter_init_method; | |
220 | ||
64cadc66 PP |
221 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD */ |
222 | bt_component_class_notification_iterator_finalize_method notif_iter_finalize_method; | |
d3eb6e8f PP |
223 | |
224 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD */ | |
225 | bt_component_class_notification_iterator_seek_time_method notif_iter_seek_time_method; | |
6ba0b073 PP |
226 | } value; |
227 | } __attribute__((packed)); | |
228 | ||
229 | /* | |
230 | * Variable attributes for a plugin descriptor pointer to be added to | |
231 | * the plugin descriptor section (internal use). | |
232 | */ | |
233 | #define __BT_PLUGIN_DESCRIPTOR_ATTRS \ | |
234 | __attribute__((section("__bt_plugin_descriptors"), used)) | |
235 | ||
236 | /* | |
237 | * Variable attributes for a plugin attribute pointer to be added to | |
238 | * the plugin attribute section (internal use). | |
239 | */ | |
240 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \ | |
241 | __attribute__((section("__bt_plugin_descriptor_attributes"), used)) | |
242 | ||
243 | /* | |
244 | * Variable attributes for a component class descriptor pointer to be | |
245 | * added to the component class descriptor section (internal use). | |
246 | */ | |
247 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \ | |
248 | __attribute__((section("__bt_plugin_component_class_descriptors"), used)) | |
249 | ||
250 | /* | |
251 | * Variable attributes for a component class descriptor attribute | |
252 | * pointer to be added to the component class descriptor attribute | |
253 | * section (internal use). | |
254 | */ | |
255 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \ | |
256 | __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) | |
257 | ||
258 | /* | |
259 | * Declares a plugin descriptor pointer variable with a custom ID. | |
260 | * | |
261 | * _id: ID (any valid C identifier except `auto`). | |
262 | */ | |
263 | #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id | |
264 | ||
265 | /* | |
266 | * Defines a plugin descriptor with a custom ID. | |
267 | * | |
268 | * _id: ID (any valid C identifier except `auto`). | |
269 | * _name: Plugin's name (C string). | |
270 | */ | |
271 | #define BT_PLUGIN_WITH_ID(_id, _name) \ | |
272 | struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \ | |
273 | .major = __BT_PLUGIN_VERSION_MAJOR, \ | |
274 | .minor = __BT_PLUGIN_VERSION_MINOR, \ | |
275 | .name = _name, \ | |
276 | }; \ | |
277 | static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id; \ | |
278 | extern struct __bt_plugin_descriptor const *__start___bt_plugin_descriptors; \ | |
279 | extern struct __bt_plugin_descriptor const *__stop___bt_plugin_descriptors | |
280 | ||
281 | /* | |
282 | * Defines a plugin attribute (generic, internal use). | |
283 | * | |
284 | * _attr_name: Name of the attribute (C identifier). | |
285 | * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type). | |
286 | * _id: Plugin descriptor ID (C identifier). | |
287 | * _x: Value. | |
288 | */ | |
289 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \ | |
290 | static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \ | |
291 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ | |
6ba0b073 | 292 | .type_name = #_attr_name, \ |
857f4dce | 293 | .type = _attr_type, \ |
6ba0b073 PP |
294 | .value._attr_name = _x, \ |
295 | }; \ | |
296 | 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; \ | |
297 | extern struct __bt_plugin_descriptor_attribute const *__start___bt_plugin_descriptor_attributes; \ | |
298 | extern struct __bt_plugin_descriptor_attribute const *__stop___bt_plugin_descriptor_attributes | |
299 | ||
300 | /* | |
301 | * Defines a plugin initialization function attribute attached to a | |
302 | * specific plugin descriptor. | |
303 | * | |
304 | * _id: Plugin descriptor ID (C identifier). | |
305 | * _x: Initialization function (bt_plugin_init_func). | |
306 | */ | |
307 | #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \ | |
308 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x) | |
309 | ||
310 | /* | |
311 | * Defines a plugin exit function attribute attached to a specific | |
312 | * plugin descriptor. | |
313 | * | |
314 | * _id: Plugin descriptor ID (C identifier). | |
315 | * _x: Exit function (bt_plugin_exit_func). | |
316 | */ | |
317 | #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \ | |
318 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x) | |
319 | ||
320 | /* | |
321 | * Defines an author attribute attached to a specific plugin descriptor. | |
322 | * | |
323 | * _id: Plugin descriptor ID (C identifier). | |
324 | * _x: Author (C string). | |
325 | */ | |
326 | #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \ | |
327 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x) | |
328 | ||
329 | /* | |
330 | * Defines a license attribute attached to a specific plugin descriptor. | |
331 | * | |
332 | * _id: Plugin descriptor ID (C identifier). | |
333 | * _x: License (C string). | |
334 | */ | |
335 | #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \ | |
336 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x) | |
337 | ||
338 | /* | |
339 | * Defines a description attribute attached to a specific plugin | |
340 | * descriptor. | |
341 | * | |
342 | * _id: Plugin descriptor ID (C identifier). | |
343 | * _x: Description (C string). | |
344 | */ | |
345 | #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \ | |
346 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x) | |
347 | ||
b6de043b PP |
348 | #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \ |
349 | {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,} | |
350 | ||
351 | /* | |
352 | * Defines a version attribute attached to a specific plugin descriptor. | |
353 | * | |
354 | * _id: Plugin descriptor ID (C identifier). | |
355 | * _major: Plugin's major version (uint32_t). | |
356 | * _minor: Plugin's minor version (uint32_t). | |
357 | * _patch: Plugin's patch version (uint32_t). | |
358 | * _extra: Plugin's version extra information (C string). | |
359 | */ | |
360 | #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \ | |
361 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra)) | |
362 | ||
6ba0b073 | 363 | /* |
d3e4dcd8 PP |
364 | * Declaration of start and stop symbols of component class descriptors |
365 | * section. | |
366 | */ | |
367 | #define __BT_PLUGIN_DECL_COMPONENT_CLASS_DESCRIPTORS_SECTION_START_STOP \ | |
368 | extern struct __bt_plugin_component_class_descriptor const *__start___bt_plugin_component_class_descriptors; \ | |
369 | extern struct __bt_plugin_component_class_descriptor const *__stop___bt_plugin_component_class_descriptors | |
370 | ||
371 | /* | |
372 | * Defines a source component class descriptor with a custom ID. | |
6ba0b073 | 373 | * |
d3eb6e8f PP |
374 | * _id: ID (any valid C identifier except `auto`). |
375 | * _comp_class_id: Component class ID (C identifier). | |
376 | * _name: Component class name (C string). | |
d3eb6e8f PP |
377 | * _notif_iter_next_method: Component class's iterator next method |
378 | * (bt_component_class_notification_iterator_next_method). | |
6ba0b073 | 379 | */ |
41a2b7ae | 380 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_next_method) \ |
d3e4dcd8 | 381 | static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \ |
6ba0b073 | 382 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ |
6ba0b073 | 383 | .name = _name, \ |
857f4dce | 384 | .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \ |
d3e4dcd8 | 385 | .methods.source = { \ |
d3eb6e8f | 386 | .notif_iter_next = _notif_iter_next_method, \ |
d3e4dcd8 | 387 | }, \ |
6ba0b073 | 388 | }; \ |
d3e4dcd8 PP |
389 | 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; \ |
390 | __BT_PLUGIN_DECL_COMPONENT_CLASS_DESCRIPTORS_SECTION_START_STOP | |
391 | ||
392 | /* | |
393 | * Defines a filter component class descriptor with a custom ID. | |
394 | * | |
395 | * _id: ID (any valid C identifier except `auto`). | |
396 | * _comp_class_id: Component class ID (C identifier). | |
397 | * _name: Component class name (C string). | |
d3eb6e8f PP |
398 | * _notif_iter_next_method: Component class's iterator next method |
399 | * (bt_component_class_notification_iterator_next_method). | |
d3e4dcd8 | 400 | */ |
41a2b7ae | 401 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_next_method) \ |
d3e4dcd8 PP |
402 | static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \ |
403 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ | |
d3e4dcd8 | 404 | .name = _name, \ |
857f4dce | 405 | .type = BT_COMPONENT_CLASS_TYPE_FILTER, \ |
d3e4dcd8 | 406 | .methods.filter = { \ |
d3eb6e8f | 407 | .notif_iter_next = _notif_iter_next_method, \ |
d3e4dcd8 PP |
408 | }, \ |
409 | }; \ | |
410 | 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; \ | |
411 | __BT_PLUGIN_DECL_COMPONENT_CLASS_DESCRIPTORS_SECTION_START_STOP | |
412 | ||
413 | /* | |
414 | * Defines a sink component class descriptor with a custom ID. | |
415 | * | |
416 | * _id: ID (any valid C identifier except `auto`). | |
417 | * _comp_class_id: Component class ID (C identifier). | |
418 | * _name: Component class name (C string). | |
419 | * _consume_method: Component class's iterator consume method | |
420 | * (bt_component_class_sink_consume_method). | |
421 | */ | |
422 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \ | |
423 | static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \ | |
424 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ | |
d3e4dcd8 | 425 | .name = _name, \ |
857f4dce | 426 | .type = BT_COMPONENT_CLASS_TYPE_SINK, \ |
d3e4dcd8 PP |
427 | .methods.sink = { \ |
428 | .consume = _consume_method, \ | |
429 | }, \ | |
430 | }; \ | |
431 | 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; \ | |
432 | __BT_PLUGIN_DECL_COMPONENT_CLASS_DESCRIPTORS_SECTION_START_STOP | |
6ba0b073 PP |
433 | |
434 | /* | |
435 | * Defines a component class descriptor attribute (generic, internal | |
436 | * use). | |
437 | * | |
438 | * _id: Plugin descriptor ID (C identifier). | |
439 | * _comp_class_id: Component class ID (C identifier). | |
d3e4dcd8 | 440 | * _type: Component class type (`source`, `filter`, or `sink`). |
6ba0b073 PP |
441 | * _attr_name: Name of the attribute (C identifier). |
442 | * _attr_type: Type of the attribute | |
443 | * (enum __bt_plugin_descriptor_attribute_type). | |
444 | * _x: Value. | |
445 | */ | |
446 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \ | |
d3e4dcd8 PP |
447 | static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \ |
448 | .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \ | |
6ba0b073 | 449 | .type_name = #_attr_name, \ |
857f4dce | 450 | .type = _attr_type, \ |
d3e4dcd8 | 451 | .value._attr_name = _x, \ |
6ba0b073 | 452 | }; \ |
d3e4dcd8 | 453 | 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 |
454 | extern struct __bt_plugin_component_class_descriptor_attribute const *__start___bt_plugin_component_class_descriptor_attributes; \ |
455 | extern struct __bt_plugin_component_class_descriptor_attribute const *__stop___bt_plugin_component_class_descriptor_attributes | |
456 | ||
457 | /* | |
d3e4dcd8 PP |
458 | * Defines a description attribute attached to a specific source |
459 | * component class descriptor. | |
6ba0b073 PP |
460 | * |
461 | * _id: Plugin descriptor ID (C identifier). | |
462 | * _comp_class_id: Component class descriptor ID (C identifier). | |
6ba0b073 PP |
463 | * _x: Description (C string). |
464 | */ | |
d3e4dcd8 PP |
465 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \ |
466 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x) | |
467 | ||
468 | /* | |
469 | * Defines a description attribute attached to a specific filter | |
470 | * component class descriptor. | |
471 | * | |
472 | * _id: Plugin descriptor ID (C identifier). | |
473 | * _comp_class_id: Component class descriptor ID (C identifier). | |
474 | * _x: Description (C string). | |
475 | */ | |
476 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \ | |
477 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x) | |
478 | ||
479 | /* | |
480 | * Defines a description attribute attached to a specific sink | |
481 | * component class descriptor. | |
482 | * | |
483 | * _id: Plugin descriptor ID (C identifier). | |
484 | * _comp_class_id: Component class descriptor ID (C identifier). | |
485 | * _x: Description (C string). | |
486 | */ | |
487 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \ | |
488 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x) | |
489 | ||
279b3f15 PP |
490 | /* |
491 | * Defines a help attribute attached to a specific source component | |
492 | * class descriptor. | |
493 | * | |
494 | * _id: Plugin descriptor ID (C identifier). | |
495 | * _comp_class_id: Component class descriptor ID (C identifier). | |
496 | * _x: Help (C string). | |
497 | */ | |
498 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \ | |
499 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x) | |
500 | ||
501 | /* | |
502 | * Defines a help attribute attached to a specific filter component | |
503 | * class descriptor. | |
504 | * | |
505 | * _id: Plugin descriptor ID (C identifier). | |
506 | * _comp_class_id: Component class descriptor ID (C identifier). | |
507 | * _x: Help (C string). | |
508 | */ | |
509 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \ | |
510 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x) | |
511 | ||
512 | /* | |
513 | * Defines a help attribute attached to a specific sink component class | |
514 | * descriptor. | |
515 | * | |
516 | * _id: Plugin descriptor ID (C identifier). | |
517 | * _comp_class_id: Component class descriptor ID (C identifier). | |
518 | * _x: Help (C string). | |
519 | */ | |
520 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \ | |
521 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x) | |
522 | ||
d3e4dcd8 PP |
523 | /* |
524 | * Defines an initialization method attribute attached to a specific | |
525 | * source component class descriptor. | |
526 | * | |
527 | * _id: Plugin descriptor ID (C identifier). | |
528 | * _comp_class_id: Component class descriptor ID (C identifier). | |
529 | * _x: Initialization method (bt_component_class_init_method). | |
530 | */ | |
531 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
532 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x) | |
533 | ||
534 | /* | |
535 | * Defines an initialization method attribute attached to a specific | |
536 | * filter component class descriptor. | |
537 | * | |
538 | * _id: Plugin descriptor ID (C identifier). | |
539 | * _comp_class_id: Component class descriptor ID (C identifier). | |
540 | * _x: Initialization method (bt_component_class_init_method). | |
541 | */ | |
542 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
543 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x) | |
544 | ||
545 | /* | |
546 | * Defines an initialization method attribute attached to a specific | |
547 | * sink component class descriptor. | |
548 | * | |
549 | * _id: Plugin descriptor ID (C identifier). | |
550 | * _comp_class_id: Component class descriptor ID (C identifier). | |
551 | * _x: Initialization method (bt_component_class_init_method). | |
552 | */ | |
553 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
554 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x) | |
555 | ||
556 | /* | |
64cadc66 | 557 | * Defines a finalize method attribute attached to a specific source |
d3e4dcd8 PP |
558 | * component class descriptor. |
559 | * | |
560 | * _id: Plugin descriptor ID (C identifier). | |
561 | * _comp_class_id: Component class descriptor ID (C identifier). | |
64cadc66 | 562 | * _x: Finalize method (bt_component_class_finalize_method). |
d3e4dcd8 | 563 | */ |
64cadc66 PP |
564 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
565 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, source, _x) | |
d3e4dcd8 PP |
566 | |
567 | /* | |
64cadc66 | 568 | * Defines a finalize method attribute attached to a specific filter |
d3e4dcd8 PP |
569 | * component class descriptor. |
570 | * | |
571 | * _id: Plugin descriptor ID (C identifier). | |
572 | * _comp_class_id: Component class descriptor ID (C identifier). | |
64cadc66 | 573 | * _x: Finalize method (bt_component_class_finalize_method). |
d3e4dcd8 | 574 | */ |
64cadc66 PP |
575 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
576 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, filter, _x) | |
d3e4dcd8 PP |
577 | |
578 | /* | |
64cadc66 | 579 | * Defines a finalize method attribute attached to a specific sink |
d3e4dcd8 PP |
580 | * component class descriptor. |
581 | * | |
582 | * _id: Plugin descriptor ID (C identifier). | |
583 | * _comp_class_id: Component class descriptor ID (C identifier). | |
64cadc66 | 584 | * _x: Finalize method (bt_component_class_finalize_method). |
d3e4dcd8 | 585 | */ |
64cadc66 PP |
586 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
587 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _id, _comp_class_id, sink, _x) | |
d3e4dcd8 | 588 | |
8463eac2 | 589 | /* |
a67681c1 | 590 | * Defines a query method attribute attached to a specific source |
8463eac2 PP |
591 | * component class descriptor. |
592 | * | |
593 | * _id: Plugin descriptor ID (C identifier). | |
594 | * _comp_class_id: Component class descriptor ID (C identifier). | |
64cadc66 | 595 | * _x: Finalize method (bt_component_class_query_method). |
8463eac2 | 596 | */ |
a67681c1 PP |
597 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
598 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, source, _x) | |
8463eac2 PP |
599 | |
600 | /* | |
a67681c1 | 601 | * Defines a query method attribute attached to a specific filter |
8463eac2 PP |
602 | * component class descriptor. |
603 | * | |
604 | * _id: Plugin descriptor ID (C identifier). | |
605 | * _comp_class_id: Component class descriptor ID (C identifier). | |
64cadc66 | 606 | * _x: Finalize method (bt_component_class_query_method). |
8463eac2 | 607 | */ |
a67681c1 PP |
608 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
609 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, filter, _x) | |
8463eac2 PP |
610 | |
611 | /* | |
a67681c1 | 612 | * Defines a query method attribute attached to a specific sink |
8463eac2 PP |
613 | * component class descriptor. |
614 | * | |
615 | * _id: Plugin descriptor ID (C identifier). | |
616 | * _comp_class_id: Component class descriptor ID (C identifier). | |
64cadc66 | 617 | * _x: Finalize method (bt_component_class_query_method). |
8463eac2 | 618 | */ |
a67681c1 PP |
619 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
620 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x) | |
8463eac2 | 621 | |
d3e4dcd8 | 622 | /* |
72b913fb PP |
623 | * Defines an accept port connection method attribute attached to a |
624 | * specific source component class descriptor. | |
625 | * | |
626 | * _id: Plugin descriptor ID (C identifier). | |
627 | * _comp_class_id: Component class descriptor ID (C identifier). | |
628 | * _x: Accept port connection method | |
629 | * (bt_component_class_accept_port_connection_method). | |
630 | */ | |
631 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
632 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(accept_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD, _id, _comp_class_id, source, _x) | |
633 | ||
634 | /* | |
635 | * Defines an accept port connection method attribute attached to a | |
636 | * specific filter component class descriptor. | |
637 | * | |
638 | * _id: Plugin descriptor ID (C identifier). | |
639 | * _comp_class_id: Component class descriptor ID (C identifier). | |
640 | * _x: Accept port connection method | |
641 | * (bt_component_class_accept_port_connection_method). | |
642 | */ | |
643 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
644 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(accept_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD, _id, _comp_class_id, filter, _x) | |
645 | ||
646 | /* | |
647 | * Defines an accept port connection method attribute attached to a | |
648 | * specific sink component class descriptor. | |
649 | * | |
650 | * _id: Plugin descriptor ID (C identifier). | |
651 | * _comp_class_id: Component class descriptor ID (C identifier). | |
652 | * _x: Accept port connection method | |
653 | * (bt_component_class_accept_port_connection_method). | |
654 | */ | |
655 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
656 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(accept_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD, _id, _comp_class_id, sink, _x) | |
657 | ||
0d8b4d8e PP |
658 | /* |
659 | * Defines a port connected method attribute attached to a specific | |
660 | * source component class descriptor. | |
661 | * | |
662 | * _id: Plugin descriptor ID (C identifier). | |
663 | * _comp_class_id: Component class descriptor ID (C identifier). | |
664 | * _x: Port connected method | |
665 | * (bt_component_class_port_connected_method). | |
666 | */ | |
667 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
668 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD, _id, _comp_class_id, source, _x) | |
669 | ||
670 | /* | |
671 | * Defines a port connected method attribute attached to a specific | |
672 | * filter component class descriptor. | |
673 | * | |
674 | * _id: Plugin descriptor ID (C identifier). | |
675 | * _comp_class_id: Component class descriptor ID (C identifier). | |
676 | * _x: Port connected method | |
677 | * (bt_component_class_port_connected_method). | |
678 | */ | |
679 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
680 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD, _id, _comp_class_id, filter, _x) | |
681 | ||
682 | /* | |
683 | * Defines a port connected method attribute attached to a specific | |
684 | * sink component class descriptor. | |
685 | * | |
686 | * _id: Plugin descriptor ID (C identifier). | |
687 | * _comp_class_id: Component class descriptor ID (C identifier). | |
688 | * _x: Port connected method | |
689 | * (bt_component_class_port_connected_method). | |
690 | */ | |
691 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
692 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD, _id, _comp_class_id, sink, _x) | |
693 | ||
72b913fb PP |
694 | /* |
695 | * Defines a port disconnected method attribute attached to a specific | |
2d41b99e JG |
696 | * source component class descriptor. |
697 | * | |
698 | * _id: Plugin descriptor ID (C identifier). | |
699 | * _comp_class_id: Component class descriptor ID (C identifier). | |
72b913fb PP |
700 | * _x: Port disconnected method |
701 | * (bt_component_class_port_disconnected_method). | |
2d41b99e | 702 | */ |
72b913fb PP |
703 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
704 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, source, _x) | |
2d41b99e JG |
705 | |
706 | /* | |
72b913fb | 707 | * Defines a port disconnected method attribute attached to a specific |
d3e4dcd8 PP |
708 | * filter component class descriptor. |
709 | * | |
710 | * _id: Plugin descriptor ID (C identifier). | |
711 | * _comp_class_id: Component class descriptor ID (C identifier). | |
72b913fb PP |
712 | * _x: Port disconnected method |
713 | * (bt_component_class_port_disconnected_method). | |
d3e4dcd8 | 714 | */ |
72b913fb PP |
715 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
716 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, filter, _x) | |
d3e4dcd8 PP |
717 | |
718 | /* | |
72b913fb | 719 | * Defines a port disconnected method attribute attached to a specific |
d3e4dcd8 PP |
720 | * sink component class descriptor. |
721 | * | |
722 | * _id: Plugin descriptor ID (C identifier). | |
723 | * _comp_class_id: Component class descriptor ID (C identifier). | |
72b913fb PP |
724 | * _x: Port disconnected method |
725 | * (bt_component_class_port_disconnected_method). | |
d3e4dcd8 | 726 | */ |
72b913fb PP |
727 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
728 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_disconnected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD, _id, _comp_class_id, sink, _x) | |
6ba0b073 | 729 | |
d3eb6e8f PP |
730 | /* |
731 | * Defines an iterator initialization method attribute attached to a | |
732 | * specific source component class descriptor. | |
733 | * | |
734 | * _id: Plugin descriptor ID (C identifier). | |
735 | * _comp_class_id: Component class descriptor ID (C identifier). | |
736 | * _x: Iterator initialization method | |
737 | * (bt_component_class_notification_iterator_init_method). | |
738 | */ | |
739 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
740 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD, _id, _comp_class_id, source, _x) | |
741 | ||
742 | /* | |
64cadc66 | 743 | * Defines an iterator finalize method attribute attached to a specific |
d3eb6e8f PP |
744 | * source component class descriptor. |
745 | * | |
746 | * _id: Plugin descriptor ID (C identifier). | |
747 | * _comp_class_id: Component class descriptor ID (C identifier). | |
64cadc66 PP |
748 | * _x: Iterator finalize method |
749 | * (bt_component_class_notification_iterator_finalize_method). | |
d3eb6e8f | 750 | */ |
64cadc66 PP |
751 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
752 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD, _id, _comp_class_id, source, _x) | |
d3eb6e8f PP |
753 | |
754 | /* | |
755 | * Defines an iterator seek time method attribute attached to a specific | |
756 | * source component class descriptor. | |
757 | * | |
758 | * _id: Plugin descriptor ID (C identifier). | |
759 | * _comp_class_id: Component class descriptor ID (C identifier). | |
760 | * _x: Iterator seek time method | |
761 | * (bt_component_class_notification_iterator_seek_time_method). | |
762 | */ | |
763 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
764 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_seek_time_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD, _id, _comp_class_id, source, _x) | |
765 | ||
766 | /* | |
767 | * Defines an iterator initialization method attribute attached to a | |
768 | * specific filter component class descriptor. | |
769 | * | |
770 | * _id: Plugin descriptor ID (C identifier). | |
771 | * _comp_class_id: Component class descriptor ID (C identifier). | |
772 | * _x: Iterator initialization method | |
773 | * (bt_component_class_notification_iterator_init_method). | |
774 | */ | |
775 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
776 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD, _id, _comp_class_id, filter, _x) | |
777 | ||
778 | /* | |
64cadc66 | 779 | * Defines an iterator finalize method attribute attached to a specific |
d3eb6e8f PP |
780 | * filter component class descriptor. |
781 | * | |
782 | * _id: Plugin descriptor ID (C identifier). | |
783 | * _comp_class_id: Component class descriptor ID (C identifier). | |
64cadc66 PP |
784 | * _x: Iterator finalize method |
785 | * (bt_component_class_notification_iterator_finalize_method). | |
d3eb6e8f | 786 | */ |
64cadc66 PP |
787 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
788 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD, _id, _comp_class_id, filter, _x) | |
d3eb6e8f PP |
789 | |
790 | /* | |
791 | * Defines an iterator seek time method attribute attached to a specific | |
792 | * filter component class descriptor. | |
793 | * | |
794 | * _id: Plugin descriptor ID (C identifier). | |
795 | * _comp_class_id: Component class descriptor ID (C identifier). | |
796 | * _x: Iterator seek time method | |
797 | * (bt_component_class_notification_iterator_seek_time_method). | |
798 | */ | |
799 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
800 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_seek_time_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD, _id, _comp_class_id, filter, _x) | |
801 | ||
6ba0b073 PP |
802 | /* |
803 | * Defines a plugin descriptor with an automatic ID. | |
804 | * | |
805 | * _name: Plugin's name (C string). | |
806 | */ | |
807 | #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name) | |
808 | ||
809 | /* | |
810 | * Defines a plugin initialization function attribute attached to the | |
811 | * automatic plugin descriptor. | |
812 | * | |
813 | * _x: Initialization function (bt_plugin_init_func). | |
814 | */ | |
815 | #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x) | |
816 | ||
817 | /* | |
818 | * Defines a plugin exit function attribute attached to the automatic | |
819 | * plugin descriptor. | |
820 | * | |
821 | * _x: Exit function (bt_plugin_exit_func). | |
822 | */ | |
823 | #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x) | |
824 | ||
825 | /* | |
826 | * Defines an author attribute attached to the automatic plugin | |
827 | * descriptor. | |
828 | * | |
829 | * _x: Author (C string). | |
830 | */ | |
831 | #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x) | |
832 | ||
833 | /* | |
834 | * Defines a license attribute attached to the automatic plugin | |
835 | * descriptor. | |
836 | * | |
837 | * _x: License (C string). | |
838 | */ | |
839 | #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x) | |
840 | ||
841 | /* | |
842 | * Defines a description attribute attached to the automatic plugin | |
843 | * descriptor. | |
844 | * | |
845 | * _x: Description (C string). | |
846 | */ | |
847 | #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x) | |
b6de043b PP |
848 | |
849 | /* | |
850 | * Defines a version attribute attached to the automatic plugin | |
851 | * descriptor. | |
852 | * | |
853 | * _major: Plugin's major version (uint32_t). | |
854 | * _minor: Plugin's minor version (uint32_t). | |
855 | * _patch: Plugin's patch version (uint32_t). | |
856 | * _extra: Plugin's version extra information (C string). | |
857 | */ | |
858 | #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra) | |
6ba0b073 PP |
859 | |
860 | /* | |
d3e4dcd8 PP |
861 | * Defines a source component class attached to the automatic plugin |
862 | * descriptor. Its ID is the same as its name, hence its name must be a | |
863 | * C identifier in this version. | |
864 | * | |
d3eb6e8f | 865 | * _name: Component class name (C identifier). |
d3eb6e8f PP |
866 | * _notif_iter_next_method: Component class's iterator next method |
867 | * (bt_component_class_notification_iterator_next_method). | |
d3e4dcd8 | 868 | */ |
41a2b7ae PP |
869 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _notif_iter_next_method) \ |
870 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_next_method) | |
d3e4dcd8 PP |
871 | |
872 | /* | |
873 | * Defines a filter component class attached to the automatic plugin | |
6ba0b073 PP |
874 | * descriptor. Its ID is the same as its name, hence its name must be a |
875 | * C identifier in this version. | |
876 | * | |
d3eb6e8f | 877 | * _name: Component class name (C identifier). |
d3eb6e8f PP |
878 | * _notif_iter_next_method: Component class's iterator next method |
879 | * (bt_component_class_notification_iterator_next_method). | |
6ba0b073 | 880 | */ |
41a2b7ae PP |
881 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _notif_iter_next_method) \ |
882 | BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_next_method) | |
6ba0b073 PP |
883 | |
884 | /* | |
d3e4dcd8 PP |
885 | * Defines a sink component class attached to the automatic plugin |
886 | * descriptor. Its ID is the same as its name, hence its name must be a | |
887 | * C identifier in this version. | |
888 | * | |
889 | * _name: Component class name (C identifier). | |
890 | * _consume_method: Component class's consume method | |
891 | * (bt_component_class_sink_consume_method). | |
892 | */ | |
893 | #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \ | |
894 | BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method) | |
895 | ||
896 | /* | |
897 | * Defines a description attribute attached to a source component class | |
6ba0b073 PP |
898 | * descriptor which is attached to the automatic plugin descriptor. |
899 | * | |
d3e4dcd8 PP |
900 | * _name: Component class name (C identifier). |
901 | * _x: Description (C string). | |
902 | */ | |
903 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \ | |
904 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x) | |
905 | ||
906 | /* | |
907 | * Defines a description attribute attached to a filter component class | |
908 | * descriptor which is attached to the automatic plugin descriptor. | |
909 | * | |
910 | * _name: Component class name (C identifier). | |
911 | * _x: Description (C string). | |
912 | */ | |
913 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \ | |
914 | BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x) | |
915 | ||
916 | /* | |
917 | * Defines a description attribute attached to a sink component class | |
918 | * descriptor which is attached to the automatic plugin descriptor. | |
919 | * | |
920 | * _name: Component class name (C identifier). | |
921 | * _x: Description (C string). | |
922 | */ | |
923 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \ | |
924 | BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x) | |
925 | ||
279b3f15 PP |
926 | /* |
927 | * Defines a help attribute attached to a source component class | |
928 | * descriptor which is attached to the automatic plugin descriptor. | |
929 | * | |
930 | * _name: Component class name (C identifier). | |
931 | * _x: Help (C string). | |
932 | */ | |
933 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \ | |
934 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x) | |
935 | ||
936 | /* | |
937 | * Defines a help attribute attached to a filter component class | |
938 | * descriptor which is attached to the automatic plugin descriptor. | |
939 | * | |
940 | * _name: Component class name (C identifier). | |
941 | * _x: Help (C string). | |
942 | */ | |
943 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \ | |
944 | BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x) | |
945 | ||
946 | /* | |
947 | * Defines a help attribute attached to a sink component class | |
948 | * descriptor which is attached to the automatic plugin descriptor. | |
949 | * | |
950 | * _name: Component class name (C identifier). | |
951 | * _x: Help (C string). | |
952 | */ | |
953 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \ | |
954 | BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x) | |
955 | ||
d3e4dcd8 PP |
956 | /* |
957 | * Defines an initialization method attribute attached to a source | |
958 | * component class descriptor which is attached to the automatic plugin | |
959 | * descriptor. | |
960 | * | |
961 | * _name: Component class name (C identifier). | |
962 | * _x: Initialization method (bt_component_class_init_method). | |
963 | */ | |
964 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ | |
965 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) | |
966 | ||
967 | /* | |
968 | * Defines an initialization method attribute attached to a filter | |
969 | * component class descriptor which is attached to the automatic plugin | |
970 | * descriptor. | |
971 | * | |
972 | * _name: Component class name (C identifier). | |
973 | * _x: Initialization method (bt_component_class_init_method). | |
974 | */ | |
975 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ | |
976 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) | |
977 | ||
978 | /* | |
979 | * Defines an initialization method attribute attached to a sink | |
980 | * component class descriptor which is attached to the automatic plugin | |
981 | * descriptor. | |
982 | * | |
983 | * _name: Component class name (C identifier). | |
984 | * _x: Initialization method (bt_component_class_init_method). | |
985 | */ | |
986 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ | |
987 | BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) | |
988 | ||
989 | /* | |
64cadc66 | 990 | * Defines a finalize method attribute attached to a source component |
d3e4dcd8 PP |
991 | * class descriptor which is attached to the automatic plugin |
992 | * descriptor. | |
993 | * | |
994 | * _name: Component class name (C identifier). | |
64cadc66 | 995 | * _x: Initialization method (bt_component_class_finalize_method). |
d3e4dcd8 | 996 | */ |
64cadc66 PP |
997 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \ |
998 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3e4dcd8 PP |
999 | |
1000 | /* | |
64cadc66 | 1001 | * Defines a finalize method attribute attached to a filter component |
d3e4dcd8 PP |
1002 | * class descriptor which is attached to the automatic plugin |
1003 | * descriptor. | |
1004 | * | |
1005 | * _name: Component class name (C identifier). | |
64cadc66 | 1006 | * _x: Initialization method (bt_component_class_finalize_method). |
d3e4dcd8 | 1007 | */ |
64cadc66 PP |
1008 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \ |
1009 | BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3e4dcd8 PP |
1010 | |
1011 | /* | |
64cadc66 | 1012 | * Defines a finalize method attribute attached to a sink component class |
d3e4dcd8 PP |
1013 | * descriptor which is attached to the automatic plugin descriptor. |
1014 | * | |
1015 | * _name: Component class name (C identifier). | |
64cadc66 | 1016 | * _x: Initialization method (bt_component_class_finalize_method). |
d3e4dcd8 | 1017 | */ |
64cadc66 PP |
1018 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _x) \ |
1019 | BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3e4dcd8 | 1020 | |
8463eac2 | 1021 | /* |
a67681c1 | 1022 | * Defines a query method attribute attached to a source component |
8463eac2 PP |
1023 | * class descriptor which is attached to the automatic plugin |
1024 | * descriptor. | |
1025 | * | |
1026 | * _name: Component class name (C identifier). | |
a67681c1 | 1027 | * _x: Initialization method (bt_component_class_query_method). |
8463eac2 | 1028 | */ |
a67681c1 PP |
1029 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
1030 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) | |
8463eac2 PP |
1031 | |
1032 | /* | |
a67681c1 | 1033 | * Defines a query method attribute attached to a filter component |
8463eac2 PP |
1034 | * class descriptor which is attached to the automatic plugin |
1035 | * descriptor. | |
1036 | * | |
1037 | * _name: Component class name (C identifier). | |
a67681c1 | 1038 | * _x: Initialization method (bt_component_class_query_method). |
8463eac2 | 1039 | */ |
a67681c1 PP |
1040 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
1041 | BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) | |
8463eac2 PP |
1042 | |
1043 | /* | |
a67681c1 | 1044 | * Defines a query method attribute attached to a sink component |
8463eac2 PP |
1045 | * class descriptor which is attached to the automatic plugin |
1046 | * descriptor. | |
1047 | * | |
1048 | * _name: Component class name (C identifier). | |
a67681c1 | 1049 | * _x: Initialization method (bt_component_class_query_method). |
8463eac2 | 1050 | */ |
a67681c1 PP |
1051 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
1052 | BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) | |
8463eac2 | 1053 | |
d3e4dcd8 | 1054 | /* |
72b913fb PP |
1055 | * Defines an accept port connection method attribute attached to a |
1056 | * source component class descriptor which is attached to the automatic | |
1057 | * plugin descriptor. | |
1058 | * | |
1059 | * _name: Component class name (C identifier). | |
1060 | * _x: Accept port connection method | |
1061 | * (bt_component_class_accept_port_connection_method). | |
1062 | */ | |
1063 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD(_name, _x) \ | |
1064 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) | |
1065 | ||
1066 | /* | |
1067 | * Defines an accept port connection method attribute attached to a | |
1068 | * filter component class descriptor which is attached to the automatic | |
1069 | * plugin descriptor. | |
d3e4dcd8 PP |
1070 | * |
1071 | * _name: Component class name (C identifier). | |
72b913fb PP |
1072 | * _x: Accept port connection method |
1073 | * (bt_component_class_accept_port_connection_method). | |
d3e4dcd8 | 1074 | */ |
72b913fb PP |
1075 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD(_name, _x) \ |
1076 | BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) | |
d3e4dcd8 PP |
1077 | |
1078 | /* | |
72b913fb PP |
1079 | * Defines an accept port connection method attribute attached to a sink |
1080 | * component class descriptor which is attached to the automatic plugin | |
1081 | * descriptor. | |
2d41b99e JG |
1082 | * |
1083 | * _name: Component class name (C identifier). | |
72b913fb PP |
1084 | * _x: Accept port connection method |
1085 | * (bt_component_class_accept_port_connection_method). | |
2d41b99e | 1086 | */ |
72b913fb PP |
1087 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD(_name, _x) \ |
1088 | BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) | |
2d41b99e | 1089 | |
0d8b4d8e PP |
1090 | /* |
1091 | * Defines a port connected method attribute attached to a source | |
1092 | * component class descriptor which is attached to the automatic plugin | |
1093 | * descriptor. | |
1094 | * | |
1095 | * _name: Component class name (C identifier). | |
1096 | * _x: Port connected (bt_component_class_port_connected_method). | |
1097 | */ | |
1098 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_CONNECTED_METHOD(_name, _x) \ | |
1099 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
1100 | ||
1101 | /* | |
1102 | * Defines a port connected method attribute attached to a filter | |
1103 | * component class descriptor which is attached to the automatic plugin | |
1104 | * descriptor. | |
1105 | * | |
1106 | * _name: Component class name (C identifier). | |
1107 | * _x: Port connected (bt_component_class_port_connected_method). | |
1108 | */ | |
1109 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_CONNECTED_METHOD(_name, _x) \ | |
1110 | BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
1111 | ||
1112 | /* | |
1113 | * Defines a port connected method attribute attached to a sink | |
1114 | * component class descriptor which is attached to the automatic plugin | |
1115 | * descriptor. | |
1116 | * | |
1117 | * _name: Component class name (C identifier). | |
1118 | * _x: Port connected (bt_component_class_port_connected_method). | |
1119 | */ | |
1120 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD(_name, _x) \ | |
1121 | BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
1122 | ||
2d41b99e | 1123 | /* |
72b913fb PP |
1124 | * Defines a port disconnected method attribute attached to a source |
1125 | * component class descriptor which is attached to the automatic plugin | |
1126 | * descriptor. | |
1127 | * | |
1128 | * _name: Component class name (C identifier). | |
1129 | * _x: Port disconnected (bt_component_class_port_disconnected_method). | |
1130 | */ | |
1131 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD(_name, _x) \ | |
1132 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
1133 | ||
1134 | /* | |
1135 | * Defines a port disconnected method attribute attached to a filter | |
1136 | * component class descriptor which is attached to the automatic plugin | |
1137 | * descriptor. | |
1138 | * | |
1139 | * _name: Component class name (C identifier). | |
1140 | * _x: Port disconnected (bt_component_class_port_disconnected_method). | |
1141 | */ | |
1142 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD(_name, _x) \ | |
1143 | BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
1144 | ||
1145 | /* | |
1146 | * Defines a port disconnected method attribute attached to a sink | |
1147 | * component class descriptor which is attached to the automatic plugin | |
1148 | * descriptor. | |
d3e4dcd8 PP |
1149 | * |
1150 | * _name: Component class name (C identifier). | |
72b913fb | 1151 | * _x: Port disconnected (bt_component_class_port_disconnected_method). |
6ba0b073 | 1152 | */ |
72b913fb PP |
1153 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD(_name, _x) \ |
1154 | BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
33b34c43 | 1155 | |
d3eb6e8f PP |
1156 | /* |
1157 | * Defines an iterator initialization method attribute attached to a | |
1158 | * source component class descriptor which is attached to the automatic | |
1159 | * plugin descriptor. | |
1160 | * | |
1161 | * _name: Component class name (C identifier). | |
1162 | * _x: Iterator initialization method | |
1163 | * (bt_component_class_notification_iterator_init_method). | |
1164 | */ | |
1165 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(_name, _x) \ | |
1166 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x) | |
1167 | ||
1168 | /* | |
64cadc66 | 1169 | * Defines an iterator finalize method attribute attached to a source |
d3eb6e8f PP |
1170 | * component class descriptor which is attached to the automatic plugin |
1171 | * descriptor. | |
1172 | * | |
1173 | * _name: Component class name (C identifier). | |
64cadc66 PP |
1174 | * _x: Iterator finalize method |
1175 | * (bt_component_class_notification_iterator_finalize_method). | |
d3eb6e8f | 1176 | */ |
64cadc66 PP |
1177 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD(_name, _x) \ |
1178 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3eb6e8f PP |
1179 | |
1180 | /* | |
1181 | * Defines an iterator seek time method attribute attached to a source | |
1182 | * component class descriptor which is attached to the automatic plugin | |
1183 | * descriptor. | |
1184 | * | |
1185 | * _name: Component class name (C identifier). | |
1186 | * _x: Iterator seek time method | |
1187 | * (bt_component_class_notification_iterator_seek_time_method). | |
1188 | */ | |
1189 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD(_name, _x) \ | |
1190 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD_WITH_ID(auto, _name, _x) | |
1191 | ||
1192 | /* | |
1193 | * Defines an iterator initialization method attribute attached to a | |
1194 | * filter component class descriptor which is attached to the automatic | |
1195 | * plugin descriptor. | |
1196 | * | |
1197 | * _name: Component class name (C identifier). | |
1198 | * _x: Iterator initialization method | |
1199 | * (bt_component_class_notification_iterator_init_method). | |
1200 | */ | |
1201 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(_name, _x) \ | |
1202 | BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x) | |
1203 | ||
1204 | /* | |
64cadc66 | 1205 | * Defines an iterator finalize method attribute attached to a filter |
d3eb6e8f PP |
1206 | * component class descriptor which is attached to the automatic plugin |
1207 | * descriptor. | |
1208 | * | |
1209 | * _name: Component class name (C identifier). | |
64cadc66 PP |
1210 | * _x: Iterator finalize method |
1211 | * (bt_component_class_notification_iterator_finalize_method). | |
d3eb6e8f | 1212 | */ |
64cadc66 PP |
1213 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD(_name, _x) \ |
1214 | BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x) | |
d3eb6e8f PP |
1215 | |
1216 | /* | |
1217 | * Defines an iterator seek time method attribute attached to a filter | |
1218 | * component class descriptor which is attached to the automatic plugin | |
1219 | * descriptor. | |
1220 | * | |
1221 | * _name: Component class name (C identifier). | |
1222 | * _x: Iterator seek time method | |
1223 | * (bt_component_class_notification_iterator_seek_time_method). | |
1224 | */ | |
1225 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD(_name, _x) \ | |
1226 | BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD_WITH_ID(auto, _name, _x) | |
1227 | ||
33b34c43 PP |
1228 | #ifdef __cplusplus |
1229 | } | |
1230 | #endif | |
1231 | ||
1232 | #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */ |