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")))
36 @defgroup api-plugin-dev Plugin development
39 Shared object plugin development.
41 This module offers macros to create a \bt_name shared object plugin.
43 Behind the scenes, the <code>BT_PLUGIN_*()</code> macros of this module
44 create and fill global tables which are located in sections of the
45 shared object with specific names. The \ref api-plugin functions can
46 load the resulting shared object file and create corresponding
49 See \ref guide-comp-link-plugin-so.
51 <h1>Plugin definition C file structure</h1>
53 The structure of a \bt_name plugin definition C file is as such:
65 Define a \bt_name plugin with BT_PLUGIN() if the plugin's name is a
66 valid C identifier, or with BT_PLUGIN_WITH_ID() otherwise.
68 See \ref api-plugin-dev-custom-plugin-id "Custom plugin ID" to
69 learn more about plugin IDs.
72 When you use BT_PLUGIN(), the plugin's ID is <code>auto</code>.
76 \bt_dt_opt Use any of the following macros (or their
77 <code>*_WITH_ID()</code> counterpart) \em once to set the properties
81 - BT_PLUGIN_DESCRIPTION()
87 \bt_dt_opt Use any of the following macros (or their
88 <code>*_WITH_ID()</code> counterpart) \em once to set the
89 initialization and finalization functions of the plugin:
91 - BT_PLUGIN_INITIALIZE_FUNC()
92 - BT_PLUGIN_FINALIZE_FUNC()
94 A plugin's initialization function is executed when the shared
95 object is loaded (see \ref api-plugin).
97 A plugin's finalization function is executed when the \bt_plugin
98 object is destroyed, if the initialization function (if any)
103 Use any of the following macros (or their <code>*_WITH_ID()</code>
104 counterpart) to add a component class to the plugin:
106 - BT_PLUGIN_SOURCE_COMPONENT_CLASS()
107 - BT_PLUGIN_FILTER_COMPONENT_CLASS()
108 - BT_PLUGIN_SINK_COMPONENT_CLASS()
112 \bt_dt_opt Depending on the type of the component class of step 5,
113 use any of the following macros (or their <code>*_WITH_ID()</code>
115 \em once to set its properties:
118 <dt>\bt_c_src_comp_cls</dt>
120 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION()
121 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP()
124 <dt>\bt_c_flt_comp_cls</dt>
126 - BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION()
127 - BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP()
130 <dt>\bt_c_sink_comp_cls</dt>
132 - BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION()
133 - BT_PLUGIN_SINK_COMPONENT_CLASS_HELP()
139 \bt_dt_opt Depending on the type of the component class of step 5,
140 use any of the following macros (or their <code>*_WITH_ID()</code>
141 counterpart) to set its optional methods:
144 <dt>Source component class</dt>
146 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD()
147 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
148 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD()
149 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
150 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
151 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
152 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD()
155 <dt>Filter component class</dt>
157 - BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD()
158 - BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
159 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD()
160 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
161 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
162 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
163 - BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
164 - BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD()
167 <dt>Sink component class</dt>
169 - BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD()
170 - BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
171 - BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD()
172 - BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD()
173 - BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
174 - BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD()
180 You can repeat steps 5 to 7 to add more than one component class to a
183 See \ref example-simple-plugin-def-file for a concrete example of how
184 to use the macros of this module.
186 <h1>\anchor api-plugin-dev-custom-plugin-id Custom plugin ID</h1>
188 The BT_PLUGIN() macro defines a plugin with a specific name and the
189 ID <code>auto</code>.
191 All the <code>BT_PLUGIN_*()</code> macros which do not end with
192 <code>_WITH_ID</code> refer to the <code>auto</code> plugin.
194 There are two situations which demand that you use a custom plugin ID:
196 - You want more than one plugin contained in your shared object file.
198 Although the \bt_name project does not recommend this, it is possible.
199 This is why bt_plugin_find_all_from_file() returns a \bt_plugin_set
200 instead of a single \bt_plugin.
202 In this case, each plugin of the shared object needs its own, unique
205 - You want to give the plugin a name which is not a valid C identifier.
207 The BT_PLUGIN() macro accepts a C identifier as the plugin name, while
208 the BT_PLUGIN_WITH_ID() accepts a C identifier for the ID and a C
211 To define a plugin with a specific ID, use BT_PLUGIN_WITH_ID(), for
215 BT_PLUGIN_WITH_ID(my_plugin_id, "my-plugin-name");
218 Then, use the <code>BT_PLUGIN_*_WITH_ID()</code> macros to refer to
219 this specific plugin, for example:
222 BT_PLUGIN_AUTHOR_WITH_ID(my_plugin_id, "Patrick Bouchard");
227 You can still use the <code>auto</code> ID with BT_PLUGIN_WITH_ID()
228 to use the simpler macros afterwards while still giving the plugin a
229 name which is not a valid C identifier, for example:
232 BT_PLUGIN_WITH_ID(auto, "my-plugin-name");
233 BT_PLUGIN_AUTHOR("Patrick Bouchard");
237 <h1>Custom component class ID</h1>
239 The BT_PLUGIN_SOURCE_COMPONENT_CLASS(),
240 BT_PLUGIN_FILTER_COMPONENT_CLASS(), and
241 BT_PLUGIN_SINK_COMPONENT_CLASS() add a component class with a specific
242 name to the plugin having the ID <code>auto</code>.
244 The name you pass to those macros must be a valid C identifier and it
245 also serves as the component class's ID within the <code>auto</code>
248 There are two situations which demand that you use a custom component
251 - You want to add the component class to a specific plugin (other than
252 <code>auto</code>, if you have more than one).
254 - You want to give the component class a name which is not a valid C
257 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros accept a
258 C identifier for the component class ID and a string for its name.
260 For a given plugin and for a given component class type, all component
261 class IDs must be unique.
263 To add a component class having a specific ID to a plugin,
264 use the BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(),
265 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(), and
266 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() macros, for example:
269 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(my_plugin_id, my_comp_class_id,
270 "my-source", my_source_iter_next);
275 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros
276 specify the ID of the plugin to which to add the component class.
278 If you use the BT_PLUGIN() macro to define your plugin, then its
279 ID is <code>auto</code>:
282 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, my_comp_class_id,
283 "my-source", my_source_iter_next);
287 Then, use the <code>BT_PLUGIN_*_COMPONENT_CLASS_*_WITH_ID()</code>
288 macros to refer to this specific component class, for example:
291 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(my_plugin_id,
292 my_comp_class_id, my_source_finalize);
302 @typedef struct bt_self_plugin bt_self_plugin;
317 Defines a plugin module.
319 In a plugin define C file, you must use this macro before you use any
320 other <code>BT_PLUGIN*()</code> macro.
322 #define BT_PLUGIN_MODULE() \
323 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
324 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
325 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
327 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
328 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
329 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
331 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
332 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
333 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
335 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; \
336 _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; \
337 _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; \
339 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
341 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
343 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
345 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
347 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
349 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
351 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
353 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
355 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
357 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
359 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
361 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
363 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
365 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
367 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
369 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
375 @name Plugin definition
381 Defines a plugin named \bt_p{_name} and having the ID \bt_p{_id}.
387 Plugin's ID, unique amongst all the plugin IDs of the same shared
392 <code>const char *</code>
397 @bt_pre_not_null{_name}
399 #define BT_PLUGIN_WITH_ID(_id, _name) \
400 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
403 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
407 Alias of BT_PLUGIN_WITH_ID() with the \bt_p{_id} parameter set to
410 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
415 @name Plugin properties
421 Sets the description of the plugin having the ID \bt_p{_id} to
424 See the \ref api-comp-cls-prop-descr "description" property.
430 ID of the plugin of which to set the description.
432 @param[in] _description
434 <code>const char *</code>
436 Plugin's description.
439 @bt_pre_not_null{_description}
441 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _description) \
442 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _description)
446 Alias of BT_PLUGIN_DESCRIPTION_WITH_ID() with the \bt_p{_id}
447 parameter set to <code>auto</code>.
449 #define BT_PLUGIN_DESCRIPTION(_description) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _description)
453 Sets the name(s) of the author(s) of the plugin having the ID
454 \bt_p{_id} to \bt_p{_author}.
456 See the \ref api-plugin-prop-author "author name(s)" property.
462 ID of the plugin of which to set the author(s).
466 <code>const char *</code>
471 @bt_pre_not_null{_author}
473 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _author) \
474 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _author)
478 Alias of BT_PLUGIN_AUTHOR_WITH_ID() with the \bt_p{_id}
479 parameter set to <code>auto</code>.
481 #define BT_PLUGIN_AUTHOR(_author) BT_PLUGIN_AUTHOR_WITH_ID(auto, _author)
485 Sets the license (name or full) of the plugin having the ID
486 \bt_p{_id} to \bt_p{_license}.
488 See the \ref api-plugin-prop-license "license" property.
494 ID of the plugin of which to set the license.
498 <code>const char *</code>
503 @bt_pre_not_null{_license}
505 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _license) \
506 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _license)
510 Alias of BT_PLUGIN_LICENSE_WITH_ID() with the \bt_p{_id}
511 parameter set to <code>auto</code>.
513 #define BT_PLUGIN_LICENSE(_license) BT_PLUGIN_LICENSE_WITH_ID(auto, _license)
517 Sets the version of the plugin having the ID \bt_p{_id} to
520 See the \ref api-plugin-prop-version "version" property.
526 ID of the plugin of which to set the version.
530 <code>unsigned int</code>
532 Plugin's major version.
536 <code>unsigned int</code>
538 Plugin's minor version.
542 <code>unsigned int</code>
544 Plugin's patch version.
548 <code>const char *</code>
550 Plugin's version's extra information.
552 Can be \c NULL if the plugin's version has no extra information.
555 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
556 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
560 Alias of BT_PLUGIN_VERSION_WITH_ID() with the \bt_p{_id}
561 parameter set to <code>auto</code>.
563 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
568 @name Plugin functions
574 Status codes for #bt_plugin_initialize_func.
576 typedef enum bt_plugin_initialize_func_status
{
581 BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
= __BT_FUNC_STATUS_OK
,
587 BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
593 BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
594 } bt_plugin_initialize_func_status
;
598 User plugin initialization function.
600 @param[in] self_plugin
604 This parameter is a private view of the \bt_plugin object for
607 As of \bt_name_version_min_maj, there's no self plugin API.
610 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
612 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
614 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
617 @bt_pre_not_null{self_plugin}
619 typedef bt_plugin_initialize_func_status (*bt_plugin_initialize_func
)(
620 bt_self_plugin
*self_plugin
);
624 Sets the initialization function of the plugin having the ID
625 \bt_p{_id} to \bt_p{_func}.
631 ID of the plugin of which to set the initialization function.
635 #bt_plugin_initialize_func
637 Plugin's initialization function.
640 @bt_pre_not_null{_func}
642 #define BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(_id, _func) \
643 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _func)
647 Alias of BT_PLUGIN_INITIALIZE_FUNC_WITH_ID() with the \bt_p{_id}
648 parameter set to <code>auto</code>.
650 #define BT_PLUGIN_INITIALIZE_FUNC(_func) BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(auto, _func)
654 User plugin finalization function.
656 typedef void (*bt_plugin_finalize_func
)(void);
660 Sets the finalization function of the plugin having the ID
661 \bt_p{_id} to \bt_p{_func}.
667 ID of the plugin of which to set the finalization function.
671 #bt_plugin_finalize_func
673 Plugin's finalization function.
676 @bt_pre_not_null{_func}
678 #define BT_PLUGIN_FINALIZE_FUNC_WITH_ID(_id, _func) \
679 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _func)
683 Alias of BT_PLUGIN_FINALIZE_FUNC_WITH_ID() with the \bt_p{_id}
684 parameter set to <code>auto</code>.
686 #define BT_PLUGIN_FINALIZE_FUNC(_func) BT_PLUGIN_FINALIZE_FUNC_WITH_ID(auto, _func)
691 @name Component class adding
697 Adds a \bt_src_comp_cls named \bt_p{_name}, having the ID
698 \bt_p{_component_class_id} and the message iterator class's "next"
699 method \bt_p{_message_iterator_class_next_method}, to the plugin
700 having the ID \bt_p{_plugin_id}.
702 @param[in] _plugin_id
706 ID of the plugin to which to add the source component class.
708 @param[in] _component_class_id
712 Source component class's ID, unique amongst all the source component
713 class IDs of the same plugin.
717 <code>const char *</code>
719 Source component class's name, unique amongst all the source
720 component class names of the same plugin.
722 @param[in] _message_iterator_class_next_method
724 #bt_message_iterator_class_next_method
726 Source component class's message iterator class's "next" method.
729 @bt_pre_not_null{_name}
730 @bt_pre_not_null{_message_iterator_class_next_method}
732 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
733 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
734 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
736 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
737 .methods = { .source = { .msg_iter_next = _message_iterator_class_next_method } }, \
739 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
743 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID() with the
744 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
745 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
746 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
752 Passed as both the \bt_p{_component_class_id} and the
753 \bt_p{_name} (once converted to a string) parameters of
754 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID().
757 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
758 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
762 Adds a \bt_flt_comp_cls named \bt_p{_name}, having the ID
763 \bt_p{_component_class_id} and the message iterator class's "next"
764 method \bt_p{_message_iterator_class_next_method}, to the plugin
765 having the ID \bt_p{_plugin_id}.
767 @param[in] _plugin_id
771 ID of the plugin to which to add the filter component class.
773 @param[in] _component_class_id
777 Filter component class's ID, unique amongst all the filter component
778 class IDs of the same plugin.
782 <code>const char *</code>
784 Filter component class's name, unique amongst all the filter
785 component class names of the same plugin.
787 @param[in] _message_iterator_class_next_method
789 #bt_message_iterator_class_next_method
791 Filter component class's message iterator class's "next" method.
794 @bt_pre_not_null{_name}
795 @bt_pre_not_null{_message_iterator_class_next_method}
797 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
798 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
799 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
801 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
802 .methods = { .filter = { .msg_iter_next = _message_iterator_class_next_method } }, \
804 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
808 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID() with the
809 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
810 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
811 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
817 Passed as both the \bt_p{_component_class_id} and the
818 \bt_p{_name} (once converted to a string) parameters of
819 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID().
822 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
823 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
827 Adds a \bt_sink_comp_cls named \bt_p{_name}, having the ID
828 \bt_p{_component_class_id} and the consuming method
829 \bt_p{_consume_method}, to the plugin
830 having the ID \bt_p{_plugin_id}.
832 @param[in] _plugin_id
836 ID of the plugin to which to add the sink component class.
838 @param[in] _component_class_id
842 Sink component class's ID, unique amongst all the sink component
843 class IDs of the same plugin.
847 <code>const char *</code>
849 Sink component class's name, unique amongst all the sink
850 component class names of the same plugin.
852 @param[in] _consume_method
854 #bt_component_class_sink_consume_method
856 Sink component class's message iterator class's "next" method.
859 @bt_pre_not_null{_name}
860 @bt_pre_not_null{_consume_method}
862 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _consume_method) \
863 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
864 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
866 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
867 .methods = { .sink = { .consume = _consume_method } }, \
869 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
873 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() with the
874 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
875 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
876 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
882 Passed as both the \bt_p{_component_class_id} and the
883 \bt_p{_name} (once converted to a string) parameters of
884 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID().
887 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
888 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
893 @name Source component class properties
899 Sets the description of the \bt_src_comp_cls having the ID
900 \bt_p{_component_class_id} in the plugin having the ID
901 \bt_p{_plugin_id} to \bt_p{_description}.
903 See the \ref api-comp-cls-prop-descr "description" property.
905 @param[in] _plugin_id
909 ID of the plugin which contains the source component class of which
910 to set the description.
912 @param[in] _component_class_id
916 ID of the source component class, within the plugin having the ID
917 \bt_p{_plugin_id}, of which to set the description to
920 @param[in] _description
922 <code>const char *</code>
924 Source component class's description.
927 @bt_pre_not_null{_description}
929 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
930 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, source, _description)
934 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
935 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
936 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
938 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
939 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
943 Sets the help text of the \bt_src_comp_cls having the ID
944 \bt_p{_component_class_id} in the plugin having the ID
945 \bt_p{_plugin_id} to \bt_p{_help_text}.
947 See the \ref api-comp-cls-prop-help "help text" property.
949 @param[in] _plugin_id
953 ID of the plugin which contains the source component class of which
954 to set the help text.
956 @param[in] _component_class_id
960 ID of the source component class, within the plugin having the ID
961 \bt_p{_plugin_id}, of which to set the help text to
964 @param[in] _help_text
966 <code>const char *</code>
968 Source component class's help text.
971 @bt_pre_not_null{_help_text}
973 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
974 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, source, _help_text)
978 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID() with the
979 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
980 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
982 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _help_text) \
983 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
988 @name Filter component class properties
994 Sets the description of the \bt_flt_comp_cls having the ID
995 \bt_p{_component_class_id} in the plugin having the ID
996 \bt_p{_plugin_id} to \bt_p{_description}.
998 See the \ref api-comp-cls-prop-descr "description" property.
1000 @param[in] _plugin_id
1004 ID of the plugin which contains the filter component class of which
1005 to set the description.
1007 @param[in] _component_class_id
1011 ID of the filter component class, within the plugin having the ID
1012 \bt_p{_plugin_id}, of which to set the description to
1013 \bt_p{_description}.
1015 @param[in] _description
1017 <code>const char *</code>
1019 Filter component class's description.
1022 @bt_pre_not_null{_description}
1024 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1025 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, filter, _description)
1029 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1030 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1031 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1033 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1034 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1038 Sets the help text of the \bt_flt_comp_cls having the ID
1039 \bt_p{_component_class_id} in the plugin having the ID
1040 \bt_p{_plugin_id} to \bt_p{_help_text}.
1042 See the \ref api-comp-cls-prop-help "help text" property.
1044 @param[in] _plugin_id
1048 ID of the plugin which contains the filter component class of which
1049 to set the help text.
1051 @param[in] _component_class_id
1055 ID of the filter component class, within the plugin having the ID
1056 \bt_p{_plugin_id}, of which to set the help text to
1059 @param[in] _help_text
1061 <code>const char *</code>
1063 Filter component class's help text.
1066 @bt_pre_not_null{_help_text}
1068 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1069 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, filter, _help_text)
1073 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID() with the
1074 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1075 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1077 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _help_text) \
1078 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1083 @name Sink component class properties
1089 Sets the description of the \bt_sink_comp_cls having the ID
1090 \bt_p{_component_class_id} in the plugin having the ID
1091 \bt_p{_plugin_id} to \bt_p{_description}.
1093 See the \ref api-comp-cls-prop-descr "description" property.
1095 @param[in] _plugin_id
1099 ID of the plugin which contains the sink component class of which
1100 to set the description.
1102 @param[in] _component_class_id
1106 ID of the sink component class, within the plugin having the ID
1107 \bt_p{_plugin_id}, of which to set the description to
1108 \bt_p{_description}.
1110 @param[in] _description
1112 <code>const char *</code>
1114 Sink component class's description.
1117 @bt_pre_not_null{_description}
1119 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1120 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, sink, _description)
1124 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1125 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1126 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1128 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1129 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1133 Sets the help text of the \bt_sink_comp_cls having the ID
1134 \bt_p{_component_class_id} in the plugin having the ID
1135 \bt_p{_plugin_id} to \bt_p{_help_text}.
1137 See the \ref api-comp-cls-prop-help "help text" property.
1139 @param[in] _plugin_id
1143 ID of the plugin which contains the sink component class of which
1144 to set the help text.
1146 @param[in] _component_class_id
1150 ID of the sink component class, within the plugin having the ID
1151 \bt_p{_plugin_id}, of which to set the help text to
1154 @param[in] _help_text
1156 <code>const char *</code>
1158 Sink component class's help text.
1161 @bt_pre_not_null{_help_text}
1163 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1164 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, sink, _help_text)
1168 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID() with
1169 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1170 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1172 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _help_text) \
1173 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1178 @name Source component class methods
1184 Sets the finalization method of the \bt_src_comp_cls having the ID
1185 \bt_p{_component_class_id} in the plugin having the ID
1186 \bt_p{_plugin_id} to \bt_p{_method}.
1188 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1190 @param[in] _plugin_id
1194 ID of the plugin which contains the source component class of which
1195 to set the finalization method.
1197 @param[in] _component_class_id
1201 ID of the source component class, within the plugin having the ID
1202 \bt_p{_plugin_id}, of which to set the finalization method to
1207 #bt_component_class_source_finalize_method
1209 Source component class's finalization method.
1212 @bt_pre_not_null{_method}
1214 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1215 __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)
1220 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1221 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1222 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1224 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1225 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1229 Sets the \"get supported \bt_mip versions\" method of the
1230 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1231 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1233 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1236 @param[in] _plugin_id
1240 ID of the plugin which contains the source component class of which
1241 to set the "get supported MIP versions" method.
1243 @param[in] _component_class_id
1247 ID of the source component class, within the plugin having the ID
1248 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1249 method to \bt_p{_method}.
1253 #bt_component_class_source_get_supported_mip_versions_method
1255 Source component class's "get supported MIP versions" method.
1258 @bt_pre_not_null{_method}
1260 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1261 __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)
1266 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1267 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1268 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1270 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1271 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1275 Sets the initialization method of the \bt_src_comp_cls having the ID
1276 \bt_p{_component_class_id} in the plugin having the ID
1277 \bt_p{_plugin_id} to \bt_p{_method}.
1279 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1281 @param[in] _plugin_id
1285 ID of the plugin which contains the source component class of which
1286 to set the initialization method.
1288 @param[in] _component_class_id
1292 ID of the source component class, within the plugin having the ID
1293 \bt_p{_plugin_id}, of which to set the initialization method to
1298 #bt_component_class_source_initialize_method
1300 Source component class's initialization method.
1303 @bt_pre_not_null{_method}
1305 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1306 __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)
1311 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1312 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1313 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1315 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1316 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1320 Sets the finalization method of the \bt_msg_iter_cls of the
1321 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1322 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1324 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1326 @param[in] _plugin_id
1330 ID of the plugin which contains the source component class of which
1331 to set the finalization method of the message iterator class.
1333 @param[in] _component_class_id
1337 ID of the source component class, within the plugin having the ID
1338 \bt_p{_plugin_id}, of which to set the finalization method of the
1339 message iterator class to \bt_p{_method}.
1343 #bt_message_iterator_class_finalize_method
1345 Source component class's message iterator class's finalization method.
1348 @bt_pre_not_null{_method}
1350 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1351 __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)
1356 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1357 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1358 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1360 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1361 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1365 Sets the initialization method of the \bt_msg_iter_cls of the
1366 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1367 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1369 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1371 @param[in] _plugin_id
1375 ID of the plugin which contains the source component class of which
1376 to set the initialization method of the message iterator class.
1378 @param[in] _component_class_id
1382 ID of the source component class, within the plugin having the ID
1383 \bt_p{_plugin_id}, of which to set the initialization method of the
1384 message iterator class to \bt_p{_method}.
1388 #bt_message_iterator_class_initialize_method
1390 Source component class's message iterator class's initialization
1394 @bt_pre_not_null{_method}
1396 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1397 __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)
1402 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1403 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1404 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1406 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1407 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1411 Sets the "seek beginning" and "can seek beginning?" methods of the
1412 \bt_msg_iter_cls of the \bt_src_comp_cls having the ID
1413 \bt_p{_component_class_id} in the plugin having the ID
1414 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1415 \bt_p{_can_seek_method}.
1417 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1418 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1420 @param[in] _plugin_id
1424 ID of the plugin which contains the source component class of which
1425 to set the "seek beginning" and "can seek beginning?" methods of the
1426 message iterator class.
1428 @param[in] _component_class_id
1432 ID of the source component class, within the plugin having the ID
1433 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1434 seek beginning" methods of the message iterator class to
1435 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1437 @param[in] _seek_method
1439 #bt_message_iterator_class_seek_beginning_method
1441 Source component class's message iterator class's "seek beginning"
1444 @param[in] _can_seek_method
1446 #bt_message_iterator_class_can_seek_beginning_method
1448 Source component class's message iterator class's
1449 "can seek beginning?" method.
1451 Can be \c NULL, in which case it is equivalent to setting a method
1452 which always returns #BT_TRUE.
1455 @bt_pre_not_null{_seek_method}
1456 @bt_pre_not_null{_can_seek_method}
1458 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1459 __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); \
1460 __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)
1465 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS()
1466 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1467 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1469 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1470 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1474 Sets the "seek ns from origin" and "can seek ns from origin?"
1475 methods of the \bt_msg_iter_cls of the \bt_src_comp_cls having the
1476 ID \bt_p{_component_class_id} in the plugin having the ID
1477 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1478 \bt_p{_can_seek_method}.
1480 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1481 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
1484 @param[in] _plugin_id
1488 ID of the plugin which contains the source component class of which
1489 to set the "seek ns from origin" and "can seek ns from origin?"
1490 methods of the message iterator class.
1492 @param[in] _component_class_id
1496 ID of the source component class, within the plugin having the ID
1497 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
1498 "can seek ns from origin" methods of the message iterator class to
1499 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1501 @param[in] _seek_method
1503 #bt_message_iterator_class_seek_ns_from_origin_method
1505 Source component class's message iterator class's "seek ns from
1508 @param[in] _can_seek_method
1510 #bt_message_iterator_class_can_seek_ns_from_origin_method
1512 Source component class's message iterator class's "can seek ns from
1515 Can be \c NULL, in which case it is equivalent to setting a method
1516 which always returns #BT_TRUE.
1519 @bt_pre_not_null{_seek_method}
1520 @bt_pre_not_null{_can_seek_method}
1522 #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) \
1523 __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); \
1524 __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)
1529 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
1530 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1531 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1533 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
1534 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1538 Sets the "output port connected" method of the \bt_src_comp_cls
1539 having the ID \bt_p{_component_class_id} in the plugin having the ID
1540 \bt_p{_plugin_id} to \bt_p{_method}.
1543 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
1546 @param[in] _plugin_id
1550 ID of the plugin which contains the source component class of which
1551 to set the "output port connected" method.
1553 @param[in] _component_class_id
1557 ID of the source component class, within the plugin having the ID
1558 \bt_p{_plugin_id}, of which to set the "output port connected"
1559 method to \bt_p{_method}.
1563 #bt_component_class_source_output_port_connected_method
1565 Source component class's "output port connected" method.
1568 @bt_pre_not_null{_method}
1570 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1571 __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)
1576 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
1577 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1578 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1580 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
1581 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1585 Sets the query method of the \bt_src_comp_cls
1586 having the ID \bt_p{_component_class_id} in the plugin having the ID
1587 \bt_p{_plugin_id} to \bt_p{_method}.
1589 See the \ref api-comp-cls-dev-meth-query "query" method.
1591 @param[in] _plugin_id
1595 ID of the plugin which contains the source component class of which
1596 to set the query method.
1598 @param[in] _component_class_id
1602 ID of the source component class, within the plugin having the ID
1603 \bt_p{_plugin_id}, of which to set the query
1604 method to \bt_p{_method}.
1608 #bt_component_class_source_query_method
1610 Source component class's query method.
1613 @bt_pre_not_null{_method}
1615 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1616 __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)
1621 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
1622 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1623 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1625 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
1626 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
1631 @name Filter component class methods
1637 Sets the finalization method of the \bt_flt_comp_cls having the ID
1638 \bt_p{_component_class_id} in the plugin having the ID
1639 \bt_p{_plugin_id} to \bt_p{_method}.
1641 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1643 @param[in] _plugin_id
1647 ID of the plugin which contains the filter component class of which
1648 to set the finalization method.
1650 @param[in] _component_class_id
1654 ID of the filter component class, within the plugin having the ID
1655 \bt_p{_plugin_id}, of which to set the finalization method to
1660 #bt_component_class_filter_finalize_method
1662 Filter component class's finalization method.
1665 @bt_pre_not_null{_method}
1667 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1668 __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)
1673 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1674 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1675 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1677 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1678 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1682 Sets the \"get supported \bt_mip versions\" method of the
1683 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1684 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1686 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1689 @param[in] _plugin_id
1693 ID of the plugin which contains the filter component class of which
1694 to set the "get supported MIP versions" method.
1696 @param[in] _component_class_id
1700 ID of the filter component class, within the plugin having the ID
1701 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1702 method to \bt_p{_method}.
1706 #bt_component_class_filter_get_supported_mip_versions_method
1708 Filter component class's "get supported MIP versions" method.
1711 @bt_pre_not_null{_method}
1713 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1714 __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)
1719 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1720 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1721 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1723 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1724 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1728 Sets the initialization method of the \bt_flt_comp_cls having the ID
1729 \bt_p{_component_class_id} in the plugin having the ID
1730 \bt_p{_plugin_id} to \bt_p{_method}.
1732 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1734 @param[in] _plugin_id
1738 ID of the plugin which contains the filter component class of which
1739 to set the initialization method.
1741 @param[in] _component_class_id
1745 ID of the filter component class, within the plugin having the ID
1746 \bt_p{_plugin_id}, of which to set the initialization method to
1751 #bt_component_class_filter_initialize_method
1753 Filter component class's initialization method.
1756 @bt_pre_not_null{_method}
1758 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1759 __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)
1764 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1765 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1766 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1768 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1769 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1773 Sets the "input port connected" method of the \bt_flt_comp_cls
1774 having the ID \bt_p{_component_class_id} in the plugin having the ID
1775 \bt_p{_plugin_id} to \bt_p{_method}.
1778 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
1781 @param[in] _plugin_id
1785 ID of the plugin which contains the filter component class of which
1786 to set the "input port connected" method.
1788 @param[in] _component_class_id
1792 ID of the filter component class, within the plugin having the ID
1793 \bt_p{_plugin_id}, of which to set the "input port connected"
1794 method to \bt_p{_method}.
1798 #bt_component_class_filter_input_port_connected_method
1800 Filter component class's "input port connected" method.
1803 @bt_pre_not_null{_method}
1805 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1806 __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)
1811 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
1812 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1813 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1815 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
1816 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1820 Sets the finalization method of the \bt_msg_iter_cls of the
1821 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1822 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1824 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1826 @param[in] _plugin_id
1830 ID of the plugin which contains the filter component class of which
1831 to set the finalization method of the message iterator class.
1833 @param[in] _component_class_id
1837 ID of the filter component class, within the plugin having the ID
1838 \bt_p{_plugin_id}, of which to set the finalization method of the
1839 message iterator class to \bt_p{_method}.
1843 #bt_message_iterator_class_finalize_method
1845 Filter component class's message iterator class's finalization method.
1848 @bt_pre_not_null{_method}
1850 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1851 __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)
1856 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1857 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1858 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1860 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1861 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1865 Sets the initialization method of the \bt_msg_iter_cls of the
1866 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1867 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1869 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1871 @param[in] _plugin_id
1875 ID of the plugin which contains the filter component class of which
1876 to set the initialization method of the message iterator class.
1878 @param[in] _component_class_id
1882 ID of the filter component class, within the plugin having the ID
1883 \bt_p{_plugin_id}, of which to set the initialization method of the
1884 message iterator class to \bt_p{_method}.
1888 #bt_message_iterator_class_initialize_method
1890 Filter component class's message iterator class's initialization
1894 @bt_pre_not_null{_method}
1896 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1897 __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)
1902 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1903 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1904 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1906 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1907 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1911 Sets the "seek beginning" and "can seek beginning?" methods of the
1912 \bt_msg_iter_cls of the \bt_flt_comp_cls having the ID
1913 \bt_p{_component_class_id} in the plugin having the ID
1914 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1915 \bt_p{_can_seek_method}.
1917 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1918 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1920 @param[in] _plugin_id
1924 ID of the plugin which contains the filter component class of which
1925 to set the "seek beginning" and "can seek beginning?" methods of the
1926 message iterator class.
1928 @param[in] _component_class_id
1932 ID of the filter component class, within the plugin having the ID
1933 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1934 seek beginning" methods of the message iterator class to
1935 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1937 @param[in] _seek_method
1939 #bt_message_iterator_class_seek_beginning_method
1941 Filter component class's message iterator class's "seek beginning"
1944 @param[in] _can_seek_method
1946 #bt_message_iterator_class_can_seek_beginning_method
1948 Filter component class's message iterator class's
1949 "can seek beginning?" method.
1951 Can be \c NULL, in which case it is equivalent to setting a method
1952 which always returns #BT_TRUE.
1955 @bt_pre_not_null{_seek_method}
1956 @bt_pre_not_null{_can_seek_method}
1958 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1959 __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); \
1960 __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);
1965 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID()
1966 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1967 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1969 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1970 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1974 Sets the "seek ns from origin" and "can seek ns from origin?"
1975 methods of the \bt_msg_iter_cls of the \bt_flt_comp_cls having the
1976 ID \bt_p{_component_class_id} in the plugin having the ID
1977 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1978 \bt_p{_can_seek_method}.
1980 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1981 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
1984 @param[in] _plugin_id
1988 ID of the plugin which contains the filter component class of which
1989 to set the "seek ns from origin" and "can seek ns from origin?"
1990 methods of the message iterator class.
1992 @param[in] _component_class_id
1996 ID of the filter component class, within the plugin having the ID
1997 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
1998 "can seek ns from origin" methods of the message iterator class to
1999 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
2001 @param[in] _seek_method
2003 #bt_message_iterator_class_seek_ns_from_origin_method
2005 Filter component class's message iterator class's "seek ns from
2008 @param[in] _can_seek_method
2010 #bt_message_iterator_class_can_seek_ns_from_origin_method
2012 Filter component class's message iterator class's "can seek ns from
2015 Can be \c NULL, in which case it is equivalent to setting a method
2016 which always returns #BT_TRUE.
2019 @bt_pre_not_null{_seek_method}
2020 @bt_pre_not_null{_can_seek_method}
2022 #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) \
2023 __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); \
2024 __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)
2029 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
2030 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2031 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2033 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
2034 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
2038 Sets the "output port connected" method of the \bt_flt_comp_cls
2039 having the ID \bt_p{_component_class_id} in the plugin having the ID
2040 \bt_p{_plugin_id} to \bt_p{_method}.
2043 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
2046 @param[in] _plugin_id
2050 ID of the plugin which contains the filter component class of which
2051 to set the "output port connected" method.
2053 @param[in] _component_class_id
2057 ID of the filter component class, within the plugin having the ID
2058 \bt_p{_plugin_id}, of which to set the "output port connected"
2059 method to \bt_p{_method}.
2063 #bt_component_class_filter_output_port_connected_method
2065 Filter component class's "output port connected" method.
2068 @bt_pre_not_null{_method}
2070 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2071 __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)
2076 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
2077 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2078 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2080 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
2081 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2085 Sets the query method of the \bt_flt_comp_cls
2086 having the ID \bt_p{_component_class_id} in the plugin having the ID
2087 \bt_p{_plugin_id} to \bt_p{_method}.
2089 See the \ref api-comp-cls-dev-meth-query "query" method.
2091 @param[in] _plugin_id
2095 ID of the plugin which contains the filter component class of which
2096 to set the query method.
2098 @param[in] _component_class_id
2102 ID of the filter component class, within the plugin having the ID
2103 \bt_p{_plugin_id}, of which to set the query
2104 method to \bt_p{_method}.
2108 #bt_component_class_filter_query_method
2110 Filter component class's query method.
2113 @bt_pre_not_null{_method}
2115 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2116 __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)
2121 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2122 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2123 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2125 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2126 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2131 @name Sink component class methods
2137 Sets the finalization method of the \bt_sink_comp_cls having the ID
2138 \bt_p{_component_class_id} in the plugin having the ID
2139 \bt_p{_plugin_id} to \bt_p{_method}.
2141 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
2143 @param[in] _plugin_id
2147 ID of the plugin which contains the sink component class of which
2148 to set the finalization method.
2150 @param[in] _component_class_id
2154 ID of the sink component class, within the plugin having the ID
2155 \bt_p{_plugin_id}, of which to set the finalization method to
2160 #bt_component_class_sink_finalize_method
2162 Sink component class's finalization method.
2165 @bt_pre_not_null{_method}
2167 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2168 __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)
2173 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
2174 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2175 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2177 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
2178 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
2182 Sets the \"get supported \bt_mip versions\" method of the
2183 \bt_sink_comp_cls having the ID \bt_p{_component_class_id} in the
2184 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
2186 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
2189 @param[in] _plugin_id
2193 ID of the plugin which contains the sink component class of which
2194 to set the "get supported MIP versions" method.
2196 @param[in] _component_class_id
2200 ID of the sink component class, within the plugin having the ID
2201 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
2202 method to \bt_p{_method}.
2206 #bt_component_class_sink_get_supported_mip_versions_method
2208 Sink component class's "get supported MIP versions" method.
2211 @bt_pre_not_null{_method}
2213 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2214 __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)
2219 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
2220 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2221 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2223 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
2224 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
2228 Sets the "graph is configured" method of the \bt_sink_comp_cls
2229 having the ID \bt_p{_component_class_id} in the plugin having the ID
2230 \bt_p{_plugin_id} to \bt_p{_method}.
2233 \ref api-comp-cls-dev-meth-graph-configured "graph is configured"
2236 @param[in] _plugin_id
2240 ID of the plugin which contains the sink component class of which
2241 to set the "graph is configured" method.
2243 @param[in] _component_class_id
2247 ID of the sink component class, within the plugin having the ID
2248 \bt_p{_plugin_id}, of which to set the "graph is configured"
2249 method to \bt_p{_method}.
2253 #bt_component_class_sink_graph_is_configured_method
2255 Sink component class's "graph is configured" method.
2258 @bt_pre_not_null{_method}
2260 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2261 __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)
2266 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID()
2267 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2268 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2270 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _method) \
2271 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _method)
2275 Sets the initialization method of the \bt_sink_comp_cls having the
2276 ID \bt_p{_component_class_id} in the plugin having the ID
2277 \bt_p{_plugin_id} to \bt_p{_method}.
2279 See the \ref api-comp-cls-dev-meth-init "initialize" method.
2281 @param[in] _plugin_id
2285 ID of the plugin which contains the sink component class of which
2286 to set the initialization method.
2288 @param[in] _component_class_id
2292 ID of the sink component class, within the plugin having the ID
2293 \bt_p{_plugin_id}, of which to set the initialization method to
2298 #bt_component_class_sink_initialize_method
2300 Sink component class's initialization method.
2303 @bt_pre_not_null{_method}
2305 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2306 __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)
2311 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
2312 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2313 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2315 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
2316 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
2320 Sets the "input port connected" method of the \bt_sink_comp_cls
2321 having the ID \bt_p{_component_class_id} in the plugin having the ID
2322 \bt_p{_plugin_id} to \bt_p{_method}.
2325 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
2328 @param[in] _plugin_id
2332 ID of the plugin which contains the sink component class of which
2333 to set the "input port connected" method.
2335 @param[in] _component_class_id
2339 ID of the sink component class, within the plugin having the ID
2340 \bt_p{_plugin_id}, of which to set the "input port connected"
2341 method to \bt_p{_method}.
2345 #bt_component_class_sink_input_port_connected_method
2347 Sink component class's "input port connected" method.
2350 @bt_pre_not_null{_method}
2352 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2353 __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)
2358 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
2359 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2360 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2362 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
2363 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2367 Sets the query method of the \bt_sink_comp_cls
2368 having the ID \bt_p{_component_class_id} in the plugin having the ID
2369 \bt_p{_plugin_id} to \bt_p{_method}.
2371 See the \ref api-comp-cls-dev-meth-query "query" method.
2373 @param[in] _plugin_id
2377 ID of the plugin which contains the sink component class of which
2378 to set the query method.
2380 @param[in] _component_class_id
2384 ID of the sink component class, within the plugin having the ID
2385 \bt_p{_plugin_id}, of which to set the query
2386 method to \bt_p{_method}.
2390 #bt_component_class_sink_query_method
2392 Sink component class's query method.
2395 @bt_pre_not_null{_method}
2397 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2398 __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)
2403 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2404 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2405 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2407 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2408 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2414 /* Plugin descriptor: describes a single plugin (internal use) */
2415 struct __bt_plugin_descriptor
{
2418 } __attribute__((packed
));
2420 /* Type of a plugin attribute (internal use) */
2421 enum __bt_plugin_descriptor_attribute_type
{
2422 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
2423 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
2424 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
2425 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
2426 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
2427 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
2430 /* Plugin (user) version */
2431 struct __bt_plugin_descriptor_version
{
2438 /* Plugin attribute (internal use) */
2439 struct __bt_plugin_descriptor_attribute
{
2440 /* Plugin descriptor to which to associate this attribute */
2441 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2443 /* Name of the attribute's type for debug purposes */
2444 const char *type_name
;
2446 /* Attribute's type */
2447 enum __bt_plugin_descriptor_attribute_type type
;
2449 /* Attribute's value (depends on attribute's type) */
2451 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
2452 bt_plugin_initialize_func init
;
2454 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
2455 bt_plugin_finalize_func exit
;
2457 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
2460 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
2461 const char *license
;
2463 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2464 const char *description
;
2466 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
2467 struct __bt_plugin_descriptor_version version
;
2469 } __attribute__((packed
));
2471 /* Component class descriptor (internal use) */
2472 struct __bt_plugin_component_class_descriptor
{
2474 * Plugin descriptor to which to associate this component
2477 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2479 /* Component class name */
2482 /* Component class type */
2483 bt_component_class_type type
;
2485 /* Mandatory methods (depends on component class type) */
2487 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
2489 bt_message_iterator_class_next_method msg_iter_next
;
2492 /* BT_COMPONENT_CLASS_TYPE_FILTER */
2494 bt_message_iterator_class_next_method msg_iter_next
;
2497 /* BT_COMPONENT_CLASS_TYPE_SINK */
2499 bt_component_class_sink_consume_method consume
;
2502 } __attribute__((packed
));
2504 /* Type of a component class attribute (internal use) */
2505 enum __bt_plugin_component_class_descriptor_attribute_type
{
2506 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
2507 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
2508 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD
= 2,
2509 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD
= 3,
2510 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 4,
2511 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 5,
2512 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 6,
2513 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 7,
2514 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD
= 8,
2515 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD
= 9,
2516 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 10,
2517 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD
= 11,
2518 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD
= 12,
2519 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD
= 13,
2520 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD
= 14,
2523 /* Component class attribute (internal use) */
2524 struct __bt_plugin_component_class_descriptor_attribute
{
2526 * Component class plugin attribute to which to associate this
2527 * component class attribute.
2529 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
2531 /* Name of the attribute's type for debug purposes */
2532 const char *type_name
;
2534 /* Attribute's type */
2535 enum __bt_plugin_component_class_descriptor_attribute_type type
;
2537 /* Attribute's value (depends on attribute's type) */
2539 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2540 const char *description
;
2542 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
2545 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD */
2546 bt_component_class_source_get_supported_mip_versions_method source_get_supported_mip_versions_method
;
2547 bt_component_class_filter_get_supported_mip_versions_method filter_get_supported_mip_versions_method
;
2548 bt_component_class_sink_get_supported_mip_versions_method sink_get_supported_mip_versions_method
;
2550 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD */
2551 bt_component_class_source_initialize_method source_initialize_method
;
2552 bt_component_class_filter_initialize_method filter_initialize_method
;
2553 bt_component_class_sink_initialize_method sink_initialize_method
;
2555 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
2556 bt_component_class_source_finalize_method source_finalize_method
;
2557 bt_component_class_filter_finalize_method filter_finalize_method
;
2558 bt_component_class_sink_finalize_method sink_finalize_method
;
2560 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
2561 bt_component_class_source_query_method source_query_method
;
2562 bt_component_class_filter_query_method filter_query_method
;
2563 bt_component_class_sink_query_method sink_query_method
;
2565 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
2566 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
2567 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
2569 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
2570 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
2571 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
2573 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */
2574 bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method
;
2576 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD */
2577 bt_message_iterator_class_initialize_method msg_iter_initialize_method
;
2579 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
2580 bt_message_iterator_class_finalize_method msg_iter_finalize_method
;
2582 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
2583 bt_message_iterator_class_seek_ns_from_origin_method msg_iter_seek_ns_from_origin_method
;
2585 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
2586 bt_message_iterator_class_seek_beginning_method msg_iter_seek_beginning_method
;
2588 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
2589 bt_message_iterator_class_can_seek_ns_from_origin_method msg_iter_can_seek_ns_from_origin_method
;
2591 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
2592 bt_message_iterator_class_can_seek_beginning_method msg_iter_can_seek_beginning_method
;
2594 } __attribute__((packed
));
2596 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
2597 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
2598 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
2599 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
2600 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
2601 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
2602 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
2603 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
2606 * Defines a plugin attribute (generic, internal use).
2608 * _attr_name: Name of the attribute (C identifier).
2609 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
2610 * _id: Plugin descriptor ID (C identifier).
2613 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
2614 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
2615 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
2616 .type_name = #_attr_name, \
2617 .type = _attr_type, \
2618 .value = { ._attr_name = _x }, \
2620 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
2622 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
2623 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
2626 * Defines a component class descriptor attribute (generic, internal
2629 * _id: Plugin descriptor ID (C identifier).
2630 * _component_class_id: Component class ID (C identifier).
2631 * _type: Component class type (`source`, `filter`, or `sink`).
2632 * _attr_name: Name of the attribute (C identifier).
2633 * _attr_type: Type of the attribute
2634 * (enum __bt_plugin_descriptor_attribute_type).
2637 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _component_class_id, _type, _x) \
2638 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name = { \
2639 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_component_class_id, \
2640 .type_name = #_attr_name, \
2641 .type = _attr_type, \
2642 .value = { ._attr_name = _x }, \
2644 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
2647 * Clang supports the no_sanitize variable attribute on global variables.
2648 * GCC only supports the no_sanitize_address function attribute, which is
2649 * not what we need. This is fine because, as far as we have seen, gcc
2650 * does not insert red zones around global variables.
2652 #if defined(__clang__)
2653 # if __has_feature(address_sanitizer)
2654 # define __bt_plugin_variable_attribute_no_sanitize_address \
2655 __attribute__((no_sanitize("address")))
2657 # define __bt_plugin_variable_attribute_no_sanitize_address
2660 # define __bt_plugin_variable_attribute_no_sanitize_address
2664 * Variable attributes for a plugin descriptor pointer to be added to
2665 * the plugin descriptor section (internal use).
2668 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2669 __attribute__((section("__DATA,btp_desc"), used)) \
2670 __bt_plugin_variable_attribute_no_sanitize_address
2672 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2673 __start___bt_plugin_descriptors
2675 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2676 __stop___bt_plugin_descriptors
2678 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
2679 __asm("section$start$__DATA$btp_desc")
2681 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
2682 __asm("section$end$__DATA$btp_desc")
2686 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2687 __attribute__((section("__bt_plugin_descriptors"), used)) \
2688 __bt_plugin_variable_attribute_no_sanitize_address
2690 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2691 __start___bt_plugin_descriptors
2693 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2694 __stop___bt_plugin_descriptors
2696 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
2698 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
2702 * Variable attributes for a plugin attribute pointer to be added to
2703 * the plugin attribute section (internal use).
2706 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2707 __attribute__((section("__DATA,btp_desc_att"), used)) \
2708 __bt_plugin_variable_attribute_no_sanitize_address
2710 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2711 __start___bt_plugin_descriptor_attributes
2713 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2714 __stop___bt_plugin_descriptor_attributes
2716 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2717 __asm("section$start$__DATA$btp_desc_att")
2719 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2720 __asm("section$end$__DATA$btp_desc_att")
2724 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2725 __attribute__((section("__bt_plugin_descriptor_attributes"), used)) \
2726 __bt_plugin_variable_attribute_no_sanitize_address
2728 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2729 __start___bt_plugin_descriptor_attributes
2731 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2732 __stop___bt_plugin_descriptor_attributes
2734 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2736 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2740 * Variable attributes for a component class descriptor pointer to be
2741 * added to the component class descriptor section (internal use).
2744 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2745 __attribute__((section("__DATA,btp_cc_desc"), used)) \
2746 __bt_plugin_variable_attribute_no_sanitize_address
2748 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2749 __start___bt_plugin_component_class_descriptors
2751 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2752 __stop___bt_plugin_component_class_descriptors
2754 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
2755 __asm("section$start$__DATA$btp_cc_desc")
2757 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
2758 __asm("section$end$__DATA$btp_cc_desc")
2762 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2763 __attribute__((section("__bt_plugin_component_class_descriptors"), used)) \
2764 __bt_plugin_variable_attribute_no_sanitize_address
2766 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2767 __start___bt_plugin_component_class_descriptors
2769 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2770 __stop___bt_plugin_component_class_descriptors
2772 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
2774 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
2778 * Variable attributes for a component class descriptor attribute
2779 * pointer to be added to the component class descriptor attribute
2780 * section (internal use).
2783 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2784 __attribute__((section("__DATA,btp_cc_desc_att"), used)) \
2785 __bt_plugin_variable_attribute_no_sanitize_address
2787 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2788 __start___bt_plugin_component_class_descriptor_attributes
2790 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2791 __stop___bt_plugin_component_class_descriptor_attributes
2793 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2794 __asm("section$start$__DATA$btp_cc_desc_att")
2796 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2797 __asm("section$end$__DATA$btp_cc_desc_att")
2801 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2802 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) \
2803 __bt_plugin_variable_attribute_no_sanitize_address
2805 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2806 __start___bt_plugin_component_class_descriptor_attributes
2808 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2809 __stop___bt_plugin_component_class_descriptor_attributes
2811 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2813 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2820 #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */