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