2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
7 #ifndef BABELTRACE2_PLUGIN_PLUGIN_DEV_H
8 #define BABELTRACE2_PLUGIN_PLUGIN_DEV_H
10 #ifndef __BT_IN_BABELTRACE_H
11 # error "Please include <babeltrace2/babeltrace.h> instead."
16 #include <babeltrace2/graph/component-class-dev.h>
17 #include <babeltrace2/graph/message-iterator-class.h>
18 #include <babeltrace2/types.h>
21 * _BT_HIDDEN: set the hidden attribute for internal functions
22 * On Windows, symbols are local unless explicitly exported,
23 * see https://gcc.gnu.org/wiki/Visibility
25 #if defined(_WIN32) || defined(__CYGWIN__)
28 #define _BT_HIDDEN __attribute__((visibility("hidden")))
32 * _BT_EXPORT: set the visibility for exported functions.
34 #if defined(_WIN32) || defined(__CYGWIN__)
37 #define _BT_EXPORT __attribute__((visibility("default")))
45 @defgroup api-plugin-dev Plugin development
48 Shared object plugin development.
50 This module offers macros to create a \bt_name shared object plugin.
52 Behind the scenes, the <code>BT_PLUGIN_*()</code> macros of this module
53 create and fill global tables which are located in sections of the
54 shared object with specific names. The \ref api-plugin functions can
55 load the resulting shared object file and create corresponding
58 See \ref guide-comp-link-plugin-so.
60 <h1>Plugin definition C file structure</h1>
62 The structure of a \bt_name plugin definition C file is as such:
74 Define a \bt_name plugin with BT_PLUGIN() if the plugin's name is a
75 valid C identifier, or with BT_PLUGIN_WITH_ID() otherwise.
77 See \ref api-plugin-dev-custom-plugin-id "Custom plugin ID" to
78 learn more about plugin IDs.
81 When you use BT_PLUGIN(), the plugin's ID is <code>auto</code>.
85 \bt_dt_opt Use any of the following macros (or their
86 <code>*_WITH_ID()</code> counterpart) \em once to set the properties
90 - BT_PLUGIN_DESCRIPTION()
96 \bt_dt_opt Use any of the following macros (or their
97 <code>*_WITH_ID()</code> counterpart) \em once to set the
98 initialization and finalization functions of the plugin:
100 - BT_PLUGIN_INITIALIZE_FUNC()
101 - BT_PLUGIN_FINALIZE_FUNC()
103 A plugin's initialization function is executed when the shared
104 object is loaded (see \ref api-plugin).
106 A plugin's finalization function is executed when the \bt_plugin
107 object is destroyed, if the initialization function (if any)
112 Use any of the following macros (or their <code>*_WITH_ID()</code>
113 counterpart) to add a component class to the plugin:
115 - BT_PLUGIN_SOURCE_COMPONENT_CLASS()
116 - BT_PLUGIN_FILTER_COMPONENT_CLASS()
117 - BT_PLUGIN_SINK_COMPONENT_CLASS()
121 \bt_dt_opt Depending on the type of the component class of step 5,
122 use any of the following macros (or their <code>*_WITH_ID()</code>
124 \em once to set its properties:
127 <dt>\bt_c_src_comp_cls</dt>
129 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION()
130 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP()
133 <dt>\bt_c_flt_comp_cls</dt>
135 - BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION()
136 - BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP()
139 <dt>\bt_c_sink_comp_cls</dt>
141 - BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION()
142 - BT_PLUGIN_SINK_COMPONENT_CLASS_HELP()
148 \bt_dt_opt Depending on the type of the component class of step 5,
149 use any of the following macros (or their <code>*_WITH_ID()</code>
150 counterpart) to set its optional methods:
153 <dt>Source component class</dt>
155 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD()
156 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
157 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD()
158 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
159 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
160 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
161 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD()
164 <dt>Filter component class</dt>
166 - BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD()
167 - BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
168 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD()
169 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
170 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
171 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
172 - BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
173 - BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD()
176 <dt>Sink component class</dt>
178 - BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD()
179 - BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
180 - BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD()
181 - BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD()
182 - BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
183 - BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD()
189 You can repeat steps 5 to 7 to add more than one component class to a
192 See \ref example-simple-plugin-def-file for a concrete example of how
193 to use the macros of this module.
195 <h1>\anchor api-plugin-dev-custom-plugin-id Custom plugin ID</h1>
197 The BT_PLUGIN() macro defines a plugin with a specific name and the
198 ID <code>auto</code>.
200 All the <code>BT_PLUGIN_*()</code> macros which do not end with
201 <code>_WITH_ID</code> refer to the <code>auto</code> plugin.
203 There are two situations which demand that you use a custom plugin ID:
205 - You want more than one plugin contained in your shared object file.
207 Although the \bt_name project does not recommend this, it is possible.
208 This is why bt_plugin_find_all_from_file() returns a \bt_plugin_set
209 instead of a single \bt_plugin.
211 In this case, each plugin of the shared object needs its own, unique
214 - You want to give the plugin a name which is not a valid C identifier.
216 The BT_PLUGIN() macro accepts a C identifier as the plugin name, while
217 the BT_PLUGIN_WITH_ID() accepts a C identifier for the ID and a C
220 To define a plugin with a specific ID, use BT_PLUGIN_WITH_ID(), for
224 BT_PLUGIN_WITH_ID(my_plugin_id, "my-plugin-name");
227 Then, use the <code>BT_PLUGIN_*_WITH_ID()</code> macros to refer to
228 this specific plugin, for example:
231 BT_PLUGIN_AUTHOR_WITH_ID(my_plugin_id, "Patrick Bouchard");
236 You can still use the <code>auto</code> ID with BT_PLUGIN_WITH_ID()
237 to use the simpler macros afterwards while still giving the plugin a
238 name which is not a valid C identifier, for example:
241 BT_PLUGIN_WITH_ID(auto, "my-plugin-name");
242 BT_PLUGIN_AUTHOR("Patrick Bouchard");
246 <h1>Custom component class ID</h1>
248 The BT_PLUGIN_SOURCE_COMPONENT_CLASS(),
249 BT_PLUGIN_FILTER_COMPONENT_CLASS(), and
250 BT_PLUGIN_SINK_COMPONENT_CLASS() add a component class with a specific
251 name to the plugin having the ID <code>auto</code>.
253 The name you pass to those macros must be a valid C identifier and it
254 also serves as the component class's ID within the <code>auto</code>
257 There are two situations which demand that you use a custom component
260 - You want to add the component class to a specific plugin (other than
261 <code>auto</code>, if you have more than one).
263 - You want to give the component class a name which is not a valid C
266 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros accept a
267 C identifier for the component class ID and a string for its name.
269 For a given plugin and for a given component class type, all component
270 class IDs must be unique.
272 To add a component class having a specific ID to a plugin,
273 use the BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(),
274 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(), and
275 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() macros, for example:
278 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(my_plugin_id, my_comp_class_id,
279 "my-source", my_source_iter_next);
284 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros
285 specify the ID of the plugin to which to add the component class.
287 If you use the BT_PLUGIN() macro to define your plugin, then its
288 ID is <code>auto</code>:
291 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, my_comp_class_id,
292 "my-source", my_source_iter_next);
296 Then, use the <code>BT_PLUGIN_*_COMPONENT_CLASS_*_WITH_ID()</code>
297 macros to refer to this specific component class, for example:
300 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(my_plugin_id,
301 my_comp_class_id, my_source_finalize);
311 @typedef struct bt_self_plugin bt_self_plugin;
326 Defines a plugin module.
328 In a plugin define C file, you must use this macro before you use any
329 other <code>BT_PLUGIN*()</code> macro.
331 #define BT_PLUGIN_MODULE() \
332 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
333 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
334 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
336 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
337 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
338 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
340 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
341 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
342 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
344 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; \
345 _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; \
346 _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; \
348 _BT_EXPORT struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
350 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
352 _BT_EXPORT struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
354 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
356 _BT_EXPORT struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
358 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
360 _BT_EXPORT struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
362 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
364 _BT_EXPORT struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
366 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
368 _BT_EXPORT struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
370 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
372 _BT_EXPORT struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
374 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
376 _BT_EXPORT struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
378 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
384 @name Plugin definition
390 Defines a plugin named \bt_p{_name} and having the ID \bt_p{_id}.
396 Plugin's ID, unique amongst all the plugin IDs of the same shared
401 <code>const char *</code>
406 @bt_pre_not_null{_name}
408 #define BT_PLUGIN_WITH_ID(_id, _name) \
409 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
412 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
416 Alias of BT_PLUGIN_WITH_ID() with the \bt_p{_id} parameter set to
419 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
424 @name Plugin properties
430 Sets the description of the plugin having the ID \bt_p{_id} to
433 See the \ref api-comp-cls-prop-descr "description" property.
439 ID of the plugin of which to set the description.
441 @param[in] _description
443 <code>const char *</code>
445 Plugin's description.
448 @bt_pre_not_null{_description}
450 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _description) \
451 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _description)
455 Alias of BT_PLUGIN_DESCRIPTION_WITH_ID() with the \bt_p{_id}
456 parameter set to <code>auto</code>.
458 #define BT_PLUGIN_DESCRIPTION(_description) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _description)
462 Sets the name(s) of the author(s) of the plugin having the ID
463 \bt_p{_id} to \bt_p{_author}.
465 See the \ref api-plugin-prop-author "author name(s)" property.
471 ID of the plugin of which to set the author(s).
475 <code>const char *</code>
480 @bt_pre_not_null{_author}
482 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _author) \
483 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _author)
487 Alias of BT_PLUGIN_AUTHOR_WITH_ID() with the \bt_p{_id}
488 parameter set to <code>auto</code>.
490 #define BT_PLUGIN_AUTHOR(_author) BT_PLUGIN_AUTHOR_WITH_ID(auto, _author)
494 Sets the license (name or full) of the plugin having the ID
495 \bt_p{_id} to \bt_p{_license}.
497 See the \ref api-plugin-prop-license "license" property.
503 ID of the plugin of which to set the license.
507 <code>const char *</code>
512 @bt_pre_not_null{_license}
514 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _license) \
515 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _license)
519 Alias of BT_PLUGIN_LICENSE_WITH_ID() with the \bt_p{_id}
520 parameter set to <code>auto</code>.
522 #define BT_PLUGIN_LICENSE(_license) BT_PLUGIN_LICENSE_WITH_ID(auto, _license)
526 Sets the version of the plugin having the ID \bt_p{_id} to
529 See the \ref api-plugin-prop-version "version" property.
535 ID of the plugin of which to set the version.
539 <code>unsigned int</code>
541 Plugin's major version.
545 <code>unsigned int</code>
547 Plugin's minor version.
551 <code>unsigned int</code>
553 Plugin's patch version.
557 <code>const char *</code>
559 Plugin's version's extra information.
561 Can be \c NULL if the plugin's version has no extra information.
564 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
565 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
569 Alias of BT_PLUGIN_VERSION_WITH_ID() with the \bt_p{_id}
570 parameter set to <code>auto</code>.
572 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
577 @name Plugin functions
583 Status codes for #bt_plugin_initialize_func.
585 typedef enum bt_plugin_initialize_func_status
{
590 BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
= __BT_FUNC_STATUS_OK
,
596 BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
602 BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
603 } bt_plugin_initialize_func_status
;
607 User plugin initialization function.
609 @param[in] self_plugin
613 This parameter is a private view of the \bt_plugin object for
616 As of \bt_name_version_min_maj, there's no self plugin API.
619 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
621 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
623 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
626 @bt_pre_not_null{self_plugin}
628 typedef bt_plugin_initialize_func_status (*bt_plugin_initialize_func
)(
629 bt_self_plugin
*self_plugin
);
633 Sets the initialization function of the plugin having the ID
634 \bt_p{_id} to \bt_p{_func}.
640 ID of the plugin of which to set the initialization function.
644 #bt_plugin_initialize_func
646 Plugin's initialization function.
649 @bt_pre_not_null{_func}
651 #define BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(_id, _func) \
652 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _func)
656 Alias of BT_PLUGIN_INITIALIZE_FUNC_WITH_ID() with the \bt_p{_id}
657 parameter set to <code>auto</code>.
659 #define BT_PLUGIN_INITIALIZE_FUNC(_func) BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(auto, _func)
663 User plugin finalization function.
665 typedef void (*bt_plugin_finalize_func
)(void);
669 Sets the finalization function of the plugin having the ID
670 \bt_p{_id} to \bt_p{_func}.
676 ID of the plugin of which to set the finalization function.
680 #bt_plugin_finalize_func
682 Plugin's finalization function.
685 @bt_pre_not_null{_func}
687 #define BT_PLUGIN_FINALIZE_FUNC_WITH_ID(_id, _func) \
688 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _func)
692 Alias of BT_PLUGIN_FINALIZE_FUNC_WITH_ID() with the \bt_p{_id}
693 parameter set to <code>auto</code>.
695 #define BT_PLUGIN_FINALIZE_FUNC(_func) BT_PLUGIN_FINALIZE_FUNC_WITH_ID(auto, _func)
700 @name Component class adding
706 Adds a \bt_src_comp_cls named \bt_p{_name}, having the ID
707 \bt_p{_component_class_id} and the message iterator class's "next"
708 method \bt_p{_message_iterator_class_next_method}, to the plugin
709 having the ID \bt_p{_plugin_id}.
711 @param[in] _plugin_id
715 ID of the plugin to which to add the source component class.
717 @param[in] _component_class_id
721 Source component class's ID, unique amongst all the source component
722 class IDs of the same plugin.
726 <code>const char *</code>
728 Source component class's name, unique amongst all the source
729 component class names of the same plugin.
731 @param[in] _message_iterator_class_next_method
733 #bt_message_iterator_class_next_method
735 Source component class's message iterator class's "next" method.
738 @bt_pre_not_null{_name}
739 @bt_pre_not_null{_message_iterator_class_next_method}
741 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
742 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
743 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
745 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
746 .methods = { .source = { .msg_iter_next = _message_iterator_class_next_method } }, \
748 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
752 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID() with the
753 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
754 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
755 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
761 Passed as both the \bt_p{_component_class_id} and the
762 \bt_p{_name} (once converted to a string) parameters of
763 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID().
766 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
767 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
771 Adds a \bt_flt_comp_cls named \bt_p{_name}, having the ID
772 \bt_p{_component_class_id} and the message iterator class's "next"
773 method \bt_p{_message_iterator_class_next_method}, to the plugin
774 having the ID \bt_p{_plugin_id}.
776 @param[in] _plugin_id
780 ID of the plugin to which to add the filter component class.
782 @param[in] _component_class_id
786 Filter component class's ID, unique amongst all the filter component
787 class IDs of the same plugin.
791 <code>const char *</code>
793 Filter component class's name, unique amongst all the filter
794 component class names of the same plugin.
796 @param[in] _message_iterator_class_next_method
798 #bt_message_iterator_class_next_method
800 Filter component class's message iterator class's "next" method.
803 @bt_pre_not_null{_name}
804 @bt_pre_not_null{_message_iterator_class_next_method}
806 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
807 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
808 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
810 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
811 .methods = { .filter = { .msg_iter_next = _message_iterator_class_next_method } }, \
813 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
817 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID() with the
818 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
819 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
820 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
826 Passed as both the \bt_p{_component_class_id} and the
827 \bt_p{_name} (once converted to a string) parameters of
828 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID().
831 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
832 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
836 Adds a \bt_sink_comp_cls named \bt_p{_name}, having the ID
837 \bt_p{_component_class_id} and the consuming method
838 \bt_p{_consume_method}, to the plugin
839 having the ID \bt_p{_plugin_id}.
841 @param[in] _plugin_id
845 ID of the plugin to which to add the sink component class.
847 @param[in] _component_class_id
851 Sink component class's ID, unique amongst all the sink component
852 class IDs of the same plugin.
856 <code>const char *</code>
858 Sink component class's name, unique amongst all the sink
859 component class names of the same plugin.
861 @param[in] _consume_method
863 #bt_component_class_sink_consume_method
865 Sink component class's message iterator class's "next" method.
868 @bt_pre_not_null{_name}
869 @bt_pre_not_null{_consume_method}
871 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _consume_method) \
872 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
873 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
875 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
876 .methods = { .sink = { .consume = _consume_method } }, \
878 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
882 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() with the
883 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
884 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
885 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
891 Passed as both the \bt_p{_component_class_id} and the
892 \bt_p{_name} (once converted to a string) parameters of
893 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID().
896 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
897 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
902 @name Source component class properties
908 Sets the description of the \bt_src_comp_cls having the ID
909 \bt_p{_component_class_id} in the plugin having the ID
910 \bt_p{_plugin_id} to \bt_p{_description}.
912 See the \ref api-comp-cls-prop-descr "description" property.
914 @param[in] _plugin_id
918 ID of the plugin which contains the source component class of which
919 to set the description.
921 @param[in] _component_class_id
925 ID of the source component class, within the plugin having the ID
926 \bt_p{_plugin_id}, of which to set the description to
929 @param[in] _description
931 <code>const char *</code>
933 Source component class's description.
936 @bt_pre_not_null{_description}
938 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
939 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, source, _description)
943 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
944 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
945 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
947 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
948 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
952 Sets the help text of the \bt_src_comp_cls having the ID
953 \bt_p{_component_class_id} in the plugin having the ID
954 \bt_p{_plugin_id} to \bt_p{_help_text}.
956 See the \ref api-comp-cls-prop-help "help text" property.
958 @param[in] _plugin_id
962 ID of the plugin which contains the source component class of which
963 to set the help text.
965 @param[in] _component_class_id
969 ID of the source component class, within the plugin having the ID
970 \bt_p{_plugin_id}, of which to set the help text to
973 @param[in] _help_text
975 <code>const char *</code>
977 Source component class's help text.
980 @bt_pre_not_null{_help_text}
982 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
983 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, source, _help_text)
987 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID() with the
988 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
989 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
991 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _help_text) \
992 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
997 @name Filter component class properties
1003 Sets the description of the \bt_flt_comp_cls having the ID
1004 \bt_p{_component_class_id} in the plugin having the ID
1005 \bt_p{_plugin_id} to \bt_p{_description}.
1007 See the \ref api-comp-cls-prop-descr "description" property.
1009 @param[in] _plugin_id
1013 ID of the plugin which contains the filter component class of which
1014 to set the description.
1016 @param[in] _component_class_id
1020 ID of the filter component class, within the plugin having the ID
1021 \bt_p{_plugin_id}, of which to set the description to
1022 \bt_p{_description}.
1024 @param[in] _description
1026 <code>const char *</code>
1028 Filter component class's description.
1031 @bt_pre_not_null{_description}
1033 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1034 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, filter, _description)
1038 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1039 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1040 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1042 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1043 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1047 Sets the help text of the \bt_flt_comp_cls having the ID
1048 \bt_p{_component_class_id} in the plugin having the ID
1049 \bt_p{_plugin_id} to \bt_p{_help_text}.
1051 See the \ref api-comp-cls-prop-help "help text" property.
1053 @param[in] _plugin_id
1057 ID of the plugin which contains the filter component class of which
1058 to set the help text.
1060 @param[in] _component_class_id
1064 ID of the filter component class, within the plugin having the ID
1065 \bt_p{_plugin_id}, of which to set the help text to
1068 @param[in] _help_text
1070 <code>const char *</code>
1072 Filter component class's help text.
1075 @bt_pre_not_null{_help_text}
1077 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1078 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, filter, _help_text)
1082 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID() with the
1083 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1084 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1086 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _help_text) \
1087 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1092 @name Sink component class properties
1098 Sets the description of the \bt_sink_comp_cls having the ID
1099 \bt_p{_component_class_id} in the plugin having the ID
1100 \bt_p{_plugin_id} to \bt_p{_description}.
1102 See the \ref api-comp-cls-prop-descr "description" property.
1104 @param[in] _plugin_id
1108 ID of the plugin which contains the sink component class of which
1109 to set the description.
1111 @param[in] _component_class_id
1115 ID of the sink component class, within the plugin having the ID
1116 \bt_p{_plugin_id}, of which to set the description to
1117 \bt_p{_description}.
1119 @param[in] _description
1121 <code>const char *</code>
1123 Sink component class's description.
1126 @bt_pre_not_null{_description}
1128 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1129 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, sink, _description)
1133 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1134 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1135 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1137 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1138 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1142 Sets the help text of the \bt_sink_comp_cls having the ID
1143 \bt_p{_component_class_id} in the plugin having the ID
1144 \bt_p{_plugin_id} to \bt_p{_help_text}.
1146 See the \ref api-comp-cls-prop-help "help text" property.
1148 @param[in] _plugin_id
1152 ID of the plugin which contains the sink component class of which
1153 to set the help text.
1155 @param[in] _component_class_id
1159 ID of the sink component class, within the plugin having the ID
1160 \bt_p{_plugin_id}, of which to set the help text to
1163 @param[in] _help_text
1165 <code>const char *</code>
1167 Sink component class's help text.
1170 @bt_pre_not_null{_help_text}
1172 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1173 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, sink, _help_text)
1177 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID() with
1178 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1179 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1181 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _help_text) \
1182 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1187 @name Source component class methods
1193 Sets the finalization method of the \bt_src_comp_cls having the ID
1194 \bt_p{_component_class_id} in the plugin having the ID
1195 \bt_p{_plugin_id} to \bt_p{_method}.
1197 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1199 @param[in] _plugin_id
1203 ID of the plugin which contains the source component class of which
1204 to set the finalization method.
1206 @param[in] _component_class_id
1210 ID of the source component class, within the plugin having the ID
1211 \bt_p{_plugin_id}, of which to set the finalization method to
1216 #bt_component_class_source_finalize_method
1218 Source component class's finalization method.
1221 @bt_pre_not_null{_method}
1223 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1224 __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)
1229 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1230 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1231 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1233 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1234 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1238 Sets the \"get supported \bt_mip versions\" method of the
1239 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1240 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1242 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1245 @param[in] _plugin_id
1249 ID of the plugin which contains the source component class of which
1250 to set the "get supported MIP versions" method.
1252 @param[in] _component_class_id
1256 ID of the source component class, within the plugin having the ID
1257 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1258 method to \bt_p{_method}.
1262 #bt_component_class_source_get_supported_mip_versions_method
1264 Source component class's "get supported MIP versions" method.
1267 @bt_pre_not_null{_method}
1269 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1270 __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)
1275 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1276 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1277 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1279 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1280 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1284 Sets the initialization method of the \bt_src_comp_cls having the ID
1285 \bt_p{_component_class_id} in the plugin having the ID
1286 \bt_p{_plugin_id} to \bt_p{_method}.
1288 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1290 @param[in] _plugin_id
1294 ID of the plugin which contains the source component class of which
1295 to set the initialization method.
1297 @param[in] _component_class_id
1301 ID of the source component class, within the plugin having the ID
1302 \bt_p{_plugin_id}, of which to set the initialization method to
1307 #bt_component_class_source_initialize_method
1309 Source component class's initialization method.
1312 @bt_pre_not_null{_method}
1314 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1315 __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)
1320 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1321 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1322 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1324 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1325 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1329 Sets the finalization method of the \bt_msg_iter_cls of the
1330 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1331 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1333 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1335 @param[in] _plugin_id
1339 ID of the plugin which contains the source component class of which
1340 to set the finalization method of the message iterator class.
1342 @param[in] _component_class_id
1346 ID of the source component class, within the plugin having the ID
1347 \bt_p{_plugin_id}, of which to set the finalization method of the
1348 message iterator class to \bt_p{_method}.
1352 #bt_message_iterator_class_finalize_method
1354 Source component class's message iterator class's finalization method.
1357 @bt_pre_not_null{_method}
1359 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1360 __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)
1365 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1366 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1367 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1369 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1370 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1374 Sets the initialization method of the \bt_msg_iter_cls of the
1375 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1376 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1378 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1380 @param[in] _plugin_id
1384 ID of the plugin which contains the source component class of which
1385 to set the initialization method of the message iterator class.
1387 @param[in] _component_class_id
1391 ID of the source component class, within the plugin having the ID
1392 \bt_p{_plugin_id}, of which to set the initialization method of the
1393 message iterator class to \bt_p{_method}.
1397 #bt_message_iterator_class_initialize_method
1399 Source component class's message iterator class's initialization
1403 @bt_pre_not_null{_method}
1405 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1406 __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)
1411 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1412 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1413 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1415 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1416 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1420 Sets the "seek beginning" and "can seek beginning?" methods of the
1421 \bt_msg_iter_cls of the \bt_src_comp_cls having the ID
1422 \bt_p{_component_class_id} in the plugin having the ID
1423 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1424 \bt_p{_can_seek_method}.
1426 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1427 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1429 @param[in] _plugin_id
1433 ID of the plugin which contains the source component class of which
1434 to set the "seek beginning" and "can seek beginning?" methods of the
1435 message iterator class.
1437 @param[in] _component_class_id
1441 ID of the source component class, within the plugin having the ID
1442 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1443 seek beginning" methods of the message iterator class to
1444 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1446 @param[in] _seek_method
1448 #bt_message_iterator_class_seek_beginning_method
1450 Source component class's message iterator class's "seek beginning"
1453 @param[in] _can_seek_method
1455 #bt_message_iterator_class_can_seek_beginning_method
1457 Source component class's message iterator class's
1458 "can seek beginning?" method.
1460 Can be \c NULL, in which case it is equivalent to setting a method
1461 which always returns #BT_TRUE.
1464 @bt_pre_not_null{_seek_method}
1465 @bt_pre_not_null{_can_seek_method}
1467 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1468 __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); \
1469 __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)
1474 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS()
1475 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1476 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1478 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1479 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1483 Sets the "seek ns from origin" and "can seek ns from origin?"
1484 methods of the \bt_msg_iter_cls of the \bt_src_comp_cls having the
1485 ID \bt_p{_component_class_id} in the plugin having the ID
1486 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1487 \bt_p{_can_seek_method}.
1489 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1490 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
1493 @param[in] _plugin_id
1497 ID of the plugin which contains the source component class of which
1498 to set the "seek ns from origin" and "can seek ns from origin?"
1499 methods of the message iterator class.
1501 @param[in] _component_class_id
1505 ID of the source component class, within the plugin having the ID
1506 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
1507 "can seek ns from origin" methods of the message iterator class to
1508 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1510 @param[in] _seek_method
1512 #bt_message_iterator_class_seek_ns_from_origin_method
1514 Source component class's message iterator class's "seek ns from
1517 @param[in] _can_seek_method
1519 #bt_message_iterator_class_can_seek_ns_from_origin_method
1521 Source component class's message iterator class's "can seek ns from
1524 Can be \c NULL, in which case it is equivalent to setting a method
1525 which always returns #BT_TRUE.
1528 @bt_pre_not_null{_seek_method}
1529 @bt_pre_not_null{_can_seek_method}
1531 #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) \
1532 __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); \
1533 __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)
1538 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
1539 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1540 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1542 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
1543 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1547 Sets the "output port connected" method of the \bt_src_comp_cls
1548 having the ID \bt_p{_component_class_id} in the plugin having the ID
1549 \bt_p{_plugin_id} to \bt_p{_method}.
1552 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
1555 @param[in] _plugin_id
1559 ID of the plugin which contains the source component class of which
1560 to set the "output port connected" method.
1562 @param[in] _component_class_id
1566 ID of the source component class, within the plugin having the ID
1567 \bt_p{_plugin_id}, of which to set the "output port connected"
1568 method to \bt_p{_method}.
1572 #bt_component_class_source_output_port_connected_method
1574 Source component class's "output port connected" method.
1577 @bt_pre_not_null{_method}
1579 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1580 __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)
1585 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
1586 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1587 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1589 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
1590 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1594 Sets the query method of the \bt_src_comp_cls
1595 having the ID \bt_p{_component_class_id} in the plugin having the ID
1596 \bt_p{_plugin_id} to \bt_p{_method}.
1598 See the \ref api-comp-cls-dev-meth-query "query" method.
1600 @param[in] _plugin_id
1604 ID of the plugin which contains the source component class of which
1605 to set the query method.
1607 @param[in] _component_class_id
1611 ID of the source component class, within the plugin having the ID
1612 \bt_p{_plugin_id}, of which to set the query
1613 method to \bt_p{_method}.
1617 #bt_component_class_source_query_method
1619 Source component class's query method.
1622 @bt_pre_not_null{_method}
1624 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1625 __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)
1630 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
1631 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1632 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1634 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
1635 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
1640 @name Filter component class methods
1646 Sets the finalization method of the \bt_flt_comp_cls having the ID
1647 \bt_p{_component_class_id} in the plugin having the ID
1648 \bt_p{_plugin_id} to \bt_p{_method}.
1650 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1652 @param[in] _plugin_id
1656 ID of the plugin which contains the filter component class of which
1657 to set the finalization method.
1659 @param[in] _component_class_id
1663 ID of the filter component class, within the plugin having the ID
1664 \bt_p{_plugin_id}, of which to set the finalization method to
1669 #bt_component_class_filter_finalize_method
1671 Filter component class's finalization method.
1674 @bt_pre_not_null{_method}
1676 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1677 __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)
1682 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1683 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1684 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1686 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1687 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1691 Sets the \"get supported \bt_mip versions\" method of the
1692 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1693 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1695 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1698 @param[in] _plugin_id
1702 ID of the plugin which contains the filter component class of which
1703 to set the "get supported MIP versions" method.
1705 @param[in] _component_class_id
1709 ID of the filter component class, within the plugin having the ID
1710 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1711 method to \bt_p{_method}.
1715 #bt_component_class_filter_get_supported_mip_versions_method
1717 Filter component class's "get supported MIP versions" method.
1720 @bt_pre_not_null{_method}
1722 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1723 __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)
1728 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1729 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1730 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1732 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1733 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1737 Sets the initialization method of the \bt_flt_comp_cls having the ID
1738 \bt_p{_component_class_id} in the plugin having the ID
1739 \bt_p{_plugin_id} to \bt_p{_method}.
1741 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1743 @param[in] _plugin_id
1747 ID of the plugin which contains the filter component class of which
1748 to set the initialization method.
1750 @param[in] _component_class_id
1754 ID of the filter component class, within the plugin having the ID
1755 \bt_p{_plugin_id}, of which to set the initialization method to
1760 #bt_component_class_filter_initialize_method
1762 Filter component class's initialization method.
1765 @bt_pre_not_null{_method}
1767 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1768 __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)
1773 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1774 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1775 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1777 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1778 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1782 Sets the "input port connected" method of the \bt_flt_comp_cls
1783 having the ID \bt_p{_component_class_id} in the plugin having the ID
1784 \bt_p{_plugin_id} to \bt_p{_method}.
1787 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
1790 @param[in] _plugin_id
1794 ID of the plugin which contains the filter component class of which
1795 to set the "input port connected" method.
1797 @param[in] _component_class_id
1801 ID of the filter component class, within the plugin having the ID
1802 \bt_p{_plugin_id}, of which to set the "input port connected"
1803 method to \bt_p{_method}.
1807 #bt_component_class_filter_input_port_connected_method
1809 Filter component class's "input port connected" method.
1812 @bt_pre_not_null{_method}
1814 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1815 __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)
1820 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
1821 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1822 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1824 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
1825 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1829 Sets the finalization method of the \bt_msg_iter_cls of the
1830 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1831 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1833 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1835 @param[in] _plugin_id
1839 ID of the plugin which contains the filter component class of which
1840 to set the finalization method of the message iterator class.
1842 @param[in] _component_class_id
1846 ID of the filter component class, within the plugin having the ID
1847 \bt_p{_plugin_id}, of which to set the finalization method of the
1848 message iterator class to \bt_p{_method}.
1852 #bt_message_iterator_class_finalize_method
1854 Filter component class's message iterator class's finalization method.
1857 @bt_pre_not_null{_method}
1859 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1860 __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)
1865 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1866 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1867 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1869 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1870 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1874 Sets the initialization method of the \bt_msg_iter_cls of the
1875 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1876 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1878 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1880 @param[in] _plugin_id
1884 ID of the plugin which contains the filter component class of which
1885 to set the initialization method of the message iterator class.
1887 @param[in] _component_class_id
1891 ID of the filter component class, within the plugin having the ID
1892 \bt_p{_plugin_id}, of which to set the initialization method of the
1893 message iterator class to \bt_p{_method}.
1897 #bt_message_iterator_class_initialize_method
1899 Filter component class's message iterator class's initialization
1903 @bt_pre_not_null{_method}
1905 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1906 __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)
1911 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1912 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1913 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1915 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1916 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1920 Sets the "seek beginning" and "can seek beginning?" methods of the
1921 \bt_msg_iter_cls of the \bt_flt_comp_cls having the ID
1922 \bt_p{_component_class_id} in the plugin having the ID
1923 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1924 \bt_p{_can_seek_method}.
1926 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1927 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1929 @param[in] _plugin_id
1933 ID of the plugin which contains the filter component class of which
1934 to set the "seek beginning" and "can seek beginning?" methods of the
1935 message iterator class.
1937 @param[in] _component_class_id
1941 ID of the filter component class, within the plugin having the ID
1942 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1943 seek beginning" methods of the message iterator class to
1944 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1946 @param[in] _seek_method
1948 #bt_message_iterator_class_seek_beginning_method
1950 Filter component class's message iterator class's "seek beginning"
1953 @param[in] _can_seek_method
1955 #bt_message_iterator_class_can_seek_beginning_method
1957 Filter component class's message iterator class's
1958 "can seek beginning?" method.
1960 Can be \c NULL, in which case it is equivalent to setting a method
1961 which always returns #BT_TRUE.
1964 @bt_pre_not_null{_seek_method}
1965 @bt_pre_not_null{_can_seek_method}
1967 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1968 __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); \
1969 __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);
1974 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID()
1975 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1976 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1978 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1979 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1983 Sets the "seek ns from origin" and "can seek ns from origin?"
1984 methods of the \bt_msg_iter_cls of the \bt_flt_comp_cls having the
1985 ID \bt_p{_component_class_id} in the plugin having the ID
1986 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1987 \bt_p{_can_seek_method}.
1989 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1990 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
1993 @param[in] _plugin_id
1997 ID of the plugin which contains the filter component class of which
1998 to set the "seek ns from origin" and "can seek ns from origin?"
1999 methods of the message iterator class.
2001 @param[in] _component_class_id
2005 ID of the filter component class, within the plugin having the ID
2006 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
2007 "can seek ns from origin" methods of the message iterator class to
2008 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
2010 @param[in] _seek_method
2012 #bt_message_iterator_class_seek_ns_from_origin_method
2014 Filter component class's message iterator class's "seek ns from
2017 @param[in] _can_seek_method
2019 #bt_message_iterator_class_can_seek_ns_from_origin_method
2021 Filter component class's message iterator class's "can seek ns from
2024 Can be \c NULL, in which case it is equivalent to setting a method
2025 which always returns #BT_TRUE.
2028 @bt_pre_not_null{_seek_method}
2029 @bt_pre_not_null{_can_seek_method}
2031 #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) \
2032 __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); \
2033 __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)
2038 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
2039 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2040 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2042 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
2043 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
2047 Sets the "output port connected" method of the \bt_flt_comp_cls
2048 having the ID \bt_p{_component_class_id} in the plugin having the ID
2049 \bt_p{_plugin_id} to \bt_p{_method}.
2052 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
2055 @param[in] _plugin_id
2059 ID of the plugin which contains the filter component class of which
2060 to set the "output port connected" method.
2062 @param[in] _component_class_id
2066 ID of the filter component class, within the plugin having the ID
2067 \bt_p{_plugin_id}, of which to set the "output port connected"
2068 method to \bt_p{_method}.
2072 #bt_component_class_filter_output_port_connected_method
2074 Filter component class's "output port connected" method.
2077 @bt_pre_not_null{_method}
2079 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2080 __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)
2085 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
2086 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2087 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2089 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
2090 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2094 Sets the query method of the \bt_flt_comp_cls
2095 having the ID \bt_p{_component_class_id} in the plugin having the ID
2096 \bt_p{_plugin_id} to \bt_p{_method}.
2098 See the \ref api-comp-cls-dev-meth-query "query" method.
2100 @param[in] _plugin_id
2104 ID of the plugin which contains the filter component class of which
2105 to set the query method.
2107 @param[in] _component_class_id
2111 ID of the filter component class, within the plugin having the ID
2112 \bt_p{_plugin_id}, of which to set the query
2113 method to \bt_p{_method}.
2117 #bt_component_class_filter_query_method
2119 Filter component class's query method.
2122 @bt_pre_not_null{_method}
2124 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2125 __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)
2130 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2131 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2132 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2134 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2135 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2140 @name Sink component class methods
2146 Sets the finalization method of the \bt_sink_comp_cls having the ID
2147 \bt_p{_component_class_id} in the plugin having the ID
2148 \bt_p{_plugin_id} to \bt_p{_method}.
2150 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
2152 @param[in] _plugin_id
2156 ID of the plugin which contains the sink component class of which
2157 to set the finalization method.
2159 @param[in] _component_class_id
2163 ID of the sink component class, within the plugin having the ID
2164 \bt_p{_plugin_id}, of which to set the finalization method to
2169 #bt_component_class_sink_finalize_method
2171 Sink component class's finalization method.
2174 @bt_pre_not_null{_method}
2176 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2177 __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)
2182 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
2183 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2184 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2186 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
2187 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
2191 Sets the \"get supported \bt_mip versions\" method of the
2192 \bt_sink_comp_cls having the ID \bt_p{_component_class_id} in the
2193 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
2195 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
2198 @param[in] _plugin_id
2202 ID of the plugin which contains the sink component class of which
2203 to set the "get supported MIP versions" method.
2205 @param[in] _component_class_id
2209 ID of the sink component class, within the plugin having the ID
2210 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
2211 method to \bt_p{_method}.
2215 #bt_component_class_sink_get_supported_mip_versions_method
2217 Sink component class's "get supported MIP versions" method.
2220 @bt_pre_not_null{_method}
2222 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2223 __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)
2228 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
2229 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2230 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2232 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
2233 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
2237 Sets the "graph is configured" method of the \bt_sink_comp_cls
2238 having the ID \bt_p{_component_class_id} in the plugin having the ID
2239 \bt_p{_plugin_id} to \bt_p{_method}.
2242 \ref api-comp-cls-dev-meth-graph-configured "graph is configured"
2245 @param[in] _plugin_id
2249 ID of the plugin which contains the sink component class of which
2250 to set the "graph is configured" method.
2252 @param[in] _component_class_id
2256 ID of the sink component class, within the plugin having the ID
2257 \bt_p{_plugin_id}, of which to set the "graph is configured"
2258 method to \bt_p{_method}.
2262 #bt_component_class_sink_graph_is_configured_method
2264 Sink component class's "graph is configured" method.
2267 @bt_pre_not_null{_method}
2269 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2270 __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)
2275 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID()
2276 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2277 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2279 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _method) \
2280 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _method)
2284 Sets the initialization method of the \bt_sink_comp_cls having the
2285 ID \bt_p{_component_class_id} in the plugin having the ID
2286 \bt_p{_plugin_id} to \bt_p{_method}.
2288 See the \ref api-comp-cls-dev-meth-init "initialize" method.
2290 @param[in] _plugin_id
2294 ID of the plugin which contains the sink component class of which
2295 to set the initialization method.
2297 @param[in] _component_class_id
2301 ID of the sink component class, within the plugin having the ID
2302 \bt_p{_plugin_id}, of which to set the initialization method to
2307 #bt_component_class_sink_initialize_method
2309 Sink component class's initialization method.
2312 @bt_pre_not_null{_method}
2314 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2315 __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)
2320 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
2321 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2322 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2324 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
2325 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
2329 Sets the "input port connected" method of the \bt_sink_comp_cls
2330 having the ID \bt_p{_component_class_id} in the plugin having the ID
2331 \bt_p{_plugin_id} to \bt_p{_method}.
2334 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
2337 @param[in] _plugin_id
2341 ID of the plugin which contains the sink component class of which
2342 to set the "input port connected" method.
2344 @param[in] _component_class_id
2348 ID of the sink component class, within the plugin having the ID
2349 \bt_p{_plugin_id}, of which to set the "input port connected"
2350 method to \bt_p{_method}.
2354 #bt_component_class_sink_input_port_connected_method
2356 Sink component class's "input port connected" method.
2359 @bt_pre_not_null{_method}
2361 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2362 __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)
2367 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
2368 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2369 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2371 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
2372 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2376 Sets the query method of the \bt_sink_comp_cls
2377 having the ID \bt_p{_component_class_id} in the plugin having the ID
2378 \bt_p{_plugin_id} to \bt_p{_method}.
2380 See the \ref api-comp-cls-dev-meth-query "query" method.
2382 @param[in] _plugin_id
2386 ID of the plugin which contains the sink component class of which
2387 to set the query method.
2389 @param[in] _component_class_id
2393 ID of the sink component class, within the plugin having the ID
2394 \bt_p{_plugin_id}, of which to set the query
2395 method to \bt_p{_method}.
2399 #bt_component_class_sink_query_method
2401 Sink component class's query method.
2404 @bt_pre_not_null{_method}
2406 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2407 __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)
2412 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2413 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2414 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2416 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2417 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2423 /* Plugin descriptor: describes a single plugin (internal use) */
2424 struct __bt_plugin_descriptor
{
2427 } __attribute__((packed
));
2429 /* Type of a plugin attribute (internal use) */
2430 enum __bt_plugin_descriptor_attribute_type
{
2431 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
2432 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
2433 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
2434 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
2435 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
2436 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
2439 /* Plugin (user) version */
2440 struct __bt_plugin_descriptor_version
{
2447 /* Plugin attribute (internal use) */
2448 struct __bt_plugin_descriptor_attribute
{
2449 /* Plugin descriptor to which to associate this attribute */
2450 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2452 /* Name of the attribute's type for debug purposes */
2453 const char *type_name
;
2455 /* Attribute's type */
2456 enum __bt_plugin_descriptor_attribute_type type
;
2458 /* Attribute's value (depends on attribute's type) */
2460 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
2461 bt_plugin_initialize_func init
;
2463 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
2464 bt_plugin_finalize_func exit
;
2466 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
2469 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
2470 const char *license
;
2472 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2473 const char *description
;
2475 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
2476 struct __bt_plugin_descriptor_version version
;
2478 } __attribute__((packed
));
2480 /* Component class descriptor (internal use) */
2481 struct __bt_plugin_component_class_descriptor
{
2483 * Plugin descriptor to which to associate this component
2486 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2488 /* Component class name */
2491 /* Component class type */
2492 bt_component_class_type type
;
2494 /* Mandatory methods (depends on component class type) */
2496 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
2498 bt_message_iterator_class_next_method msg_iter_next
;
2501 /* BT_COMPONENT_CLASS_TYPE_FILTER */
2503 bt_message_iterator_class_next_method msg_iter_next
;
2506 /* BT_COMPONENT_CLASS_TYPE_SINK */
2508 bt_component_class_sink_consume_method consume
;
2511 } __attribute__((packed
));
2513 /* Type of a component class attribute (internal use) */
2514 enum __bt_plugin_component_class_descriptor_attribute_type
{
2515 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
2516 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
2517 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD
= 2,
2518 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD
= 3,
2519 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 4,
2520 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 5,
2521 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 6,
2522 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 7,
2523 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD
= 8,
2524 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD
= 9,
2525 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 10,
2526 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD
= 11,
2527 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD
= 12,
2528 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD
= 13,
2529 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD
= 14,
2532 /* Component class attribute (internal use) */
2533 struct __bt_plugin_component_class_descriptor_attribute
{
2535 * Component class plugin attribute to which to associate this
2536 * component class attribute.
2538 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
2540 /* Name of the attribute's type for debug purposes */
2541 const char *type_name
;
2543 /* Attribute's type */
2544 enum __bt_plugin_component_class_descriptor_attribute_type type
;
2546 /* Attribute's value (depends on attribute's type) */
2548 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2549 const char *description
;
2551 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
2554 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD */
2555 bt_component_class_source_get_supported_mip_versions_method source_get_supported_mip_versions_method
;
2556 bt_component_class_filter_get_supported_mip_versions_method filter_get_supported_mip_versions_method
;
2557 bt_component_class_sink_get_supported_mip_versions_method sink_get_supported_mip_versions_method
;
2559 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD */
2560 bt_component_class_source_initialize_method source_initialize_method
;
2561 bt_component_class_filter_initialize_method filter_initialize_method
;
2562 bt_component_class_sink_initialize_method sink_initialize_method
;
2564 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
2565 bt_component_class_source_finalize_method source_finalize_method
;
2566 bt_component_class_filter_finalize_method filter_finalize_method
;
2567 bt_component_class_sink_finalize_method sink_finalize_method
;
2569 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
2570 bt_component_class_source_query_method source_query_method
;
2571 bt_component_class_filter_query_method filter_query_method
;
2572 bt_component_class_sink_query_method sink_query_method
;
2574 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
2575 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
2576 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
2578 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
2579 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
2580 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
2582 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */
2583 bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method
;
2585 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD */
2586 bt_message_iterator_class_initialize_method msg_iter_initialize_method
;
2588 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
2589 bt_message_iterator_class_finalize_method msg_iter_finalize_method
;
2591 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
2592 bt_message_iterator_class_seek_ns_from_origin_method msg_iter_seek_ns_from_origin_method
;
2594 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
2595 bt_message_iterator_class_seek_beginning_method msg_iter_seek_beginning_method
;
2597 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
2598 bt_message_iterator_class_can_seek_ns_from_origin_method msg_iter_can_seek_ns_from_origin_method
;
2600 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
2601 bt_message_iterator_class_can_seek_beginning_method msg_iter_can_seek_beginning_method
;
2603 } __attribute__((packed
));
2605 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
2606 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
2607 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
2608 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
2609 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
2610 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
2611 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
2612 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
2615 * Defines a plugin attribute (generic, internal use).
2617 * _attr_name: Name of the attribute (C identifier).
2618 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
2619 * _id: Plugin descriptor ID (C identifier).
2622 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
2623 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
2624 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
2625 .type_name = #_attr_name, \
2626 .type = _attr_type, \
2627 .value = { ._attr_name = _x }, \
2629 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
2631 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
2632 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
2635 * Defines a component class descriptor attribute (generic, internal
2638 * _id: Plugin descriptor ID (C identifier).
2639 * _component_class_id: Component class ID (C identifier).
2640 * _type: Component class type (`source`, `filter`, or `sink`).
2641 * _attr_name: Name of the attribute (C identifier).
2642 * _attr_type: Type of the attribute
2643 * (enum __bt_plugin_descriptor_attribute_type).
2646 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _component_class_id, _type, _x) \
2647 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name = { \
2648 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_component_class_id, \
2649 .type_name = #_attr_name, \
2650 .type = _attr_type, \
2651 .value = { ._attr_name = _x }, \
2653 static struct __bt_plugin_component_class_descriptor_attribute const * const __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS = &__bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name
2656 * Clang supports the no_sanitize variable attribute on global variables.
2657 * GCC only supports the no_sanitize_address function attribute, which is
2658 * not what we need. This is fine because, as far as we have seen, gcc
2659 * does not insert red zones around global variables.
2661 #if defined(__clang__)
2662 # if __has_feature(address_sanitizer)
2663 # define __bt_plugin_variable_attribute_no_sanitize_address \
2664 __attribute__((no_sanitize("address")))
2666 # define __bt_plugin_variable_attribute_no_sanitize_address
2669 # define __bt_plugin_variable_attribute_no_sanitize_address
2673 * Variable attributes for a plugin descriptor pointer to be added to
2674 * the plugin descriptor section (internal use).
2677 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2678 __attribute__((section("__DATA,btp_desc"), used)) \
2679 __bt_plugin_variable_attribute_no_sanitize_address
2681 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2682 __start___bt_plugin_descriptors
2684 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2685 __stop___bt_plugin_descriptors
2687 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
2688 __asm("section$start$__DATA$btp_desc")
2690 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
2691 __asm("section$end$__DATA$btp_desc")
2695 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2696 __attribute__((section("__bt_plugin_descriptors"), used)) \
2697 __bt_plugin_variable_attribute_no_sanitize_address
2699 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2700 __start___bt_plugin_descriptors
2702 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2703 __stop___bt_plugin_descriptors
2705 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
2707 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
2711 * Variable attributes for a plugin attribute pointer to be added to
2712 * the plugin attribute section (internal use).
2715 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2716 __attribute__((section("__DATA,btp_desc_att"), used)) \
2717 __bt_plugin_variable_attribute_no_sanitize_address
2719 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2720 __start___bt_plugin_descriptor_attributes
2722 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2723 __stop___bt_plugin_descriptor_attributes
2725 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2726 __asm("section$start$__DATA$btp_desc_att")
2728 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2729 __asm("section$end$__DATA$btp_desc_att")
2733 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2734 __attribute__((section("__bt_plugin_descriptor_attributes"), used)) \
2735 __bt_plugin_variable_attribute_no_sanitize_address
2737 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2738 __start___bt_plugin_descriptor_attributes
2740 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2741 __stop___bt_plugin_descriptor_attributes
2743 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2745 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2749 * Variable attributes for a component class descriptor pointer to be
2750 * added to the component class descriptor section (internal use).
2753 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2754 __attribute__((section("__DATA,btp_cc_desc"), used)) \
2755 __bt_plugin_variable_attribute_no_sanitize_address
2757 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2758 __start___bt_plugin_component_class_descriptors
2760 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2761 __stop___bt_plugin_component_class_descriptors
2763 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
2764 __asm("section$start$__DATA$btp_cc_desc")
2766 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
2767 __asm("section$end$__DATA$btp_cc_desc")
2771 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2772 __attribute__((section("__bt_plugin_component_class_descriptors"), used)) \
2773 __bt_plugin_variable_attribute_no_sanitize_address
2775 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2776 __start___bt_plugin_component_class_descriptors
2778 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2779 __stop___bt_plugin_component_class_descriptors
2781 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
2783 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
2787 * Variable attributes for a component class descriptor attribute
2788 * pointer to be added to the component class descriptor attribute
2789 * section (internal use).
2792 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2793 __attribute__((section("__DATA,btp_cc_desc_att"), used)) \
2794 __bt_plugin_variable_attribute_no_sanitize_address
2796 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2797 __start___bt_plugin_component_class_descriptor_attributes
2799 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2800 __stop___bt_plugin_component_class_descriptor_attributes
2802 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2803 __asm("section$start$__DATA$btp_cc_desc_att")
2805 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2806 __asm("section$end$__DATA$btp_cc_desc_att")
2810 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2811 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) \
2812 __bt_plugin_variable_attribute_no_sanitize_address
2814 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2815 __start___bt_plugin_component_class_descriptor_attributes
2817 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2818 __stop___bt_plugin_component_class_descriptor_attributes
2820 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2822 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2829 #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */