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