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 /* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
12 #ifndef __BT_IN_BABELTRACE_H
13 # error "Please include <babeltrace2/babeltrace.h> instead."
18 #include <babeltrace2/graph/component-class-dev.h>
19 #include <babeltrace2/graph/message-iterator-class.h>
20 #include <babeltrace2/types.h>
23 * _BT_HIDDEN: set the hidden attribute for internal functions
24 * On Windows, symbols are local unless explicitly exported,
25 * see https://gcc.gnu.org/wiki/Visibility
27 #if defined(_WIN32) || defined(__CYGWIN__)
30 #define _BT_HIDDEN __attribute__((visibility("hidden")))
34 * _BT_EXPORT: set the visibility for exported functions.
36 #if defined(_WIN32) || defined(__CYGWIN__)
39 #define _BT_EXPORT __attribute__((visibility("default")))
47 @defgroup api-plugin-dev Plugin development
50 Shared object plugin development.
52 This API offers macros to create a \bt_name shared
55 Behind the scenes, the <code>BT_PLUGIN_*()</code> macros of this
56 API create and fill global tables which are located in
57 sections of the shared object with specific names. The \ref api-plugin
58 functions can load the resulting shared object file and create
59 corresponding \bt_plugin objects.
61 See \ref guide-comp-link-plugin-so.
63 <h1>Plugin definition C file structure</h1>
65 The structure of a \bt_name plugin definition C file is as such:
77 Define a \bt_name plugin with BT_PLUGIN() if the plugin's name is a
78 valid C identifier, or with BT_PLUGIN_WITH_ID() otherwise.
80 See \ref api-plugin-dev-custom-plugin-id "Custom plugin ID" to
81 learn more about plugin IDs.
84 When you use BT_PLUGIN(), the plugin's ID is <code>auto</code>.
88 \bt_dt_opt Use any of the following macros (or their
89 <code>*_WITH_ID()</code> counterpart) \em once to set the properties
93 - BT_PLUGIN_DESCRIPTION()
99 \bt_dt_opt Use any of the following macros (or their
100 <code>*_WITH_ID()</code> counterpart) \em once to set the
101 initialization and finalization functions of the plugin:
103 - BT_PLUGIN_INITIALIZE_FUNC()
104 - BT_PLUGIN_FINALIZE_FUNC()
106 A plugin's initialization function is executed when the shared
107 object is loaded (see \ref api-plugin).
109 A plugin's finalization function is executed when the \bt_plugin
110 object is destroyed, if the initialization function (if any)
115 Use any of the following macros (or their <code>*_WITH_ID()</code>
116 counterpart) to add a component class to the plugin:
118 - BT_PLUGIN_SOURCE_COMPONENT_CLASS()
119 - BT_PLUGIN_FILTER_COMPONENT_CLASS()
120 - BT_PLUGIN_SINK_COMPONENT_CLASS()
124 \bt_dt_opt Depending on the type of the component class of step 5,
125 use any of the following macros (or their <code>*_WITH_ID()</code>
127 \em once to set its properties:
130 <dt>\bt_c_src_comp_cls</dt>
132 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION()
133 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP()
136 <dt>\bt_c_flt_comp_cls</dt>
138 - BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION()
139 - BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP()
142 <dt>\bt_c_sink_comp_cls</dt>
144 - BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION()
145 - BT_PLUGIN_SINK_COMPONENT_CLASS_HELP()
151 \bt_dt_opt Depending on the type of the component class of step 5,
152 use any of the following macros (or their <code>*_WITH_ID()</code>
153 counterpart) to set its optional methods:
156 <dt>Source component class</dt>
158 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD()
159 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
160 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD()
161 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
162 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
163 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
164 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD()
167 <dt>Filter component class</dt>
169 - BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD()
170 - BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
171 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD()
172 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
173 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
174 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
175 - BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
176 - BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD()
179 <dt>Sink component class</dt>
181 - BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD()
182 - BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
183 - BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD()
184 - BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD()
185 - BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
186 - BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD()
192 You can repeat steps 5 to 7 to add more than one component class to a
195 See \ref example-simple-plugin-def-file for a concrete example of how
196 to use the macros of this API.
198 <h1>\anchor api-plugin-dev-custom-plugin-id Custom plugin ID</h1>
200 The BT_PLUGIN() macro defines a plugin with a specific name and the
201 ID <code>auto</code>.
203 All the <code>BT_PLUGIN_*()</code> macros which do not end with
204 <code>_WITH_ID</code> refer to the <code>auto</code> plugin.
206 There are two situations which demand that you use a custom plugin ID:
208 - You want more than one plugin contained in your shared object file.
210 Although the \bt_name project does not recommend this, it is possible.
211 This is why bt_plugin_find_all_from_file() returns a \bt_plugin_set
212 instead of a single \bt_plugin.
214 In this case, each plugin of the shared object needs its own, unique
217 - You want to give the plugin a name which is not a valid C identifier.
219 The BT_PLUGIN() macro accepts a C identifier as the plugin name, while
220 the BT_PLUGIN_WITH_ID() accepts a C identifier for the ID and a C
223 To define a plugin with a specific ID, use BT_PLUGIN_WITH_ID(), for
227 BT_PLUGIN_WITH_ID(my_plugin_id, "my-plugin-name");
230 Then, use the <code>BT_PLUGIN_*_WITH_ID()</code> macros to refer to
231 this specific plugin, for example:
234 BT_PLUGIN_AUTHOR_WITH_ID(my_plugin_id, "Patrick Bouchard");
239 You can still use the <code>auto</code> ID with BT_PLUGIN_WITH_ID()
240 to use the simpler macros afterwards while still giving the plugin a
241 name which is not a valid C identifier, for example:
244 BT_PLUGIN_WITH_ID(auto, "my-plugin-name");
245 BT_PLUGIN_AUTHOR("Patrick Bouchard");
249 <h1>Custom component class ID</h1>
251 The BT_PLUGIN_SOURCE_COMPONENT_CLASS(),
252 BT_PLUGIN_FILTER_COMPONENT_CLASS(), and
253 BT_PLUGIN_SINK_COMPONENT_CLASS() add a component class with a specific
254 name to the plugin having the ID <code>auto</code>.
256 The name you pass to those macros must be a valid C identifier and it
257 also serves as the component class's ID within the <code>auto</code>
260 There are two situations which demand that you use a custom component
263 - You want to add the component class to a specific plugin (other than
264 <code>auto</code>, if you have more than one).
266 - You want to give the component class a name which is not a valid C
269 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros accept a
270 C identifier for the component class ID and a string for its name.
272 For a given plugin and for a given component class type, all component
273 class IDs must be unique.
275 To add a component class having a specific ID to a plugin,
276 use the BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(),
277 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(), and
278 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() macros, for example:
281 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(my_plugin_id, my_comp_class_id,
282 "my-source", my_source_iter_next);
287 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros
288 specify the ID of the plugin to which to add the component class.
290 If you use the BT_PLUGIN() macro to define your plugin, then its
291 ID is <code>auto</code>:
294 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, my_comp_class_id,
295 "my-source", my_source_iter_next);
299 Then, use the <code>BT_PLUGIN_*_COMPONENT_CLASS_*_WITH_ID()</code>
300 macros to refer to this specific component class, for example:
303 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(my_plugin_id,
304 my_comp_class_id, my_source_finalize);
314 @typedef struct bt_self_plugin bt_self_plugin;
329 Defines a plugin module.
331 In a plugin definition C file, you must use this macro before you use
332 any other <code>BT_PLUGIN*()</code> macro.
334 #define BT_PLUGIN_MODULE() \
335 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
336 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
337 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
339 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
340 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
341 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
343 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
344 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
345 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
347 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; \
348 _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; \
349 _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; \
351 _BT_EXPORT struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
353 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
355 _BT_EXPORT struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
357 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
359 _BT_EXPORT struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
361 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
363 _BT_EXPORT struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
365 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
367 _BT_EXPORT struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
369 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
371 _BT_EXPORT struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
373 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
375 _BT_EXPORT struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
377 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
379 _BT_EXPORT struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
381 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
387 @name Plugin definition
393 Defines a plugin named \bt_p{_name} and having the ID \bt_p{_id}.
399 Plugin's ID, unique amongst all the plugin IDs of the same shared
404 <code>const char *</code>
409 @bt_pre_not_null{_name}
411 #define BT_PLUGIN_WITH_ID(_id, _name) \
412 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
415 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
419 Alias of BT_PLUGIN_WITH_ID() with the \bt_p{_id} parameter set to
422 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
427 @name Plugin properties
433 Sets the description of the plugin having the ID \bt_p{_id} to
436 See the \ref api-comp-cls-prop-descr "description" property.
442 ID of the plugin of which to set the description.
444 @param[in] _description
446 <code>const char *</code>
448 Plugin's description.
451 @bt_pre_not_null{_description}
453 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _description) \
454 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _description)
458 Alias of BT_PLUGIN_DESCRIPTION_WITH_ID() with the \bt_p{_id}
459 parameter set to <code>auto</code>.
461 #define BT_PLUGIN_DESCRIPTION(_description) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _description)
465 Sets the name(s) of the author(s) of the plugin having the ID
466 \bt_p{_id} to \bt_p{_author}.
468 See the \ref api-plugin-prop-author "author name(s)" property.
474 ID of the plugin of which to set the author(s).
478 <code>const char *</code>
483 @bt_pre_not_null{_author}
485 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _author) \
486 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _author)
490 Alias of BT_PLUGIN_AUTHOR_WITH_ID() with the \bt_p{_id}
491 parameter set to <code>auto</code>.
493 #define BT_PLUGIN_AUTHOR(_author) BT_PLUGIN_AUTHOR_WITH_ID(auto, _author)
497 Sets the license (name or full) of the plugin having the ID
498 \bt_p{_id} to \bt_p{_license}.
500 See the \ref api-plugin-prop-license "license" property.
506 ID of the plugin of which to set the license.
510 <code>const char *</code>
515 @bt_pre_not_null{_license}
517 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _license) \
518 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _license)
522 Alias of BT_PLUGIN_LICENSE_WITH_ID() with the \bt_p{_id}
523 parameter set to <code>auto</code>.
525 #define BT_PLUGIN_LICENSE(_license) BT_PLUGIN_LICENSE_WITH_ID(auto, _license)
529 Sets the version of the plugin having the ID \bt_p{_id} to
532 See the \ref api-plugin-prop-version "version" property.
538 ID of the plugin of which to set the version.
542 <code>unsigned int</code>
544 Plugin's major version.
548 <code>unsigned int</code>
550 Plugin's minor version.
554 <code>unsigned int</code>
556 Plugin's patch version.
560 <code>const char *</code>
562 Plugin's version's extra information.
564 Can be \c NULL if the plugin's version has no extra information.
567 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
568 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
572 Alias of BT_PLUGIN_VERSION_WITH_ID() with the \bt_p{_id}
573 parameter set to <code>auto</code>.
575 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
580 @name Plugin functions
586 Status codes for #bt_plugin_initialize_func.
588 typedef enum bt_plugin_initialize_func_status
{
593 BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
= __BT_FUNC_STATUS_OK
,
599 BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
605 BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
606 } bt_plugin_initialize_func_status
;
610 User plugin initialization function.
612 @param[in] self_plugin
616 This parameter is a private view of the \bt_plugin object for
619 As of \bt_name_version_min_maj, there's no self plugin API.
622 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
624 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
626 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
629 @bt_pre_not_null{self_plugin}
631 typedef bt_plugin_initialize_func_status (*bt_plugin_initialize_func
)(
632 bt_self_plugin
*self_plugin
);
636 Sets the initialization function of the plugin having the ID
637 \bt_p{_id} to \bt_p{_func}.
643 ID of the plugin of which to set the initialization function.
647 #bt_plugin_initialize_func
649 Plugin's initialization function.
652 @bt_pre_not_null{_func}
654 #define BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(_id, _func) \
655 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _func)
659 Alias of BT_PLUGIN_INITIALIZE_FUNC_WITH_ID() with the \bt_p{_id}
660 parameter set to <code>auto</code>.
662 #define BT_PLUGIN_INITIALIZE_FUNC(_func) BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(auto, _func)
666 User plugin finalization function.
668 typedef void (*bt_plugin_finalize_func
)(void);
672 Sets the finalization function of the plugin having the ID
673 \bt_p{_id} to \bt_p{_func}.
679 ID of the plugin of which to set the finalization function.
683 #bt_plugin_finalize_func
685 Plugin's finalization function.
688 @bt_pre_not_null{_func}
690 #define BT_PLUGIN_FINALIZE_FUNC_WITH_ID(_id, _func) \
691 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _func)
695 Alias of BT_PLUGIN_FINALIZE_FUNC_WITH_ID() with the \bt_p{_id}
696 parameter set to <code>auto</code>.
698 #define BT_PLUGIN_FINALIZE_FUNC(_func) BT_PLUGIN_FINALIZE_FUNC_WITH_ID(auto, _func)
703 @name Component class adding
709 Adds a \bt_src_comp_cls named \bt_p{_name}, having the ID
710 \bt_p{_component_class_id} and the message iterator class's "next"
711 method \bt_p{_message_iterator_class_next_method}, to the plugin
712 having the ID \bt_p{_plugin_id}.
714 @param[in] _plugin_id
718 ID of the plugin to which to add the source component class.
720 @param[in] _component_class_id
724 Source component class's ID, unique amongst all the source component
725 class IDs of the same plugin.
729 <code>const char *</code>
731 Source component class's name, unique amongst all the source
732 component class names of the same plugin.
734 @param[in] _message_iterator_class_next_method
736 #bt_message_iterator_class_next_method
738 Source component class's message iterator class's "next" method.
741 @bt_pre_not_null{_name}
742 @bt_pre_not_null{_message_iterator_class_next_method}
744 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
745 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
746 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
748 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
749 .methods = { .source = { .msg_iter_next = _message_iterator_class_next_method } }, \
751 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
755 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID() with the
756 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
757 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
758 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
764 Passed as both the \bt_p{_component_class_id} and the
765 \bt_p{_name} (once converted to a string) parameters of
766 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID().
769 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
770 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
774 Adds a \bt_flt_comp_cls named \bt_p{_name}, having the ID
775 \bt_p{_component_class_id} and the message iterator class's "next"
776 method \bt_p{_message_iterator_class_next_method}, to the plugin
777 having the ID \bt_p{_plugin_id}.
779 @param[in] _plugin_id
783 ID of the plugin to which to add the filter component class.
785 @param[in] _component_class_id
789 Filter component class's ID, unique amongst all the filter component
790 class IDs of the same plugin.
794 <code>const char *</code>
796 Filter component class's name, unique amongst all the filter
797 component class names of the same plugin.
799 @param[in] _message_iterator_class_next_method
801 #bt_message_iterator_class_next_method
803 Filter component class's message iterator class's "next" method.
806 @bt_pre_not_null{_name}
807 @bt_pre_not_null{_message_iterator_class_next_method}
809 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
810 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
811 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
813 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
814 .methods = { .filter = { .msg_iter_next = _message_iterator_class_next_method } }, \
816 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
820 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID() with the
821 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
822 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
823 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
829 Passed as both the \bt_p{_component_class_id} and the
830 \bt_p{_name} (once converted to a string) parameters of
831 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID().
834 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
835 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
839 Adds a \bt_sink_comp_cls named \bt_p{_name}, having the ID
840 \bt_p{_component_class_id} and the consuming method
841 \bt_p{_consume_method}, to the plugin
842 having the ID \bt_p{_plugin_id}.
844 @param[in] _plugin_id
848 ID of the plugin to which to add the sink component class.
850 @param[in] _component_class_id
854 Sink component class's ID, unique amongst all the sink component
855 class IDs of the same plugin.
859 <code>const char *</code>
861 Sink component class's name, unique amongst all the sink
862 component class names of the same plugin.
864 @param[in] _consume_method
866 #bt_component_class_sink_consume_method
868 Sink component class's message iterator class's "next" method.
871 @bt_pre_not_null{_name}
872 @bt_pre_not_null{_consume_method}
874 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _consume_method) \
875 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
876 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
878 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
879 .methods = { .sink = { .consume = _consume_method } }, \
881 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
885 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() with the
886 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
887 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
888 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
894 Passed as both the \bt_p{_component_class_id} and the
895 \bt_p{_name} (once converted to a string) parameters of
896 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID().
899 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
900 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
905 @name Source component class properties
911 Sets the description of the \bt_src_comp_cls having the ID
912 \bt_p{_component_class_id} in the plugin having the ID
913 \bt_p{_plugin_id} to \bt_p{_description}.
915 See the \ref api-comp-cls-prop-descr "description" property.
917 @param[in] _plugin_id
921 ID of the plugin which contains the source component class of which
922 to set the description.
924 @param[in] _component_class_id
928 ID of the source component class, within the plugin having the ID
929 \bt_p{_plugin_id}, of which to set the description to
932 @param[in] _description
934 <code>const char *</code>
936 Source component class's description.
939 @bt_pre_not_null{_description}
941 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
942 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, source, _description)
946 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
947 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
948 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
950 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
951 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
955 Sets the help text of the \bt_src_comp_cls having the ID
956 \bt_p{_component_class_id} in the plugin having the ID
957 \bt_p{_plugin_id} to \bt_p{_help_text}.
959 See the \ref api-comp-cls-prop-help "help text" property.
961 @param[in] _plugin_id
965 ID of the plugin which contains the source component class of which
966 to set the help text.
968 @param[in] _component_class_id
972 ID of the source component class, within the plugin having the ID
973 \bt_p{_plugin_id}, of which to set the help text to
976 @param[in] _help_text
978 <code>const char *</code>
980 Source component class's help text.
983 @bt_pre_not_null{_help_text}
985 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
986 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, source, _help_text)
990 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID() with the
991 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
992 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
994 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _help_text) \
995 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1000 @name Filter component class properties
1006 Sets the description of the \bt_flt_comp_cls having the ID
1007 \bt_p{_component_class_id} in the plugin having the ID
1008 \bt_p{_plugin_id} to \bt_p{_description}.
1010 See the \ref api-comp-cls-prop-descr "description" property.
1012 @param[in] _plugin_id
1016 ID of the plugin which contains the filter component class of which
1017 to set the description.
1019 @param[in] _component_class_id
1023 ID of the filter component class, within the plugin having the ID
1024 \bt_p{_plugin_id}, of which to set the description to
1025 \bt_p{_description}.
1027 @param[in] _description
1029 <code>const char *</code>
1031 Filter component class's description.
1034 @bt_pre_not_null{_description}
1036 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1037 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, filter, _description)
1041 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1042 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1043 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1045 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1046 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1050 Sets the help text of the \bt_flt_comp_cls having the ID
1051 \bt_p{_component_class_id} in the plugin having the ID
1052 \bt_p{_plugin_id} to \bt_p{_help_text}.
1054 See the \ref api-comp-cls-prop-help "help text" property.
1056 @param[in] _plugin_id
1060 ID of the plugin which contains the filter component class of which
1061 to set the help text.
1063 @param[in] _component_class_id
1067 ID of the filter component class, within the plugin having the ID
1068 \bt_p{_plugin_id}, of which to set the help text to
1071 @param[in] _help_text
1073 <code>const char *</code>
1075 Filter component class's help text.
1078 @bt_pre_not_null{_help_text}
1080 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1081 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, filter, _help_text)
1085 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID() with the
1086 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1087 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1089 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _help_text) \
1090 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1095 @name Sink component class properties
1101 Sets the description of the \bt_sink_comp_cls having the ID
1102 \bt_p{_component_class_id} in the plugin having the ID
1103 \bt_p{_plugin_id} to \bt_p{_description}.
1105 See the \ref api-comp-cls-prop-descr "description" property.
1107 @param[in] _plugin_id
1111 ID of the plugin which contains the sink component class of which
1112 to set the description.
1114 @param[in] _component_class_id
1118 ID of the sink component class, within the plugin having the ID
1119 \bt_p{_plugin_id}, of which to set the description to
1120 \bt_p{_description}.
1122 @param[in] _description
1124 <code>const char *</code>
1126 Sink component class's description.
1129 @bt_pre_not_null{_description}
1131 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1132 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, sink, _description)
1136 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1137 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1138 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1140 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1141 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1145 Sets the help text of the \bt_sink_comp_cls having the ID
1146 \bt_p{_component_class_id} in the plugin having the ID
1147 \bt_p{_plugin_id} to \bt_p{_help_text}.
1149 See the \ref api-comp-cls-prop-help "help text" property.
1151 @param[in] _plugin_id
1155 ID of the plugin which contains the sink component class of which
1156 to set the help text.
1158 @param[in] _component_class_id
1162 ID of the sink component class, within the plugin having the ID
1163 \bt_p{_plugin_id}, of which to set the help text to
1166 @param[in] _help_text
1168 <code>const char *</code>
1170 Sink component class's help text.
1173 @bt_pre_not_null{_help_text}
1175 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1176 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, sink, _help_text)
1180 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID() with
1181 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1182 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1184 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _help_text) \
1185 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1190 @name Source component class methods
1196 Sets the finalization method of the \bt_src_comp_cls having the ID
1197 \bt_p{_component_class_id} in the plugin having the ID
1198 \bt_p{_plugin_id} to \bt_p{_method}.
1200 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1202 @param[in] _plugin_id
1206 ID of the plugin which contains the source component class of which
1207 to set the finalization method.
1209 @param[in] _component_class_id
1213 ID of the source component class, within the plugin having the ID
1214 \bt_p{_plugin_id}, of which to set the finalization method to
1219 #bt_component_class_source_finalize_method
1221 Source component class's finalization method.
1224 @bt_pre_not_null{_method}
1226 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1227 __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)
1232 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1233 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1234 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1236 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1237 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1241 Sets the \"get supported \bt_mip versions\" method of the
1242 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1243 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1245 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1248 @param[in] _plugin_id
1252 ID of the plugin which contains the source component class of which
1253 to set the "get supported MIP versions" method.
1255 @param[in] _component_class_id
1259 ID of the source component class, within the plugin having the ID
1260 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1261 method to \bt_p{_method}.
1265 #bt_component_class_source_get_supported_mip_versions_method
1267 Source component class's "get supported MIP versions" method.
1270 @bt_pre_not_null{_method}
1272 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1273 __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)
1278 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1279 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1280 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1282 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1283 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1287 Sets the initialization method of the \bt_src_comp_cls having the ID
1288 \bt_p{_component_class_id} in the plugin having the ID
1289 \bt_p{_plugin_id} to \bt_p{_method}.
1291 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1293 @param[in] _plugin_id
1297 ID of the plugin which contains the source component class of which
1298 to set the initialization method.
1300 @param[in] _component_class_id
1304 ID of the source component class, within the plugin having the ID
1305 \bt_p{_plugin_id}, of which to set the initialization method to
1310 #bt_component_class_source_initialize_method
1312 Source component class's initialization method.
1315 @bt_pre_not_null{_method}
1317 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1318 __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)
1323 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1324 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1325 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1327 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1328 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1332 Sets the finalization method of the \bt_msg_iter_cls of the
1333 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1334 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1336 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1338 @param[in] _plugin_id
1342 ID of the plugin which contains the source component class of which
1343 to set the finalization method of the message iterator class.
1345 @param[in] _component_class_id
1349 ID of the source component class, within the plugin having the ID
1350 \bt_p{_plugin_id}, of which to set the finalization method of the
1351 message iterator class to \bt_p{_method}.
1355 #bt_message_iterator_class_finalize_method
1357 Source component class's message iterator class's finalization method.
1360 @bt_pre_not_null{_method}
1362 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1363 __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)
1368 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1369 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1370 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1372 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1373 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1377 Sets the initialization method of the \bt_msg_iter_cls of the
1378 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1379 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1381 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1383 @param[in] _plugin_id
1387 ID of the plugin which contains the source component class of which
1388 to set the initialization method of the message iterator class.
1390 @param[in] _component_class_id
1394 ID of the source component class, within the plugin having the ID
1395 \bt_p{_plugin_id}, of which to set the initialization method of the
1396 message iterator class to \bt_p{_method}.
1400 #bt_message_iterator_class_initialize_method
1402 Source component class's message iterator class's initialization
1406 @bt_pre_not_null{_method}
1408 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1409 __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)
1414 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1415 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1416 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1418 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1419 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1423 Sets the "seek beginning" and "can seek beginning?" methods of the
1424 \bt_msg_iter_cls of the \bt_src_comp_cls having the ID
1425 \bt_p{_component_class_id} in the plugin having the ID
1426 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1427 \bt_p{_can_seek_method}.
1429 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1430 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1432 @param[in] _plugin_id
1436 ID of the plugin which contains the source component class of which
1437 to set the "seek beginning" and "can seek beginning?" methods of the
1438 message iterator class.
1440 @param[in] _component_class_id
1444 ID of the source component class, within the plugin having the ID
1445 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1446 seek beginning" methods of the message iterator class to
1447 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1449 @param[in] _seek_method
1451 #bt_message_iterator_class_seek_beginning_method
1453 Source component class's message iterator class's "seek beginning"
1456 @param[in] _can_seek_method
1458 #bt_message_iterator_class_can_seek_beginning_method
1460 Source component class's message iterator class's
1461 "can seek beginning?" method.
1463 Can be \c NULL, in which case it is equivalent to setting a method
1464 which always returns #BT_TRUE.
1467 @bt_pre_not_null{_seek_method}
1468 @bt_pre_not_null{_can_seek_method}
1470 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1471 __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); \
1472 __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)
1477 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS()
1478 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1479 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1481 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1482 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1486 Sets the "seek ns from origin" and "can seek ns from origin?"
1487 methods of the \bt_msg_iter_cls of the \bt_src_comp_cls having the
1488 ID \bt_p{_component_class_id} in the plugin having the ID
1489 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1490 \bt_p{_can_seek_method}.
1492 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1493 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
1496 @param[in] _plugin_id
1500 ID of the plugin which contains the source component class of which
1501 to set the "seek ns from origin" and "can seek ns from origin?"
1502 methods of the message iterator class.
1504 @param[in] _component_class_id
1508 ID of the source component class, within the plugin having the ID
1509 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
1510 "can seek ns from origin" methods of the message iterator class to
1511 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1513 @param[in] _seek_method
1515 #bt_message_iterator_class_seek_ns_from_origin_method
1517 Source component class's message iterator class's "seek ns from
1520 @param[in] _can_seek_method
1522 #bt_message_iterator_class_can_seek_ns_from_origin_method
1524 Source component class's message iterator class's "can seek ns from
1527 Can be \c NULL, in which case it is equivalent to setting a method
1528 which always returns #BT_TRUE.
1531 @bt_pre_not_null{_seek_method}
1532 @bt_pre_not_null{_can_seek_method}
1534 #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) \
1535 __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); \
1536 __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)
1541 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
1542 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1543 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1545 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
1546 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1550 Sets the "output port connected" method of the \bt_src_comp_cls
1551 having the ID \bt_p{_component_class_id} in the plugin having the ID
1552 \bt_p{_plugin_id} to \bt_p{_method}.
1555 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
1558 @param[in] _plugin_id
1562 ID of the plugin which contains the source component class of which
1563 to set the "output port connected" method.
1565 @param[in] _component_class_id
1569 ID of the source component class, within the plugin having the ID
1570 \bt_p{_plugin_id}, of which to set the "output port connected"
1571 method to \bt_p{_method}.
1575 #bt_component_class_source_output_port_connected_method
1577 Source component class's "output port connected" method.
1580 @bt_pre_not_null{_method}
1582 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1583 __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)
1588 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
1589 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1590 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1592 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
1593 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1597 Sets the query method of the \bt_src_comp_cls
1598 having the ID \bt_p{_component_class_id} in the plugin having the ID
1599 \bt_p{_plugin_id} to \bt_p{_method}.
1601 See the \ref api-comp-cls-dev-meth-query "query" method.
1603 @param[in] _plugin_id
1607 ID of the plugin which contains the source component class of which
1608 to set the query method.
1610 @param[in] _component_class_id
1614 ID of the source component class, within the plugin having the ID
1615 \bt_p{_plugin_id}, of which to set the query
1616 method to \bt_p{_method}.
1620 #bt_component_class_source_query_method
1622 Source component class's query method.
1625 @bt_pre_not_null{_method}
1627 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1628 __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)
1633 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
1634 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1635 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1637 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
1638 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
1643 @name Filter component class methods
1649 Sets the finalization method of the \bt_flt_comp_cls having the ID
1650 \bt_p{_component_class_id} in the plugin having the ID
1651 \bt_p{_plugin_id} to \bt_p{_method}.
1653 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1655 @param[in] _plugin_id
1659 ID of the plugin which contains the filter component class of which
1660 to set the finalization method.
1662 @param[in] _component_class_id
1666 ID of the filter component class, within the plugin having the ID
1667 \bt_p{_plugin_id}, of which to set the finalization method to
1672 #bt_component_class_filter_finalize_method
1674 Filter component class's finalization method.
1677 @bt_pre_not_null{_method}
1679 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1680 __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)
1685 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1686 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1687 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1689 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1690 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1694 Sets the \"get supported \bt_mip versions\" method of the
1695 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1696 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1698 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1701 @param[in] _plugin_id
1705 ID of the plugin which contains the filter component class of which
1706 to set the "get supported MIP versions" method.
1708 @param[in] _component_class_id
1712 ID of the filter component class, within the plugin having the ID
1713 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1714 method to \bt_p{_method}.
1718 #bt_component_class_filter_get_supported_mip_versions_method
1720 Filter component class's "get supported MIP versions" method.
1723 @bt_pre_not_null{_method}
1725 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1726 __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)
1731 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1732 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1733 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1735 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1736 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1740 Sets the initialization method of the \bt_flt_comp_cls having the ID
1741 \bt_p{_component_class_id} in the plugin having the ID
1742 \bt_p{_plugin_id} to \bt_p{_method}.
1744 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1746 @param[in] _plugin_id
1750 ID of the plugin which contains the filter component class of which
1751 to set the initialization method.
1753 @param[in] _component_class_id
1757 ID of the filter component class, within the plugin having the ID
1758 \bt_p{_plugin_id}, of which to set the initialization method to
1763 #bt_component_class_filter_initialize_method
1765 Filter component class's initialization method.
1768 @bt_pre_not_null{_method}
1770 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1771 __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)
1776 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1777 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1778 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1780 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1781 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1785 Sets the "input port connected" method of the \bt_flt_comp_cls
1786 having the ID \bt_p{_component_class_id} in the plugin having the ID
1787 \bt_p{_plugin_id} to \bt_p{_method}.
1790 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
1793 @param[in] _plugin_id
1797 ID of the plugin which contains the filter component class of which
1798 to set the "input port connected" method.
1800 @param[in] _component_class_id
1804 ID of the filter component class, within the plugin having the ID
1805 \bt_p{_plugin_id}, of which to set the "input port connected"
1806 method to \bt_p{_method}.
1810 #bt_component_class_filter_input_port_connected_method
1812 Filter component class's "input port connected" method.
1815 @bt_pre_not_null{_method}
1817 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1818 __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)
1823 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
1824 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1825 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1827 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
1828 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1832 Sets the finalization method of the \bt_msg_iter_cls of the
1833 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1834 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1836 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1838 @param[in] _plugin_id
1842 ID of the plugin which contains the filter component class of which
1843 to set the finalization method of the message iterator class.
1845 @param[in] _component_class_id
1849 ID of the filter component class, within the plugin having the ID
1850 \bt_p{_plugin_id}, of which to set the finalization method of the
1851 message iterator class to \bt_p{_method}.
1855 #bt_message_iterator_class_finalize_method
1857 Filter component class's message iterator class's finalization method.
1860 @bt_pre_not_null{_method}
1862 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1863 __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)
1868 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1869 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1870 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1872 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1873 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1877 Sets the initialization method of the \bt_msg_iter_cls of the
1878 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1879 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1881 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1883 @param[in] _plugin_id
1887 ID of the plugin which contains the filter component class of which
1888 to set the initialization method of the message iterator class.
1890 @param[in] _component_class_id
1894 ID of the filter component class, within the plugin having the ID
1895 \bt_p{_plugin_id}, of which to set the initialization method of the
1896 message iterator class to \bt_p{_method}.
1900 #bt_message_iterator_class_initialize_method
1902 Filter component class's message iterator class's initialization
1906 @bt_pre_not_null{_method}
1908 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1909 __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)
1914 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1915 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1916 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1918 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1919 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1923 Sets the "seek beginning" and "can seek beginning?" methods of the
1924 \bt_msg_iter_cls of the \bt_flt_comp_cls having the ID
1925 \bt_p{_component_class_id} in the plugin having the ID
1926 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1927 \bt_p{_can_seek_method}.
1929 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1930 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1932 @param[in] _plugin_id
1936 ID of the plugin which contains the filter component class of which
1937 to set the "seek beginning" and "can seek beginning?" methods of the
1938 message iterator class.
1940 @param[in] _component_class_id
1944 ID of the filter component class, within the plugin having the ID
1945 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1946 seek beginning" methods of the message iterator class to
1947 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1949 @param[in] _seek_method
1951 #bt_message_iterator_class_seek_beginning_method
1953 Filter component class's message iterator class's "seek beginning"
1956 @param[in] _can_seek_method
1958 #bt_message_iterator_class_can_seek_beginning_method
1960 Filter component class's message iterator class's
1961 "can seek beginning?" method.
1963 Can be \c NULL, in which case it is equivalent to setting a method
1964 which always returns #BT_TRUE.
1967 @bt_pre_not_null{_seek_method}
1968 @bt_pre_not_null{_can_seek_method}
1970 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1971 __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); \
1972 __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);
1977 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID()
1978 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1979 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1981 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1982 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1986 Sets the "seek ns from origin" and "can seek ns from origin?"
1987 methods of the \bt_msg_iter_cls of the \bt_flt_comp_cls having the
1988 ID \bt_p{_component_class_id} in the plugin having the ID
1989 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1990 \bt_p{_can_seek_method}.
1992 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1993 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
1996 @param[in] _plugin_id
2000 ID of the plugin which contains the filter component class of which
2001 to set the "seek ns from origin" and "can seek ns from origin?"
2002 methods of the message iterator class.
2004 @param[in] _component_class_id
2008 ID of the filter component class, within the plugin having the ID
2009 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
2010 "can seek ns from origin" methods of the message iterator class to
2011 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
2013 @param[in] _seek_method
2015 #bt_message_iterator_class_seek_ns_from_origin_method
2017 Filter component class's message iterator class's "seek ns from
2020 @param[in] _can_seek_method
2022 #bt_message_iterator_class_can_seek_ns_from_origin_method
2024 Filter component class's message iterator class's "can seek ns from
2027 Can be \c NULL, in which case it is equivalent to setting a method
2028 which always returns #BT_TRUE.
2031 @bt_pre_not_null{_seek_method}
2032 @bt_pre_not_null{_can_seek_method}
2034 #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) \
2035 __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); \
2036 __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)
2041 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
2042 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2043 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2045 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
2046 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
2050 Sets the "output port connected" method of the \bt_flt_comp_cls
2051 having the ID \bt_p{_component_class_id} in the plugin having the ID
2052 \bt_p{_plugin_id} to \bt_p{_method}.
2055 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
2058 @param[in] _plugin_id
2062 ID of the plugin which contains the filter component class of which
2063 to set the "output port connected" method.
2065 @param[in] _component_class_id
2069 ID of the filter component class, within the plugin having the ID
2070 \bt_p{_plugin_id}, of which to set the "output port connected"
2071 method to \bt_p{_method}.
2075 #bt_component_class_filter_output_port_connected_method
2077 Filter component class's "output port connected" method.
2080 @bt_pre_not_null{_method}
2082 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2083 __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)
2088 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
2089 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2090 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2092 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
2093 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2097 Sets the query method of the \bt_flt_comp_cls
2098 having the ID \bt_p{_component_class_id} in the plugin having the ID
2099 \bt_p{_plugin_id} to \bt_p{_method}.
2101 See the \ref api-comp-cls-dev-meth-query "query" method.
2103 @param[in] _plugin_id
2107 ID of the plugin which contains the filter component class of which
2108 to set the query method.
2110 @param[in] _component_class_id
2114 ID of the filter component class, within the plugin having the ID
2115 \bt_p{_plugin_id}, of which to set the query
2116 method to \bt_p{_method}.
2120 #bt_component_class_filter_query_method
2122 Filter component class's query method.
2125 @bt_pre_not_null{_method}
2127 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2128 __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)
2133 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2134 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2135 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2137 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2138 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2143 @name Sink component class methods
2149 Sets the finalization method of the \bt_sink_comp_cls having the ID
2150 \bt_p{_component_class_id} in the plugin having the ID
2151 \bt_p{_plugin_id} to \bt_p{_method}.
2153 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
2155 @param[in] _plugin_id
2159 ID of the plugin which contains the sink component class of which
2160 to set the finalization method.
2162 @param[in] _component_class_id
2166 ID of the sink component class, within the plugin having the ID
2167 \bt_p{_plugin_id}, of which to set the finalization method to
2172 #bt_component_class_sink_finalize_method
2174 Sink component class's finalization method.
2177 @bt_pre_not_null{_method}
2179 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2180 __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)
2185 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
2186 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2187 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2189 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
2190 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
2194 Sets the \"get supported \bt_mip versions\" method of the
2195 \bt_sink_comp_cls having the ID \bt_p{_component_class_id} in the
2196 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
2198 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
2201 @param[in] _plugin_id
2205 ID of the plugin which contains the sink component class of which
2206 to set the "get supported MIP versions" method.
2208 @param[in] _component_class_id
2212 ID of the sink component class, within the plugin having the ID
2213 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
2214 method to \bt_p{_method}.
2218 #bt_component_class_sink_get_supported_mip_versions_method
2220 Sink component class's "get supported MIP versions" method.
2223 @bt_pre_not_null{_method}
2225 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2226 __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)
2231 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
2232 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2233 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2235 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
2236 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
2240 Sets the "graph is configured" method of the \bt_sink_comp_cls
2241 having the ID \bt_p{_component_class_id} in the plugin having the ID
2242 \bt_p{_plugin_id} to \bt_p{_method}.
2245 \ref api-comp-cls-dev-meth-graph-configured "graph is configured"
2248 @param[in] _plugin_id
2252 ID of the plugin which contains the sink component class of which
2253 to set the "graph is configured" method.
2255 @param[in] _component_class_id
2259 ID of the sink component class, within the plugin having the ID
2260 \bt_p{_plugin_id}, of which to set the "graph is configured"
2261 method to \bt_p{_method}.
2265 #bt_component_class_sink_graph_is_configured_method
2267 Sink component class's "graph is configured" method.
2270 @bt_pre_not_null{_method}
2272 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2273 __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)
2278 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID()
2279 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2280 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2282 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _method) \
2283 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _method)
2287 Sets the initialization method of the \bt_sink_comp_cls having the
2288 ID \bt_p{_component_class_id} in the plugin having the ID
2289 \bt_p{_plugin_id} to \bt_p{_method}.
2291 See the \ref api-comp-cls-dev-meth-init "initialize" method.
2293 @param[in] _plugin_id
2297 ID of the plugin which contains the sink component class of which
2298 to set the initialization method.
2300 @param[in] _component_class_id
2304 ID of the sink component class, within the plugin having the ID
2305 \bt_p{_plugin_id}, of which to set the initialization method to
2310 #bt_component_class_sink_initialize_method
2312 Sink component class's initialization method.
2315 @bt_pre_not_null{_method}
2317 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2318 __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)
2323 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
2324 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2325 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2327 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
2328 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
2332 Sets the "input port connected" method of the \bt_sink_comp_cls
2333 having the ID \bt_p{_component_class_id} in the plugin having the ID
2334 \bt_p{_plugin_id} to \bt_p{_method}.
2337 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
2340 @param[in] _plugin_id
2344 ID of the plugin which contains the sink component class of which
2345 to set the "input port connected" method.
2347 @param[in] _component_class_id
2351 ID of the sink component class, within the plugin having the ID
2352 \bt_p{_plugin_id}, of which to set the "input port connected"
2353 method to \bt_p{_method}.
2357 #bt_component_class_sink_input_port_connected_method
2359 Sink component class's "input port connected" method.
2362 @bt_pre_not_null{_method}
2364 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2365 __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)
2370 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
2371 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2372 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2374 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
2375 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2379 Sets the query method of the \bt_sink_comp_cls
2380 having the ID \bt_p{_component_class_id} in the plugin having the ID
2381 \bt_p{_plugin_id} to \bt_p{_method}.
2383 See the \ref api-comp-cls-dev-meth-query "query" method.
2385 @param[in] _plugin_id
2389 ID of the plugin which contains the sink component class of which
2390 to set the query method.
2392 @param[in] _component_class_id
2396 ID of the sink component class, within the plugin having the ID
2397 \bt_p{_plugin_id}, of which to set the query
2398 method to \bt_p{_method}.
2402 #bt_component_class_sink_query_method
2404 Sink component class's query method.
2407 @bt_pre_not_null{_method}
2409 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2410 __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)
2415 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2416 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2417 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2419 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2420 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2426 /* Plugin descriptor: describes a single plugin (internal use) */
2427 struct __bt_plugin_descriptor
{
2430 } __attribute__((packed
));
2432 /* Type of a plugin attribute (internal use) */
2433 enum __bt_plugin_descriptor_attribute_type
{
2434 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
2435 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
2436 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
2437 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
2438 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
2439 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
2442 /* Plugin (user) version */
2443 struct __bt_plugin_descriptor_version
{
2450 /* Plugin attribute (internal use) */
2451 struct __bt_plugin_descriptor_attribute
{
2452 /* Plugin descriptor to which to associate this attribute */
2453 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2455 /* Name of the attribute's type for debug purposes */
2456 const char *type_name
;
2458 /* Attribute's type */
2459 enum __bt_plugin_descriptor_attribute_type type
;
2461 /* Attribute's value (depends on attribute's type) */
2463 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
2464 bt_plugin_initialize_func init
;
2466 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
2467 bt_plugin_finalize_func exit
;
2469 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
2472 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
2473 const char *license
;
2475 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2476 const char *description
;
2478 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
2479 struct __bt_plugin_descriptor_version version
;
2481 } __attribute__((packed
));
2483 /* Component class descriptor (internal use) */
2484 struct __bt_plugin_component_class_descriptor
{
2486 * Plugin descriptor to which to associate this component
2489 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2491 /* Component class name */
2494 /* Component class type */
2495 bt_component_class_type type
;
2497 /* Mandatory methods (depends on component class type) */
2499 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
2501 bt_message_iterator_class_next_method msg_iter_next
;
2504 /* BT_COMPONENT_CLASS_TYPE_FILTER */
2506 bt_message_iterator_class_next_method msg_iter_next
;
2509 /* BT_COMPONENT_CLASS_TYPE_SINK */
2511 bt_component_class_sink_consume_method consume
;
2514 } __attribute__((packed
));
2516 /* Type of a component class attribute (internal use) */
2517 enum __bt_plugin_component_class_descriptor_attribute_type
{
2518 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
2519 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
2520 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD
= 2,
2521 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD
= 3,
2522 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 4,
2523 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 5,
2524 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 6,
2525 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 7,
2526 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD
= 8,
2527 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD
= 9,
2528 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 10,
2529 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD
= 11,
2530 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD
= 12,
2531 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD
= 13,
2532 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD
= 14,
2535 /* Component class attribute (internal use) */
2536 struct __bt_plugin_component_class_descriptor_attribute
{
2538 * Component class plugin attribute to which to associate this
2539 * component class attribute.
2541 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
2543 /* Name of the attribute's type for debug purposes */
2544 const char *type_name
;
2546 /* Attribute's type */
2547 enum __bt_plugin_component_class_descriptor_attribute_type type
;
2549 /* Attribute's value (depends on attribute's type) */
2551 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2552 const char *description
;
2554 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
2557 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD */
2558 bt_component_class_source_get_supported_mip_versions_method source_get_supported_mip_versions_method
;
2559 bt_component_class_filter_get_supported_mip_versions_method filter_get_supported_mip_versions_method
;
2560 bt_component_class_sink_get_supported_mip_versions_method sink_get_supported_mip_versions_method
;
2562 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD */
2563 bt_component_class_source_initialize_method source_initialize_method
;
2564 bt_component_class_filter_initialize_method filter_initialize_method
;
2565 bt_component_class_sink_initialize_method sink_initialize_method
;
2567 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
2568 bt_component_class_source_finalize_method source_finalize_method
;
2569 bt_component_class_filter_finalize_method filter_finalize_method
;
2570 bt_component_class_sink_finalize_method sink_finalize_method
;
2572 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
2573 bt_component_class_source_query_method source_query_method
;
2574 bt_component_class_filter_query_method filter_query_method
;
2575 bt_component_class_sink_query_method sink_query_method
;
2577 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
2578 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
2579 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
2581 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
2582 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
2583 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
2585 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */
2586 bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method
;
2588 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD */
2589 bt_message_iterator_class_initialize_method msg_iter_initialize_method
;
2591 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
2592 bt_message_iterator_class_finalize_method msg_iter_finalize_method
;
2594 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
2595 bt_message_iterator_class_seek_ns_from_origin_method msg_iter_seek_ns_from_origin_method
;
2597 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
2598 bt_message_iterator_class_seek_beginning_method msg_iter_seek_beginning_method
;
2600 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
2601 bt_message_iterator_class_can_seek_ns_from_origin_method msg_iter_can_seek_ns_from_origin_method
;
2603 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
2604 bt_message_iterator_class_can_seek_beginning_method msg_iter_can_seek_beginning_method
;
2606 } __attribute__((packed
));
2608 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
2609 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
2610 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
2611 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
2612 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
2613 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
2614 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
2615 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
2618 * Defines a plugin attribute (generic, internal use).
2620 * _attr_name: Name of the attribute (C identifier).
2621 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
2622 * _id: Plugin descriptor ID (C identifier).
2625 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
2626 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
2627 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
2628 .type_name = #_attr_name, \
2629 .type = _attr_type, \
2630 .value = { ._attr_name = _x }, \
2632 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
2634 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
2635 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
2638 * Defines a component class descriptor attribute (generic, internal
2641 * _id: Plugin descriptor ID (C identifier).
2642 * _component_class_id: Component class ID (C identifier).
2643 * _type: Component class type (`source`, `filter`, or `sink`).
2644 * _attr_name: Name of the attribute (C identifier).
2645 * _attr_type: Type of the attribute
2646 * (enum __bt_plugin_descriptor_attribute_type).
2649 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _component_class_id, _type, _x) \
2650 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name = { \
2651 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_component_class_id, \
2652 .type_name = #_attr_name, \
2653 .type = _attr_type, \
2654 .value = { ._attr_name = _x }, \
2656 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
2659 * Clang supports the no_sanitize variable attribute on global variables.
2660 * GCC only supports the no_sanitize_address function attribute, which is
2661 * not what we need. This is fine because, as far as we have seen, gcc
2662 * does not insert red zones around global variables.
2664 #if defined(__clang__)
2665 # if __has_feature(address_sanitizer)
2666 # define __bt_plugin_variable_attribute_no_sanitize_address \
2667 __attribute__((no_sanitize("address")))
2669 # define __bt_plugin_variable_attribute_no_sanitize_address
2672 # define __bt_plugin_variable_attribute_no_sanitize_address
2676 * Variable attributes for a plugin descriptor pointer to be added to
2677 * the plugin descriptor section (internal use).
2680 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2681 __attribute__((section("__DATA,btp_desc"), used)) \
2682 __bt_plugin_variable_attribute_no_sanitize_address
2684 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2685 __start___bt_plugin_descriptors
2687 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2688 __stop___bt_plugin_descriptors
2690 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
2691 __asm("section$start$__DATA$btp_desc")
2693 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
2694 __asm("section$end$__DATA$btp_desc")
2698 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2699 __attribute__((section("__bt_plugin_descriptors"), used)) \
2700 __bt_plugin_variable_attribute_no_sanitize_address
2702 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2703 __start___bt_plugin_descriptors
2705 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2706 __stop___bt_plugin_descriptors
2708 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
2710 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
2714 * Variable attributes for a plugin attribute pointer to be added to
2715 * the plugin attribute section (internal use).
2718 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2719 __attribute__((section("__DATA,btp_desc_att"), used)) \
2720 __bt_plugin_variable_attribute_no_sanitize_address
2722 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2723 __start___bt_plugin_descriptor_attributes
2725 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2726 __stop___bt_plugin_descriptor_attributes
2728 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2729 __asm("section$start$__DATA$btp_desc_att")
2731 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2732 __asm("section$end$__DATA$btp_desc_att")
2736 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2737 __attribute__((section("__bt_plugin_descriptor_attributes"), used)) \
2738 __bt_plugin_variable_attribute_no_sanitize_address
2740 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2741 __start___bt_plugin_descriptor_attributes
2743 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2744 __stop___bt_plugin_descriptor_attributes
2746 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2748 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2752 * Variable attributes for a component class descriptor pointer to be
2753 * added to the component class descriptor section (internal use).
2756 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2757 __attribute__((section("__DATA,btp_cc_desc"), used)) \
2758 __bt_plugin_variable_attribute_no_sanitize_address
2760 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2761 __start___bt_plugin_component_class_descriptors
2763 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2764 __stop___bt_plugin_component_class_descriptors
2766 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
2767 __asm("section$start$__DATA$btp_cc_desc")
2769 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
2770 __asm("section$end$__DATA$btp_cc_desc")
2774 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2775 __attribute__((section("__bt_plugin_component_class_descriptors"), used)) \
2776 __bt_plugin_variable_attribute_no_sanitize_address
2778 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2779 __start___bt_plugin_component_class_descriptors
2781 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2782 __stop___bt_plugin_component_class_descriptors
2784 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
2786 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
2790 * Variable attributes for a component class descriptor attribute
2791 * pointer to be added to the component class descriptor attribute
2792 * section (internal use).
2795 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2796 __attribute__((section("__DATA,btp_cc_desc_att"), used)) \
2797 __bt_plugin_variable_attribute_no_sanitize_address
2799 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2800 __start___bt_plugin_component_class_descriptor_attributes
2802 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2803 __stop___bt_plugin_component_class_descriptor_attributes
2805 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2806 __asm("section$start$__DATA$btp_cc_desc_att")
2808 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2809 __asm("section$end$__DATA$btp_cc_desc_att")
2813 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2814 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) \
2815 __bt_plugin_variable_attribute_no_sanitize_address
2817 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2818 __start___bt_plugin_component_class_descriptor_attributes
2820 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2821 __stop___bt_plugin_component_class_descriptor_attributes
2823 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2825 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2832 #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */