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