Document libbabeltrace2's C API
[babeltrace.git] / include / babeltrace2 / plugin / plugin-dev.h
1 #ifndef BABELTRACE2_PLUGIN_PLUGIN_DEV_H
2 #define BABELTRACE2_PLUGIN_PLUGIN_DEV_H
3
4 /*
5 * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
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
26 #ifndef __BT_IN_BABELTRACE_H
27 # error "Please include <babeltrace2/babeltrace.h> instead."
28 #endif
29
30 #include <stdint.h>
31
32 #include <babeltrace2/graph/component-class-dev.h>
33 #include <babeltrace2/graph/message-iterator-class.h>
34 #include <babeltrace2/types.h>
35
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
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50
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 */
593 typedef enum bt_plugin_initialize_func_status {
594 /*!
595 @brief
596 Success.
597 */
598 BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK = __BT_FUNC_STATUS_OK,
599
600 /*!
601 @brief
602 Out of memory.
603 */
604 BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
605
606 /*!
607 @brief
608 Error.
609 */
610 BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR = __BT_FUNC_STATUS_ERROR,
611 } bt_plugin_initialize_func_status;
612
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.
633
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 */
673 typedef void (*bt_plugin_finalize_func)(void);
674
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
2431 /* Plugin descriptor: describes a single plugin (internal use) */
2432 struct __bt_plugin_descriptor {
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,
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;
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
2460 /* Name of the attribute's type for debug purposes */
2461 const char *type_name;
2462
2463 /* Attribute's type */
2464 enum __bt_plugin_descriptor_attribute_type type;
2465
2466 /* Attribute's value (depends on attribute's type) */
2467 union {
2468 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
2469 bt_plugin_initialize_func init;
2470
2471 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
2472 bt_plugin_finalize_func exit;
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;
2482
2483 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
2484 struct __bt_plugin_descriptor_version version;
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
2496 /* Component class name */
2497 const char *name;
2498
2499 /* Component class type */
2500 bt_component_class_type type;
2501
2502 /* Mandatory methods (depends on component class type) */
2503 union {
2504 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
2505 struct {
2506 bt_message_iterator_class_next_method msg_iter_next;
2507 } source;
2508
2509 /* BT_COMPONENT_CLASS_TYPE_FILTER */
2510 struct {
2511 bt_message_iterator_class_next_method msg_iter_next;
2512 } filter;
2513
2514 /* BT_COMPONENT_CLASS_TYPE_SINK */
2515 struct {
2516 bt_component_class_sink_consume_method consume;
2517 } sink;
2518 } methods;
2519 } __attribute__((packed));
2520
2521 /* Type of a component class attribute (internal use) */
2522 enum __bt_plugin_component_class_descriptor_attribute_type {
2523 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 0,
2524 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP = 1,
2525 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD = 2,
2526 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD = 3,
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,
2532 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD = 9,
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,
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
2548 /* Name of the attribute's type for debug purposes */
2549 const char *type_name;
2550
2551 /* Attribute's type */
2552 enum __bt_plugin_component_class_descriptor_attribute_type type;
2553
2554 /* Attribute's value (depends on attribute's type) */
2555 union {
2556 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2557 const char *description;
2558
2559 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
2560 const char *help;
2561
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
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;
2571
2572 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
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;
2576
2577 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
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;
2581
2582 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
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;
2585
2586 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
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;
2589
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
2593 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD */
2594 bt_message_iterator_class_initialize_method msg_iter_initialize_method;
2595
2596 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
2597 bt_message_iterator_class_finalize_method msg_iter_finalize_method;
2598
2599 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
2600 bt_message_iterator_class_seek_ns_from_origin_method msg_iter_seek_ns_from_origin_method;
2601
2602 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
2603 bt_message_iterator_class_seek_beginning_method msg_iter_seek_beginning_method;
2604
2605 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
2606 bt_message_iterator_class_can_seek_ns_from_origin_method msg_iter_can_seek_ns_from_origin_method;
2607
2608 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
2609 bt_message_iterator_class_can_seek_beginning_method msg_iter_can_seek_beginning_method;
2610 } value;
2611 } __attribute__((packed));
2612
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
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
2663 /*
2664 * Variable attributes for a plugin descriptor pointer to be added to
2665 * the plugin descriptor section (internal use).
2666 */
2667 #ifdef __APPLE__
2668 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2669 __attribute__((section("__DATA,btp_desc"), used))
2670
2671 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2672 __start___bt_plugin_descriptors
2673
2674 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2675 __stop___bt_plugin_descriptors
2676
2677 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
2678 __asm("section$start$__DATA$btp_desc")
2679
2680 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
2681 __asm("section$end$__DATA$btp_desc")
2682
2683 #else
2684
2685 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2686 __attribute__((section("__bt_plugin_descriptors"), used))
2687
2688 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2689 __start___bt_plugin_descriptors
2690
2691 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2692 __stop___bt_plugin_descriptors
2693
2694 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
2695
2696 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
2697 #endif
2698
2699 /*
2700 * Variable attributes for a plugin attribute pointer to be added to
2701 * the plugin attribute section (internal use).
2702 */
2703 #ifdef __APPLE__
2704 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2705 __attribute__((section("__DATA,btp_desc_att"), used))
2706
2707 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2708 __start___bt_plugin_descriptor_attributes
2709
2710 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2711 __stop___bt_plugin_descriptor_attributes
2712
2713 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2714 __asm("section$start$__DATA$btp_desc_att")
2715
2716 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2717 __asm("section$end$__DATA$btp_desc_att")
2718
2719 #else
2720
2721 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2722 __attribute__((section("__bt_plugin_descriptor_attributes"), used))
2723
2724 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2725 __start___bt_plugin_descriptor_attributes
2726
2727 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2728 __stop___bt_plugin_descriptor_attributes
2729
2730 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2731
2732 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2733 #endif
2734
2735 /*
2736 * Variable attributes for a component class descriptor pointer to be
2737 * added to the component class descriptor section (internal use).
2738 */
2739 #ifdef __APPLE__
2740 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2741 __attribute__((section("__DATA,btp_cc_desc"), used))
2742
2743 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2744 __start___bt_plugin_component_class_descriptors
2745
2746 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2747 __stop___bt_plugin_component_class_descriptors
2748
2749 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
2750 __asm("section$start$__DATA$btp_cc_desc")
2751
2752 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
2753 __asm("section$end$__DATA$btp_cc_desc")
2754
2755 #else
2756
2757 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2758 __attribute__((section("__bt_plugin_component_class_descriptors"), used))
2759
2760 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2761 __start___bt_plugin_component_class_descriptors
2762
2763 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2764 __stop___bt_plugin_component_class_descriptors
2765
2766 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
2767
2768 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
2769 #endif
2770
2771 /*
2772 * Variable attributes for a component class descriptor attribute
2773 * pointer to be added to the component class descriptor attribute
2774 * section (internal use).
2775 */
2776 #ifdef __APPLE__
2777 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2778 __attribute__((section("__DATA,btp_cc_desc_att"), used))
2779
2780 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2781 __start___bt_plugin_component_class_descriptor_attributes
2782
2783 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2784 __stop___bt_plugin_component_class_descriptor_attributes
2785
2786 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2787 __asm("section$start$__DATA$btp_cc_desc_att")
2788
2789 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2790 __asm("section$end$__DATA$btp_cc_desc_att")
2791
2792 #else
2793
2794 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2795 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
2796
2797 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2798 __start___bt_plugin_component_class_descriptor_attributes
2799
2800 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2801 __stop___bt_plugin_component_class_descriptor_attributes
2802
2803 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2804
2805 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2806 #endif
2807
2808 #ifdef __cplusplus
2809 }
2810 #endif
2811
2812 #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */
This page took 0.123878 seconds and 4 git commands to generate.