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 PP |
35 | #include <babeltrace/plugin/plugin.h> |
36 | #include <babeltrace/component/component-class.h> | |
d3e4dcd8 PP |
37 | #include <babeltrace/component/component-class-source.h> |
38 | #include <babeltrace/component/component-class-filter.h> | |
39 | #include <babeltrace/component/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 PP |
148 | bt_component_class_notification_iterator_get_method notif_iter_get; |
149 | bt_component_class_notification_iterator_next_method notif_iter_next; | |
d3e4dcd8 PP |
150 | } source; |
151 | ||
152 | /* BT_COMPONENT_CLASS_TYPE_FILTER */ | |
153 | struct { | |
d3eb6e8f PP |
154 | bt_component_class_notification_iterator_get_method notif_iter_get; |
155 | bt_component_class_notification_iterator_next_method notif_iter_next; | |
d3e4dcd8 PP |
156 | } filter; |
157 | ||
158 | /* BT_COMPONENT_CLASS_TYPE_SINK */ | |
159 | struct { | |
160 | bt_component_class_sink_consume_method consume; | |
161 | } sink; | |
162 | } methods; | |
6ba0b073 PP |
163 | } __attribute__((packed)); |
164 | ||
165 | /* Type of a component class attribute (internal use) */ | |
166 | enum __bt_plugin_component_class_descriptor_attribute_type { | |
72b913fb PP |
167 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 0, |
168 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP = 1, | |
169 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD = 2, | |
170 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESTROY_METHOD = 3, | |
171 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD = 4, | |
172 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD = 5, | |
173 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD = 6, | |
174 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD = 7, | |
175 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_DESTROY_METHOD = 8, | |
176 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD = 9, | |
6ba0b073 PP |
177 | }; |
178 | ||
179 | /* Component class attribute (internal use) */ | |
180 | struct __bt_plugin_component_class_descriptor_attribute { | |
181 | /* | |
182 | * Component class plugin attribute to which to associate this | |
183 | * component class attribute. | |
184 | */ | |
185 | const struct __bt_plugin_component_class_descriptor *comp_class_descriptor; | |
186 | ||
6ba0b073 PP |
187 | /* Name of the attribute's type for debug purposes */ |
188 | const char *type_name; | |
189 | ||
857f4dce PP |
190 | /* Attribute's type */ |
191 | enum __bt_plugin_component_class_descriptor_attribute_type type; | |
192 | ||
d3e4dcd8 | 193 | /* Attribute's value (depends on attribute's type) */ |
6ba0b073 | 194 | union { |
d3e4dcd8 | 195 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */ |
6ba0b073 | 196 | const char *description; |
d3e4dcd8 | 197 | |
279b3f15 PP |
198 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */ |
199 | const char *help; | |
200 | ||
d3e4dcd8 PP |
201 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */ |
202 | bt_component_class_init_method init_method; | |
203 | ||
204 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESTROY_METHOD */ | |
205 | bt_component_class_destroy_method destroy_method; | |
206 | ||
a67681c1 PP |
207 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */ |
208 | bt_component_class_query_method query_method; | |
8463eac2 | 209 | |
72b913fb PP |
210 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD */ |
211 | bt_component_class_accept_port_connection_method accept_port_connection_method; | |
212 | ||
213 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD */ | |
214 | bt_component_class_port_disconnected_method port_disconnected_method; | |
d3eb6e8f PP |
215 | |
216 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD */ | |
217 | bt_component_class_notification_iterator_init_method notif_iter_init_method; | |
218 | ||
219 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_DESTROY_METHOD */ | |
220 | bt_component_class_notification_iterator_destroy_method notif_iter_destroy_method; | |
221 | ||
222 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD */ | |
223 | bt_component_class_notification_iterator_seek_time_method notif_iter_seek_time_method; | |
6ba0b073 PP |
224 | } value; |
225 | } __attribute__((packed)); | |
226 | ||
227 | /* | |
228 | * Variable attributes for a plugin descriptor pointer to be added to | |
229 | * the plugin descriptor section (internal use). | |
230 | */ | |
231 | #define __BT_PLUGIN_DESCRIPTOR_ATTRS \ | |
232 | __attribute__((section("__bt_plugin_descriptors"), used)) | |
233 | ||
234 | /* | |
235 | * Variable attributes for a plugin attribute pointer to be added to | |
236 | * the plugin attribute section (internal use). | |
237 | */ | |
238 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \ | |
239 | __attribute__((section("__bt_plugin_descriptor_attributes"), used)) | |
240 | ||
241 | /* | |
242 | * Variable attributes for a component class descriptor pointer to be | |
243 | * added to the component class descriptor section (internal use). | |
244 | */ | |
245 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \ | |
246 | __attribute__((section("__bt_plugin_component_class_descriptors"), used)) | |
247 | ||
248 | /* | |
249 | * Variable attributes for a component class descriptor attribute | |
250 | * pointer to be added to the component class descriptor attribute | |
251 | * section (internal use). | |
252 | */ | |
253 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \ | |
254 | __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) | |
255 | ||
256 | /* | |
257 | * Declares a plugin descriptor pointer variable with a custom ID. | |
258 | * | |
259 | * _id: ID (any valid C identifier except `auto`). | |
260 | */ | |
261 | #define BT_PLUGIN_DECLARE(_id) extern struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id | |
262 | ||
263 | /* | |
264 | * Defines a plugin descriptor with a custom ID. | |
265 | * | |
266 | * _id: ID (any valid C identifier except `auto`). | |
267 | * _name: Plugin's name (C string). | |
268 | */ | |
269 | #define BT_PLUGIN_WITH_ID(_id, _name) \ | |
270 | struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \ | |
271 | .major = __BT_PLUGIN_VERSION_MAJOR, \ | |
272 | .minor = __BT_PLUGIN_VERSION_MINOR, \ | |
273 | .name = _name, \ | |
274 | }; \ | |
275 | static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id; \ | |
276 | extern struct __bt_plugin_descriptor const *__start___bt_plugin_descriptors; \ | |
277 | extern struct __bt_plugin_descriptor const *__stop___bt_plugin_descriptors | |
278 | ||
279 | /* | |
280 | * Defines a plugin attribute (generic, internal use). | |
281 | * | |
282 | * _attr_name: Name of the attribute (C identifier). | |
283 | * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type). | |
284 | * _id: Plugin descriptor ID (C identifier). | |
285 | * _x: Value. | |
286 | */ | |
287 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \ | |
288 | static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \ | |
289 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ | |
6ba0b073 | 290 | .type_name = #_attr_name, \ |
857f4dce | 291 | .type = _attr_type, \ |
6ba0b073 PP |
292 | .value._attr_name = _x, \ |
293 | }; \ | |
294 | 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; \ | |
295 | extern struct __bt_plugin_descriptor_attribute const *__start___bt_plugin_descriptor_attributes; \ | |
296 | extern struct __bt_plugin_descriptor_attribute const *__stop___bt_plugin_descriptor_attributes | |
297 | ||
298 | /* | |
299 | * Defines a plugin initialization function attribute attached to a | |
300 | * specific plugin descriptor. | |
301 | * | |
302 | * _id: Plugin descriptor ID (C identifier). | |
303 | * _x: Initialization function (bt_plugin_init_func). | |
304 | */ | |
305 | #define BT_PLUGIN_INIT_WITH_ID(_id, _x) \ | |
306 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x) | |
307 | ||
308 | /* | |
309 | * Defines a plugin exit function attribute attached to a specific | |
310 | * plugin descriptor. | |
311 | * | |
312 | * _id: Plugin descriptor ID (C identifier). | |
313 | * _x: Exit function (bt_plugin_exit_func). | |
314 | */ | |
315 | #define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \ | |
316 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x) | |
317 | ||
318 | /* | |
319 | * Defines an author attribute attached to a specific plugin descriptor. | |
320 | * | |
321 | * _id: Plugin descriptor ID (C identifier). | |
322 | * _x: Author (C string). | |
323 | */ | |
324 | #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _x) \ | |
325 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _x) | |
326 | ||
327 | /* | |
328 | * Defines a license attribute attached to a specific plugin descriptor. | |
329 | * | |
330 | * _id: Plugin descriptor ID (C identifier). | |
331 | * _x: License (C string). | |
332 | */ | |
333 | #define BT_PLUGIN_LICENSE_WITH_ID(_id, _x) \ | |
334 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _x) | |
335 | ||
336 | /* | |
337 | * Defines a description attribute attached to a specific plugin | |
338 | * descriptor. | |
339 | * | |
340 | * _id: Plugin descriptor ID (C identifier). | |
341 | * _x: Description (C string). | |
342 | */ | |
343 | #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _x) \ | |
344 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _x) | |
345 | ||
b6de043b PP |
346 | #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \ |
347 | {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,} | |
348 | ||
349 | /* | |
350 | * Defines a version attribute attached to a specific plugin descriptor. | |
351 | * | |
352 | * _id: Plugin descriptor ID (C identifier). | |
353 | * _major: Plugin's major version (uint32_t). | |
354 | * _minor: Plugin's minor version (uint32_t). | |
355 | * _patch: Plugin's patch version (uint32_t). | |
356 | * _extra: Plugin's version extra information (C string). | |
357 | */ | |
358 | #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \ | |
359 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra)) | |
360 | ||
6ba0b073 | 361 | /* |
d3e4dcd8 PP |
362 | * Declaration of start and stop symbols of component class descriptors |
363 | * section. | |
364 | */ | |
365 | #define __BT_PLUGIN_DECL_COMPONENT_CLASS_DESCRIPTORS_SECTION_START_STOP \ | |
366 | extern struct __bt_plugin_component_class_descriptor const *__start___bt_plugin_component_class_descriptors; \ | |
367 | extern struct __bt_plugin_component_class_descriptor const *__stop___bt_plugin_component_class_descriptors | |
368 | ||
369 | /* | |
370 | * Defines a source component class descriptor with a custom ID. | |
6ba0b073 | 371 | * |
d3eb6e8f PP |
372 | * _id: ID (any valid C identifier except `auto`). |
373 | * _comp_class_id: Component class ID (C identifier). | |
374 | * _name: Component class name (C string). | |
375 | * _notif_iter_get_method: Component class's iterator get method | |
376 | * (bt_component_class_notification_iterator_get_method). | |
377 | * _notif_iter_next_method: Component class's iterator next method | |
378 | * (bt_component_class_notification_iterator_next_method). | |
6ba0b073 | 379 | */ |
d3eb6e8f | 380 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_get_method, _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 PP |
386 | .notif_iter_get = _notif_iter_get_method, \ |
387 | .notif_iter_next = _notif_iter_next_method, \ | |
d3e4dcd8 | 388 | }, \ |
6ba0b073 | 389 | }; \ |
d3e4dcd8 PP |
390 | 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; \ |
391 | __BT_PLUGIN_DECL_COMPONENT_CLASS_DESCRIPTORS_SECTION_START_STOP | |
392 | ||
393 | /* | |
394 | * Defines a filter component class descriptor with a custom ID. | |
395 | * | |
396 | * _id: ID (any valid C identifier except `auto`). | |
397 | * _comp_class_id: Component class ID (C identifier). | |
398 | * _name: Component class name (C string). | |
d3eb6e8f PP |
399 | * _notif_iter_get_method: Component class's iterator get method |
400 | * (bt_component_class_notification_iterator_get_method). | |
401 | * _notif_iter_next_method: Component class's iterator next method | |
402 | * (bt_component_class_notification_iterator_next_method). | |
d3e4dcd8 | 403 | */ |
d3eb6e8f | 404 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_get_method, _notif_iter_next_method) \ |
d3e4dcd8 PP |
405 | static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \ |
406 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ | |
d3e4dcd8 | 407 | .name = _name, \ |
857f4dce | 408 | .type = BT_COMPONENT_CLASS_TYPE_FILTER, \ |
d3e4dcd8 | 409 | .methods.filter = { \ |
d3eb6e8f PP |
410 | .notif_iter_get = _notif_iter_get_method, \ |
411 | .notif_iter_next = _notif_iter_next_method, \ | |
d3e4dcd8 PP |
412 | }, \ |
413 | }; \ | |
414 | 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; \ | |
415 | __BT_PLUGIN_DECL_COMPONENT_CLASS_DESCRIPTORS_SECTION_START_STOP | |
416 | ||
417 | /* | |
418 | * Defines a sink component class descriptor with a custom ID. | |
419 | * | |
420 | * _id: ID (any valid C identifier except `auto`). | |
421 | * _comp_class_id: Component class ID (C identifier). | |
422 | * _name: Component class name (C string). | |
423 | * _consume_method: Component class's iterator consume method | |
424 | * (bt_component_class_sink_consume_method). | |
425 | */ | |
426 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _consume_method) \ | |
427 | static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id = { \ | |
428 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ | |
d3e4dcd8 | 429 | .name = _name, \ |
857f4dce | 430 | .type = BT_COMPONENT_CLASS_TYPE_SINK, \ |
d3e4dcd8 PP |
431 | .methods.sink = { \ |
432 | .consume = _consume_method, \ | |
433 | }, \ | |
434 | }; \ | |
435 | 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; \ | |
436 | __BT_PLUGIN_DECL_COMPONENT_CLASS_DESCRIPTORS_SECTION_START_STOP | |
6ba0b073 PP |
437 | |
438 | /* | |
439 | * Defines a component class descriptor attribute (generic, internal | |
440 | * use). | |
441 | * | |
442 | * _id: Plugin descriptor ID (C identifier). | |
443 | * _comp_class_id: Component class ID (C identifier). | |
d3e4dcd8 | 444 | * _type: Component class type (`source`, `filter`, or `sink`). |
6ba0b073 PP |
445 | * _attr_name: Name of the attribute (C identifier). |
446 | * _attr_type: Type of the attribute | |
447 | * (enum __bt_plugin_descriptor_attribute_type). | |
448 | * _x: Value. | |
449 | */ | |
450 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _comp_class_id, _type, _x) \ | |
d3e4dcd8 PP |
451 | static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name = { \ |
452 | .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \ | |
6ba0b073 | 453 | .type_name = #_attr_name, \ |
857f4dce | 454 | .type = _attr_type, \ |
d3e4dcd8 | 455 | .value._attr_name = _x, \ |
6ba0b073 | 456 | }; \ |
d3e4dcd8 | 457 | 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 |
458 | extern struct __bt_plugin_component_class_descriptor_attribute const *__start___bt_plugin_component_class_descriptor_attributes; \ |
459 | extern struct __bt_plugin_component_class_descriptor_attribute const *__stop___bt_plugin_component_class_descriptor_attributes | |
460 | ||
461 | /* | |
d3e4dcd8 PP |
462 | * Defines a description attribute attached to a specific source |
463 | * component class descriptor. | |
6ba0b073 PP |
464 | * |
465 | * _id: Plugin descriptor ID (C identifier). | |
466 | * _comp_class_id: Component class descriptor ID (C identifier). | |
6ba0b073 PP |
467 | * _x: Description (C string). |
468 | */ | |
d3e4dcd8 PP |
469 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \ |
470 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, source, _x) | |
471 | ||
472 | /* | |
473 | * Defines a description attribute attached to a specific filter | |
474 | * component class descriptor. | |
475 | * | |
476 | * _id: Plugin descriptor ID (C identifier). | |
477 | * _comp_class_id: Component class descriptor ID (C identifier). | |
478 | * _x: Description (C string). | |
479 | */ | |
480 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \ | |
481 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, filter, _x) | |
482 | ||
483 | /* | |
484 | * Defines a description attribute attached to a specific sink | |
485 | * component class descriptor. | |
486 | * | |
487 | * _id: Plugin descriptor ID (C identifier). | |
488 | * _comp_class_id: Component class descriptor ID (C identifier). | |
489 | * _x: Description (C string). | |
490 | */ | |
491 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_id, _comp_class_id, _x) \ | |
492 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _comp_class_id, sink, _x) | |
493 | ||
279b3f15 PP |
494 | /* |
495 | * Defines a help attribute attached to a specific source component | |
496 | * class descriptor. | |
497 | * | |
498 | * _id: Plugin descriptor ID (C identifier). | |
499 | * _comp_class_id: Component class descriptor ID (C identifier). | |
500 | * _x: Help (C string). | |
501 | */ | |
502 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \ | |
503 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, source, _x) | |
504 | ||
505 | /* | |
506 | * Defines a help attribute attached to a specific filter component | |
507 | * class descriptor. | |
508 | * | |
509 | * _id: Plugin descriptor ID (C identifier). | |
510 | * _comp_class_id: Component class descriptor ID (C identifier). | |
511 | * _x: Help (C string). | |
512 | */ | |
513 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \ | |
514 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, filter, _x) | |
515 | ||
516 | /* | |
517 | * Defines a help attribute attached to a specific sink component class | |
518 | * descriptor. | |
519 | * | |
520 | * _id: Plugin descriptor ID (C identifier). | |
521 | * _comp_class_id: Component class descriptor ID (C identifier). | |
522 | * _x: Help (C string). | |
523 | */ | |
524 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_id, _comp_class_id, _x) \ | |
525 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _id, _comp_class_id, sink, _x) | |
526 | ||
d3e4dcd8 PP |
527 | /* |
528 | * Defines an initialization method attribute attached to a specific | |
529 | * source component class descriptor. | |
530 | * | |
531 | * _id: Plugin descriptor ID (C identifier). | |
532 | * _comp_class_id: Component class descriptor ID (C identifier). | |
533 | * _x: Initialization method (bt_component_class_init_method). | |
534 | */ | |
535 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
536 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x) | |
537 | ||
538 | /* | |
539 | * Defines an initialization method attribute attached to a specific | |
540 | * filter component class descriptor. | |
541 | * | |
542 | * _id: Plugin descriptor ID (C identifier). | |
543 | * _comp_class_id: Component class descriptor ID (C identifier). | |
544 | * _x: Initialization method (bt_component_class_init_method). | |
545 | */ | |
546 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
547 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x) | |
548 | ||
549 | /* | |
550 | * Defines an initialization method attribute attached to a specific | |
551 | * sink component class descriptor. | |
552 | * | |
553 | * _id: Plugin descriptor ID (C identifier). | |
554 | * _comp_class_id: Component class descriptor ID (C identifier). | |
555 | * _x: Initialization method (bt_component_class_init_method). | |
556 | */ | |
557 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
558 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x) | |
559 | ||
560 | /* | |
561 | * Defines a destroy method attribute attached to a specific source | |
562 | * component class descriptor. | |
563 | * | |
564 | * _id: Plugin descriptor ID (C identifier). | |
565 | * _comp_class_id: Component class descriptor ID (C identifier). | |
566 | * _x: Destroy method (bt_component_class_destroy_method). | |
567 | */ | |
568 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESTROY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
569 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(destroy_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESTROY_METHOD, _id, _comp_class_id, source, _x) | |
570 | ||
571 | /* | |
572 | * Defines a destroy method attribute attached to a specific filter | |
573 | * component class descriptor. | |
574 | * | |
575 | * _id: Plugin descriptor ID (C identifier). | |
576 | * _comp_class_id: Component class descriptor ID (C identifier). | |
577 | * _x: Destroy method (bt_component_class_destroy_method). | |
578 | */ | |
579 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESTROY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
580 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(destroy_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESTROY_METHOD, _id, _comp_class_id, filter, _x) | |
581 | ||
582 | /* | |
583 | * Defines a destroy method attribute attached to a specific sink | |
584 | * component class descriptor. | |
585 | * | |
586 | * _id: Plugin descriptor ID (C identifier). | |
587 | * _comp_class_id: Component class descriptor ID (C identifier). | |
588 | * _x: Destroy method (bt_component_class_destroy_method). | |
589 | */ | |
590 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESTROY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
591 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(destroy_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESTROY_METHOD, _id, _comp_class_id, sink, _x) | |
592 | ||
8463eac2 | 593 | /* |
a67681c1 | 594 | * Defines a query method attribute attached to a specific source |
8463eac2 PP |
595 | * component class descriptor. |
596 | * | |
597 | * _id: Plugin descriptor ID (C identifier). | |
598 | * _comp_class_id: Component class descriptor ID (C identifier). | |
a67681c1 | 599 | * _x: Destroy method (bt_component_class_query_method). |
8463eac2 | 600 | */ |
a67681c1 PP |
601 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
602 | __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 |
603 | |
604 | /* | |
a67681c1 | 605 | * Defines a query method attribute attached to a specific filter |
8463eac2 PP |
606 | * component class descriptor. |
607 | * | |
608 | * _id: Plugin descriptor ID (C identifier). | |
609 | * _comp_class_id: Component class descriptor ID (C identifier). | |
a67681c1 | 610 | * _x: Destroy method (bt_component_class_query_method). |
8463eac2 | 611 | */ |
a67681c1 PP |
612 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
613 | __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 |
614 | |
615 | /* | |
a67681c1 | 616 | * Defines a query method attribute attached to a specific sink |
8463eac2 PP |
617 | * component class descriptor. |
618 | * | |
619 | * _id: Plugin descriptor ID (C identifier). | |
620 | * _comp_class_id: Component class descriptor ID (C identifier). | |
a67681c1 | 621 | * _x: Destroy method (bt_component_class_query_method). |
8463eac2 | 622 | */ |
a67681c1 PP |
623 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
624 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x) | |
8463eac2 | 625 | |
d3e4dcd8 | 626 | /* |
72b913fb PP |
627 | * Defines an accept port connection method attribute attached to a |
628 | * specific source component class descriptor. | |
629 | * | |
630 | * _id: Plugin descriptor ID (C identifier). | |
631 | * _comp_class_id: Component class descriptor ID (C identifier). | |
632 | * _x: Accept port connection method | |
633 | * (bt_component_class_accept_port_connection_method). | |
634 | */ | |
635 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
636 | __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) | |
637 | ||
638 | /* | |
639 | * Defines an accept port connection method attribute attached to a | |
640 | * specific filter component class descriptor. | |
641 | * | |
642 | * _id: Plugin descriptor ID (C identifier). | |
643 | * _comp_class_id: Component class descriptor ID (C identifier). | |
644 | * _x: Accept port connection method | |
645 | * (bt_component_class_accept_port_connection_method). | |
646 | */ | |
647 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
648 | __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) | |
649 | ||
650 | /* | |
651 | * Defines an accept port connection method attribute attached to a | |
652 | * specific sink component class descriptor. | |
653 | * | |
654 | * _id: Plugin descriptor ID (C identifier). | |
655 | * _comp_class_id: Component class descriptor ID (C identifier). | |
656 | * _x: Accept port connection method | |
657 | * (bt_component_class_accept_port_connection_method). | |
658 | */ | |
659 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
660 | __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) | |
661 | ||
662 | /* | |
663 | * Defines a port disconnected method attribute attached to a specific | |
2d41b99e JG |
664 | * source component class descriptor. |
665 | * | |
666 | * _id: Plugin descriptor ID (C identifier). | |
667 | * _comp_class_id: Component class descriptor ID (C identifier). | |
72b913fb PP |
668 | * _x: Port disconnected method |
669 | * (bt_component_class_port_disconnected_method). | |
2d41b99e | 670 | */ |
72b913fb PP |
671 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
672 | __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 |
673 | |
674 | /* | |
72b913fb | 675 | * Defines a port disconnected method attribute attached to a specific |
d3e4dcd8 PP |
676 | * filter component class descriptor. |
677 | * | |
678 | * _id: Plugin descriptor ID (C identifier). | |
679 | * _comp_class_id: Component class descriptor ID (C identifier). | |
72b913fb PP |
680 | * _x: Port disconnected method |
681 | * (bt_component_class_port_disconnected_method). | |
d3e4dcd8 | 682 | */ |
72b913fb PP |
683 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
684 | __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 |
685 | |
686 | /* | |
72b913fb | 687 | * Defines a port disconnected method attribute attached to a specific |
d3e4dcd8 PP |
688 | * sink component class descriptor. |
689 | * | |
690 | * _id: Plugin descriptor ID (C identifier). | |
691 | * _comp_class_id: Component class descriptor ID (C identifier). | |
72b913fb PP |
692 | * _x: Port disconnected method |
693 | * (bt_component_class_port_disconnected_method). | |
d3e4dcd8 | 694 | */ |
72b913fb PP |
695 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \ |
696 | __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 | 697 | |
d3eb6e8f PP |
698 | /* |
699 | * Defines an iterator initialization method attribute attached to a | |
700 | * specific source component class descriptor. | |
701 | * | |
702 | * _id: Plugin descriptor ID (C identifier). | |
703 | * _comp_class_id: Component class descriptor ID (C identifier). | |
704 | * _x: Iterator initialization method | |
705 | * (bt_component_class_notification_iterator_init_method). | |
706 | */ | |
707 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
708 | __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) | |
709 | ||
710 | /* | |
711 | * Defines an iterator destroy method attribute attached to a specific | |
712 | * source component class descriptor. | |
713 | * | |
714 | * _id: Plugin descriptor ID (C identifier). | |
715 | * _comp_class_id: Component class descriptor ID (C identifier). | |
716 | * _x: Iterator destroy method | |
717 | * (bt_component_class_notification_iterator_destroy_method). | |
718 | */ | |
719 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_DESTROY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
720 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_destroy_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_DESTROY_METHOD, _id, _comp_class_id, source, _x) | |
721 | ||
722 | /* | |
723 | * Defines an iterator seek time method attribute attached to a specific | |
724 | * source component class descriptor. | |
725 | * | |
726 | * _id: Plugin descriptor ID (C identifier). | |
727 | * _comp_class_id: Component class descriptor ID (C identifier). | |
728 | * _x: Iterator seek time method | |
729 | * (bt_component_class_notification_iterator_seek_time_method). | |
730 | */ | |
731 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
732 | __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) | |
733 | ||
734 | /* | |
735 | * Defines an iterator initialization method attribute attached to a | |
736 | * specific filter component class descriptor. | |
737 | * | |
738 | * _id: Plugin descriptor ID (C identifier). | |
739 | * _comp_class_id: Component class descriptor ID (C identifier). | |
740 | * _x: Iterator initialization method | |
741 | * (bt_component_class_notification_iterator_init_method). | |
742 | */ | |
743 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
744 | __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) | |
745 | ||
746 | /* | |
747 | * Defines an iterator destroy method attribute attached to a specific | |
748 | * filter component class descriptor. | |
749 | * | |
750 | * _id: Plugin descriptor ID (C identifier). | |
751 | * _comp_class_id: Component class descriptor ID (C identifier). | |
752 | * _x: Iterator destroy method | |
753 | * (bt_component_class_notification_iterator_destroy_method). | |
754 | */ | |
755 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_DESTROY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
756 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(notif_iter_destroy_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_DESTROY_METHOD, _id, _comp_class_id, filter, _x) | |
757 | ||
758 | /* | |
759 | * Defines an iterator seek time method attribute attached to a specific | |
760 | * filter component class descriptor. | |
761 | * | |
762 | * _id: Plugin descriptor ID (C identifier). | |
763 | * _comp_class_id: Component class descriptor ID (C identifier). | |
764 | * _x: Iterator seek time method | |
765 | * (bt_component_class_notification_iterator_seek_time_method). | |
766 | */ | |
767 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD_WITH_ID(_id, _comp_class_id, _x) \ | |
768 | __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) | |
769 | ||
6ba0b073 PP |
770 | /* |
771 | * Defines a plugin descriptor with an automatic ID. | |
772 | * | |
773 | * _name: Plugin's name (C string). | |
774 | */ | |
775 | #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name) | |
776 | ||
777 | /* | |
778 | * Defines a plugin initialization function attribute attached to the | |
779 | * automatic plugin descriptor. | |
780 | * | |
781 | * _x: Initialization function (bt_plugin_init_func). | |
782 | */ | |
783 | #define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x) | |
784 | ||
785 | /* | |
786 | * Defines a plugin exit function attribute attached to the automatic | |
787 | * plugin descriptor. | |
788 | * | |
789 | * _x: Exit function (bt_plugin_exit_func). | |
790 | */ | |
791 | #define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x) | |
792 | ||
793 | /* | |
794 | * Defines an author attribute attached to the automatic plugin | |
795 | * descriptor. | |
796 | * | |
797 | * _x: Author (C string). | |
798 | */ | |
799 | #define BT_PLUGIN_AUTHOR(_x) BT_PLUGIN_AUTHOR_WITH_ID(auto, _x) | |
800 | ||
801 | /* | |
802 | * Defines a license attribute attached to the automatic plugin | |
803 | * descriptor. | |
804 | * | |
805 | * _x: License (C string). | |
806 | */ | |
807 | #define BT_PLUGIN_LICENSE(_x) BT_PLUGIN_LICENSE_WITH_ID(auto, _x) | |
808 | ||
809 | /* | |
810 | * Defines a description attribute attached to the automatic plugin | |
811 | * descriptor. | |
812 | * | |
813 | * _x: Description (C string). | |
814 | */ | |
815 | #define BT_PLUGIN_DESCRIPTION(_x) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _x) | |
b6de043b PP |
816 | |
817 | /* | |
818 | * Defines a version attribute attached to the automatic plugin | |
819 | * descriptor. | |
820 | * | |
821 | * _major: Plugin's major version (uint32_t). | |
822 | * _minor: Plugin's minor version (uint32_t). | |
823 | * _patch: Plugin's patch version (uint32_t). | |
824 | * _extra: Plugin's version extra information (C string). | |
825 | */ | |
826 | #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra) | |
6ba0b073 PP |
827 | |
828 | /* | |
d3e4dcd8 PP |
829 | * Defines a source component class attached to the automatic plugin |
830 | * descriptor. Its ID is the same as its name, hence its name must be a | |
831 | * C identifier in this version. | |
832 | * | |
d3eb6e8f PP |
833 | * _name: Component class name (C identifier). |
834 | * _notif_iter_get_method: Component class's iterator get method | |
835 | * (bt_component_class_notification_iterator_get_method). | |
836 | * _notif_iter_next_method: Component class's iterator next method | |
837 | * (bt_component_class_notification_iterator_next_method). | |
d3e4dcd8 | 838 | */ |
d3eb6e8f PP |
839 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _notif_iter_get_method, _notif_iter_next_method) \ |
840 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_get_method, _notif_iter_next_method) | |
d3e4dcd8 PP |
841 | |
842 | /* | |
843 | * Defines a filter component class attached to the automatic plugin | |
6ba0b073 PP |
844 | * descriptor. Its ID is the same as its name, hence its name must be a |
845 | * C identifier in this version. | |
846 | * | |
d3eb6e8f PP |
847 | * _name: Component class name (C identifier). |
848 | * _notif_iter_get_method: Component class's iterator get method | |
849 | * (bt_component_class_notification_iterator_get_method). | |
850 | * _notif_iter_next_method: Component class's iterator next method | |
851 | * (bt_component_class_notification_iterator_next_method). | |
6ba0b073 | 852 | */ |
d3eb6e8f PP |
853 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _notif_iter_get_method, _notif_iter_next_method) \ |
854 | BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_get_method, _notif_iter_next_method) | |
6ba0b073 PP |
855 | |
856 | /* | |
d3e4dcd8 PP |
857 | * Defines a sink component class attached to the automatic plugin |
858 | * descriptor. Its ID is the same as its name, hence its name must be a | |
859 | * C identifier in this version. | |
860 | * | |
861 | * _name: Component class name (C identifier). | |
862 | * _consume_method: Component class's consume method | |
863 | * (bt_component_class_sink_consume_method). | |
864 | */ | |
865 | #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \ | |
866 | BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method) | |
867 | ||
868 | /* | |
869 | * Defines a description attribute attached to a source component class | |
6ba0b073 PP |
870 | * descriptor which is attached to the automatic plugin descriptor. |
871 | * | |
d3e4dcd8 PP |
872 | * _name: Component class name (C identifier). |
873 | * _x: Description (C string). | |
874 | */ | |
875 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _x) \ | |
876 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x) | |
877 | ||
878 | /* | |
879 | * Defines a description attribute attached to a filter component class | |
880 | * descriptor which is attached to the automatic plugin descriptor. | |
881 | * | |
882 | * _name: Component class name (C identifier). | |
883 | * _x: Description (C string). | |
884 | */ | |
885 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _x) \ | |
886 | BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x) | |
887 | ||
888 | /* | |
889 | * Defines a description attribute attached to a sink component class | |
890 | * descriptor which is attached to the automatic plugin descriptor. | |
891 | * | |
892 | * _name: Component class name (C identifier). | |
893 | * _x: Description (C string). | |
894 | */ | |
895 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _x) \ | |
896 | BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _x) | |
897 | ||
279b3f15 PP |
898 | /* |
899 | * Defines a help attribute attached to a source component class | |
900 | * descriptor which is attached to the automatic plugin descriptor. | |
901 | * | |
902 | * _name: Component class name (C identifier). | |
903 | * _x: Help (C string). | |
904 | */ | |
905 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _x) \ | |
906 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x) | |
907 | ||
908 | /* | |
909 | * Defines a help attribute attached to a filter component class | |
910 | * descriptor which is attached to the automatic plugin descriptor. | |
911 | * | |
912 | * _name: Component class name (C identifier). | |
913 | * _x: Help (C string). | |
914 | */ | |
915 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _x) \ | |
916 | BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x) | |
917 | ||
918 | /* | |
919 | * Defines a help attribute attached to a sink component class | |
920 | * descriptor which is attached to the automatic plugin descriptor. | |
921 | * | |
922 | * _name: Component class name (C identifier). | |
923 | * _x: Help (C string). | |
924 | */ | |
925 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _x) \ | |
926 | BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _x) | |
927 | ||
d3e4dcd8 PP |
928 | /* |
929 | * Defines an initialization method attribute attached to a source | |
930 | * component class descriptor which is attached to the automatic plugin | |
931 | * descriptor. | |
932 | * | |
933 | * _name: Component class name (C identifier). | |
934 | * _x: Initialization method (bt_component_class_init_method). | |
935 | */ | |
936 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ | |
937 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) | |
938 | ||
939 | /* | |
940 | * Defines an initialization method attribute attached to a filter | |
941 | * component class descriptor which is attached to the automatic plugin | |
942 | * descriptor. | |
943 | * | |
944 | * _name: Component class name (C identifier). | |
945 | * _x: Initialization method (bt_component_class_init_method). | |
946 | */ | |
947 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ | |
948 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) | |
949 | ||
950 | /* | |
951 | * Defines an initialization method attribute attached to a sink | |
952 | * component class descriptor which is attached to the automatic plugin | |
953 | * descriptor. | |
954 | * | |
955 | * _name: Component class name (C identifier). | |
956 | * _x: Initialization method (bt_component_class_init_method). | |
957 | */ | |
958 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ | |
959 | BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) | |
960 | ||
961 | /* | |
962 | * Defines a destroy method attribute attached to a source component | |
963 | * class descriptor which is attached to the automatic plugin | |
964 | * descriptor. | |
965 | * | |
966 | * _name: Component class name (C identifier). | |
967 | * _x: Initialization method (bt_component_class_destroy_method). | |
968 | */ | |
969 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESTROY_METHOD(_name, _x) \ | |
970 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESTROY_METHOD_WITH_ID(auto, _name, _x) | |
971 | ||
972 | /* | |
973 | * Defines a destroy method attribute attached to a filter component | |
974 | * class descriptor which is attached to the automatic plugin | |
975 | * descriptor. | |
976 | * | |
977 | * _name: Component class name (C identifier). | |
978 | * _x: Initialization method (bt_component_class_destroy_method). | |
979 | */ | |
980 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESTROY_METHOD(_name, _x) \ | |
981 | BT_PLUGIN_FILTER_COMPONENT_CLASS_DESTROY_METHOD_WITH_ID(auto, _name, _x) | |
982 | ||
983 | /* | |
984 | * Defines a destroy method attribute attached to a sink component class | |
985 | * descriptor which is attached to the automatic plugin descriptor. | |
986 | * | |
987 | * _name: Component class name (C identifier). | |
988 | * _x: Initialization method (bt_component_class_destroy_method). | |
989 | */ | |
990 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESTROY_METHOD(_name, _x) \ | |
991 | BT_PLUGIN_SINK_COMPONENT_CLASS_DESTROY_METHOD_WITH_ID(auto, _name, _x) | |
992 | ||
8463eac2 | 993 | /* |
a67681c1 | 994 | * Defines a query method attribute attached to a source component |
8463eac2 PP |
995 | * class descriptor which is attached to the automatic plugin |
996 | * descriptor. | |
997 | * | |
998 | * _name: Component class name (C identifier). | |
a67681c1 | 999 | * _x: Initialization method (bt_component_class_query_method). |
8463eac2 | 1000 | */ |
a67681c1 PP |
1001 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
1002 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) | |
8463eac2 PP |
1003 | |
1004 | /* | |
a67681c1 | 1005 | * Defines a query method attribute attached to a filter component |
8463eac2 PP |
1006 | * class descriptor which is attached to the automatic plugin |
1007 | * descriptor. | |
1008 | * | |
1009 | * _name: Component class name (C identifier). | |
a67681c1 | 1010 | * _x: Initialization method (bt_component_class_query_method). |
8463eac2 | 1011 | */ |
a67681c1 PP |
1012 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
1013 | BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) | |
8463eac2 PP |
1014 | |
1015 | /* | |
a67681c1 | 1016 | * Defines a query method attribute attached to a sink component |
8463eac2 PP |
1017 | * class descriptor which is attached to the automatic plugin |
1018 | * descriptor. | |
1019 | * | |
1020 | * _name: Component class name (C identifier). | |
a67681c1 | 1021 | * _x: Initialization method (bt_component_class_query_method). |
8463eac2 | 1022 | */ |
a67681c1 PP |
1023 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ |
1024 | BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) | |
8463eac2 | 1025 | |
d3e4dcd8 | 1026 | /* |
72b913fb PP |
1027 | * Defines an accept port connection method attribute attached to a |
1028 | * source component class descriptor which is attached to the automatic | |
1029 | * plugin descriptor. | |
1030 | * | |
1031 | * _name: Component class name (C identifier). | |
1032 | * _x: Accept port connection method | |
1033 | * (bt_component_class_accept_port_connection_method). | |
1034 | */ | |
1035 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD(_name, _x) \ | |
1036 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) | |
1037 | ||
1038 | /* | |
1039 | * Defines an accept port connection method attribute attached to a | |
1040 | * filter component class descriptor which is attached to the automatic | |
1041 | * plugin descriptor. | |
d3e4dcd8 PP |
1042 | * |
1043 | * _name: Component class name (C identifier). | |
72b913fb PP |
1044 | * _x: Accept port connection method |
1045 | * (bt_component_class_accept_port_connection_method). | |
d3e4dcd8 | 1046 | */ |
72b913fb PP |
1047 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD(_name, _x) \ |
1048 | BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) | |
d3e4dcd8 PP |
1049 | |
1050 | /* | |
72b913fb PP |
1051 | * Defines an accept port connection method attribute attached to a sink |
1052 | * component class descriptor which is attached to the automatic plugin | |
1053 | * descriptor. | |
2d41b99e JG |
1054 | * |
1055 | * _name: Component class name (C identifier). | |
72b913fb PP |
1056 | * _x: Accept port connection method |
1057 | * (bt_component_class_accept_port_connection_method). | |
2d41b99e | 1058 | */ |
72b913fb PP |
1059 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD(_name, _x) \ |
1060 | BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) | |
2d41b99e JG |
1061 | |
1062 | /* | |
72b913fb PP |
1063 | * Defines a port disconnected method attribute attached to a source |
1064 | * component class descriptor which is attached to the automatic plugin | |
1065 | * descriptor. | |
1066 | * | |
1067 | * _name: Component class name (C identifier). | |
1068 | * _x: Port disconnected (bt_component_class_port_disconnected_method). | |
1069 | */ | |
1070 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD(_name, _x) \ | |
1071 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
1072 | ||
1073 | /* | |
1074 | * Defines a port disconnected method attribute attached to a filter | |
1075 | * component class descriptor which is attached to the automatic plugin | |
1076 | * descriptor. | |
1077 | * | |
1078 | * _name: Component class name (C identifier). | |
1079 | * _x: Port disconnected (bt_component_class_port_disconnected_method). | |
1080 | */ | |
1081 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD(_name, _x) \ | |
1082 | BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
1083 | ||
1084 | /* | |
1085 | * Defines a port disconnected method attribute attached to a sink | |
1086 | * component class descriptor which is attached to the automatic plugin | |
1087 | * descriptor. | |
d3e4dcd8 PP |
1088 | * |
1089 | * _name: Component class name (C identifier). | |
72b913fb | 1090 | * _x: Port disconnected (bt_component_class_port_disconnected_method). |
6ba0b073 | 1091 | */ |
72b913fb PP |
1092 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD(_name, _x) \ |
1093 | BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_DISCONNECTED_METHOD_WITH_ID(auto, _name, _x) | |
33b34c43 | 1094 | |
d3eb6e8f PP |
1095 | /* |
1096 | * Defines an iterator initialization method attribute attached to a | |
1097 | * source component class descriptor which is attached to the automatic | |
1098 | * plugin descriptor. | |
1099 | * | |
1100 | * _name: Component class name (C identifier). | |
1101 | * _x: Iterator initialization method | |
1102 | * (bt_component_class_notification_iterator_init_method). | |
1103 | */ | |
1104 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(_name, _x) \ | |
1105 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x) | |
1106 | ||
1107 | /* | |
1108 | * Defines an iterator destroy method attribute attached to a source | |
1109 | * component class descriptor which is attached to the automatic plugin | |
1110 | * descriptor. | |
1111 | * | |
1112 | * _name: Component class name (C identifier). | |
1113 | * _x: Iterator destroy method | |
1114 | * (bt_component_class_notification_iterator_destroy_method). | |
1115 | */ | |
1116 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_DESTROY_METHOD(_name, _x) \ | |
1117 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_DESTROY_METHOD_WITH_ID(auto, _name, _x) | |
1118 | ||
1119 | /* | |
1120 | * Defines an iterator seek time method attribute attached to a source | |
1121 | * component class descriptor which is attached to the automatic plugin | |
1122 | * descriptor. | |
1123 | * | |
1124 | * _name: Component class name (C identifier). | |
1125 | * _x: Iterator seek time method | |
1126 | * (bt_component_class_notification_iterator_seek_time_method). | |
1127 | */ | |
1128 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD(_name, _x) \ | |
1129 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD_WITH_ID(auto, _name, _x) | |
1130 | ||
1131 | /* | |
1132 | * Defines an iterator initialization method attribute attached to a | |
1133 | * filter component class descriptor which is attached to the automatic | |
1134 | * plugin descriptor. | |
1135 | * | |
1136 | * _name: Component class name (C identifier). | |
1137 | * _x: Iterator initialization method | |
1138 | * (bt_component_class_notification_iterator_init_method). | |
1139 | */ | |
1140 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD(_name, _x) \ | |
1141 | BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x) | |
1142 | ||
1143 | /* | |
1144 | * Defines an iterator destroy method attribute attached to a filter | |
1145 | * component class descriptor which is attached to the automatic plugin | |
1146 | * descriptor. | |
1147 | * | |
1148 | * _name: Component class name (C identifier). | |
1149 | * _x: Iterator destroy method | |
1150 | * (bt_component_class_notification_iterator_destroy_method). | |
1151 | */ | |
1152 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_DESTROY_METHOD(_name, _x) \ | |
1153 | BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_DESTROY_METHOD_WITH_ID(auto, _name, _x) | |
1154 | ||
1155 | /* | |
1156 | * Defines an iterator seek time method attribute attached to a filter | |
1157 | * component class descriptor which is attached to the automatic plugin | |
1158 | * descriptor. | |
1159 | * | |
1160 | * _name: Component class name (C identifier). | |
1161 | * _x: Iterator seek time method | |
1162 | * (bt_component_class_notification_iterator_seek_time_method). | |
1163 | */ | |
1164 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD(_name, _x) \ | |
1165 | BT_PLUGIN_FILTER_COMPONENT_CLASS_NOTIFICATION_ITERATOR_SEEK_TIME_METHOD_WITH_ID(auto, _name, _x) | |
1166 | ||
33b34c43 PP |
1167 | #ifdef __cplusplus |
1168 | } | |
1169 | #endif | |
1170 | ||
1171 | #endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */ |