1 #ifndef BABELTRACE2_PLUGIN_PLUGIN_DEV_H
2 #define BABELTRACE2_PLUGIN_PLUGIN_DEV_H
5 * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
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:
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
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
26 #ifndef __BT_IN_BABELTRACE_H
27 # error "Please include <babeltrace2/babeltrace.h> instead."
32 #include <babeltrace2/graph/component-class-dev.h>
33 #include <babeltrace2/graph/message-iterator-class.h>
34 #include <babeltrace2/types.h>
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
41 #if defined(_WIN32) || defined(__CYGWIN__)
44 #define _BT_HIDDEN __attribute__((visibility("hidden")))
48 * _BT_EXPORT: set the visibility for exported functions.
50 #if defined(_WIN32) || defined(__CYGWIN__)
53 #define _BT_EXPORT __attribute__((visibility("default")))
61 @defgroup api-plugin-dev Plugin development
64 Shared object plugin development.
66 This module offers macros to create a \bt_name shared object plugin.
68 Behind the scenes, the <code>BT_PLUGIN_*()</code> macros of this module
69 create and fill global tables which are located in sections of the
70 shared object with specific names. The \ref api-plugin functions can
71 load the resulting shared object file and create corresponding
74 See \ref guide-comp-link-plugin-so.
76 <h1>Plugin definition C file structure</h1>
78 The structure of a \bt_name plugin definition C file is as such:
90 Define a \bt_name plugin with BT_PLUGIN() if the plugin's name is a
91 valid C identifier, or with BT_PLUGIN_WITH_ID() otherwise.
93 See \ref api-plugin-dev-custom-plugin-id "Custom plugin ID" to
94 learn more about plugin IDs.
97 When you use BT_PLUGIN(), the plugin's ID is <code>auto</code>.
101 \bt_dt_opt Use any of the following macros (or their
102 <code>*_WITH_ID()</code> counterpart) \em once to set the properties
106 - BT_PLUGIN_DESCRIPTION()
107 - BT_PLUGIN_LICENSE()
108 - BT_PLUGIN_VERSION()
112 \bt_dt_opt Use any of the following macros (or their
113 <code>*_WITH_ID()</code> counterpart) \em once to set the
114 initialization and finalization functions of the plugin:
116 - BT_PLUGIN_INITIALIZE_FUNC()
117 - BT_PLUGIN_FINALIZE_FUNC()
119 A plugin's initialization function is executed when the shared
120 object is loaded (see \ref api-plugin).
122 A plugin's finalization function is executed when the \bt_plugin
123 object is destroyed, if the initialization function (if any)
128 Use any of the following macros (or their <code>*_WITH_ID()</code>
129 counterpart) to add a component class to the plugin:
131 - BT_PLUGIN_SOURCE_COMPONENT_CLASS()
132 - BT_PLUGIN_FILTER_COMPONENT_CLASS()
133 - BT_PLUGIN_SINK_COMPONENT_CLASS()
137 \bt_dt_opt Depending on the type of the component class of step 5,
138 use any of the following macros (or their <code>*_WITH_ID()</code>
140 \em once to set its properties:
143 <dt>\bt_c_src_comp_cls</dt>
145 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION()
146 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP()
149 <dt>\bt_c_flt_comp_cls</dt>
151 - BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION()
152 - BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP()
155 <dt>\bt_c_sink_comp_cls</dt>
157 - BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION()
158 - BT_PLUGIN_SINK_COMPONENT_CLASS_HELP()
164 \bt_dt_opt Depending on the type of the component class of step 5,
165 use any of the following macros (or their <code>*_WITH_ID()</code>
166 counterpart) to set its optional methods:
169 <dt>Source component class</dt>
171 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD()
172 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
173 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD()
174 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
175 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
176 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
177 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD()
180 <dt>Filter component class</dt>
182 - BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD()
183 - BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
184 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD()
185 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
186 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
187 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
188 - BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
189 - BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD()
192 <dt>Sink component class</dt>
194 - BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD()
195 - BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
196 - BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD()
197 - BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD()
198 - BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
199 - BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD()
205 You can repeat steps 5 to 7 to add more than one component class to a
208 See \ref example-simple-plugin-def-file for a concrete example of how
209 to use the macros of this module.
211 <h1>\anchor api-plugin-dev-custom-plugin-id Custom plugin ID</h1>
213 The BT_PLUGIN() macro defines a plugin with a specific name and the
214 ID <code>auto</code>.
216 All the <code>BT_PLUGIN_*()</code> macros which do not end with
217 <code>_WITH_ID</code> refer to the <code>auto</code> plugin.
219 There are two situations which demand that you use a custom plugin ID:
221 - You want more than one plugin contained in your shared object file.
223 Although the \bt_name project does not recommend this, it is possible.
224 This is why bt_plugin_find_all_from_file() returns a \bt_plugin_set
225 instead of a single \bt_plugin.
227 In this case, each plugin of the shared object needs its own, unique
230 - You want to give the plugin a name which is not a valid C identifier.
232 The BT_PLUGIN() macro accepts a C identifier as the plugin name, while
233 the BT_PLUGIN_WITH_ID() accepts a C identifier for the ID and a C
236 To define a plugin with a specific ID, use BT_PLUGIN_WITH_ID(), for
240 BT_PLUGIN_WITH_ID(my_plugin_id, "my-plugin-name");
243 Then, use the <code>BT_PLUGIN_*_WITH_ID()</code> macros to refer to
244 this specific plugin, for example:
247 BT_PLUGIN_AUTHOR_WITH_ID(my_plugin_id, "Patrick Bouchard");
252 You can still use the <code>auto</code> ID with BT_PLUGIN_WITH_ID()
253 to use the simpler macros afterwards while still giving the plugin a
254 name which is not a valid C identifier, for example:
257 BT_PLUGIN_WITH_ID(auto, "my-plugin-name");
258 BT_PLUGIN_AUTHOR("Patrick Bouchard");
262 <h1>Custom component class ID</h1>
264 The BT_PLUGIN_SOURCE_COMPONENT_CLASS(),
265 BT_PLUGIN_FILTER_COMPONENT_CLASS(), and
266 BT_PLUGIN_SINK_COMPONENT_CLASS() add a component class with a specific
267 name to the plugin having the ID <code>auto</code>.
269 The name you pass to those macros must be a valid C identifier and it
270 also serves as the component class's ID within the <code>auto</code>
273 There are two situations which demand that you use a custom component
276 - You want to add the component class to a specific plugin (other than
277 <code>auto</code>, if you have more than one).
279 - You want to give the component class a name which is not a valid C
282 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros accept a
283 C identifier for the component class ID and a string for its name.
285 For a given plugin and for a given component class type, all component
286 class IDs must be unique.
288 To add a component class having a specific ID to a plugin,
289 use the BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(),
290 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(), and
291 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() macros, for example:
294 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(my_plugin_id, my_comp_class_id,
295 "my-source", my_source_iter_next);
300 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros
301 specify the ID of the plugin to which to add the component class.
303 If you use the BT_PLUGIN() macro to define your plugin, then its
304 ID is <code>auto</code>:
307 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, my_comp_class_id,
308 "my-source", my_source_iter_next);
312 Then, use the <code>BT_PLUGIN_*_COMPONENT_CLASS_*_WITH_ID()</code>
313 macros to refer to this specific component class, for example:
316 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(my_plugin_id,
317 my_comp_class_id, my_source_finalize);
327 @typedef struct bt_self_plugin bt_self_plugin;
342 Defines a plugin module.
344 In a plugin definition C file, you must use this macro before you use
345 any other <code>BT_PLUGIN*()</code> macro.
347 #define BT_PLUGIN_MODULE() \
348 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
349 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
350 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
352 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
353 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
354 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
356 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
357 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
358 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
360 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; \
361 _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; \
362 _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; \
364 _BT_EXPORT struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
366 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
368 _BT_EXPORT struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
370 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
372 _BT_EXPORT struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
374 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
376 _BT_EXPORT struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
378 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
380 _BT_EXPORT struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
382 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
384 _BT_EXPORT struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
386 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
388 _BT_EXPORT struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
390 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
392 _BT_EXPORT struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
394 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
400 @name Plugin definition
406 Defines a plugin named \bt_p{_name} and having the ID \bt_p{_id}.
412 Plugin's ID, unique amongst all the plugin IDs of the same shared
417 <code>const char *</code>
422 @bt_pre_not_null{_name}
424 #define BT_PLUGIN_WITH_ID(_id, _name) \
425 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
428 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
432 Alias of BT_PLUGIN_WITH_ID() with the \bt_p{_id} parameter set to
435 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
440 @name Plugin properties
446 Sets the description of the plugin having the ID \bt_p{_id} to
449 See the \ref api-comp-cls-prop-descr "description" property.
455 ID of the plugin of which to set the description.
457 @param[in] _description
459 <code>const char *</code>
461 Plugin's description.
464 @bt_pre_not_null{_description}
466 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _description) \
467 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _description)
471 Alias of BT_PLUGIN_DESCRIPTION_WITH_ID() with the \bt_p{_id}
472 parameter set to <code>auto</code>.
474 #define BT_PLUGIN_DESCRIPTION(_description) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _description)
479 Sets the name(s) of the author(s) of the plugin having the ID
480 \bt_p{_id} to \bt_p{_author}.
482 See the \ref api-plugin-prop-author "author name(s)" property.
488 ID of the plugin of which to set the author(s).
492 <code>const char *</code>
497 @bt_pre_not_null{_author}
499 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _author) \
500 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _author)
504 Alias of BT_PLUGIN_AUTHOR_WITH_ID() with the \bt_p{_id}
505 parameter set to <code>auto</code>.
507 #define BT_PLUGIN_AUTHOR(_author) BT_PLUGIN_AUTHOR_WITH_ID(auto, _author)
511 Sets the license (name or full) of the plugin having the ID
512 \bt_p{_id} to \bt_p{_license}.
514 See the \ref api-plugin-prop-license "license" property.
520 ID of the plugin of which to set the license.
524 <code>const char *</code>
529 @bt_pre_not_null{_license}
531 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _license) \
532 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _license)
536 Alias of BT_PLUGIN_LICENSE_WITH_ID() with the \bt_p{_id}
537 parameter set to <code>auto</code>.
539 #define BT_PLUGIN_LICENSE(_license) BT_PLUGIN_LICENSE_WITH_ID(auto, _license)
543 Sets the version of the plugin having the ID \bt_p{_id} to
546 See the \ref api-plugin-prop-version "version" property.
552 ID of the plugin of which to set the version.
556 <code>unsigned int</code>
558 Plugin's major version.
562 <code>unsigned int</code>
564 Plugin's minor version.
568 <code>unsigned int</code>
570 Plugin's patch version.
574 <code>const char *</code>
576 Plugin's version's extra information.
578 Can be \c NULL if the plugin's version has no extra information.
581 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
582 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
586 Alias of BT_PLUGIN_VERSION_WITH_ID() with the \bt_p{_id}
587 parameter set to <code>auto</code>.
589 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
594 @name Plugin functions
600 Status codes for #bt_plugin_initialize_func.
602 typedef enum bt_plugin_initialize_func_status
{
607 BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
= __BT_FUNC_STATUS_OK
,
613 BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
619 BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
620 } bt_plugin_initialize_func_status
;
624 User plugin initialization function.
626 @param[in] self_plugin
630 This parameter is a private view of the \bt_plugin object for
633 As of \bt_name_version_min_maj, there's no self plugin API.
636 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
638 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
640 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
643 @bt_pre_not_null{self_plugin}
645 typedef bt_plugin_initialize_func_status (*bt_plugin_initialize_func
)(
646 bt_self_plugin
*self_plugin
);
650 Sets the initialization function of the plugin having the ID
651 \bt_p{_id} to \bt_p{_func}.
657 ID of the plugin of which to set the initialization function.
661 #bt_plugin_initialize_func
663 Plugin's initialization function.
666 @bt_pre_not_null{_func}
668 #define BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(_id, _func) \
669 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _func)
673 Alias of BT_PLUGIN_INITIALIZE_FUNC_WITH_ID() with the \bt_p{_id}
674 parameter set to <code>auto</code>.
676 #define BT_PLUGIN_INITIALIZE_FUNC(_func) BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(auto, _func)
680 User plugin finalization function.
682 typedef void (*bt_plugin_finalize_func
)(void);
686 Sets the finalization function of the plugin having the ID
687 \bt_p{_id} to \bt_p{_func}.
693 ID of the plugin of which to set the finalization function.
697 #bt_plugin_finalize_func
699 Plugin's finalization function.
702 @bt_pre_not_null{_func}
704 #define BT_PLUGIN_FINALIZE_FUNC_WITH_ID(_id, _func) \
705 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _func)
709 Alias of BT_PLUGIN_FINALIZE_FUNC_WITH_ID() with the \bt_p{_id}
710 parameter set to <code>auto</code>.
712 #define BT_PLUGIN_FINALIZE_FUNC(_func) BT_PLUGIN_FINALIZE_FUNC_WITH_ID(auto, _func)
717 @name Component class adding
723 Adds a \bt_src_comp_cls named \bt_p{_name}, having the ID
724 \bt_p{_component_class_id} and the message iterator class's "next"
725 method \bt_p{_message_iterator_class_next_method}, to the plugin
726 having the ID \bt_p{_plugin_id}.
728 @param[in] _plugin_id
732 ID of the plugin to which to add the source component class.
734 @param[in] _component_class_id
738 Source component class's ID, unique amongst all the source component
739 class IDs of the same plugin.
743 <code>const char *</code>
745 Source component class's name, unique amongst all the source
746 component class names of the same plugin.
748 @param[in] _message_iterator_class_next_method
750 #bt_message_iterator_class_next_method
752 Source component class's message iterator class's "next" method.
755 @bt_pre_not_null{_name}
756 @bt_pre_not_null{_message_iterator_class_next_method}
758 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
759 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
760 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
762 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
763 .methods = { .source = { .msg_iter_next = _message_iterator_class_next_method } }, \
765 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
769 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID() with the
770 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
771 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
772 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
778 Passed as both the \bt_p{_component_class_id} and the
779 \bt_p{_name} (once converted to a string) parameters of
780 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID().
783 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
784 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
788 Adds a \bt_flt_comp_cls named \bt_p{_name}, having the ID
789 \bt_p{_component_class_id} and the message iterator class's "next"
790 method \bt_p{_message_iterator_class_next_method}, to the plugin
791 having the ID \bt_p{_plugin_id}.
793 @param[in] _plugin_id
797 ID of the plugin to which to add the filter component class.
799 @param[in] _component_class_id
803 Filter component class's ID, unique amongst all the filter component
804 class IDs of the same plugin.
808 <code>const char *</code>
810 Filter component class's name, unique amongst all the filter
811 component class names of the same plugin.
813 @param[in] _message_iterator_class_next_method
815 #bt_message_iterator_class_next_method
817 Filter component class's message iterator class's "next" method.
820 @bt_pre_not_null{_name}
821 @bt_pre_not_null{_message_iterator_class_next_method}
823 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
824 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
825 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
827 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
828 .methods = { .filter = { .msg_iter_next = _message_iterator_class_next_method } }, \
830 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
834 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID() with the
835 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
836 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
837 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
843 Passed as both the \bt_p{_component_class_id} and the
844 \bt_p{_name} (once converted to a string) parameters of
845 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID().
848 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
849 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
853 Adds a \bt_sink_comp_cls named \bt_p{_name}, having the ID
854 \bt_p{_component_class_id} and the consuming method
855 \bt_p{_consume_method}, to the plugin
856 having the ID \bt_p{_plugin_id}.
858 @param[in] _plugin_id
862 ID of the plugin to which to add the sink component class.
864 @param[in] _component_class_id
868 Sink component class's ID, unique amongst all the sink component
869 class IDs of the same plugin.
873 <code>const char *</code>
875 Sink component class's name, unique amongst all the sink
876 component class names of the same plugin.
878 @param[in] _consume_method
880 #bt_component_class_sink_consume_method
882 Sink component class's message iterator class's "next" method.
885 @bt_pre_not_null{_name}
886 @bt_pre_not_null{_consume_method}
888 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _consume_method) \
889 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
890 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
892 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
893 .methods = { .sink = { .consume = _consume_method } }, \
895 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
899 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() with the
900 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
901 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
902 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
908 Passed as both the \bt_p{_component_class_id} and the
909 \bt_p{_name} (once converted to a string) parameters of
910 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID().
913 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
914 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
919 @name Source component class properties
925 Sets the description of the \bt_src_comp_cls having the ID
926 \bt_p{_component_class_id} in the plugin having the ID
927 \bt_p{_plugin_id} to \bt_p{_description}.
929 See the \ref api-comp-cls-prop-descr "description" property.
931 @param[in] _plugin_id
935 ID of the plugin which contains the source component class of which
936 to set the description.
938 @param[in] _component_class_id
942 ID of the source component class, within the plugin having the ID
943 \bt_p{_plugin_id}, of which to set the description to
946 @param[in] _description
948 <code>const char *</code>
950 Source component class's description.
953 @bt_pre_not_null{_description}
955 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
956 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, source, _description)
960 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
961 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
962 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
964 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
965 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
969 Sets the help text of the \bt_src_comp_cls having the ID
970 \bt_p{_component_class_id} in the plugin having the ID
971 \bt_p{_plugin_id} to \bt_p{_help_text}.
973 See the \ref api-comp-cls-prop-help "help text" property.
975 @param[in] _plugin_id
979 ID of the plugin which contains the source component class of which
980 to set the help text.
982 @param[in] _component_class_id
986 ID of the source component class, within the plugin having the ID
987 \bt_p{_plugin_id}, of which to set the help text to
990 @param[in] _help_text
992 <code>const char *</code>
994 Source component class's help text.
997 @bt_pre_not_null{_help_text}
999 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1000 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, source, _help_text)
1004 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID() with the
1005 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1006 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1008 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _help_text) \
1009 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1014 @name Filter component class properties
1020 Sets the description of the \bt_flt_comp_cls having the ID
1021 \bt_p{_component_class_id} in the plugin having the ID
1022 \bt_p{_plugin_id} to \bt_p{_description}.
1024 See the \ref api-comp-cls-prop-descr "description" property.
1026 @param[in] _plugin_id
1030 ID of the plugin which contains the filter component class of which
1031 to set the description.
1033 @param[in] _component_class_id
1037 ID of the filter component class, within the plugin having the ID
1038 \bt_p{_plugin_id}, of which to set the description to
1039 \bt_p{_description}.
1041 @param[in] _description
1043 <code>const char *</code>
1045 Filter component class's description.
1048 @bt_pre_not_null{_description}
1050 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1051 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, filter, _description)
1055 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1056 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1057 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1059 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1060 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1064 Sets the help text of the \bt_flt_comp_cls having the ID
1065 \bt_p{_component_class_id} in the plugin having the ID
1066 \bt_p{_plugin_id} to \bt_p{_help_text}.
1068 See the \ref api-comp-cls-prop-help "help text" property.
1070 @param[in] _plugin_id
1074 ID of the plugin which contains the filter component class of which
1075 to set the help text.
1077 @param[in] _component_class_id
1081 ID of the filter component class, within the plugin having the ID
1082 \bt_p{_plugin_id}, of which to set the help text to
1085 @param[in] _help_text
1087 <code>const char *</code>
1089 Filter component class's help text.
1092 @bt_pre_not_null{_help_text}
1094 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1095 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, filter, _help_text)
1099 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID() with the
1100 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1101 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1103 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _help_text) \
1104 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1109 @name Sink component class properties
1115 Sets the description of the \bt_sink_comp_cls having the ID
1116 \bt_p{_component_class_id} in the plugin having the ID
1117 \bt_p{_plugin_id} to \bt_p{_description}.
1119 See the \ref api-comp-cls-prop-descr "description" property.
1121 @param[in] _plugin_id
1125 ID of the plugin which contains the sink component class of which
1126 to set the description.
1128 @param[in] _component_class_id
1132 ID of the sink component class, within the plugin having the ID
1133 \bt_p{_plugin_id}, of which to set the description to
1134 \bt_p{_description}.
1136 @param[in] _description
1138 <code>const char *</code>
1140 Sink component class's description.
1143 @bt_pre_not_null{_description}
1145 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1146 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, sink, _description)
1150 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1151 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1152 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1154 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1155 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1159 Sets the help text of the \bt_sink_comp_cls having the ID
1160 \bt_p{_component_class_id} in the plugin having the ID
1161 \bt_p{_plugin_id} to \bt_p{_help_text}.
1163 See the \ref api-comp-cls-prop-help "help text" property.
1165 @param[in] _plugin_id
1169 ID of the plugin which contains the sink component class of which
1170 to set the help text.
1172 @param[in] _component_class_id
1176 ID of the sink component class, within the plugin having the ID
1177 \bt_p{_plugin_id}, of which to set the help text to
1180 @param[in] _help_text
1182 <code>const char *</code>
1184 Sink component class's help text.
1187 @bt_pre_not_null{_help_text}
1189 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1190 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, sink, _help_text)
1194 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID() with
1195 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1196 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1198 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _help_text) \
1199 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1204 @name Source component class methods
1210 Sets the finalization method of the \bt_src_comp_cls having the ID
1211 \bt_p{_component_class_id} in the plugin having the ID
1212 \bt_p{_plugin_id} to \bt_p{_method}.
1214 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1216 @param[in] _plugin_id
1220 ID of the plugin which contains the source component class of which
1221 to set the finalization method.
1223 @param[in] _component_class_id
1227 ID of the source component class, within the plugin having the ID
1228 \bt_p{_plugin_id}, of which to set the finalization method to
1233 #bt_component_class_source_finalize_method
1235 Source component class's finalization method.
1238 @bt_pre_not_null{_method}
1240 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1241 __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)
1246 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1247 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1248 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1250 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1251 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1255 Sets the \"get supported \bt_mip versions\" method of the
1256 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1257 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1259 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1262 @param[in] _plugin_id
1266 ID of the plugin which contains the source component class of which
1267 to set the "get supported MIP versions" method.
1269 @param[in] _component_class_id
1273 ID of the source component class, within the plugin having the ID
1274 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1275 method to \bt_p{_method}.
1279 #bt_component_class_source_get_supported_mip_versions_method
1281 Source component class's "get supported MIP versions" method.
1284 @bt_pre_not_null{_method}
1286 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1287 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD, _plugin_id, _component_class_id, source, _method)
1292 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1293 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1294 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1296 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1297 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1301 Sets the initialization method of the \bt_src_comp_cls having the ID
1302 \bt_p{_component_class_id} in the plugin having the ID
1303 \bt_p{_plugin_id} to \bt_p{_method}.
1305 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1307 @param[in] _plugin_id
1311 ID of the plugin which contains the source component class of which
1312 to set the initialization method.
1314 @param[in] _component_class_id
1318 ID of the source component class, within the plugin having the ID
1319 \bt_p{_plugin_id}, of which to set the initialization method to
1324 #bt_component_class_source_initialize_method
1326 Source component class's initialization method.
1329 @bt_pre_not_null{_method}
1331 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1332 __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)
1337 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1338 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1339 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1341 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1342 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1346 Sets the finalization method of the \bt_msg_iter_cls of the
1347 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1348 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1350 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1352 @param[in] _plugin_id
1356 ID of the plugin which contains the source component class of which
1357 to set the finalization method of the message iterator class.
1359 @param[in] _component_class_id
1363 ID of the source component class, within the plugin having the ID
1364 \bt_p{_plugin_id}, of which to set the finalization method of the
1365 message iterator class to \bt_p{_method}.
1369 #bt_message_iterator_class_finalize_method
1371 Source component class's message iterator class's finalization method.
1374 @bt_pre_not_null{_method}
1376 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1377 __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)
1382 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1383 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1384 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1386 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1387 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1391 Sets the initialization method of the \bt_msg_iter_cls of the
1392 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1393 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1395 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1397 @param[in] _plugin_id
1401 ID of the plugin which contains the source component class of which
1402 to set the initialization method of the message iterator class.
1404 @param[in] _component_class_id
1408 ID of the source component class, within the plugin having the ID
1409 \bt_p{_plugin_id}, of which to set the initialization method of the
1410 message iterator class to \bt_p{_method}.
1414 #bt_message_iterator_class_initialize_method
1416 Source component class's message iterator class's initialization
1420 @bt_pre_not_null{_method}
1422 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1423 __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)
1428 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1429 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1430 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1432 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1433 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1437 Sets the "seek beginning" and "can seek beginning?" methods of the
1438 \bt_msg_iter_cls of the \bt_src_comp_cls having the ID
1439 \bt_p{_component_class_id} in the plugin having the ID
1440 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1441 \bt_p{_can_seek_method}.
1443 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1444 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1446 @param[in] _plugin_id
1450 ID of the plugin which contains the source component class of which
1451 to set the "seek beginning" and "can seek beginning?" methods of the
1452 message iterator class.
1454 @param[in] _component_class_id
1458 ID of the source component class, within the plugin having the ID
1459 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1460 seek beginning" methods of the message iterator class to
1461 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1463 @param[in] _seek_method
1465 #bt_message_iterator_class_seek_beginning_method
1467 Source component class's message iterator class's "seek beginning"
1470 @param[in] _can_seek_method
1472 #bt_message_iterator_class_can_seek_beginning_method
1474 Source component class's message iterator class's
1475 "can seek beginning?" method.
1477 Can be \c NULL, in which case it is equivalent to setting a method
1478 which always returns #BT_TRUE.
1481 @bt_pre_not_null{_seek_method}
1482 @bt_pre_not_null{_can_seek_method}
1484 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1485 __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); \
1486 __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)
1491 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS()
1492 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1493 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1495 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1496 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1500 Sets the "seek ns from origin" and "can seek ns from origin?"
1501 methods of the \bt_msg_iter_cls of the \bt_src_comp_cls having the
1502 ID \bt_p{_component_class_id} in the plugin having the ID
1503 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1504 \bt_p{_can_seek_method}.
1506 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1507 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
1510 @param[in] _plugin_id
1514 ID of the plugin which contains the source component class of which
1515 to set the "seek ns from origin" and "can seek ns from origin?"
1516 methods of the message iterator class.
1518 @param[in] _component_class_id
1522 ID of the source component class, within the plugin having the ID
1523 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
1524 "can seek ns from origin" methods of the message iterator class to
1525 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1527 @param[in] _seek_method
1529 #bt_message_iterator_class_seek_ns_from_origin_method
1531 Source component class's message iterator class's "seek ns from
1534 @param[in] _can_seek_method
1536 #bt_message_iterator_class_can_seek_ns_from_origin_method
1538 Source component class's message iterator class's "can seek ns from
1541 Can be \c NULL, in which case it is equivalent to setting a method
1542 which always returns #BT_TRUE.
1545 @bt_pre_not_null{_seek_method}
1546 @bt_pre_not_null{_can_seek_method}
1548 #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) \
1549 __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); \
1550 __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)
1555 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
1556 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1557 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1559 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
1560 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1564 Sets the "output port connected" method of the \bt_src_comp_cls
1565 having the ID \bt_p{_component_class_id} in the plugin having the ID
1566 \bt_p{_plugin_id} to \bt_p{_method}.
1569 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
1572 @param[in] _plugin_id
1576 ID of the plugin which contains the source component class of which
1577 to set the "output port connected" method.
1579 @param[in] _component_class_id
1583 ID of the source component class, within the plugin having the ID
1584 \bt_p{_plugin_id}, of which to set the "output port connected"
1585 method to \bt_p{_method}.
1589 #bt_component_class_source_output_port_connected_method
1591 Source component class's "output port connected" method.
1594 @bt_pre_not_null{_method}
1596 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1597 __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)
1602 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
1603 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1604 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1606 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
1607 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1611 Sets the query method of the \bt_src_comp_cls
1612 having the ID \bt_p{_component_class_id} in the plugin having the ID
1613 \bt_p{_plugin_id} to \bt_p{_method}.
1615 See the \ref api-comp-cls-dev-meth-query "query" method.
1617 @param[in] _plugin_id
1621 ID of the plugin which contains the source component class of which
1622 to set the query method.
1624 @param[in] _component_class_id
1628 ID of the source component class, within the plugin having the ID
1629 \bt_p{_plugin_id}, of which to set the query
1630 method to \bt_p{_method}.
1634 #bt_component_class_source_query_method
1636 Source component class's query method.
1639 @bt_pre_not_null{_method}
1641 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1642 __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)
1647 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
1648 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1649 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1651 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
1652 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
1657 @name Filter component class methods
1663 Sets the finalization method of the \bt_flt_comp_cls having the ID
1664 \bt_p{_component_class_id} in the plugin having the ID
1665 \bt_p{_plugin_id} to \bt_p{_method}.
1667 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1669 @param[in] _plugin_id
1673 ID of the plugin which contains the filter component class of which
1674 to set the finalization method.
1676 @param[in] _component_class_id
1680 ID of the filter component class, within the plugin having the ID
1681 \bt_p{_plugin_id}, of which to set the finalization method to
1686 #bt_component_class_filter_finalize_method
1688 Filter component class's finalization method.
1691 @bt_pre_not_null{_method}
1693 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1694 __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)
1699 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1700 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1701 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1703 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1704 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1708 Sets the \"get supported \bt_mip versions\" method of the
1709 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1710 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1712 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1715 @param[in] _plugin_id
1719 ID of the plugin which contains the filter component class of which
1720 to set the "get supported MIP versions" method.
1722 @param[in] _component_class_id
1726 ID of the filter component class, within the plugin having the ID
1727 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1728 method to \bt_p{_method}.
1732 #bt_component_class_filter_get_supported_mip_versions_method
1734 Filter component class's "get supported MIP versions" method.
1737 @bt_pre_not_null{_method}
1739 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1740 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD, _plugin_id, _component_class_id, filter, _method)
1745 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1746 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1747 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1749 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1750 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1754 Sets the initialization method of the \bt_flt_comp_cls having the ID
1755 \bt_p{_component_class_id} in the plugin having the ID
1756 \bt_p{_plugin_id} to \bt_p{_method}.
1758 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1760 @param[in] _plugin_id
1764 ID of the plugin which contains the filter component class of which
1765 to set the initialization method.
1767 @param[in] _component_class_id
1771 ID of the filter component class, within the plugin having the ID
1772 \bt_p{_plugin_id}, of which to set the initialization method to
1777 #bt_component_class_filter_initialize_method
1779 Filter component class's initialization method.
1782 @bt_pre_not_null{_method}
1784 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1785 __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)
1790 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1791 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1792 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1794 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1795 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1799 Sets the "input port connected" method of the \bt_flt_comp_cls
1800 having the ID \bt_p{_component_class_id} in the plugin having the ID
1801 \bt_p{_plugin_id} to \bt_p{_method}.
1804 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
1807 @param[in] _plugin_id
1811 ID of the plugin which contains the filter component class of which
1812 to set the "input port connected" method.
1814 @param[in] _component_class_id
1818 ID of the filter component class, within the plugin having the ID
1819 \bt_p{_plugin_id}, of which to set the "input port connected"
1820 method to \bt_p{_method}.
1824 #bt_component_class_filter_input_port_connected_method
1826 Filter component class's "input port connected" method.
1829 @bt_pre_not_null{_method}
1831 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1832 __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)
1837 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
1838 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1839 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1841 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
1842 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1846 Sets the finalization method of the \bt_msg_iter_cls of the
1847 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1848 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1850 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1852 @param[in] _plugin_id
1856 ID of the plugin which contains the filter component class of which
1857 to set the finalization method of the message iterator class.
1859 @param[in] _component_class_id
1863 ID of the filter component class, within the plugin having the ID
1864 \bt_p{_plugin_id}, of which to set the finalization method of the
1865 message iterator class to \bt_p{_method}.
1869 #bt_message_iterator_class_finalize_method
1871 Filter component class's message iterator class's finalization method.
1874 @bt_pre_not_null{_method}
1876 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1877 __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)
1882 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1883 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1884 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1886 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1887 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1891 Sets the initialization method of the \bt_msg_iter_cls of the
1892 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1893 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1895 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1897 @param[in] _plugin_id
1901 ID of the plugin which contains the filter component class of which
1902 to set the initialization method of the message iterator class.
1904 @param[in] _component_class_id
1908 ID of the filter component class, within the plugin having the ID
1909 \bt_p{_plugin_id}, of which to set the initialization method of the
1910 message iterator class to \bt_p{_method}.
1914 #bt_message_iterator_class_initialize_method
1916 Filter component class's message iterator class's initialization
1920 @bt_pre_not_null{_method}
1922 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1923 __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)
1928 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1929 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1930 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1932 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1933 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1937 Sets the "seek beginning" and "can seek beginning?" methods of the
1938 \bt_msg_iter_cls of the \bt_flt_comp_cls having the ID
1939 \bt_p{_component_class_id} in the plugin having the ID
1940 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1941 \bt_p{_can_seek_method}.
1943 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1944 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1946 @param[in] _plugin_id
1950 ID of the plugin which contains the filter component class of which
1951 to set the "seek beginning" and "can seek beginning?" methods of the
1952 message iterator class.
1954 @param[in] _component_class_id
1958 ID of the filter component class, within the plugin having the ID
1959 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1960 seek beginning" methods of the message iterator class to
1961 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1963 @param[in] _seek_method
1965 #bt_message_iterator_class_seek_beginning_method
1967 Filter component class's message iterator class's "seek beginning"
1970 @param[in] _can_seek_method
1972 #bt_message_iterator_class_can_seek_beginning_method
1974 Filter component class's message iterator class's
1975 "can seek beginning?" method.
1977 Can be \c NULL, in which case it is equivalent to setting a method
1978 which always returns #BT_TRUE.
1981 @bt_pre_not_null{_seek_method}
1982 @bt_pre_not_null{_can_seek_method}
1984 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1985 __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); \
1986 __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);
1991 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID()
1992 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1993 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1995 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1996 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
2000 Sets the "seek ns from origin" and "can seek ns from origin?"
2001 methods of the \bt_msg_iter_cls of the \bt_flt_comp_cls having the
2002 ID \bt_p{_component_class_id} in the plugin having the ID
2003 \bt_p{_plugin_id} to \bt_p{_seek_method} and
2004 \bt_p{_can_seek_method}.
2006 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
2007 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
2010 @param[in] _plugin_id
2014 ID of the plugin which contains the filter component class of which
2015 to set the "seek ns from origin" and "can seek ns from origin?"
2016 methods of the message iterator class.
2018 @param[in] _component_class_id
2022 ID of the filter component class, within the plugin having the ID
2023 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
2024 "can seek ns from origin" methods of the message iterator class to
2025 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
2027 @param[in] _seek_method
2029 #bt_message_iterator_class_seek_ns_from_origin_method
2031 Filter component class's message iterator class's "seek ns from
2034 @param[in] _can_seek_method
2036 #bt_message_iterator_class_can_seek_ns_from_origin_method
2038 Filter component class's message iterator class's "can seek ns from
2041 Can be \c NULL, in which case it is equivalent to setting a method
2042 which always returns #BT_TRUE.
2045 @bt_pre_not_null{_seek_method}
2046 @bt_pre_not_null{_can_seek_method}
2048 #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) \
2049 __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); \
2050 __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)
2055 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
2056 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2057 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2059 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
2060 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
2064 Sets the "output port connected" method of the \bt_flt_comp_cls
2065 having the ID \bt_p{_component_class_id} in the plugin having the ID
2066 \bt_p{_plugin_id} to \bt_p{_method}.
2069 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
2072 @param[in] _plugin_id
2076 ID of the plugin which contains the filter component class of which
2077 to set the "output port connected" method.
2079 @param[in] _component_class_id
2083 ID of the filter component class, within the plugin having the ID
2084 \bt_p{_plugin_id}, of which to set the "output port connected"
2085 method to \bt_p{_method}.
2089 #bt_component_class_filter_output_port_connected_method
2091 Filter component class's "output port connected" method.
2094 @bt_pre_not_null{_method}
2096 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2097 __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)
2102 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
2103 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2104 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2106 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
2107 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2111 Sets the query method of the \bt_flt_comp_cls
2112 having the ID \bt_p{_component_class_id} in the plugin having the ID
2113 \bt_p{_plugin_id} to \bt_p{_method}.
2115 See the \ref api-comp-cls-dev-meth-query "query" method.
2117 @param[in] _plugin_id
2121 ID of the plugin which contains the filter component class of which
2122 to set the query method.
2124 @param[in] _component_class_id
2128 ID of the filter component class, within the plugin having the ID
2129 \bt_p{_plugin_id}, of which to set the query
2130 method to \bt_p{_method}.
2134 #bt_component_class_filter_query_method
2136 Filter component class's query method.
2139 @bt_pre_not_null{_method}
2141 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2142 __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)
2147 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2148 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2149 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2151 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2152 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2157 @name Sink component class methods
2163 Sets the finalization method of the \bt_sink_comp_cls having the ID
2164 \bt_p{_component_class_id} in the plugin having the ID
2165 \bt_p{_plugin_id} to \bt_p{_method}.
2167 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
2169 @param[in] _plugin_id
2173 ID of the plugin which contains the sink component class of which
2174 to set the finalization method.
2176 @param[in] _component_class_id
2180 ID of the sink component class, within the plugin having the ID
2181 \bt_p{_plugin_id}, of which to set the finalization method to
2186 #bt_component_class_sink_finalize_method
2188 Sink component class's finalization method.
2191 @bt_pre_not_null{_method}
2193 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2194 __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)
2199 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
2200 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2201 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2203 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
2204 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
2208 Sets the \"get supported \bt_mip versions\" method of the
2209 \bt_sink_comp_cls having the ID \bt_p{_component_class_id} in the
2210 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
2212 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
2215 @param[in] _plugin_id
2219 ID of the plugin which contains the sink component class of which
2220 to set the "get supported MIP versions" method.
2222 @param[in] _component_class_id
2226 ID of the sink component class, within the plugin having the ID
2227 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
2228 method to \bt_p{_method}.
2232 #bt_component_class_sink_get_supported_mip_versions_method
2234 Sink component class's "get supported MIP versions" method.
2237 @bt_pre_not_null{_method}
2239 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2240 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD, _plugin_id, _component_class_id, sink, _method)
2245 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
2246 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2247 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2249 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
2250 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
2254 Sets the "graph is configured" method of the \bt_sink_comp_cls
2255 having the ID \bt_p{_component_class_id} in the plugin having the ID
2256 \bt_p{_plugin_id} to \bt_p{_method}.
2259 \ref api-comp-cls-dev-meth-graph-configured "graph is configured"
2262 @param[in] _plugin_id
2266 ID of the plugin which contains the sink component class of which
2267 to set the "graph is configured" method.
2269 @param[in] _component_class_id
2273 ID of the sink component class, within the plugin having the ID
2274 \bt_p{_plugin_id}, of which to set the "graph is configured"
2275 method to \bt_p{_method}.
2279 #bt_component_class_sink_graph_is_configured_method
2281 Sink component class's "graph is configured" method.
2284 @bt_pre_not_null{_method}
2286 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2287 __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)
2292 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID()
2293 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2294 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2296 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _method) \
2297 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _method)
2301 Sets the initialization method of the \bt_sink_comp_cls having the
2302 ID \bt_p{_component_class_id} in the plugin having the ID
2303 \bt_p{_plugin_id} to \bt_p{_method}.
2305 See the \ref api-comp-cls-dev-meth-init "initialize" method.
2307 @param[in] _plugin_id
2311 ID of the plugin which contains the sink component class of which
2312 to set the initialization method.
2314 @param[in] _component_class_id
2318 ID of the sink component class, within the plugin having the ID
2319 \bt_p{_plugin_id}, of which to set the initialization method to
2324 #bt_component_class_sink_initialize_method
2326 Sink component class's initialization method.
2329 @bt_pre_not_null{_method}
2331 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2332 __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)
2337 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
2338 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2339 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2341 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
2342 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
2346 Sets the "input port connected" method of the \bt_sink_comp_cls
2347 having the ID \bt_p{_component_class_id} in the plugin having the ID
2348 \bt_p{_plugin_id} to \bt_p{_method}.
2351 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
2354 @param[in] _plugin_id
2358 ID of the plugin which contains the sink component class of which
2359 to set the "input port connected" method.
2361 @param[in] _component_class_id
2365 ID of the sink component class, within the plugin having the ID
2366 \bt_p{_plugin_id}, of which to set the "input port connected"
2367 method to \bt_p{_method}.
2371 #bt_component_class_sink_input_port_connected_method
2373 Sink component class's "input port connected" method.
2376 @bt_pre_not_null{_method}
2378 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2379 __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)
2384 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
2385 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2386 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2388 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
2389 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2393 Sets the query method of the \bt_sink_comp_cls
2394 having the ID \bt_p{_component_class_id} in the plugin having the ID
2395 \bt_p{_plugin_id} to \bt_p{_method}.
2397 See the \ref api-comp-cls-dev-meth-query "query" method.
2399 @param[in] _plugin_id
2403 ID of the plugin which contains the sink component class of which
2404 to set the query method.
2406 @param[in] _component_class_id
2410 ID of the sink component class, within the plugin having the ID
2411 \bt_p{_plugin_id}, of which to set the query
2412 method to \bt_p{_method}.
2416 #bt_component_class_sink_query_method
2418 Sink component class's query method.
2421 @bt_pre_not_null{_method}
2423 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2424 __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)
2429 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2430 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2431 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2433 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2434 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2440 /* Plugin descriptor: describes a single plugin (internal use) */
2441 struct __bt_plugin_descriptor
{
2444 } __attribute__((packed
));
2446 /* Type of a plugin attribute (internal use) */
2447 enum __bt_plugin_descriptor_attribute_type
{
2448 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
2449 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
2450 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
2451 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
2452 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
2453 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
2456 /* Plugin (user) version */
2457 struct __bt_plugin_descriptor_version
{
2464 /* Plugin attribute (internal use) */
2465 struct __bt_plugin_descriptor_attribute
{
2466 /* Plugin descriptor to which to associate this attribute */
2467 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2469 /* Name of the attribute's type for debug purposes */
2470 const char *type_name
;
2472 /* Attribute's type */
2473 enum __bt_plugin_descriptor_attribute_type type
;
2475 /* Attribute's value (depends on attribute's type) */
2477 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
2478 bt_plugin_initialize_func init
;
2480 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
2481 bt_plugin_finalize_func exit
;
2483 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
2486 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
2487 const char *license
;
2489 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2490 const char *description
;
2492 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
2493 struct __bt_plugin_descriptor_version version
;
2495 } __attribute__((packed
));
2497 /* Component class descriptor (internal use) */
2498 struct __bt_plugin_component_class_descriptor
{
2500 * Plugin descriptor to which to associate this component
2503 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2505 /* Component class name */
2508 /* Component class type */
2509 bt_component_class_type type
;
2511 /* Mandatory methods (depends on component class type) */
2513 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
2515 bt_message_iterator_class_next_method msg_iter_next
;
2518 /* BT_COMPONENT_CLASS_TYPE_FILTER */
2520 bt_message_iterator_class_next_method msg_iter_next
;
2523 /* BT_COMPONENT_CLASS_TYPE_SINK */
2525 bt_component_class_sink_consume_method consume
;
2528 } __attribute__((packed
));
2530 /* Type of a component class attribute (internal use) */
2531 enum __bt_plugin_component_class_descriptor_attribute_type
{
2532 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
2533 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
2534 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD
= 2,
2535 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD
= 3,
2536 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 4,
2537 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 5,
2538 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 6,
2539 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 7,
2540 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD
= 8,
2541 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD
= 9,
2542 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 10,
2543 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD
= 11,
2544 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD
= 12,
2545 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD
= 13,
2546 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD
= 14,
2549 /* Component class attribute (internal use) */
2550 struct __bt_plugin_component_class_descriptor_attribute
{
2552 * Component class plugin attribute to which to associate this
2553 * component class attribute.
2555 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
2557 /* Name of the attribute's type for debug purposes */
2558 const char *type_name
;
2560 /* Attribute's type */
2561 enum __bt_plugin_component_class_descriptor_attribute_type type
;
2563 /* Attribute's value (depends on attribute's type) */
2565 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2566 const char *description
;
2568 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
2571 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD */
2572 bt_component_class_source_get_supported_mip_versions_method source_get_supported_mip_versions_method
;
2573 bt_component_class_filter_get_supported_mip_versions_method filter_get_supported_mip_versions_method
;
2574 bt_component_class_sink_get_supported_mip_versions_method sink_get_supported_mip_versions_method
;
2576 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD */
2577 bt_component_class_source_initialize_method source_initialize_method
;
2578 bt_component_class_filter_initialize_method filter_initialize_method
;
2579 bt_component_class_sink_initialize_method sink_initialize_method
;
2581 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
2582 bt_component_class_source_finalize_method source_finalize_method
;
2583 bt_component_class_filter_finalize_method filter_finalize_method
;
2584 bt_component_class_sink_finalize_method sink_finalize_method
;
2586 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
2587 bt_component_class_source_query_method source_query_method
;
2588 bt_component_class_filter_query_method filter_query_method
;
2589 bt_component_class_sink_query_method sink_query_method
;
2591 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
2592 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
2593 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
2595 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
2596 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
2597 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
2599 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */
2600 bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method
;
2602 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD */
2603 bt_message_iterator_class_initialize_method msg_iter_initialize_method
;
2605 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
2606 bt_message_iterator_class_finalize_method msg_iter_finalize_method
;
2608 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
2609 bt_message_iterator_class_seek_ns_from_origin_method msg_iter_seek_ns_from_origin_method
;
2611 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
2612 bt_message_iterator_class_seek_beginning_method msg_iter_seek_beginning_method
;
2614 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
2615 bt_message_iterator_class_can_seek_ns_from_origin_method msg_iter_can_seek_ns_from_origin_method
;
2617 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
2618 bt_message_iterator_class_can_seek_beginning_method msg_iter_can_seek_beginning_method
;
2620 } __attribute__((packed
));
2622 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
2623 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
2624 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
2625 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
2626 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
2627 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
2628 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
2629 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
2632 * Defines a plugin attribute (generic, internal use).
2634 * _attr_name: Name of the attribute (C identifier).
2635 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
2636 * _id: Plugin descriptor ID (C identifier).
2639 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
2640 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
2641 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
2642 .type_name = #_attr_name, \
2643 .type = _attr_type, \
2644 .value = { ._attr_name = _x }, \
2646 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
2648 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
2649 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
2652 * Defines a component class descriptor attribute (generic, internal
2655 * _id: Plugin descriptor ID (C identifier).
2656 * _component_class_id: Component class ID (C identifier).
2657 * _type: Component class type (`source`, `filter`, or `sink`).
2658 * _attr_name: Name of the attribute (C identifier).
2659 * _attr_type: Type of the attribute
2660 * (enum __bt_plugin_descriptor_attribute_type).
2663 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _component_class_id, _type, _x) \
2664 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name = { \
2665 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_component_class_id, \
2666 .type_name = #_attr_name, \
2667 .type = _attr_type, \
2668 .value = { ._attr_name = _x }, \
2670 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
2673 * Clang supports the no_sanitize variable attribute on global variables.
2674 * GCC only supports the no_sanitize_address function attribute, which is
2675 * not what we need. This is fine because, as far as we have seen, gcc
2676 * does not insert red zones around global variables.
2678 #if defined(__clang__)
2679 # if __has_feature(address_sanitizer)
2680 # define __bt_plugin_variable_attribute_no_sanitize_address \
2681 __attribute__((no_sanitize("address")))
2683 # define __bt_plugin_variable_attribute_no_sanitize_address
2686 # define __bt_plugin_variable_attribute_no_sanitize_address
2690 * Variable attributes for a plugin descriptor pointer to be added to
2691 * the plugin descriptor section (internal use).
2694 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2695 __attribute__((section("__DATA,btp_desc"), used)) \
2696 __bt_plugin_variable_attribute_no_sanitize_address
2698 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2699 __start___bt_plugin_descriptors
2701 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2702 __stop___bt_plugin_descriptors
2704 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
2705 __asm("section$start$__DATA$btp_desc")
2707 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
2708 __asm("section$end$__DATA$btp_desc")
2712 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2713 __attribute__((section("__bt_plugin_descriptors"), used)) \
2714 __bt_plugin_variable_attribute_no_sanitize_address
2716 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2717 __start___bt_plugin_descriptors
2719 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2720 __stop___bt_plugin_descriptors
2722 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
2724 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
2728 * Variable attributes for a plugin attribute pointer to be added to
2729 * the plugin attribute section (internal use).
2732 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2733 __attribute__((section("__DATA,btp_desc_att"), used)) \
2734 __bt_plugin_variable_attribute_no_sanitize_address
2736 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2737 __start___bt_plugin_descriptor_attributes
2739 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2740 __stop___bt_plugin_descriptor_attributes
2742 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2743 __asm("section$start$__DATA$btp_desc_att")
2745 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2746 __asm("section$end$__DATA$btp_desc_att")
2750 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2751 __attribute__((section("__bt_plugin_descriptor_attributes"), used)) \
2752 __bt_plugin_variable_attribute_no_sanitize_address
2754 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2755 __start___bt_plugin_descriptor_attributes
2757 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2758 __stop___bt_plugin_descriptor_attributes
2760 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2762 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2766 * Variable attributes for a component class descriptor pointer to be
2767 * added to the component class descriptor section (internal use).
2770 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2771 __attribute__((section("__DATA,btp_cc_desc"), used)) \
2772 __bt_plugin_variable_attribute_no_sanitize_address
2774 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2775 __start___bt_plugin_component_class_descriptors
2777 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2778 __stop___bt_plugin_component_class_descriptors
2780 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
2781 __asm("section$start$__DATA$btp_cc_desc")
2783 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
2784 __asm("section$end$__DATA$btp_cc_desc")
2788 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2789 __attribute__((section("__bt_plugin_component_class_descriptors"), used)) \
2790 __bt_plugin_variable_attribute_no_sanitize_address
2792 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2793 __start___bt_plugin_component_class_descriptors
2795 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2796 __stop___bt_plugin_component_class_descriptors
2798 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
2800 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
2804 * Variable attributes for a component class descriptor attribute
2805 * pointer to be added to the component class descriptor attribute
2806 * section (internal use).
2809 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2810 __attribute__((section("__DATA,btp_cc_desc_att"), used)) \
2811 __bt_plugin_variable_attribute_no_sanitize_address
2813 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2814 __start___bt_plugin_component_class_descriptor_attributes
2816 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2817 __stop___bt_plugin_component_class_descriptor_attributes
2819 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2820 __asm("section$start$__DATA$btp_cc_desc_att")
2822 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2823 __asm("section$end$__DATA$btp_cc_desc_att")
2827 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2828 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) \
2829 __bt_plugin_variable_attribute_no_sanitize_address
2831 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2832 __start___bt_plugin_component_class_descriptor_attributes
2834 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2835 __stop___bt_plugin_component_class_descriptor_attributes
2837 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2839 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2846 #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */