Commit | Line | Data |
---|---|---|
33b34c43 | 1 | /* |
0235b0db | 2 | * SPDX-License-Identifier: MIT |
33b34c43 | 3 | * |
0235b0db | 4 | * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation |
33b34c43 PP |
5 | */ |
6 | ||
0235b0db MJ |
7 | #ifndef BABELTRACE2_PLUGIN_PLUGIN_DEV_H |
8 | #define BABELTRACE2_PLUGIN_PLUGIN_DEV_H | |
9 | ||
4fa90f32 PP |
10 | #ifndef __BT_IN_BABELTRACE_H |
11 | # error "Please include <babeltrace2/babeltrace.h> instead." | |
12 | #endif | |
13 | ||
6ba0b073 | 14 | #include <stdint.h> |
9d408fca | 15 | |
43c59509 | 16 | #include <babeltrace2/graph/component-class-dev.h> |
a3f0c7db | 17 | #include <babeltrace2/graph/message-iterator-class.h> |
d24d5663 PP |
18 | #include <babeltrace2/types.h> |
19 | ||
4581096d | 20 | /* |
1353b066 | 21 | * _BT_EXPORT: set the visibility for exported functions. |
4581096d PP |
22 | */ |
23 | #if defined(_WIN32) || defined(__CYGWIN__) | |
1353b066 | 24 | #define _BT_EXPORT |
4581096d | 25 | #else |
1353b066 | 26 | #define _BT_EXPORT __attribute__((visibility("default"))) |
4581096d PP |
27 | #endif |
28 | ||
33b34c43 PP |
29 | #ifdef __cplusplus |
30 | extern "C" { | |
31 | #endif | |
32 | ||
43c59509 PP |
33 | /*! |
34 | @defgroup api-plugin-dev Plugin development | |
35 | ||
36 | @brief | |
37 | Shared object plugin development. | |
38 | ||
39 | This module offers macros to create a \bt_name shared object plugin. | |
40 | ||
41 | Behind the scenes, the <code>BT_PLUGIN_*()</code> macros of this module | |
42 | create and fill global tables which are located in sections of the | |
43 | shared object with specific names. The \ref api-plugin functions can | |
44 | load the resulting shared object file and create corresponding | |
45 | \bt_plugin objects. | |
46 | ||
47 | See \ref guide-comp-link-plugin-so. | |
48 | ||
49 | <h1>Plugin definition C file structure</h1> | |
50 | ||
51 | The structure of a \bt_name plugin definition C file is as such: | |
52 | ||
53 | <ol> | |
54 | <li> | |
55 | Start with | |
56 | ||
57 | @code | |
58 | BT_PLUGIN_MODULE(); | |
59 | @endcode | |
60 | </li> | |
61 | ||
62 | <li> | |
63 | Define a \bt_name plugin with BT_PLUGIN() if the plugin's name is a | |
64 | valid C identifier, or with BT_PLUGIN_WITH_ID() otherwise. | |
65 | ||
66 | See \ref api-plugin-dev-custom-plugin-id "Custom plugin ID" to | |
67 | learn more about plugin IDs. | |
68 | ||
69 | @note | |
70 | When you use BT_PLUGIN(), the plugin's ID is <code>auto</code>. | |
71 | </li> | |
72 | ||
73 | <li> | |
74 | \bt_dt_opt Use any of the following macros (or their | |
75 | <code>*_WITH_ID()</code> counterpart) \em once to set the properties | |
76 | of the plugin: | |
77 | ||
78 | - BT_PLUGIN_AUTHOR() | |
79 | - BT_PLUGIN_DESCRIPTION() | |
80 | - BT_PLUGIN_LICENSE() | |
81 | - BT_PLUGIN_VERSION() | |
82 | </li> | |
83 | ||
84 | <li> | |
85 | \bt_dt_opt Use any of the following macros (or their | |
86 | <code>*_WITH_ID()</code> counterpart) \em once to set the | |
87 | initialization and finalization functions of the plugin: | |
88 | ||
89 | - BT_PLUGIN_INITIALIZE_FUNC() | |
90 | - BT_PLUGIN_FINALIZE_FUNC() | |
91 | ||
92 | A plugin's initialization function is executed when the shared | |
93 | object is loaded (see \ref api-plugin). | |
94 | ||
95 | A plugin's finalization function is executed when the \bt_plugin | |
96 | object is destroyed, if the initialization function (if any) | |
97 | succeeded. | |
98 | </li> | |
99 | ||
100 | <li> | |
101 | Use any of the following macros (or their <code>*_WITH_ID()</code> | |
102 | counterpart) to add a component class to the plugin: | |
103 | ||
104 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS() | |
105 | - BT_PLUGIN_FILTER_COMPONENT_CLASS() | |
106 | - BT_PLUGIN_SINK_COMPONENT_CLASS() | |
107 | </li> | |
108 | ||
109 | <li> | |
110 | \bt_dt_opt Depending on the type of the component class of step 5, | |
111 | use any of the following macros (or their <code>*_WITH_ID()</code> | |
112 | counterpart) | |
113 | \em once to set its properties: | |
114 | ||
115 | <dl> | |
116 | <dt>\bt_c_src_comp_cls</dt> | |
117 | <dd> | |
118 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION() | |
119 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP() | |
120 | </dd> | |
121 | ||
122 | <dt>\bt_c_flt_comp_cls</dt> | |
123 | <dd> | |
124 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION() | |
125 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP() | |
126 | </dd> | |
127 | ||
128 | <dt>\bt_c_sink_comp_cls</dt> | |
129 | <dd> | |
130 | - BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION() | |
131 | - BT_PLUGIN_SINK_COMPONENT_CLASS_HELP() | |
132 | </dd> | |
133 | </dl> | |
134 | </li> | |
135 | ||
136 | <li> | |
137 | \bt_dt_opt Depending on the type of the component class of step 5, | |
138 | use any of the following macros (or their <code>*_WITH_ID()</code> | |
139 | counterpart) to set its optional methods: | |
140 | ||
141 | <dl> | |
142 | <dt>Source component class</dt> | |
143 | <dd> | |
144 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD() | |
145 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD() | |
146 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD() | |
147 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD() | |
148 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD() | |
149 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD() | |
150 | - BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD() | |
151 | </dd> | |
152 | ||
153 | <dt>Filter component class</dt> | |
154 | <dd> | |
155 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD() | |
156 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD() | |
157 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD() | |
158 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD() | |
159 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD() | |
160 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD() | |
161 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD() | |
162 | - BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD() | |
163 | </dd> | |
164 | ||
165 | <dt>Sink component class</dt> | |
166 | <dd> | |
167 | - BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD() | |
168 | - BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD() | |
169 | - BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD() | |
170 | - BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD() | |
171 | - BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD() | |
172 | - BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD() | |
173 | </dd> | |
174 | </dl> | |
175 | </li> | |
176 | </ol> | |
177 | ||
178 | You can repeat steps 5 to 7 to add more than one component class to a | |
179 | given plugin. | |
180 | ||
181 | See \ref example-simple-plugin-def-file for a concrete example of how | |
182 | to use the macros of this module. | |
183 | ||
184 | <h1>\anchor api-plugin-dev-custom-plugin-id Custom plugin ID</h1> | |
185 | ||
186 | The BT_PLUGIN() macro defines a plugin with a specific name and the | |
187 | ID <code>auto</code>. | |
188 | ||
189 | All the <code>BT_PLUGIN_*()</code> macros which do not end with | |
190 | <code>_WITH_ID</code> refer to the <code>auto</code> plugin. | |
191 | ||
192 | There are two situations which demand that you use a custom plugin ID: | |
193 | ||
194 | - You want more than one plugin contained in your shared object file. | |
195 | ||
196 | Although the \bt_name project does not recommend this, it is possible. | |
197 | This is why bt_plugin_find_all_from_file() returns a \bt_plugin_set | |
198 | instead of a single \bt_plugin. | |
199 | ||
200 | In this case, each plugin of the shared object needs its own, unique | |
201 | ID. | |
202 | ||
203 | - You want to give the plugin a name which is not a valid C identifier. | |
204 | ||
205 | The BT_PLUGIN() macro accepts a C identifier as the plugin name, while | |
206 | the BT_PLUGIN_WITH_ID() accepts a C identifier for the ID and a C | |
207 | string for the name. | |
208 | ||
209 | To define a plugin with a specific ID, use BT_PLUGIN_WITH_ID(), for | |
210 | example: | |
211 | ||
212 | @code | |
213 | BT_PLUGIN_WITH_ID(my_plugin_id, "my-plugin-name"); | |
214 | @endcode | |
215 | ||
216 | Then, use the <code>BT_PLUGIN_*_WITH_ID()</code> macros to refer to | |
217 | this specific plugin, for example: | |
218 | ||
219 | @code | |
220 | BT_PLUGIN_AUTHOR_WITH_ID(my_plugin_id, "Patrick Bouchard"); | |
221 | @endcode | |
222 | ||
223 | @note | |
224 | @parblock | |
225 | You can still use the <code>auto</code> ID with BT_PLUGIN_WITH_ID() | |
226 | to use the simpler macros afterwards while still giving the plugin a | |
227 | name which is not a valid C identifier, for example: | |
228 | ||
229 | @code | |
230 | BT_PLUGIN_WITH_ID(auto, "my-plugin-name"); | |
231 | BT_PLUGIN_AUTHOR("Patrick Bouchard"); | |
232 | @endcode | |
233 | @endparblock | |
234 | ||
235 | <h1>Custom component class ID</h1> | |
236 | ||
237 | The BT_PLUGIN_SOURCE_COMPONENT_CLASS(), | |
238 | BT_PLUGIN_FILTER_COMPONENT_CLASS(), and | |
239 | BT_PLUGIN_SINK_COMPONENT_CLASS() add a component class with a specific | |
240 | name to the plugin having the ID <code>auto</code>. | |
241 | ||
242 | The name you pass to those macros must be a valid C identifier and it | |
243 | also serves as the component class's ID within the <code>auto</code> | |
244 | plugin. | |
245 | ||
246 | There are two situations which demand that you use a custom component | |
247 | class ID: | |
248 | ||
249 | - You want to add the component class to a specific plugin (other than | |
250 | <code>auto</code>, if you have more than one). | |
251 | ||
252 | - You want to give the component class a name which is not a valid C | |
253 | identifier. | |
254 | ||
255 | The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros accept a | |
256 | C identifier for the component class ID and a string for its name. | |
257 | ||
258 | For a given plugin and for a given component class type, all component | |
259 | class IDs must be unique. | |
260 | ||
261 | To add a component class having a specific ID to a plugin, | |
262 | use the BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(), | |
263 | BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(), and | |
264 | BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() macros, for example: | |
265 | ||
266 | @code | |
267 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(my_plugin_id, my_comp_class_id, | |
268 | "my-source", my_source_iter_next); | |
269 | @endcode | |
270 | ||
271 | @note | |
272 | @parblock | |
273 | The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros | |
274 | specify the ID of the plugin to which to add the component class. | |
275 | ||
276 | If you use the BT_PLUGIN() macro to define your plugin, then its | |
277 | ID is <code>auto</code>: | |
278 | ||
279 | @code | |
280 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, my_comp_class_id, | |
281 | "my-source", my_source_iter_next); | |
282 | @endcode | |
283 | @endparblock | |
284 | ||
285 | Then, use the <code>BT_PLUGIN_*_COMPONENT_CLASS_*_WITH_ID()</code> | |
286 | macros to refer to this specific component class, for example: | |
287 | ||
288 | @code | |
289 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(my_plugin_id, | |
290 | my_comp_class_id, my_source_finalize); | |
291 | @endcode | |
292 | */ | |
293 | ||
294 | /*! @{ */ | |
295 | ||
296 | /*! | |
297 | @name Type | |
298 | @{ | |
299 | ||
300 | @typedef struct bt_self_plugin bt_self_plugin; | |
301 | ||
302 | @brief | |
303 | Self plugin. | |
304 | ||
305 | @} | |
306 | */ | |
307 | ||
308 | /*! | |
309 | @name Plugin module | |
310 | @{ | |
311 | */ | |
312 | ||
313 | /*! | |
314 | @brief | |
315 | Defines a plugin module. | |
316 | ||
317 | In a plugin define C file, you must use this macro before you use any | |
318 | other <code>BT_PLUGIN*()</code> macro. | |
319 | */ | |
320 | #define BT_PLUGIN_MODULE() \ | |
321 | static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \ | |
1353b066 SM |
322 | extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \ |
323 | extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \ | |
43c59509 PP |
324 | \ |
325 | static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \ | |
1353b066 SM |
326 | extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \ |
327 | extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \ | |
43c59509 PP |
328 | \ |
329 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \ | |
1353b066 SM |
330 | extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \ |
331 | extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \ | |
43c59509 PP |
332 | \ |
333 | static struct __bt_plugin_component_class_descriptor_attribute const * const __bt_plugin_component_class_descriptor_attribute_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \ | |
1353b066 SM |
334 | extern struct __bt_plugin_component_class_descriptor_attribute const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \ |
335 | extern struct __bt_plugin_component_class_descriptor_attribute const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \ | |
43c59509 | 336 | \ |
1353b066 | 337 | _BT_EXPORT struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \ |
43c59509 PP |
338 | { \ |
339 | return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \ | |
340 | } \ | |
1353b066 | 341 | _BT_EXPORT struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \ |
43c59509 PP |
342 | { \ |
343 | return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \ | |
344 | } \ | |
1353b066 | 345 | _BT_EXPORT struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \ |
43c59509 PP |
346 | { \ |
347 | return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \ | |
348 | } \ | |
1353b066 | 349 | _BT_EXPORT struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \ |
43c59509 PP |
350 | { \ |
351 | return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \ | |
352 | } \ | |
1353b066 | 353 | _BT_EXPORT struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \ |
43c59509 PP |
354 | { \ |
355 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \ | |
356 | } \ | |
1353b066 | 357 | _BT_EXPORT struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \ |
43c59509 PP |
358 | { \ |
359 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \ | |
360 | } \ | |
1353b066 | 361 | _BT_EXPORT struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \ |
43c59509 PP |
362 | { \ |
363 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \ | |
364 | } \ | |
1353b066 | 365 | _BT_EXPORT struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \ |
43c59509 PP |
366 | { \ |
367 | return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \ | |
368 | } | |
369 | ||
370 | /*! @} */ | |
371 | ||
372 | /*! | |
373 | @name Plugin definition | |
374 | @{ | |
375 | */ | |
376 | ||
377 | /*! | |
378 | @brief | |
379 | Defines a plugin named \bt_p{_name} and having the ID \bt_p{_id}. | |
380 | ||
381 | @param[in] _id | |
382 | @parblock | |
383 | C identifier. | |
384 | ||
385 | Plugin's ID, unique amongst all the plugin IDs of the same shared | |
386 | object. | |
387 | @endparblock | |
388 | @param[in] _name | |
389 | @parblock | |
390 | <code>const char *</code> | |
391 | ||
392 | Plugin's name. | |
393 | @endparblock | |
394 | ||
395 | @bt_pre_not_null{_name} | |
396 | */ | |
397 | #define BT_PLUGIN_WITH_ID(_id, _name) \ | |
398 | struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \ | |
399 | .name = _name, \ | |
400 | }; \ | |
401 | static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id | |
402 | ||
403 | /*! | |
404 | @brief | |
405 | Alias of BT_PLUGIN_WITH_ID() with the \bt_p{_id} parameter set to | |
406 | <code>auto</code>. | |
407 | */ | |
408 | #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name) | |
409 | ||
410 | /*! @} */ | |
411 | ||
412 | /*! | |
413 | @name Plugin properties | |
414 | @{ | |
415 | */ | |
416 | ||
417 | /*! | |
418 | @brief | |
419 | Sets the description of the plugin having the ID \bt_p{_id} to | |
420 | \bt_p{_description}. | |
421 | ||
422 | See the \ref api-comp-cls-prop-descr "description" property. | |
423 | ||
424 | @param[in] _id | |
425 | @parblock | |
426 | C identifier. | |
427 | ||
428 | ID of the plugin of which to set the description. | |
429 | @endparblock | |
430 | @param[in] _description | |
431 | @parblock | |
432 | <code>const char *</code> | |
433 | ||
434 | Plugin's description. | |
435 | @endparblock | |
436 | ||
437 | @bt_pre_not_null{_description} | |
438 | */ | |
439 | #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _description) \ | |
440 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _description) | |
441 | ||
442 | /*! | |
443 | @brief | |
444 | Alias of BT_PLUGIN_DESCRIPTION_WITH_ID() with the \bt_p{_id} | |
445 | parameter set to <code>auto</code>. | |
446 | */ | |
447 | #define BT_PLUGIN_DESCRIPTION(_description) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _description) | |
448 | ||
43c59509 PP |
449 | /*! |
450 | @brief | |
451 | Sets the name(s) of the author(s) of the plugin having the ID | |
452 | \bt_p{_id} to \bt_p{_author}. | |
453 | ||
454 | See the \ref api-plugin-prop-author "author name(s)" property. | |
455 | ||
456 | @param[in] _id | |
457 | @parblock | |
458 | C identifier. | |
459 | ||
460 | ID of the plugin of which to set the author(s). | |
461 | @endparblock | |
462 | @param[in] _author | |
463 | @parblock | |
464 | <code>const char *</code> | |
465 | ||
466 | Plugin's author(s). | |
467 | @endparblock | |
468 | ||
469 | @bt_pre_not_null{_author} | |
470 | */ | |
471 | #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _author) \ | |
472 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _author) | |
473 | ||
474 | /*! | |
475 | @brief | |
476 | Alias of BT_PLUGIN_AUTHOR_WITH_ID() with the \bt_p{_id} | |
477 | parameter set to <code>auto</code>. | |
478 | */ | |
479 | #define BT_PLUGIN_AUTHOR(_author) BT_PLUGIN_AUTHOR_WITH_ID(auto, _author) | |
480 | ||
481 | /*! | |
482 | @brief | |
483 | Sets the license (name or full) of the plugin having the ID | |
484 | \bt_p{_id} to \bt_p{_license}. | |
485 | ||
486 | See the \ref api-plugin-prop-license "license" property. | |
487 | ||
488 | @param[in] _id | |
489 | @parblock | |
490 | C identifier. | |
491 | ||
492 | ID of the plugin of which to set the license. | |
493 | @endparblock | |
494 | @param[in] _license | |
495 | @parblock | |
496 | <code>const char *</code> | |
497 | ||
498 | Plugin's license. | |
499 | @endparblock | |
500 | ||
501 | @bt_pre_not_null{_license} | |
502 | */ | |
503 | #define BT_PLUGIN_LICENSE_WITH_ID(_id, _license) \ | |
504 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _license) | |
505 | ||
506 | /*! | |
507 | @brief | |
508 | Alias of BT_PLUGIN_LICENSE_WITH_ID() with the \bt_p{_id} | |
509 | parameter set to <code>auto</code>. | |
510 | */ | |
511 | #define BT_PLUGIN_LICENSE(_license) BT_PLUGIN_LICENSE_WITH_ID(auto, _license) | |
512 | ||
513 | /*! | |
514 | @brief | |
515 | Sets the version of the plugin having the ID \bt_p{_id} to | |
516 | \bt_p{_version}. | |
517 | ||
518 | See the \ref api-plugin-prop-version "version" property. | |
519 | ||
520 | @param[in] _id | |
521 | @parblock | |
522 | C identifier. | |
523 | ||
524 | ID of the plugin of which to set the version. | |
525 | @endparblock | |
526 | @param[in] _major | |
527 | @parblock | |
528 | <code>unsigned int</code> | |
529 | ||
530 | Plugin's major version. | |
531 | @endparblock | |
532 | @param[in] _minor | |
533 | @parblock | |
534 | <code>unsigned int</code> | |
535 | ||
536 | Plugin's minor version. | |
537 | @endparblock | |
538 | @param[in] _patch | |
539 | @parblock | |
540 | <code>unsigned int</code> | |
541 | ||
542 | Plugin's patch version. | |
543 | @endparblock | |
544 | @param[in] _extra | |
545 | @parblock | |
546 | <code>const char *</code> | |
547 | ||
548 | Plugin's version's extra information. | |
549 | ||
550 | Can be \c NULL if the plugin's version has no extra information. | |
551 | @endparblock | |
552 | */ | |
553 | #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \ | |
554 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra)) | |
555 | ||
556 | /*! | |
557 | @brief | |
558 | Alias of BT_PLUGIN_VERSION_WITH_ID() with the \bt_p{_id} | |
559 | parameter set to <code>auto</code>. | |
560 | */ | |
561 | #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra) | |
562 | ||
563 | /*! @} */ | |
564 | ||
565 | /*! | |
566 | @name Plugin functions | |
567 | @{ | |
568 | */ | |
569 | ||
570 | /*! | |
571 | @brief | |
572 | Status codes for #bt_plugin_initialize_func. | |
573 | */ | |
21a9f056 | 574 | typedef enum bt_plugin_initialize_func_status { |
43c59509 PP |
575 | /*! |
576 | @brief | |
577 | Success. | |
578 | */ | |
21a9f056 | 579 | BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK = __BT_FUNC_STATUS_OK, |
43c59509 PP |
580 | |
581 | /*! | |
582 | @brief | |
583 | Out of memory. | |
584 | */ | |
21a9f056 | 585 | BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR, |
43c59509 PP |
586 | |
587 | /*! | |
588 | @brief | |
589 | Error. | |
590 | */ | |
21a9f056 FD |
591 | BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR = __BT_FUNC_STATUS_ERROR, |
592 | } bt_plugin_initialize_func_status; | |
9724cce9 | 593 | |
43c59509 PP |
594 | /*! |
595 | @brief | |
596 | User plugin initialization function. | |
597 | ||
598 | @param[in] self_plugin | |
599 | @parblock | |
600 | Plugin instance. | |
601 | ||
602 | This parameter is a private view of the \bt_plugin object for | |
603 | this function. | |
604 | ||
605 | As of \bt_name_version_min_maj, there's no self plugin API. | |
606 | @endparblock | |
607 | ||
608 | @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK | |
609 | Success. | |
610 | @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR | |
611 | Out of memory. | |
612 | @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR | |
613 | Error. | |
33b34c43 | 614 | |
43c59509 PP |
615 | @bt_pre_not_null{self_plugin} |
616 | */ | |
617 | typedef bt_plugin_initialize_func_status (*bt_plugin_initialize_func)( | |
618 | bt_self_plugin *self_plugin); | |
619 | ||
620 | /*! | |
621 | @brief | |
622 | Sets the initialization function of the plugin having the ID | |
623 | \bt_p{_id} to \bt_p{_func}. | |
624 | ||
625 | @param[in] _id | |
626 | @parblock | |
627 | C identifier. | |
628 | ||
629 | ID of the plugin of which to set the initialization function. | |
630 | @endparblock | |
631 | @param[in] _func | |
632 | @parblock | |
633 | #bt_plugin_initialize_func | |
634 | ||
635 | Plugin's initialization function. | |
636 | @endparblock | |
637 | ||
638 | @bt_pre_not_null{_func} | |
639 | */ | |
640 | #define BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(_id, _func) \ | |
641 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _func) | |
642 | ||
643 | /*! | |
644 | @brief | |
645 | Alias of BT_PLUGIN_INITIALIZE_FUNC_WITH_ID() with the \bt_p{_id} | |
646 | parameter set to <code>auto</code>. | |
647 | */ | |
648 | #define BT_PLUGIN_INITIALIZE_FUNC(_func) BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(auto, _func) | |
649 | ||
650 | /*! | |
651 | @brief | |
652 | User plugin finalization function. | |
653 | */ | |
a71c9a60 | 654 | typedef void (*bt_plugin_finalize_func)(void); |
33b34c43 | 655 | |
43c59509 PP |
656 | /*! |
657 | @brief | |
658 | Sets the finalization function of the plugin having the ID | |
659 | \bt_p{_id} to \bt_p{_func}. | |
660 | ||
661 | @param[in] _id | |
662 | @parblock | |
663 | C identifier. | |
664 | ||
665 | ID of the plugin of which to set the finalization function. | |
666 | @endparblock | |
667 | @param[in] _func | |
668 | @parblock | |
669 | #bt_plugin_finalize_func | |
670 | ||
671 | Plugin's finalization function. | |
672 | @endparblock | |
673 | ||
674 | @bt_pre_not_null{_func} | |
675 | */ | |
676 | #define BT_PLUGIN_FINALIZE_FUNC_WITH_ID(_id, _func) \ | |
677 | __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _func) | |
678 | ||
679 | /*! | |
680 | @brief | |
681 | Alias of BT_PLUGIN_FINALIZE_FUNC_WITH_ID() with the \bt_p{_id} | |
682 | parameter set to <code>auto</code>. | |
683 | */ | |
684 | #define BT_PLUGIN_FINALIZE_FUNC(_func) BT_PLUGIN_FINALIZE_FUNC_WITH_ID(auto, _func) | |
685 | ||
686 | /*! @} */ | |
687 | ||
688 | /*! | |
689 | @name Component class adding | |
690 | @{ | |
691 | */ | |
692 | ||
693 | /*! | |
694 | @brief | |
695 | Adds a \bt_src_comp_cls named \bt_p{_name}, having the ID | |
696 | \bt_p{_component_class_id} and the message iterator class's "next" | |
697 | method \bt_p{_message_iterator_class_next_method}, to the plugin | |
698 | having the ID \bt_p{_plugin_id}. | |
699 | ||
700 | @param[in] _plugin_id | |
701 | @parblock | |
702 | C identifier. | |
703 | ||
704 | ID of the plugin to which to add the source component class. | |
705 | @endparblock | |
706 | @param[in] _component_class_id | |
707 | @parblock | |
708 | C identifier. | |
709 | ||
710 | Source component class's ID, unique amongst all the source component | |
711 | class IDs of the same plugin. | |
712 | @endparblock | |
713 | @param[in] _name | |
714 | @parblock | |
715 | <code>const char *</code> | |
716 | ||
717 | Source component class's name, unique amongst all the source | |
718 | component class names of the same plugin. | |
719 | @endparblock | |
720 | @param[in] _message_iterator_class_next_method | |
721 | @parblock | |
722 | #bt_message_iterator_class_next_method | |
723 | ||
724 | Source component class's message iterator class's "next" method. | |
725 | @endparblock | |
726 | ||
727 | @bt_pre_not_null{_name} | |
728 | @bt_pre_not_null{_message_iterator_class_next_method} | |
729 | */ | |
730 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \ | |
731 | static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id = { \ | |
732 | .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \ | |
733 | .name = _name, \ | |
734 | .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \ | |
735 | .methods = { .source = { .msg_iter_next = _message_iterator_class_next_method } }, \ | |
736 | }; \ | |
737 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id | |
738 | ||
739 | /*! | |
740 | @brief | |
741 | Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID() with the | |
742 | \bt_p{_plugin_id} parameter set to <code>auto</code>, the | |
743 | \bt_p{_component_class_id} parameter set to \bt_p{_name}, and | |
744 | the \bt_p{_name} parameter set to a string version of \bt_p{_name}. | |
745 | ||
746 | @param[in] _name | |
747 | @parblock | |
748 | C identifier | |
749 | ||
750 | Passed as both the \bt_p{_component_class_id} and the | |
751 | \bt_p{_name} (once converted to a string) parameters of | |
752 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(). | |
753 | @endparblock | |
754 | */ | |
755 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \ | |
756 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method) | |
757 | ||
758 | /*! | |
759 | @brief | |
760 | Adds a \bt_flt_comp_cls named \bt_p{_name}, having the ID | |
761 | \bt_p{_component_class_id} and the message iterator class's "next" | |
762 | method \bt_p{_message_iterator_class_next_method}, to the plugin | |
763 | having the ID \bt_p{_plugin_id}. | |
764 | ||
765 | @param[in] _plugin_id | |
766 | @parblock | |
767 | C identifier. | |
768 | ||
769 | ID of the plugin to which to add the filter component class. | |
770 | @endparblock | |
771 | @param[in] _component_class_id | |
772 | @parblock | |
773 | C identifier. | |
774 | ||
775 | Filter component class's ID, unique amongst all the filter component | |
776 | class IDs of the same plugin. | |
777 | @endparblock | |
778 | @param[in] _name | |
779 | @parblock | |
780 | <code>const char *</code> | |
781 | ||
782 | Filter component class's name, unique amongst all the filter | |
783 | component class names of the same plugin. | |
784 | @endparblock | |
785 | @param[in] _message_iterator_class_next_method | |
786 | @parblock | |
787 | #bt_message_iterator_class_next_method | |
788 | ||
789 | Filter component class's message iterator class's "next" method. | |
790 | @endparblock | |
791 | ||
792 | @bt_pre_not_null{_name} | |
793 | @bt_pre_not_null{_message_iterator_class_next_method} | |
794 | */ | |
795 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \ | |
796 | static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id = { \ | |
797 | .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \ | |
798 | .name = _name, \ | |
799 | .type = BT_COMPONENT_CLASS_TYPE_FILTER, \ | |
800 | .methods = { .filter = { .msg_iter_next = _message_iterator_class_next_method } }, \ | |
801 | }; \ | |
802 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id | |
803 | ||
804 | /*! | |
805 | @brief | |
806 | Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID() with the | |
807 | \bt_p{_plugin_id} parameter set to <code>auto</code>, the | |
808 | \bt_p{_component_class_id} parameter set to \bt_p{_name}, and | |
809 | the \bt_p{_name} parameter set to a string version of \bt_p{_name}. | |
810 | ||
811 | @param[in] _name | |
812 | @parblock | |
813 | C identifier | |
814 | ||
815 | Passed as both the \bt_p{_component_class_id} and the | |
816 | \bt_p{_name} (once converted to a string) parameters of | |
817 | BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(). | |
818 | @endparblock | |
819 | */ | |
820 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \ | |
821 | BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method) | |
822 | ||
823 | /*! | |
824 | @brief | |
825 | Adds a \bt_sink_comp_cls named \bt_p{_name}, having the ID | |
826 | \bt_p{_component_class_id} and the consuming method | |
827 | \bt_p{_consume_method}, to the plugin | |
828 | having the ID \bt_p{_plugin_id}. | |
829 | ||
830 | @param[in] _plugin_id | |
831 | @parblock | |
832 | C identifier. | |
833 | ||
834 | ID of the plugin to which to add the sink component class. | |
835 | @endparblock | |
836 | @param[in] _component_class_id | |
837 | @parblock | |
838 | C identifier. | |
839 | ||
840 | Sink component class's ID, unique amongst all the sink component | |
841 | class IDs of the same plugin. | |
842 | @endparblock | |
843 | @param[in] _name | |
844 | @parblock | |
845 | <code>const char *</code> | |
846 | ||
847 | Sink component class's name, unique amongst all the sink | |
848 | component class names of the same plugin. | |
849 | @endparblock | |
850 | @param[in] _consume_method | |
851 | @parblock | |
852 | #bt_component_class_sink_consume_method | |
853 | ||
854 | Sink component class's message iterator class's "next" method. | |
855 | @endparblock | |
856 | ||
857 | @bt_pre_not_null{_name} | |
858 | @bt_pre_not_null{_consume_method} | |
859 | */ | |
860 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _consume_method) \ | |
861 | static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id = { \ | |
862 | .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \ | |
863 | .name = _name, \ | |
864 | .type = BT_COMPONENT_CLASS_TYPE_SINK, \ | |
865 | .methods = { .sink = { .consume = _consume_method } }, \ | |
866 | }; \ | |
867 | static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id | |
868 | ||
869 | /*! | |
870 | @brief | |
871 | Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() with the | |
872 | \bt_p{_plugin_id} parameter set to <code>auto</code>, the | |
873 | \bt_p{_component_class_id} parameter set to \bt_p{_name}, and | |
874 | the \bt_p{_name} parameter set to a string version of \bt_p{_name}. | |
875 | ||
876 | @param[in] _name | |
877 | @parblock | |
878 | C identifier | |
879 | ||
880 | Passed as both the \bt_p{_component_class_id} and the | |
881 | \bt_p{_name} (once converted to a string) parameters of | |
882 | BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(). | |
883 | @endparblock | |
884 | */ | |
885 | #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \ | |
886 | BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method) | |
887 | ||
888 | /*! @} */ | |
889 | ||
890 | /*! | |
891 | @name Source component class properties | |
892 | @{ | |
893 | */ | |
894 | ||
895 | /*! | |
896 | @brief | |
897 | Sets the description of the \bt_src_comp_cls having the ID | |
898 | \bt_p{_component_class_id} in the plugin having the ID | |
899 | \bt_p{_plugin_id} to \bt_p{_description}. | |
900 | ||
901 | See the \ref api-comp-cls-prop-descr "description" property. | |
902 | ||
903 | @param[in] _plugin_id | |
904 | @parblock | |
905 | C identifier. | |
906 | ||
907 | ID of the plugin which contains the source component class of which | |
908 | to set the description. | |
909 | @endparblock | |
910 | @param[in] _component_class_id | |
911 | @parblock | |
912 | C identifier. | |
913 | ||
914 | ID of the source component class, within the plugin having the ID | |
915 | \bt_p{_plugin_id}, of which to set the description to | |
916 | \bt_p{_description}. | |
917 | @endparblock | |
918 | @param[in] _description | |
919 | @parblock | |
920 | <code>const char *</code> | |
921 | ||
922 | Source component class's description. | |
923 | @endparblock | |
924 | ||
925 | @bt_pre_not_null{_description} | |
926 | */ | |
927 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \ | |
928 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, source, _description) | |
929 | ||
930 | /*! | |
931 | @brief | |
932 | Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with | |
933 | the \bt_p{_plugin_id} parameter set to <code>auto</code> and the | |
934 | \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
935 | */ | |
936 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _description) \ | |
937 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description) | |
938 | ||
939 | /*! | |
940 | @brief | |
941 | Sets the help text of the \bt_src_comp_cls having the ID | |
942 | \bt_p{_component_class_id} in the plugin having the ID | |
943 | \bt_p{_plugin_id} to \bt_p{_help_text}. | |
944 | ||
945 | See the \ref api-comp-cls-prop-help "help text" property. | |
946 | ||
947 | @param[in] _plugin_id | |
948 | @parblock | |
949 | C identifier. | |
950 | ||
951 | ID of the plugin which contains the source component class of which | |
952 | to set the help text. | |
953 | @endparblock | |
954 | @param[in] _component_class_id | |
955 | @parblock | |
956 | C identifier. | |
957 | ||
958 | ID of the source component class, within the plugin having the ID | |
959 | \bt_p{_plugin_id}, of which to set the help text to | |
960 | \bt_p{_help_text}. | |
961 | @endparblock | |
962 | @param[in] _help_text | |
963 | @parblock | |
964 | <code>const char *</code> | |
965 | ||
966 | Source component class's help text. | |
967 | @endparblock | |
968 | ||
969 | @bt_pre_not_null{_help_text} | |
970 | */ | |
971 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \ | |
972 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, source, _help_text) | |
973 | ||
974 | /*! | |
975 | @brief | |
976 | Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID() with the | |
977 | \bt_p{_plugin_id} parameter set to <code>auto</code> and the | |
978 | \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
979 | */ | |
980 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _help_text) \ | |
981 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text) | |
982 | ||
983 | /*! @} */ | |
984 | ||
985 | /*! | |
986 | @name Filter component class properties | |
987 | @{ | |
988 | */ | |
989 | ||
990 | /*! | |
991 | @brief | |
992 | Sets the description of the \bt_flt_comp_cls having the ID | |
993 | \bt_p{_component_class_id} in the plugin having the ID | |
994 | \bt_p{_plugin_id} to \bt_p{_description}. | |
995 | ||
996 | See the \ref api-comp-cls-prop-descr "description" property. | |
997 | ||
998 | @param[in] _plugin_id | |
999 | @parblock | |
1000 | C identifier. | |
1001 | ||
1002 | ID of the plugin which contains the filter component class of which | |
1003 | to set the description. | |
1004 | @endparblock | |
1005 | @param[in] _component_class_id | |
1006 | @parblock | |
1007 | C identifier. | |
1008 | ||
1009 | ID of the filter component class, within the plugin having the ID | |
1010 | \bt_p{_plugin_id}, of which to set the description to | |
1011 | \bt_p{_description}. | |
1012 | @endparblock | |
1013 | @param[in] _description | |
1014 | @parblock | |
1015 | <code>const char *</code> | |
1016 | ||
1017 | Filter component class's description. | |
1018 | @endparblock | |
1019 | ||
1020 | @bt_pre_not_null{_description} | |
1021 | */ | |
1022 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \ | |
1023 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, filter, _description) | |
1024 | ||
1025 | /*! | |
1026 | @brief | |
1027 | Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with | |
1028 | the \bt_p{_plugin_id} parameter set to <code>auto</code> and the | |
1029 | \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1030 | */ | |
1031 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _description) \ | |
1032 | BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description) | |
1033 | ||
1034 | /*! | |
1035 | @brief | |
1036 | Sets the help text of the \bt_flt_comp_cls having the ID | |
1037 | \bt_p{_component_class_id} in the plugin having the ID | |
1038 | \bt_p{_plugin_id} to \bt_p{_help_text}. | |
1039 | ||
1040 | See the \ref api-comp-cls-prop-help "help text" property. | |
1041 | ||
1042 | @param[in] _plugin_id | |
1043 | @parblock | |
1044 | C identifier. | |
1045 | ||
1046 | ID of the plugin which contains the filter component class of which | |
1047 | to set the help text. | |
1048 | @endparblock | |
1049 | @param[in] _component_class_id | |
1050 | @parblock | |
1051 | C identifier. | |
1052 | ||
1053 | ID of the filter component class, within the plugin having the ID | |
1054 | \bt_p{_plugin_id}, of which to set the help text to | |
1055 | \bt_p{_help_text}. | |
1056 | @endparblock | |
1057 | @param[in] _help_text | |
1058 | @parblock | |
1059 | <code>const char *</code> | |
1060 | ||
1061 | Filter component class's help text. | |
1062 | @endparblock | |
1063 | ||
1064 | @bt_pre_not_null{_help_text} | |
1065 | */ | |
1066 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \ | |
1067 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, filter, _help_text) | |
1068 | ||
1069 | /*! | |
1070 | @brief | |
1071 | Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID() with the | |
1072 | \bt_p{_plugin_id} parameter set to <code>auto</code> and the | |
1073 | \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1074 | */ | |
1075 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _help_text) \ | |
1076 | BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text) | |
1077 | ||
1078 | /*! @} */ | |
1079 | ||
1080 | /*! | |
1081 | @name Sink component class properties | |
1082 | @{ | |
1083 | */ | |
1084 | ||
1085 | /*! | |
1086 | @brief | |
1087 | Sets the description of the \bt_sink_comp_cls having the ID | |
1088 | \bt_p{_component_class_id} in the plugin having the ID | |
1089 | \bt_p{_plugin_id} to \bt_p{_description}. | |
1090 | ||
1091 | See the \ref api-comp-cls-prop-descr "description" property. | |
1092 | ||
1093 | @param[in] _plugin_id | |
1094 | @parblock | |
1095 | C identifier. | |
1096 | ||
1097 | ID of the plugin which contains the sink component class of which | |
1098 | to set the description. | |
1099 | @endparblock | |
1100 | @param[in] _component_class_id | |
1101 | @parblock | |
1102 | C identifier. | |
1103 | ||
1104 | ID of the sink component class, within the plugin having the ID | |
1105 | \bt_p{_plugin_id}, of which to set the description to | |
1106 | \bt_p{_description}. | |
1107 | @endparblock | |
1108 | @param[in] _description | |
1109 | @parblock | |
1110 | <code>const char *</code> | |
1111 | ||
1112 | Sink component class's description. | |
1113 | @endparblock | |
1114 | ||
1115 | @bt_pre_not_null{_description} | |
1116 | */ | |
1117 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \ | |
1118 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, sink, _description) | |
1119 | ||
1120 | /*! | |
1121 | @brief | |
1122 | Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with | |
1123 | the \bt_p{_plugin_id} parameter set to <code>auto</code> and the | |
1124 | \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1125 | */ | |
1126 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _description) \ | |
1127 | BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description) | |
1128 | ||
1129 | /*! | |
1130 | @brief | |
1131 | Sets the help text of the \bt_sink_comp_cls having the ID | |
1132 | \bt_p{_component_class_id} in the plugin having the ID | |
1133 | \bt_p{_plugin_id} to \bt_p{_help_text}. | |
1134 | ||
1135 | See the \ref api-comp-cls-prop-help "help text" property. | |
1136 | ||
1137 | @param[in] _plugin_id | |
1138 | @parblock | |
1139 | C identifier. | |
1140 | ||
1141 | ID of the plugin which contains the sink component class of which | |
1142 | to set the help text. | |
1143 | @endparblock | |
1144 | @param[in] _component_class_id | |
1145 | @parblock | |
1146 | C identifier. | |
1147 | ||
1148 | ID of the sink component class, within the plugin having the ID | |
1149 | \bt_p{_plugin_id}, of which to set the help text to | |
1150 | \bt_p{_help_text}. | |
1151 | @endparblock | |
1152 | @param[in] _help_text | |
1153 | @parblock | |
1154 | <code>const char *</code> | |
1155 | ||
1156 | Sink component class's help text. | |
1157 | @endparblock | |
1158 | ||
1159 | @bt_pre_not_null{_help_text} | |
1160 | */ | |
1161 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \ | |
1162 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, sink, _help_text) | |
1163 | ||
1164 | /*! | |
1165 | @brief | |
1166 | Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID() with | |
1167 | the \bt_p{_plugin_id} parameter set to <code>auto</code> and the | |
1168 | \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1169 | */ | |
1170 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _help_text) \ | |
1171 | BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text) | |
1172 | ||
1173 | /*! @} */ | |
1174 | ||
1175 | /*! | |
1176 | @name Source component class methods | |
1177 | @{ | |
1178 | */ | |
1179 | ||
1180 | /*! | |
1181 | @brief | |
1182 | Sets the finalization method of the \bt_src_comp_cls having the ID | |
1183 | \bt_p{_component_class_id} in the plugin having the ID | |
1184 | \bt_p{_plugin_id} to \bt_p{_method}. | |
1185 | ||
1186 | See the \ref api-comp-cls-dev-meth-fini "finalize" method. | |
1187 | ||
1188 | @param[in] _plugin_id | |
1189 | @parblock | |
1190 | C identifier. | |
1191 | ||
1192 | ID of the plugin which contains the source component class of which | |
1193 | to set the finalization method. | |
1194 | @endparblock | |
1195 | @param[in] _component_class_id | |
1196 | @parblock | |
1197 | C identifier. | |
1198 | ||
1199 | ID of the source component class, within the plugin having the ID | |
1200 | \bt_p{_plugin_id}, of which to set the finalization method to | |
1201 | \bt_p{_method}. | |
1202 | @endparblock | |
1203 | @param[in] _method | |
1204 | @parblock | |
1205 | #bt_component_class_source_finalize_method | |
1206 | ||
1207 | Source component class's finalization method. | |
1208 | @endparblock | |
1209 | ||
1210 | @bt_pre_not_null{_method} | |
1211 | */ | |
1212 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
1213 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _plugin_id, _component_class_id, source, _method) | |
1214 | ||
1215 | /*! | |
1216 | @brief | |
1217 | Alias of | |
1218 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID() | |
1219 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1220 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1221 | */ | |
1222 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \ | |
1223 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method) | |
1224 | ||
1225 | /*! | |
1226 | @brief | |
1227 | Sets the \"get supported \bt_mip versions\" method of the | |
1228 | \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the | |
1229 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. | |
1230 | ||
1231 | See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions" | |
1232 | method. | |
1233 | ||
1234 | @param[in] _plugin_id | |
1235 | @parblock | |
1236 | C identifier. | |
1237 | ||
1238 | ID of the plugin which contains the source component class of which | |
1239 | to set the "get supported MIP versions" method. | |
1240 | @endparblock | |
1241 | @param[in] _component_class_id | |
1242 | @parblock | |
1243 | C identifier. | |
1244 | ||
1245 | ID of the source component class, within the plugin having the ID | |
1246 | \bt_p{_plugin_id}, of which to set the "get supported MIP versions" | |
1247 | method to \bt_p{_method}. | |
1248 | @endparblock | |
1249 | @param[in] _method | |
1250 | @parblock | |
1251 | #bt_component_class_source_get_supported_mip_versions_method | |
1252 | ||
1253 | Source component class's "get supported MIP versions" method. | |
1254 | @endparblock | |
1255 | ||
1256 | @bt_pre_not_null{_method} | |
1257 | */ | |
1258 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
c39793dd | 1259 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD, _plugin_id, _component_class_id, source, _method) |
43c59509 PP |
1260 | |
1261 | /*! | |
1262 | @brief | |
1263 | Alias of | |
1264 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID() | |
1265 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1266 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1267 | */ | |
1268 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \ | |
1269 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method) | |
1270 | ||
1271 | /*! | |
1272 | @brief | |
1273 | Sets the initialization method of the \bt_src_comp_cls having the ID | |
1274 | \bt_p{_component_class_id} in the plugin having the ID | |
1275 | \bt_p{_plugin_id} to \bt_p{_method}. | |
1276 | ||
1277 | See the \ref api-comp-cls-dev-meth-init "initialize" method. | |
1278 | ||
1279 | @param[in] _plugin_id | |
1280 | @parblock | |
1281 | C identifier. | |
1282 | ||
1283 | ID of the plugin which contains the source component class of which | |
1284 | to set the initialization method. | |
1285 | @endparblock | |
1286 | @param[in] _component_class_id | |
1287 | @parblock | |
1288 | C identifier. | |
1289 | ||
1290 | ID of the source component class, within the plugin having the ID | |
1291 | \bt_p{_plugin_id}, of which to set the initialization method to | |
1292 | \bt_p{_method}. | |
1293 | @endparblock | |
1294 | @param[in] _method | |
1295 | @parblock | |
1296 | #bt_component_class_source_initialize_method | |
1297 | ||
1298 | Source component class's initialization method. | |
1299 | @endparblock | |
1300 | ||
1301 | @bt_pre_not_null{_method} | |
1302 | */ | |
1303 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
1304 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD, _plugin_id, _component_class_id, source, _method) | |
1305 | ||
1306 | /*! | |
1307 | @brief | |
1308 | Alias of | |
1309 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID() | |
1310 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1311 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1312 | */ | |
1313 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \ | |
1314 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method) | |
1315 | ||
1316 | /*! | |
1317 | @brief | |
1318 | Sets the finalization method of the \bt_msg_iter_cls of the | |
1319 | \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the | |
1320 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. | |
1321 | ||
1322 | See the \ref api-msg-iter-cls-meth-fini "finalize" method. | |
1323 | ||
1324 | @param[in] _plugin_id | |
1325 | @parblock | |
1326 | C identifier. | |
1327 | ||
1328 | ID of the plugin which contains the source component class of which | |
1329 | to set the finalization method of the message iterator class. | |
1330 | @endparblock | |
1331 | @param[in] _component_class_id | |
1332 | @parblock | |
1333 | C identifier. | |
1334 | ||
1335 | ID of the source component class, within the plugin having the ID | |
1336 | \bt_p{_plugin_id}, of which to set the finalization method of the | |
1337 | message iterator class to \bt_p{_method}. | |
1338 | @endparblock | |
1339 | @param[in] _method | |
1340 | @parblock | |
1341 | #bt_message_iterator_class_finalize_method | |
1342 | ||
1343 | Source component class's message iterator class's finalization method. | |
1344 | @endparblock | |
1345 | ||
1346 | @bt_pre_not_null{_method} | |
1347 | */ | |
1348 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
1349 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _plugin_id, _component_class_id, source, _method) | |
1350 | ||
1351 | /*! | |
1352 | @brief | |
1353 | Alias of | |
1354 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID() | |
1355 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1356 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1357 | */ | |
1358 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \ | |
1359 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method) | |
1360 | ||
1361 | /*! | |
1362 | @brief | |
1363 | Sets the initialization method of the \bt_msg_iter_cls of the | |
1364 | \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the | |
1365 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. | |
1366 | ||
1367 | See the \ref api-msg-iter-cls-meth-init "initialize" method. | |
1368 | ||
1369 | @param[in] _plugin_id | |
1370 | @parblock | |
1371 | C identifier. | |
1372 | ||
1373 | ID of the plugin which contains the source component class of which | |
1374 | to set the initialization method of the message iterator class. | |
1375 | @endparblock | |
1376 | @param[in] _component_class_id | |
1377 | @parblock | |
1378 | C identifier. | |
1379 | ||
1380 | ID of the source component class, within the plugin having the ID | |
1381 | \bt_p{_plugin_id}, of which to set the initialization method of the | |
1382 | message iterator class to \bt_p{_method}. | |
1383 | @endparblock | |
1384 | @param[in] _method | |
1385 | @parblock | |
1386 | #bt_message_iterator_class_initialize_method | |
1387 | ||
1388 | Source component class's message iterator class's initialization | |
1389 | method. | |
1390 | @endparblock | |
1391 | ||
1392 | @bt_pre_not_null{_method} | |
1393 | */ | |
1394 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
1395 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD, _plugin_id, _component_class_id, source, _method) | |
1396 | ||
1397 | /*! | |
1398 | @brief | |
1399 | Alias of | |
1400 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID() | |
1401 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1402 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1403 | */ | |
1404 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \ | |
1405 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method) | |
1406 | ||
1407 | /*! | |
1408 | @brief | |
1409 | Sets the "seek beginning" and "can seek beginning?" methods of the | |
1410 | \bt_msg_iter_cls of the \bt_src_comp_cls having the ID | |
1411 | \bt_p{_component_class_id} in the plugin having the ID | |
1412 | \bt_p{_plugin_id} to \bt_p{_seek_method} and | |
1413 | \bt_p{_can_seek_method}. | |
1414 | ||
1415 | See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and | |
1416 | \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods. | |
1417 | ||
1418 | @param[in] _plugin_id | |
1419 | @parblock | |
1420 | C identifier. | |
1421 | ||
1422 | ID of the plugin which contains the source component class of which | |
1423 | to set the "seek beginning" and "can seek beginning?" methods of the | |
1424 | message iterator class. | |
1425 | @endparblock | |
1426 | @param[in] _component_class_id | |
1427 | @parblock | |
1428 | C identifier. | |
1429 | ||
1430 | ID of the source component class, within the plugin having the ID | |
1431 | \bt_p{_plugin_id}, of which to set the "seek beginning" and "can | |
1432 | seek beginning" methods of the message iterator class to | |
1433 | \bt_p{_seek_method} and \bt_p{_can_seek_method}. | |
1434 | @endparblock | |
1435 | @param[in] _seek_method | |
1436 | @parblock | |
1437 | #bt_message_iterator_class_seek_beginning_method | |
1438 | ||
1439 | Source component class's message iterator class's "seek beginning" | |
1440 | method. | |
1441 | @endparblock | |
1442 | @param[in] _can_seek_method | |
1443 | @parblock | |
1444 | #bt_message_iterator_class_can_seek_beginning_method | |
1445 | ||
1446 | Source component class's message iterator class's | |
1447 | "can seek beginning?" method. | |
1448 | ||
1449 | Can be \c NULL, in which case it is equivalent to setting a method | |
1450 | which always returns #BT_TRUE. | |
1451 | @endparblock | |
1452 | ||
1453 | @bt_pre_not_null{_seek_method} | |
1454 | @bt_pre_not_null{_can_seek_method} | |
1455 | */ | |
1456 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \ | |
1457 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _plugin_id, _component_class_id, source, _seek_method); \ | |
1458 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _plugin_id, _component_class_id, source, _can_seek_method) | |
1459 | ||
1460 | /*! | |
1461 | @brief | |
1462 | Alias of | |
1463 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS() | |
1464 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1465 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1466 | */ | |
1467 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \ | |
1468 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method) | |
1469 | ||
1470 | /*! | |
1471 | @brief | |
1472 | Sets the "seek ns from origin" and "can seek ns from origin?" | |
1473 | methods of the \bt_msg_iter_cls of the \bt_src_comp_cls having the | |
1474 | ID \bt_p{_component_class_id} in the plugin having the ID | |
1475 | \bt_p{_plugin_id} to \bt_p{_seek_method} and | |
1476 | \bt_p{_can_seek_method}. | |
1477 | ||
1478 | See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and | |
1479 | \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?" | |
1480 | methods. | |
1481 | ||
1482 | @param[in] _plugin_id | |
1483 | @parblock | |
1484 | C identifier. | |
1485 | ||
1486 | ID of the plugin which contains the source component class of which | |
1487 | to set the "seek ns from origin" and "can seek ns from origin?" | |
1488 | methods of the message iterator class. | |
1489 | @endparblock | |
1490 | @param[in] _component_class_id | |
1491 | @parblock | |
1492 | C identifier. | |
1493 | ||
1494 | ID of the source component class, within the plugin having the ID | |
1495 | \bt_p{_plugin_id}, of which to set the "seek ns from origin" and | |
1496 | "can seek ns from origin" methods of the message iterator class to | |
1497 | \bt_p{_seek_method} and \bt_p{_can_seek_method}. | |
1498 | @endparblock | |
1499 | @param[in] _seek_method | |
1500 | @parblock | |
1501 | #bt_message_iterator_class_seek_ns_from_origin_method | |
1502 | ||
1503 | Source component class's message iterator class's "seek ns from | |
1504 | origin" method. | |
1505 | @endparblock | |
1506 | @param[in] _can_seek_method | |
1507 | @parblock | |
1508 | #bt_message_iterator_class_can_seek_ns_from_origin_method | |
1509 | ||
1510 | Source component class's message iterator class's "can seek ns from | |
1511 | origin?" method. | |
1512 | ||
1513 | Can be \c NULL, in which case it is equivalent to setting a method | |
1514 | which always returns #BT_TRUE. | |
1515 | @endparblock | |
1516 | ||
1517 | @bt_pre_not_null{_seek_method} | |
1518 | @bt_pre_not_null{_can_seek_method} | |
1519 | */ | |
1520 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \ | |
1521 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _plugin_id, _component_class_id, source, _seek_method); \ | |
1522 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _plugin_id, _component_class_id, source, _can_seek_method) | |
1523 | ||
1524 | /*! | |
1525 | @brief | |
1526 | Alias of | |
1527 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID() | |
1528 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1529 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1530 | */ | |
1531 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \ | |
1532 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method) | |
1533 | ||
1534 | /*! | |
1535 | @brief | |
1536 | Sets the "output port connected" method of the \bt_src_comp_cls | |
1537 | having the ID \bt_p{_component_class_id} in the plugin having the ID | |
1538 | \bt_p{_plugin_id} to \bt_p{_method}. | |
1539 | ||
1540 | See the | |
1541 | \ref api-comp-cls-dev-meth-oport-connected "output port connected" | |
1542 | method. | |
1543 | ||
1544 | @param[in] _plugin_id | |
1545 | @parblock | |
1546 | C identifier. | |
1547 | ||
1548 | ID of the plugin which contains the source component class of which | |
1549 | to set the "output port connected" method. | |
1550 | @endparblock | |
1551 | @param[in] _component_class_id | |
1552 | @parblock | |
1553 | C identifier. | |
1554 | ||
1555 | ID of the source component class, within the plugin having the ID | |
1556 | \bt_p{_plugin_id}, of which to set the "output port connected" | |
1557 | method to \bt_p{_method}. | |
1558 | @endparblock | |
1559 | @param[in] _method | |
1560 | @parblock | |
1561 | #bt_component_class_source_output_port_connected_method | |
1562 | ||
1563 | Source component class's "output port connected" method. | |
1564 | @endparblock | |
1565 | ||
1566 | @bt_pre_not_null{_method} | |
1567 | */ | |
1568 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
1569 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_output_port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD, _plugin_id, _component_class_id, source, _method) | |
1570 | ||
1571 | /*! | |
1572 | @brief | |
1573 | Alias of | |
1574 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID() | |
1575 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1576 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1577 | */ | |
1578 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \ | |
1579 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method) | |
1580 | ||
1581 | /*! | |
1582 | @brief | |
1583 | Sets the query method of the \bt_src_comp_cls | |
1584 | having the ID \bt_p{_component_class_id} in the plugin having the ID | |
1585 | \bt_p{_plugin_id} to \bt_p{_method}. | |
1586 | ||
1587 | See the \ref api-comp-cls-dev-meth-query "query" method. | |
1588 | ||
1589 | @param[in] _plugin_id | |
1590 | @parblock | |
1591 | C identifier. | |
1592 | ||
1593 | ID of the plugin which contains the source component class of which | |
1594 | to set the query method. | |
1595 | @endparblock | |
1596 | @param[in] _component_class_id | |
1597 | @parblock | |
1598 | C identifier. | |
1599 | ||
1600 | ID of the source component class, within the plugin having the ID | |
1601 | \bt_p{_plugin_id}, of which to set the query | |
1602 | method to \bt_p{_method}. | |
1603 | @endparblock | |
1604 | @param[in] _method | |
1605 | @parblock | |
1606 | #bt_component_class_source_query_method | |
1607 | ||
1608 | Source component class's query method. | |
1609 | @endparblock | |
1610 | ||
1611 | @bt_pre_not_null{_method} | |
1612 | */ | |
1613 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
1614 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _plugin_id, _component_class_id, source, _method) | |
1615 | ||
1616 | /*! | |
1617 | @brief | |
1618 | Alias of | |
1619 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID() | |
1620 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1621 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1622 | */ | |
1623 | #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \ | |
1624 | BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method) | |
1625 | ||
1626 | /*! @} */ | |
1627 | ||
1628 | /*! | |
1629 | @name Filter component class methods | |
1630 | @{ | |
1631 | */ | |
1632 | ||
1633 | /*! | |
1634 | @brief | |
1635 | Sets the finalization method of the \bt_flt_comp_cls having the ID | |
1636 | \bt_p{_component_class_id} in the plugin having the ID | |
1637 | \bt_p{_plugin_id} to \bt_p{_method}. | |
1638 | ||
1639 | See the \ref api-comp-cls-dev-meth-fini "finalize" method. | |
1640 | ||
1641 | @param[in] _plugin_id | |
1642 | @parblock | |
1643 | C identifier. | |
1644 | ||
1645 | ID of the plugin which contains the filter component class of which | |
1646 | to set the finalization method. | |
1647 | @endparblock | |
1648 | @param[in] _component_class_id | |
1649 | @parblock | |
1650 | C identifier. | |
1651 | ||
1652 | ID of the filter component class, within the plugin having the ID | |
1653 | \bt_p{_plugin_id}, of which to set the finalization method to | |
1654 | \bt_p{_method}. | |
1655 | @endparblock | |
1656 | @param[in] _method | |
1657 | @parblock | |
1658 | #bt_component_class_filter_finalize_method | |
1659 | ||
1660 | Filter component class's finalization method. | |
1661 | @endparblock | |
1662 | ||
1663 | @bt_pre_not_null{_method} | |
1664 | */ | |
1665 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
1666 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _plugin_id, _component_class_id, filter, _method) | |
1667 | ||
1668 | /*! | |
1669 | @brief | |
1670 | Alias of | |
1671 | BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID() | |
1672 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1673 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1674 | */ | |
1675 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \ | |
1676 | BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method) | |
1677 | ||
1678 | /*! | |
1679 | @brief | |
1680 | Sets the \"get supported \bt_mip versions\" method of the | |
1681 | \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the | |
1682 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. | |
1683 | ||
1684 | See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions" | |
1685 | method. | |
1686 | ||
1687 | @param[in] _plugin_id | |
1688 | @parblock | |
1689 | C identifier. | |
1690 | ||
1691 | ID of the plugin which contains the filter component class of which | |
1692 | to set the "get supported MIP versions" method. | |
1693 | @endparblock | |
1694 | @param[in] _component_class_id | |
1695 | @parblock | |
1696 | C identifier. | |
1697 | ||
1698 | ID of the filter component class, within the plugin having the ID | |
1699 | \bt_p{_plugin_id}, of which to set the "get supported MIP versions" | |
1700 | method to \bt_p{_method}. | |
1701 | @endparblock | |
1702 | @param[in] _method | |
1703 | @parblock | |
1704 | #bt_component_class_filter_get_supported_mip_versions_method | |
1705 | ||
1706 | Filter component class's "get supported MIP versions" method. | |
1707 | @endparblock | |
1708 | ||
1709 | @bt_pre_not_null{_method} | |
1710 | */ | |
1711 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
c39793dd | 1712 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD, _plugin_id, _component_class_id, filter, _method) |
43c59509 PP |
1713 | |
1714 | /*! | |
1715 | @brief | |
1716 | Alias of | |
1717 | BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID() | |
1718 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1719 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1720 | */ | |
1721 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \ | |
1722 | BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method) | |
1723 | ||
1724 | /*! | |
1725 | @brief | |
1726 | Sets the initialization method of the \bt_flt_comp_cls having the ID | |
1727 | \bt_p{_component_class_id} in the plugin having the ID | |
1728 | \bt_p{_plugin_id} to \bt_p{_method}. | |
1729 | ||
1730 | See the \ref api-comp-cls-dev-meth-init "initialize" method. | |
1731 | ||
1732 | @param[in] _plugin_id | |
1733 | @parblock | |
1734 | C identifier. | |
1735 | ||
1736 | ID of the plugin which contains the filter component class of which | |
1737 | to set the initialization method. | |
1738 | @endparblock | |
1739 | @param[in] _component_class_id | |
1740 | @parblock | |
1741 | C identifier. | |
1742 | ||
1743 | ID of the filter component class, within the plugin having the ID | |
1744 | \bt_p{_plugin_id}, of which to set the initialization method to | |
1745 | \bt_p{_method}. | |
1746 | @endparblock | |
1747 | @param[in] _method | |
1748 | @parblock | |
1749 | #bt_component_class_filter_initialize_method | |
1750 | ||
1751 | Filter component class's initialization method. | |
1752 | @endparblock | |
1753 | ||
1754 | @bt_pre_not_null{_method} | |
1755 | */ | |
1756 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
1757 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD, _plugin_id, _component_class_id, filter, _method) | |
1758 | ||
1759 | /*! | |
1760 | @brief | |
1761 | Alias of | |
1762 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID() | |
1763 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1764 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1765 | */ | |
1766 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \ | |
1767 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method) | |
1768 | ||
1769 | /*! | |
1770 | @brief | |
1771 | Sets the "input port connected" method of the \bt_flt_comp_cls | |
1772 | having the ID \bt_p{_component_class_id} in the plugin having the ID | |
1773 | \bt_p{_plugin_id} to \bt_p{_method}. | |
1774 | ||
1775 | See the | |
1776 | \ref api-comp-cls-dev-meth-iport-connected "input port connected" | |
1777 | method. | |
1778 | ||
1779 | @param[in] _plugin_id | |
1780 | @parblock | |
1781 | C identifier. | |
1782 | ||
1783 | ID of the plugin which contains the filter component class of which | |
1784 | to set the "input port connected" method. | |
1785 | @endparblock | |
1786 | @param[in] _component_class_id | |
1787 | @parblock | |
1788 | C identifier. | |
1789 | ||
1790 | ID of the filter component class, within the plugin having the ID | |
1791 | \bt_p{_plugin_id}, of which to set the "input port connected" | |
1792 | method to \bt_p{_method}. | |
1793 | @endparblock | |
1794 | @param[in] _method | |
1795 | @parblock | |
1796 | #bt_component_class_filter_input_port_connected_method | |
1797 | ||
1798 | Filter component class's "input port connected" method. | |
1799 | @endparblock | |
1800 | ||
1801 | @bt_pre_not_null{_method} | |
1802 | */ | |
1803 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
1804 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_input_port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD, _plugin_id, _component_class_id, filter, _method) | |
1805 | ||
1806 | /*! | |
1807 | @brief | |
1808 | Alias of | |
1809 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID() | |
1810 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1811 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1812 | */ | |
1813 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \ | |
1814 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method) | |
1815 | ||
1816 | /*! | |
1817 | @brief | |
1818 | Sets the finalization method of the \bt_msg_iter_cls of the | |
1819 | \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the | |
1820 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. | |
1821 | ||
1822 | See the \ref api-msg-iter-cls-meth-fini "finalize" method. | |
1823 | ||
1824 | @param[in] _plugin_id | |
1825 | @parblock | |
1826 | C identifier. | |
1827 | ||
1828 | ID of the plugin which contains the filter component class of which | |
1829 | to set the finalization method of the message iterator class. | |
1830 | @endparblock | |
1831 | @param[in] _component_class_id | |
1832 | @parblock | |
1833 | C identifier. | |
1834 | ||
1835 | ID of the filter component class, within the plugin having the ID | |
1836 | \bt_p{_plugin_id}, of which to set the finalization method of the | |
1837 | message iterator class to \bt_p{_method}. | |
1838 | @endparblock | |
1839 | @param[in] _method | |
1840 | @parblock | |
1841 | #bt_message_iterator_class_finalize_method | |
1842 | ||
1843 | Filter component class's message iterator class's finalization method. | |
1844 | @endparblock | |
1845 | ||
1846 | @bt_pre_not_null{_method} | |
1847 | */ | |
1848 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
1849 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _plugin_id, _component_class_id, filter, _method) | |
1850 | ||
1851 | /*! | |
1852 | @brief | |
1853 | Alias of | |
1854 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID() | |
1855 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1856 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1857 | */ | |
1858 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \ | |
1859 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method) | |
1860 | ||
1861 | /*! | |
1862 | @brief | |
1863 | Sets the initialization method of the \bt_msg_iter_cls of the | |
1864 | \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the | |
1865 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. | |
1866 | ||
1867 | See the \ref api-msg-iter-cls-meth-init "initialize" method. | |
1868 | ||
1869 | @param[in] _plugin_id | |
1870 | @parblock | |
1871 | C identifier. | |
1872 | ||
1873 | ID of the plugin which contains the filter component class of which | |
1874 | to set the initialization method of the message iterator class. | |
1875 | @endparblock | |
1876 | @param[in] _component_class_id | |
1877 | @parblock | |
1878 | C identifier. | |
1879 | ||
1880 | ID of the filter component class, within the plugin having the ID | |
1881 | \bt_p{_plugin_id}, of which to set the initialization method of the | |
1882 | message iterator class to \bt_p{_method}. | |
1883 | @endparblock | |
1884 | @param[in] _method | |
1885 | @parblock | |
1886 | #bt_message_iterator_class_initialize_method | |
1887 | ||
1888 | Filter component class's message iterator class's initialization | |
1889 | method. | |
1890 | @endparblock | |
1891 | ||
1892 | @bt_pre_not_null{_method} | |
1893 | */ | |
1894 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
1895 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD, _plugin_id, _component_class_id, filter, _method) | |
1896 | ||
1897 | /*! | |
1898 | @brief | |
1899 | Alias of | |
1900 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID() | |
1901 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1902 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1903 | */ | |
1904 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \ | |
1905 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method) | |
1906 | ||
1907 | /*! | |
1908 | @brief | |
1909 | Sets the "seek beginning" and "can seek beginning?" methods of the | |
1910 | \bt_msg_iter_cls of the \bt_flt_comp_cls having the ID | |
1911 | \bt_p{_component_class_id} in the plugin having the ID | |
1912 | \bt_p{_plugin_id} to \bt_p{_seek_method} and | |
1913 | \bt_p{_can_seek_method}. | |
1914 | ||
1915 | See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and | |
1916 | \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods. | |
1917 | ||
1918 | @param[in] _plugin_id | |
1919 | @parblock | |
1920 | C identifier. | |
1921 | ||
1922 | ID of the plugin which contains the filter component class of which | |
1923 | to set the "seek beginning" and "can seek beginning?" methods of the | |
1924 | message iterator class. | |
1925 | @endparblock | |
1926 | @param[in] _component_class_id | |
1927 | @parblock | |
1928 | C identifier. | |
1929 | ||
1930 | ID of the filter component class, within the plugin having the ID | |
1931 | \bt_p{_plugin_id}, of which to set the "seek beginning" and "can | |
1932 | seek beginning" methods of the message iterator class to | |
1933 | \bt_p{_seek_method} and \bt_p{_can_seek_method}. | |
1934 | @endparblock | |
1935 | @param[in] _seek_method | |
1936 | @parblock | |
1937 | #bt_message_iterator_class_seek_beginning_method | |
1938 | ||
1939 | Filter component class's message iterator class's "seek beginning" | |
1940 | method. | |
1941 | @endparblock | |
1942 | @param[in] _can_seek_method | |
1943 | @parblock | |
1944 | #bt_message_iterator_class_can_seek_beginning_method | |
1945 | ||
1946 | Filter component class's message iterator class's | |
1947 | "can seek beginning?" method. | |
1948 | ||
1949 | Can be \c NULL, in which case it is equivalent to setting a method | |
1950 | which always returns #BT_TRUE. | |
1951 | @endparblock | |
1952 | ||
1953 | @bt_pre_not_null{_seek_method} | |
1954 | @bt_pre_not_null{_can_seek_method} | |
1955 | */ | |
1956 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \ | |
1957 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _plugin_id, _component_class_id, filter, _seek_method); \ | |
1958 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _plugin_id, _component_class_id, filter, _can_seek_method); | |
1959 | ||
1960 | /*! | |
1961 | @brief | |
1962 | Alias of | |
1963 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID() | |
1964 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
1965 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
1966 | */ | |
1967 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \ | |
1968 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method) | |
1969 | ||
1970 | /*! | |
1971 | @brief | |
1972 | Sets the "seek ns from origin" and "can seek ns from origin?" | |
1973 | methods of the \bt_msg_iter_cls of the \bt_flt_comp_cls having the | |
1974 | ID \bt_p{_component_class_id} in the plugin having the ID | |
1975 | \bt_p{_plugin_id} to \bt_p{_seek_method} and | |
1976 | \bt_p{_can_seek_method}. | |
1977 | ||
1978 | See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and | |
1979 | \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?" | |
1980 | methods. | |
1981 | ||
1982 | @param[in] _plugin_id | |
1983 | @parblock | |
1984 | C identifier. | |
1985 | ||
1986 | ID of the plugin which contains the filter component class of which | |
1987 | to set the "seek ns from origin" and "can seek ns from origin?" | |
1988 | methods of the message iterator class. | |
1989 | @endparblock | |
1990 | @param[in] _component_class_id | |
1991 | @parblock | |
1992 | C identifier. | |
1993 | ||
1994 | ID of the filter component class, within the plugin having the ID | |
1995 | \bt_p{_plugin_id}, of which to set the "seek ns from origin" and | |
1996 | "can seek ns from origin" methods of the message iterator class to | |
1997 | \bt_p{_seek_method} and \bt_p{_can_seek_method}. | |
1998 | @endparblock | |
1999 | @param[in] _seek_method | |
2000 | @parblock | |
2001 | #bt_message_iterator_class_seek_ns_from_origin_method | |
2002 | ||
2003 | Filter component class's message iterator class's "seek ns from | |
2004 | origin" method. | |
2005 | @endparblock | |
2006 | @param[in] _can_seek_method | |
2007 | @parblock | |
2008 | #bt_message_iterator_class_can_seek_ns_from_origin_method | |
2009 | ||
2010 | Filter component class's message iterator class's "can seek ns from | |
2011 | origin?" method. | |
2012 | ||
2013 | Can be \c NULL, in which case it is equivalent to setting a method | |
2014 | which always returns #BT_TRUE. | |
2015 | @endparblock | |
2016 | ||
2017 | @bt_pre_not_null{_seek_method} | |
2018 | @bt_pre_not_null{_can_seek_method} | |
2019 | */ | |
2020 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \ | |
2021 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _plugin_id, _component_class_id, filter, _seek_method); \ | |
2022 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _plugin_id, _component_class_id, filter, _can_seek_method) | |
2023 | ||
2024 | /*! | |
2025 | @brief | |
2026 | Alias of | |
2027 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID() | |
2028 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
2029 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
2030 | */ | |
2031 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \ | |
2032 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method) | |
2033 | ||
2034 | /*! | |
2035 | @brief | |
2036 | Sets the "output port connected" method of the \bt_flt_comp_cls | |
2037 | having the ID \bt_p{_component_class_id} in the plugin having the ID | |
2038 | \bt_p{_plugin_id} to \bt_p{_method}. | |
2039 | ||
2040 | See the | |
2041 | \ref api-comp-cls-dev-meth-oport-connected "output port connected" | |
2042 | method. | |
2043 | ||
2044 | @param[in] _plugin_id | |
2045 | @parblock | |
2046 | C identifier. | |
2047 | ||
2048 | ID of the plugin which contains the filter component class of which | |
2049 | to set the "output port connected" method. | |
2050 | @endparblock | |
2051 | @param[in] _component_class_id | |
2052 | @parblock | |
2053 | C identifier. | |
2054 | ||
2055 | ID of the filter component class, within the plugin having the ID | |
2056 | \bt_p{_plugin_id}, of which to set the "output port connected" | |
2057 | method to \bt_p{_method}. | |
2058 | @endparblock | |
2059 | @param[in] _method | |
2060 | @parblock | |
2061 | #bt_component_class_filter_output_port_connected_method | |
2062 | ||
2063 | Filter component class's "output port connected" method. | |
2064 | @endparblock | |
2065 | ||
2066 | @bt_pre_not_null{_method} | |
2067 | */ | |
2068 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
2069 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_output_port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD, _plugin_id, _component_class_id, filter, _method) | |
2070 | ||
2071 | /*! | |
2072 | @brief | |
2073 | Alias of | |
2074 | BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID() | |
2075 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
2076 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
2077 | */ | |
2078 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \ | |
2079 | BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method) | |
2080 | ||
2081 | /*! | |
2082 | @brief | |
2083 | Sets the query method of the \bt_flt_comp_cls | |
2084 | having the ID \bt_p{_component_class_id} in the plugin having the ID | |
2085 | \bt_p{_plugin_id} to \bt_p{_method}. | |
2086 | ||
2087 | See the \ref api-comp-cls-dev-meth-query "query" method. | |
2088 | ||
2089 | @param[in] _plugin_id | |
2090 | @parblock | |
2091 | C identifier. | |
2092 | ||
2093 | ID of the plugin which contains the filter component class of which | |
2094 | to set the query method. | |
2095 | @endparblock | |
2096 | @param[in] _component_class_id | |
2097 | @parblock | |
2098 | C identifier. | |
2099 | ||
2100 | ID of the filter component class, within the plugin having the ID | |
2101 | \bt_p{_plugin_id}, of which to set the query | |
2102 | method to \bt_p{_method}. | |
2103 | @endparblock | |
2104 | @param[in] _method | |
2105 | @parblock | |
2106 | #bt_component_class_filter_query_method | |
2107 | ||
2108 | Filter component class's query method. | |
2109 | @endparblock | |
2110 | ||
2111 | @bt_pre_not_null{_method} | |
2112 | */ | |
2113 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
2114 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _plugin_id, _component_class_id, filter, _method) | |
2115 | ||
2116 | /*! | |
2117 | @brief | |
2118 | Alias of | |
2119 | BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID() | |
2120 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
2121 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
2122 | */ | |
2123 | #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \ | |
2124 | BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method) | |
2125 | ||
2126 | /*! @} */ | |
2127 | ||
2128 | /*! | |
2129 | @name Sink component class methods | |
2130 | @{ | |
2131 | */ | |
2132 | ||
2133 | /*! | |
2134 | @brief | |
2135 | Sets the finalization method of the \bt_sink_comp_cls having the ID | |
2136 | \bt_p{_component_class_id} in the plugin having the ID | |
2137 | \bt_p{_plugin_id} to \bt_p{_method}. | |
2138 | ||
2139 | See the \ref api-comp-cls-dev-meth-fini "finalize" method. | |
2140 | ||
2141 | @param[in] _plugin_id | |
2142 | @parblock | |
2143 | C identifier. | |
2144 | ||
2145 | ID of the plugin which contains the sink component class of which | |
2146 | to set the finalization method. | |
2147 | @endparblock | |
2148 | @param[in] _component_class_id | |
2149 | @parblock | |
2150 | C identifier. | |
2151 | ||
2152 | ID of the sink component class, within the plugin having the ID | |
2153 | \bt_p{_plugin_id}, of which to set the finalization method to | |
2154 | \bt_p{_method}. | |
2155 | @endparblock | |
2156 | @param[in] _method | |
2157 | @parblock | |
2158 | #bt_component_class_sink_finalize_method | |
2159 | ||
2160 | Sink component class's finalization method. | |
2161 | @endparblock | |
2162 | ||
2163 | @bt_pre_not_null{_method} | |
2164 | */ | |
2165 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
2166 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD, _plugin_id, _component_class_id, sink, _method) | |
2167 | ||
2168 | /*! | |
2169 | @brief | |
2170 | Alias of | |
2171 | BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID() | |
2172 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
2173 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
2174 | */ | |
2175 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \ | |
2176 | BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method) | |
2177 | ||
2178 | /*! | |
2179 | @brief | |
2180 | Sets the \"get supported \bt_mip versions\" method of the | |
2181 | \bt_sink_comp_cls having the ID \bt_p{_component_class_id} in the | |
2182 | plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}. | |
2183 | ||
2184 | See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions" | |
2185 | method. | |
2186 | ||
2187 | @param[in] _plugin_id | |
2188 | @parblock | |
2189 | C identifier. | |
2190 | ||
2191 | ID of the plugin which contains the sink component class of which | |
2192 | to set the "get supported MIP versions" method. | |
2193 | @endparblock | |
2194 | @param[in] _component_class_id | |
2195 | @parblock | |
2196 | C identifier. | |
2197 | ||
2198 | ID of the sink component class, within the plugin having the ID | |
2199 | \bt_p{_plugin_id}, of which to set the "get supported MIP versions" | |
2200 | method to \bt_p{_method}. | |
2201 | @endparblock | |
2202 | @param[in] _method | |
2203 | @parblock | |
2204 | #bt_component_class_sink_get_supported_mip_versions_method | |
2205 | ||
2206 | Sink component class's "get supported MIP versions" method. | |
2207 | @endparblock | |
2208 | ||
2209 | @bt_pre_not_null{_method} | |
2210 | */ | |
2211 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
c39793dd | 2212 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD, _plugin_id, _component_class_id, sink, _method) |
43c59509 PP |
2213 | |
2214 | /*! | |
2215 | @brief | |
2216 | Alias of | |
2217 | BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID() | |
2218 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
2219 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
2220 | */ | |
2221 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \ | |
2222 | BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method) | |
2223 | ||
2224 | /*! | |
2225 | @brief | |
2226 | Sets the "graph is configured" method of the \bt_sink_comp_cls | |
2227 | having the ID \bt_p{_component_class_id} in the plugin having the ID | |
2228 | \bt_p{_plugin_id} to \bt_p{_method}. | |
2229 | ||
2230 | See the | |
2231 | \ref api-comp-cls-dev-meth-graph-configured "graph is configured" | |
2232 | method. | |
2233 | ||
2234 | @param[in] _plugin_id | |
2235 | @parblock | |
2236 | C identifier. | |
2237 | ||
2238 | ID of the plugin which contains the sink component class of which | |
2239 | to set the "graph is configured" method. | |
2240 | @endparblock | |
2241 | @param[in] _component_class_id | |
2242 | @parblock | |
2243 | C identifier. | |
2244 | ||
2245 | ID of the sink component class, within the plugin having the ID | |
2246 | \bt_p{_plugin_id}, of which to set the "graph is configured" | |
2247 | method to \bt_p{_method}. | |
2248 | @endparblock | |
2249 | @param[in] _method | |
2250 | @parblock | |
2251 | #bt_component_class_sink_graph_is_configured_method | |
2252 | ||
2253 | Sink component class's "graph is configured" method. | |
2254 | @endparblock | |
2255 | ||
2256 | @bt_pre_not_null{_method} | |
2257 | */ | |
2258 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
2259 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_graph_is_configured_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD, _plugin_id, _component_class_id, sink, _method) | |
2260 | ||
2261 | /*! | |
2262 | @brief | |
2263 | Alias of | |
2264 | BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID() | |
2265 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
2266 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
2267 | */ | |
2268 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _method) \ | |
2269 | BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _method) | |
2270 | ||
2271 | /*! | |
2272 | @brief | |
2273 | Sets the initialization method of the \bt_sink_comp_cls having the | |
2274 | ID \bt_p{_component_class_id} in the plugin having the ID | |
2275 | \bt_p{_plugin_id} to \bt_p{_method}. | |
2276 | ||
2277 | See the \ref api-comp-cls-dev-meth-init "initialize" method. | |
2278 | ||
2279 | @param[in] _plugin_id | |
2280 | @parblock | |
2281 | C identifier. | |
2282 | ||
2283 | ID of the plugin which contains the sink component class of which | |
2284 | to set the initialization method. | |
2285 | @endparblock | |
2286 | @param[in] _component_class_id | |
2287 | @parblock | |
2288 | C identifier. | |
2289 | ||
2290 | ID of the sink component class, within the plugin having the ID | |
2291 | \bt_p{_plugin_id}, of which to set the initialization method to | |
2292 | \bt_p{_method}. | |
2293 | @endparblock | |
2294 | @param[in] _method | |
2295 | @parblock | |
2296 | #bt_component_class_sink_initialize_method | |
2297 | ||
2298 | Sink component class's initialization method. | |
2299 | @endparblock | |
2300 | ||
2301 | @bt_pre_not_null{_method} | |
2302 | */ | |
2303 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
2304 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD, _plugin_id, _component_class_id, sink, _method) | |
2305 | ||
2306 | /*! | |
2307 | @brief | |
2308 | Alias of | |
2309 | BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID() | |
2310 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
2311 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
2312 | */ | |
2313 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \ | |
2314 | BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method) | |
2315 | ||
2316 | /*! | |
2317 | @brief | |
2318 | Sets the "input port connected" method of the \bt_sink_comp_cls | |
2319 | having the ID \bt_p{_component_class_id} in the plugin having the ID | |
2320 | \bt_p{_plugin_id} to \bt_p{_method}. | |
2321 | ||
2322 | See the | |
2323 | \ref api-comp-cls-dev-meth-iport-connected "input port connected" | |
2324 | method. | |
2325 | ||
2326 | @param[in] _plugin_id | |
2327 | @parblock | |
2328 | C identifier. | |
2329 | ||
2330 | ID of the plugin which contains the sink component class of which | |
2331 | to set the "input port connected" method. | |
2332 | @endparblock | |
2333 | @param[in] _component_class_id | |
2334 | @parblock | |
2335 | C identifier. | |
2336 | ||
2337 | ID of the sink component class, within the plugin having the ID | |
2338 | \bt_p{_plugin_id}, of which to set the "input port connected" | |
2339 | method to \bt_p{_method}. | |
2340 | @endparblock | |
2341 | @param[in] _method | |
2342 | @parblock | |
2343 | #bt_component_class_sink_input_port_connected_method | |
2344 | ||
2345 | Sink component class's "input port connected" method. | |
2346 | @endparblock | |
2347 | ||
2348 | @bt_pre_not_null{_method} | |
2349 | */ | |
2350 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
2351 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_input_port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD, _plugin_id, _component_class_id, sink, _method) | |
2352 | ||
2353 | /*! | |
2354 | @brief | |
2355 | Alias of | |
2356 | BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID() | |
2357 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
2358 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
2359 | */ | |
2360 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \ | |
2361 | BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method) | |
2362 | ||
2363 | /*! | |
2364 | @brief | |
2365 | Sets the query method of the \bt_sink_comp_cls | |
2366 | having the ID \bt_p{_component_class_id} in the plugin having the ID | |
2367 | \bt_p{_plugin_id} to \bt_p{_method}. | |
2368 | ||
2369 | See the \ref api-comp-cls-dev-meth-query "query" method. | |
2370 | ||
2371 | @param[in] _plugin_id | |
2372 | @parblock | |
2373 | C identifier. | |
2374 | ||
2375 | ID of the plugin which contains the sink component class of which | |
2376 | to set the query method. | |
2377 | @endparblock | |
2378 | @param[in] _component_class_id | |
2379 | @parblock | |
2380 | C identifier. | |
2381 | ||
2382 | ID of the sink component class, within the plugin having the ID | |
2383 | \bt_p{_plugin_id}, of which to set the query | |
2384 | method to \bt_p{_method}. | |
2385 | @endparblock | |
2386 | @param[in] _method | |
2387 | @parblock | |
2388 | #bt_component_class_sink_query_method | |
2389 | ||
2390 | Sink component class's query method. | |
2391 | @endparblock | |
2392 | ||
2393 | @bt_pre_not_null{_method} | |
2394 | */ | |
2395 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \ | |
2396 | __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _plugin_id, _component_class_id, sink, _method) | |
2397 | ||
2398 | /*! | |
2399 | @brief | |
2400 | Alias of | |
2401 | BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID() | |
2402 | with the \bt_p{_plugin_id} parameter set to <code>auto</code> and | |
2403 | the \bt_p{_component_class_id} parameter set to \bt_p{_name}. | |
2404 | */ | |
2405 | #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \ | |
2406 | BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method) | |
2407 | ||
2408 | /*! @} */ | |
2409 | ||
2410 | /*! @} */ | |
2411 | ||
6ba0b073 PP |
2412 | /* Plugin descriptor: describes a single plugin (internal use) */ |
2413 | struct __bt_plugin_descriptor { | |
6ba0b073 PP |
2414 | /* Plugin's name */ |
2415 | const char *name; | |
2416 | } __attribute__((packed)); | |
2417 | ||
2418 | /* Type of a plugin attribute (internal use) */ | |
2419 | enum __bt_plugin_descriptor_attribute_type { | |
2420 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT = 0, | |
2421 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT = 1, | |
2422 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR = 2, | |
2423 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE = 3, | |
2424 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 4, | |
b6de043b PP |
2425 | BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION = 5, |
2426 | }; | |
2427 | ||
2428 | /* Plugin (user) version */ | |
2429 | struct __bt_plugin_descriptor_version { | |
2430 | uint32_t major; | |
2431 | uint32_t minor; | |
2432 | uint32_t patch; | |
2433 | const char *extra; | |
6ba0b073 PP |
2434 | }; |
2435 | ||
2436 | /* Plugin attribute (internal use) */ | |
2437 | struct __bt_plugin_descriptor_attribute { | |
2438 | /* Plugin descriptor to which to associate this attribute */ | |
2439 | const struct __bt_plugin_descriptor *plugin_descriptor; | |
2440 | ||
6ba0b073 PP |
2441 | /* Name of the attribute's type for debug purposes */ |
2442 | const char *type_name; | |
2443 | ||
857f4dce PP |
2444 | /* Attribute's type */ |
2445 | enum __bt_plugin_descriptor_attribute_type type; | |
2446 | ||
d3e4dcd8 | 2447 | /* Attribute's value (depends on attribute's type) */ |
6ba0b073 PP |
2448 | union { |
2449 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */ | |
21a9f056 | 2450 | bt_plugin_initialize_func init; |
6ba0b073 PP |
2451 | |
2452 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */ | |
a71c9a60 | 2453 | bt_plugin_finalize_func exit; |
6ba0b073 PP |
2454 | |
2455 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */ | |
2456 | const char *author; | |
2457 | ||
2458 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */ | |
2459 | const char *license; | |
2460 | ||
2461 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */ | |
2462 | const char *description; | |
b6de043b PP |
2463 | |
2464 | /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */ | |
2465 | struct __bt_plugin_descriptor_version version; | |
6ba0b073 PP |
2466 | } value; |
2467 | } __attribute__((packed)); | |
2468 | ||
2469 | /* Component class descriptor (internal use) */ | |
2470 | struct __bt_plugin_component_class_descriptor { | |
2471 | /* | |
2472 | * Plugin descriptor to which to associate this component | |
2473 | * class descriptor. | |
2474 | */ | |
2475 | const struct __bt_plugin_descriptor *plugin_descriptor; | |
2476 | ||
6ba0b073 PP |
2477 | /* Component class name */ |
2478 | const char *name; | |
2479 | ||
857f4dce | 2480 | /* Component class type */ |
4cdfc5e8 | 2481 | bt_component_class_type type; |
857f4dce | 2482 | |
d3e4dcd8 PP |
2483 | /* Mandatory methods (depends on component class type) */ |
2484 | union { | |
2485 | /* BT_COMPONENT_CLASS_TYPE_SOURCE */ | |
2486 | struct { | |
a3f0c7db | 2487 | bt_message_iterator_class_next_method msg_iter_next; |
d3e4dcd8 PP |
2488 | } source; |
2489 | ||
2490 | /* BT_COMPONENT_CLASS_TYPE_FILTER */ | |
2491 | struct { | |
a3f0c7db | 2492 | bt_message_iterator_class_next_method msg_iter_next; |
d3e4dcd8 PP |
2493 | } filter; |
2494 | ||
2495 | /* BT_COMPONENT_CLASS_TYPE_SINK */ | |
2496 | struct { | |
0d72b8c3 | 2497 | bt_component_class_sink_consume_method consume; |
d3e4dcd8 PP |
2498 | } sink; |
2499 | } methods; | |
6ba0b073 PP |
2500 | } __attribute__((packed)); |
2501 | ||
2502 | /* Type of a component class attribute (internal use) */ | |
2503 | enum __bt_plugin_component_class_descriptor_attribute_type { | |
d94d92ac PP |
2504 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 0, |
2505 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP = 1, | |
2b55df78 | 2506 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD = 2, |
21a9f056 | 2507 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD = 3, |
2b55df78 PP |
2508 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD = 4, |
2509 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD = 5, | |
2510 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD = 6, | |
2511 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD = 7, | |
2512 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD = 8, | |
21a9f056 | 2513 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD = 9, |
2b55df78 PP |
2514 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD = 10, |
2515 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD = 11, | |
2516 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD = 12, | |
2517 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD = 13, | |
2518 | BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD = 14, | |
6ba0b073 PP |
2519 | }; |
2520 | ||
2521 | /* Component class attribute (internal use) */ | |
2522 | struct __bt_plugin_component_class_descriptor_attribute { | |
2523 | /* | |
2524 | * Component class plugin attribute to which to associate this | |
2525 | * component class attribute. | |
2526 | */ | |
2527 | const struct __bt_plugin_component_class_descriptor *comp_class_descriptor; | |
2528 | ||
6ba0b073 PP |
2529 | /* Name of the attribute's type for debug purposes */ |
2530 | const char *type_name; | |
2531 | ||
857f4dce PP |
2532 | /* Attribute's type */ |
2533 | enum __bt_plugin_component_class_descriptor_attribute_type type; | |
2534 | ||
d3e4dcd8 | 2535 | /* Attribute's value (depends on attribute's type) */ |
6ba0b073 | 2536 | union { |
d3e4dcd8 | 2537 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */ |
6ba0b073 | 2538 | const char *description; |
d3e4dcd8 | 2539 | |
279b3f15 PP |
2540 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */ |
2541 | const char *help; | |
2542 | ||
2b55df78 PP |
2543 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD */ |
2544 | bt_component_class_source_get_supported_mip_versions_method source_get_supported_mip_versions_method; | |
2545 | bt_component_class_filter_get_supported_mip_versions_method filter_get_supported_mip_versions_method; | |
2546 | bt_component_class_sink_get_supported_mip_versions_method sink_get_supported_mip_versions_method; | |
2547 | ||
21a9f056 FD |
2548 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD */ |
2549 | bt_component_class_source_initialize_method source_initialize_method; | |
2550 | bt_component_class_filter_initialize_method filter_initialize_method; | |
2551 | bt_component_class_sink_initialize_method sink_initialize_method; | |
d3e4dcd8 | 2552 | |
64cadc66 | 2553 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */ |
0d72b8c3 PP |
2554 | bt_component_class_source_finalize_method source_finalize_method; |
2555 | bt_component_class_filter_finalize_method filter_finalize_method; | |
2556 | bt_component_class_sink_finalize_method sink_finalize_method; | |
d3e4dcd8 | 2557 | |
a67681c1 | 2558 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */ |
0d72b8c3 PP |
2559 | bt_component_class_source_query_method source_query_method; |
2560 | bt_component_class_filter_query_method filter_query_method; | |
2561 | bt_component_class_sink_query_method sink_query_method; | |
d94d92ac | 2562 | |
d94d92ac | 2563 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */ |
0d72b8c3 PP |
2564 | bt_component_class_filter_input_port_connected_method filter_input_port_connected_method; |
2565 | bt_component_class_sink_input_port_connected_method sink_input_port_connected_method; | |
72b913fb | 2566 | |
d94d92ac | 2567 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */ |
0d72b8c3 PP |
2568 | bt_component_class_source_output_port_connected_method source_output_port_connected_method; |
2569 | bt_component_class_filter_output_port_connected_method filter_output_port_connected_method; | |
0d8b4d8e | 2570 | |
5badd463 PP |
2571 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */ |
2572 | bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method; | |
2573 | ||
21a9f056 | 2574 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD */ |
a3f0c7db | 2575 | bt_message_iterator_class_initialize_method msg_iter_initialize_method; |
d3eb6e8f | 2576 | |
d6e69534 | 2577 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */ |
a3f0c7db | 2578 | bt_message_iterator_class_finalize_method msg_iter_finalize_method; |
7474e7d3 PP |
2579 | |
2580 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */ | |
a3f0c7db | 2581 | bt_message_iterator_class_seek_ns_from_origin_method msg_iter_seek_ns_from_origin_method; |
7474e7d3 PP |
2582 | |
2583 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */ | |
a3f0c7db | 2584 | bt_message_iterator_class_seek_beginning_method msg_iter_seek_beginning_method; |
7474e7d3 PP |
2585 | |
2586 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */ | |
a3f0c7db | 2587 | bt_message_iterator_class_can_seek_ns_from_origin_method msg_iter_can_seek_ns_from_origin_method; |
7474e7d3 PP |
2588 | |
2589 | /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */ | |
a3f0c7db | 2590 | bt_message_iterator_class_can_seek_beginning_method msg_iter_can_seek_beginning_method; |
6ba0b073 PP |
2591 | } value; |
2592 | } __attribute__((packed)); | |
2593 | ||
52238017 MJ |
2594 | struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void); |
2595 | struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void); | |
2596 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void); | |
2597 | struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void); | |
2598 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void); | |
2599 | struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void); | |
2600 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void); | |
2601 | struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void); | |
2602 | ||
43c59509 PP |
2603 | /* |
2604 | * Defines a plugin attribute (generic, internal use). | |
2605 | * | |
2606 | * _attr_name: Name of the attribute (C identifier). | |
2607 | * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type). | |
2608 | * _id: Plugin descriptor ID (C identifier). | |
2609 | * _x: Value. | |
2610 | */ | |
2611 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \ | |
2612 | static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \ | |
2613 | .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ | |
2614 | .type_name = #_attr_name, \ | |
2615 | .type = _attr_type, \ | |
2616 | .value = { ._attr_name = _x }, \ | |
2617 | }; \ | |
2618 | 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 | |
2619 | ||
2620 | #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \ | |
2621 | {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,} | |
2622 | ||
2623 | /* | |
2624 | * Defines a component class descriptor attribute (generic, internal | |
2625 | * use). | |
2626 | * | |
2627 | * _id: Plugin descriptor ID (C identifier). | |
2628 | * _component_class_id: Component class ID (C identifier). | |
2629 | * _type: Component class type (`source`, `filter`, or `sink`). | |
2630 | * _attr_name: Name of the attribute (C identifier). | |
2631 | * _attr_type: Type of the attribute | |
2632 | * (enum __bt_plugin_descriptor_attribute_type). | |
2633 | * _x: Value. | |
2634 | */ | |
2635 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _component_class_id, _type, _x) \ | |
2636 | static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name = { \ | |
2637 | .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_component_class_id, \ | |
2638 | .type_name = #_attr_name, \ | |
2639 | .type = _attr_type, \ | |
2640 | .value = { ._attr_name = _x }, \ | |
2641 | }; \ | |
2642 | static struct __bt_plugin_component_class_descriptor_attribute const * const __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS = &__bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name | |
2643 | ||
ce34b039 MD |
2644 | /* |
2645 | * Clang supports the no_sanitize variable attribute on global variables. | |
2646 | * GCC only supports the no_sanitize_address function attribute, which is | |
2647 | * not what we need. This is fine because, as far as we have seen, gcc | |
2648 | * does not insert red zones around global variables. | |
2649 | */ | |
2650 | #if defined(__clang__) | |
2651 | # if __has_feature(address_sanitizer) | |
2652 | # define __bt_plugin_variable_attribute_no_sanitize_address \ | |
2653 | __attribute__((no_sanitize("address"))) | |
2654 | # else | |
2655 | # define __bt_plugin_variable_attribute_no_sanitize_address | |
2656 | # endif | |
2657 | #else | |
2658 | # define __bt_plugin_variable_attribute_no_sanitize_address | |
2659 | #endif | |
2660 | ||
6ba0b073 PP |
2661 | /* |
2662 | * Variable attributes for a plugin descriptor pointer to be added to | |
2663 | * the plugin descriptor section (internal use). | |
2664 | */ | |
52238017 MJ |
2665 | #ifdef __APPLE__ |
2666 | #define __BT_PLUGIN_DESCRIPTOR_ATTRS \ | |
ce34b039 MD |
2667 | __attribute__((section("__DATA,btp_desc"), used)) \ |
2668 | __bt_plugin_variable_attribute_no_sanitize_address | |
52238017 MJ |
2669 | |
2670 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \ | |
2671 | __start___bt_plugin_descriptors | |
2672 | ||
2673 | #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \ | |
2674 | __stop___bt_plugin_descriptors | |
2675 | ||
2676 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \ | |
2677 | __asm("section$start$__DATA$btp_desc") | |
2678 | ||
2679 | #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \ | |
2680 | __asm("section$end$__DATA$btp_desc") | |
2681 | ||
2682 | #else | |
2683 | ||
6ba0b073 | 2684 | #define __BT_PLUGIN_DESCRIPTOR_ATTRS \ |
ce34b039 MD |
2685 | __attribute__((section("__bt_plugin_descriptors"), used)) \ |
2686 | __bt_plugin_variable_attribute_no_sanitize_address | |
6ba0b073 | 2687 | |
52238017 MJ |
2688 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \ |
2689 | __start___bt_plugin_descriptors | |
2690 | ||
2691 | #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \ | |
2692 | __stop___bt_plugin_descriptors | |
2693 | ||
2694 | #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA | |
2695 | ||
2696 | #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA | |
2697 | #endif | |
2698 | ||
6ba0b073 PP |
2699 | /* |
2700 | * Variable attributes for a plugin attribute pointer to be added to | |
2701 | * the plugin attribute section (internal use). | |
2702 | */ | |
52238017 MJ |
2703 | #ifdef __APPLE__ |
2704 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \ | |
ce34b039 MD |
2705 | __attribute__((section("__DATA,btp_desc_att"), used)) \ |
2706 | __bt_plugin_variable_attribute_no_sanitize_address | |
52238017 MJ |
2707 | |
2708 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ | |
2709 | __start___bt_plugin_descriptor_attributes | |
2710 | ||
2711 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ | |
2712 | __stop___bt_plugin_descriptor_attributes | |
2713 | ||
2714 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \ | |
2715 | __asm("section$start$__DATA$btp_desc_att") | |
2716 | ||
2717 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \ | |
2718 | __asm("section$end$__DATA$btp_desc_att") | |
2719 | ||
2720 | #else | |
2721 | ||
6ba0b073 | 2722 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
ce34b039 MD |
2723 | __attribute__((section("__bt_plugin_descriptor_attributes"), used)) \ |
2724 | __bt_plugin_variable_attribute_no_sanitize_address | |
6ba0b073 | 2725 | |
52238017 MJ |
2726 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ |
2727 | __start___bt_plugin_descriptor_attributes | |
2728 | ||
2729 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ | |
2730 | __stop___bt_plugin_descriptor_attributes | |
2731 | ||
2732 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA | |
2733 | ||
2734 | #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA | |
2735 | #endif | |
2736 | ||
6ba0b073 PP |
2737 | /* |
2738 | * Variable attributes for a component class descriptor pointer to be | |
2739 | * added to the component class descriptor section (internal use). | |
2740 | */ | |
52238017 MJ |
2741 | #ifdef __APPLE__ |
2742 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \ | |
ce34b039 MD |
2743 | __attribute__((section("__DATA,btp_cc_desc"), used)) \ |
2744 | __bt_plugin_variable_attribute_no_sanitize_address | |
52238017 MJ |
2745 | |
2746 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \ | |
2747 | __start___bt_plugin_component_class_descriptors | |
2748 | ||
2749 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \ | |
2750 | __stop___bt_plugin_component_class_descriptors | |
2751 | ||
2752 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \ | |
2753 | __asm("section$start$__DATA$btp_cc_desc") | |
2754 | ||
2755 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \ | |
2756 | __asm("section$end$__DATA$btp_cc_desc") | |
2757 | ||
2758 | #else | |
2759 | ||
6ba0b073 | 2760 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \ |
ce34b039 MD |
2761 | __attribute__((section("__bt_plugin_component_class_descriptors"), used)) \ |
2762 | __bt_plugin_variable_attribute_no_sanitize_address | |
6ba0b073 | 2763 | |
52238017 MJ |
2764 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \ |
2765 | __start___bt_plugin_component_class_descriptors | |
2766 | ||
2767 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \ | |
2768 | __stop___bt_plugin_component_class_descriptors | |
2769 | ||
2770 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA | |
2771 | ||
2772 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA | |
2773 | #endif | |
2774 | ||
6ba0b073 PP |
2775 | /* |
2776 | * Variable attributes for a component class descriptor attribute | |
2777 | * pointer to be added to the component class descriptor attribute | |
2778 | * section (internal use). | |
2779 | */ | |
52238017 MJ |
2780 | #ifdef __APPLE__ |
2781 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \ | |
ce34b039 MD |
2782 | __attribute__((section("__DATA,btp_cc_desc_att"), used)) \ |
2783 | __bt_plugin_variable_attribute_no_sanitize_address | |
52238017 MJ |
2784 | |
2785 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ | |
2786 | __start___bt_plugin_component_class_descriptor_attributes | |
2787 | ||
2788 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ | |
2789 | __stop___bt_plugin_component_class_descriptor_attributes | |
2790 | ||
2791 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \ | |
2792 | __asm("section$start$__DATA$btp_cc_desc_att") | |
2793 | ||
2794 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \ | |
2795 | __asm("section$end$__DATA$btp_cc_desc_att") | |
2796 | ||
2797 | #else | |
2798 | ||
6ba0b073 | 2799 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \ |
ce34b039 MD |
2800 | __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) \ |
2801 | __bt_plugin_variable_attribute_no_sanitize_address | |
6ba0b073 | 2802 | |
52238017 MJ |
2803 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \ |
2804 | __start___bt_plugin_component_class_descriptor_attributes | |
2805 | ||
2806 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \ | |
2807 | __stop___bt_plugin_component_class_descriptor_attributes | |
2808 | ||
2809 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA | |
2810 | ||
2811 | #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA | |
2812 | #endif | |
2813 | ||
33b34c43 PP |
2814 | #ifdef __cplusplus |
2815 | } | |
2816 | #endif | |
2817 | ||
924dc299 | 2818 | #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */ |