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 module offers macros to create a \bt_name shared object plugin.
54 Behind the scenes, the <code>BT_PLUGIN_*()</code> macros of this module
55 create and fill global tables which are located in sections of the
56 shared object with specific names. The \ref api-plugin functions can
57 load the resulting shared object file and create corresponding
60 See \ref guide-comp-link-plugin-so.
62 <h1>Plugin definition C file structure</h1>
64 The structure of a \bt_name plugin definition C file is as such:
76 Define a \bt_name plugin with BT_PLUGIN() if the plugin's name is a
77 valid C identifier, or with BT_PLUGIN_WITH_ID() otherwise.
79 See \ref api-plugin-dev-custom-plugin-id "Custom plugin ID" to
80 learn more about plugin IDs.
83 When you use BT_PLUGIN(), the plugin's ID is <code>auto</code>.
87 \bt_dt_opt Use any of the following macros (or their
88 <code>*_WITH_ID()</code> counterpart) \em once to set the properties
92 - BT_PLUGIN_DESCRIPTION()
98 \bt_dt_opt Use any of the following macros (or their
99 <code>*_WITH_ID()</code> counterpart) \em once to set the
100 initialization and finalization functions of the plugin:
102 - BT_PLUGIN_INITIALIZE_FUNC()
103 - BT_PLUGIN_FINALIZE_FUNC()
105 A plugin's initialization function is executed when the shared
106 object is loaded (see \ref api-plugin).
108 A plugin's finalization function is executed when the \bt_plugin
109 object is destroyed, if the initialization function (if any)
114 Use any of the following macros (or their <code>*_WITH_ID()</code>
115 counterpart) to add a component class to the plugin:
117 - BT_PLUGIN_SOURCE_COMPONENT_CLASS()
118 - BT_PLUGIN_FILTER_COMPONENT_CLASS()
119 - BT_PLUGIN_SINK_COMPONENT_CLASS()
123 \bt_dt_opt Depending on the type of the component class of step 5,
124 use any of the following macros (or their <code>*_WITH_ID()</code>
126 \em once to set its properties:
129 <dt>\bt_c_src_comp_cls</dt>
131 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION()
132 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP()
135 <dt>\bt_c_flt_comp_cls</dt>
137 - BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION()
138 - BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP()
141 <dt>\bt_c_sink_comp_cls</dt>
143 - BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION()
144 - BT_PLUGIN_SINK_COMPONENT_CLASS_HELP()
150 \bt_dt_opt Depending on the type of the component class of step 5,
151 use any of the following macros (or their <code>*_WITH_ID()</code>
152 counterpart) to set its optional methods:
155 <dt>Source component class</dt>
157 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD()
158 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
159 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD()
160 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
161 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
162 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
163 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD()
166 <dt>Filter component class</dt>
168 - BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD()
169 - BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
170 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD()
171 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
172 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
173 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
174 - BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
175 - BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD()
178 <dt>Sink component class</dt>
180 - BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD()
181 - BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
182 - BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD()
183 - BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD()
184 - BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
185 - BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD()
191 You can repeat steps 5 to 7 to add more than one component class to a
194 See \ref example-simple-plugin-def-file for a concrete example of how
195 to use the macros of this module.
197 <h1>\anchor api-plugin-dev-custom-plugin-id Custom plugin ID</h1>
199 The BT_PLUGIN() macro defines a plugin with a specific name and the
200 ID <code>auto</code>.
202 All the <code>BT_PLUGIN_*()</code> macros which do not end with
203 <code>_WITH_ID</code> refer to the <code>auto</code> plugin.
205 There are two situations which demand that you use a custom plugin ID:
207 - You want more than one plugin contained in your shared object file.
209 Although the \bt_name project does not recommend this, it is possible.
210 This is why bt_plugin_find_all_from_file() returns a \bt_plugin_set
211 instead of a single \bt_plugin.
213 In this case, each plugin of the shared object needs its own, unique
216 - You want to give the plugin a name which is not a valid C identifier.
218 The BT_PLUGIN() macro accepts a C identifier as the plugin name, while
219 the BT_PLUGIN_WITH_ID() accepts a C identifier for the ID and a C
222 To define a plugin with a specific ID, use BT_PLUGIN_WITH_ID(), for
226 BT_PLUGIN_WITH_ID(my_plugin_id, "my-plugin-name");
229 Then, use the <code>BT_PLUGIN_*_WITH_ID()</code> macros to refer to
230 this specific plugin, for example:
233 BT_PLUGIN_AUTHOR_WITH_ID(my_plugin_id, "Patrick Bouchard");
238 You can still use the <code>auto</code> ID with BT_PLUGIN_WITH_ID()
239 to use the simpler macros afterwards while still giving the plugin a
240 name which is not a valid C identifier, for example:
243 BT_PLUGIN_WITH_ID(auto, "my-plugin-name");
244 BT_PLUGIN_AUTHOR("Patrick Bouchard");
248 <h1>Custom component class ID</h1>
250 The BT_PLUGIN_SOURCE_COMPONENT_CLASS(),
251 BT_PLUGIN_FILTER_COMPONENT_CLASS(), and
252 BT_PLUGIN_SINK_COMPONENT_CLASS() add a component class with a specific
253 name to the plugin having the ID <code>auto</code>.
255 The name you pass to those macros must be a valid C identifier and it
256 also serves as the component class's ID within the <code>auto</code>
259 There are two situations which demand that you use a custom component
262 - You want to add the component class to a specific plugin (other than
263 <code>auto</code>, if you have more than one).
265 - You want to give the component class a name which is not a valid C
268 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros accept a
269 C identifier for the component class ID and a string for its name.
271 For a given plugin and for a given component class type, all component
272 class IDs must be unique.
274 To add a component class having a specific ID to a plugin,
275 use the BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(),
276 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(), and
277 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() macros, for example:
280 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(my_plugin_id, my_comp_class_id,
281 "my-source", my_source_iter_next);
286 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros
287 specify the ID of the plugin to which to add the component class.
289 If you use the BT_PLUGIN() macro to define your plugin, then its
290 ID is <code>auto</code>:
293 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, my_comp_class_id,
294 "my-source", my_source_iter_next);
298 Then, use the <code>BT_PLUGIN_*_COMPONENT_CLASS_*_WITH_ID()</code>
299 macros to refer to this specific component class, for example:
302 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(my_plugin_id,
303 my_comp_class_id, my_source_finalize);
313 @typedef struct bt_self_plugin bt_self_plugin;
328 Defines a plugin module.
330 In a plugin definition C file, you must use this macro before you use
331 any other <code>BT_PLUGIN*()</code> macro.
333 #define BT_PLUGIN_MODULE() \
334 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
335 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
336 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
338 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
339 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
340 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
342 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
343 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
344 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
346 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; \
347 _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; \
348 _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; \
350 _BT_EXPORT struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
352 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
354 _BT_EXPORT struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
356 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
358 _BT_EXPORT struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
360 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
362 _BT_EXPORT struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
364 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
366 _BT_EXPORT struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
368 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
370 _BT_EXPORT struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
372 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
374 _BT_EXPORT struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
376 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
378 _BT_EXPORT struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
380 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
386 @name Plugin definition
392 Defines a plugin named \bt_p{_name} and having the ID \bt_p{_id}.
398 Plugin's ID, unique amongst all the plugin IDs of the same shared
403 <code>const char *</code>
408 @bt_pre_not_null{_name}
410 #define BT_PLUGIN_WITH_ID(_id, _name) \
411 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
414 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
418 Alias of BT_PLUGIN_WITH_ID() with the \bt_p{_id} parameter set to
421 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
426 @name Plugin properties
432 Sets the description of the plugin having the ID \bt_p{_id} to
435 See the \ref api-comp-cls-prop-descr "description" property.
441 ID of the plugin of which to set the description.
443 @param[in] _description
445 <code>const char *</code>
447 Plugin's description.
450 @bt_pre_not_null{_description}
452 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _description) \
453 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _description)
457 Alias of BT_PLUGIN_DESCRIPTION_WITH_ID() with the \bt_p{_id}
458 parameter set to <code>auto</code>.
460 #define BT_PLUGIN_DESCRIPTION(_description) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _description)
464 Sets the name(s) of the author(s) of the plugin having the ID
465 \bt_p{_id} to \bt_p{_author}.
467 See the \ref api-plugin-prop-author "author name(s)" property.
473 ID of the plugin of which to set the author(s).
477 <code>const char *</code>
482 @bt_pre_not_null{_author}
484 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _author) \
485 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _author)
489 Alias of BT_PLUGIN_AUTHOR_WITH_ID() with the \bt_p{_id}
490 parameter set to <code>auto</code>.
492 #define BT_PLUGIN_AUTHOR(_author) BT_PLUGIN_AUTHOR_WITH_ID(auto, _author)
496 Sets the license (name or full) of the plugin having the ID
497 \bt_p{_id} to \bt_p{_license}.
499 See the \ref api-plugin-prop-license "license" property.
505 ID of the plugin of which to set the license.
509 <code>const char *</code>
514 @bt_pre_not_null{_license}
516 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _license) \
517 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _license)
521 Alias of BT_PLUGIN_LICENSE_WITH_ID() with the \bt_p{_id}
522 parameter set to <code>auto</code>.
524 #define BT_PLUGIN_LICENSE(_license) BT_PLUGIN_LICENSE_WITH_ID(auto, _license)
528 Sets the version of the plugin having the ID \bt_p{_id} to
531 See the \ref api-plugin-prop-version "version" property.
537 ID of the plugin of which to set the version.
541 <code>unsigned int</code>
543 Plugin's major version.
547 <code>unsigned int</code>
549 Plugin's minor version.
553 <code>unsigned int</code>
555 Plugin's patch version.
559 <code>const char *</code>
561 Plugin's version's extra information.
563 Can be \c NULL if the plugin's version has no extra information.
566 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
567 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
571 Alias of BT_PLUGIN_VERSION_WITH_ID() with the \bt_p{_id}
572 parameter set to <code>auto</code>.
574 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
579 @name Plugin functions
585 Status codes for #bt_plugin_initialize_func.
587 typedef enum bt_plugin_initialize_func_status
{
592 BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
= __BT_FUNC_STATUS_OK
,
598 BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
604 BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
605 } bt_plugin_initialize_func_status
;
609 User plugin initialization function.
611 @param[in] self_plugin
615 This parameter is a private view of the \bt_plugin object for
618 As of \bt_name_version_min_maj, there's no self plugin API.
621 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
623 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
625 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
628 @bt_pre_not_null{self_plugin}
630 typedef bt_plugin_initialize_func_status (*bt_plugin_initialize_func
)(
631 bt_self_plugin
*self_plugin
);
635 Sets the initialization function of the plugin having the ID
636 \bt_p{_id} to \bt_p{_func}.
642 ID of the plugin of which to set the initialization function.
646 #bt_plugin_initialize_func
648 Plugin's initialization function.
651 @bt_pre_not_null{_func}
653 #define BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(_id, _func) \
654 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _func)
658 Alias of BT_PLUGIN_INITIALIZE_FUNC_WITH_ID() with the \bt_p{_id}
659 parameter set to <code>auto</code>.
661 #define BT_PLUGIN_INITIALIZE_FUNC(_func) BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(auto, _func)
665 User plugin finalization function.
667 typedef void (*bt_plugin_finalize_func
)(void);
671 Sets the finalization function of the plugin having the ID
672 \bt_p{_id} to \bt_p{_func}.
678 ID of the plugin of which to set the finalization function.
682 #bt_plugin_finalize_func
684 Plugin's finalization function.
687 @bt_pre_not_null{_func}
689 #define BT_PLUGIN_FINALIZE_FUNC_WITH_ID(_id, _func) \
690 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _func)
694 Alias of BT_PLUGIN_FINALIZE_FUNC_WITH_ID() with the \bt_p{_id}
695 parameter set to <code>auto</code>.
697 #define BT_PLUGIN_FINALIZE_FUNC(_func) BT_PLUGIN_FINALIZE_FUNC_WITH_ID(auto, _func)
702 @name Component class adding
708 Adds a \bt_src_comp_cls named \bt_p{_name}, having the ID
709 \bt_p{_component_class_id} and the message iterator class's "next"
710 method \bt_p{_message_iterator_class_next_method}, to the plugin
711 having the ID \bt_p{_plugin_id}.
713 @param[in] _plugin_id
717 ID of the plugin to which to add the source component class.
719 @param[in] _component_class_id
723 Source component class's ID, unique amongst all the source component
724 class IDs of the same plugin.
728 <code>const char *</code>
730 Source component class's name, unique amongst all the source
731 component class names of the same plugin.
733 @param[in] _message_iterator_class_next_method
735 #bt_message_iterator_class_next_method
737 Source component class's message iterator class's "next" method.
740 @bt_pre_not_null{_name}
741 @bt_pre_not_null{_message_iterator_class_next_method}
743 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
744 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
745 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
747 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
748 .methods = { .source = { .msg_iter_next = _message_iterator_class_next_method } }, \
750 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
754 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID() with the
755 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
756 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
757 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
763 Passed as both the \bt_p{_component_class_id} and the
764 \bt_p{_name} (once converted to a string) parameters of
765 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID().
768 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
769 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
773 Adds a \bt_flt_comp_cls named \bt_p{_name}, having the ID
774 \bt_p{_component_class_id} and the message iterator class's "next"
775 method \bt_p{_message_iterator_class_next_method}, to the plugin
776 having the ID \bt_p{_plugin_id}.
778 @param[in] _plugin_id
782 ID of the plugin to which to add the filter component class.
784 @param[in] _component_class_id
788 Filter component class's ID, unique amongst all the filter component
789 class IDs of the same plugin.
793 <code>const char *</code>
795 Filter component class's name, unique amongst all the filter
796 component class names of the same plugin.
798 @param[in] _message_iterator_class_next_method
800 #bt_message_iterator_class_next_method
802 Filter component class's message iterator class's "next" method.
805 @bt_pre_not_null{_name}
806 @bt_pre_not_null{_message_iterator_class_next_method}
808 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
809 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
810 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
812 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
813 .methods = { .filter = { .msg_iter_next = _message_iterator_class_next_method } }, \
815 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
819 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID() with the
820 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
821 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
822 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
828 Passed as both the \bt_p{_component_class_id} and the
829 \bt_p{_name} (once converted to a string) parameters of
830 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID().
833 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
834 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
838 Adds a \bt_sink_comp_cls named \bt_p{_name}, having the ID
839 \bt_p{_component_class_id} and the consuming method
840 \bt_p{_consume_method}, to the plugin
841 having the ID \bt_p{_plugin_id}.
843 @param[in] _plugin_id
847 ID of the plugin to which to add the sink component class.
849 @param[in] _component_class_id
853 Sink component class's ID, unique amongst all the sink component
854 class IDs of the same plugin.
858 <code>const char *</code>
860 Sink component class's name, unique amongst all the sink
861 component class names of the same plugin.
863 @param[in] _consume_method
865 #bt_component_class_sink_consume_method
867 Sink component class's message iterator class's "next" method.
870 @bt_pre_not_null{_name}
871 @bt_pre_not_null{_consume_method}
873 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _consume_method) \
874 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
875 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
877 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
878 .methods = { .sink = { .consume = _consume_method } }, \
880 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
884 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() with the
885 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
886 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
887 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
893 Passed as both the \bt_p{_component_class_id} and the
894 \bt_p{_name} (once converted to a string) parameters of
895 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID().
898 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
899 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
904 @name Source component class properties
910 Sets the description of the \bt_src_comp_cls having the ID
911 \bt_p{_component_class_id} in the plugin having the ID
912 \bt_p{_plugin_id} to \bt_p{_description}.
914 See the \ref api-comp-cls-prop-descr "description" property.
916 @param[in] _plugin_id
920 ID of the plugin which contains the source component class of which
921 to set the description.
923 @param[in] _component_class_id
927 ID of the source component class, within the plugin having the ID
928 \bt_p{_plugin_id}, of which to set the description to
931 @param[in] _description
933 <code>const char *</code>
935 Source component class's description.
938 @bt_pre_not_null{_description}
940 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
941 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, source, _description)
945 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
946 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
947 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
949 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
950 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
954 Sets the help text of the \bt_src_comp_cls having the ID
955 \bt_p{_component_class_id} in the plugin having the ID
956 \bt_p{_plugin_id} to \bt_p{_help_text}.
958 See the \ref api-comp-cls-prop-help "help text" property.
960 @param[in] _plugin_id
964 ID of the plugin which contains the source component class of which
965 to set the help text.
967 @param[in] _component_class_id
971 ID of the source component class, within the plugin having the ID
972 \bt_p{_plugin_id}, of which to set the help text to
975 @param[in] _help_text
977 <code>const char *</code>
979 Source component class's help text.
982 @bt_pre_not_null{_help_text}
984 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
985 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, source, _help_text)
989 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID() with the
990 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
991 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
993 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _help_text) \
994 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
999 @name Filter component class properties
1005 Sets the description of the \bt_flt_comp_cls having the ID
1006 \bt_p{_component_class_id} in the plugin having the ID
1007 \bt_p{_plugin_id} to \bt_p{_description}.
1009 See the \ref api-comp-cls-prop-descr "description" property.
1011 @param[in] _plugin_id
1015 ID of the plugin which contains the filter component class of which
1016 to set the description.
1018 @param[in] _component_class_id
1022 ID of the filter component class, within the plugin having the ID
1023 \bt_p{_plugin_id}, of which to set the description to
1024 \bt_p{_description}.
1026 @param[in] _description
1028 <code>const char *</code>
1030 Filter component class's description.
1033 @bt_pre_not_null{_description}
1035 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1036 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, filter, _description)
1040 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1041 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1042 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1044 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1045 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1049 Sets the help text of the \bt_flt_comp_cls having the ID
1050 \bt_p{_component_class_id} in the plugin having the ID
1051 \bt_p{_plugin_id} to \bt_p{_help_text}.
1053 See the \ref api-comp-cls-prop-help "help text" property.
1055 @param[in] _plugin_id
1059 ID of the plugin which contains the filter component class of which
1060 to set the help text.
1062 @param[in] _component_class_id
1066 ID of the filter component class, within the plugin having the ID
1067 \bt_p{_plugin_id}, of which to set the help text to
1070 @param[in] _help_text
1072 <code>const char *</code>
1074 Filter component class's help text.
1077 @bt_pre_not_null{_help_text}
1079 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1080 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, filter, _help_text)
1084 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID() with the
1085 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1086 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1088 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _help_text) \
1089 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1094 @name Sink component class properties
1100 Sets the description of the \bt_sink_comp_cls having the ID
1101 \bt_p{_component_class_id} in the plugin having the ID
1102 \bt_p{_plugin_id} to \bt_p{_description}.
1104 See the \ref api-comp-cls-prop-descr "description" property.
1106 @param[in] _plugin_id
1110 ID of the plugin which contains the sink component class of which
1111 to set the description.
1113 @param[in] _component_class_id
1117 ID of the sink component class, within the plugin having the ID
1118 \bt_p{_plugin_id}, of which to set the description to
1119 \bt_p{_description}.
1121 @param[in] _description
1123 <code>const char *</code>
1125 Sink component class's description.
1128 @bt_pre_not_null{_description}
1130 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1131 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, sink, _description)
1135 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1136 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1137 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1139 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1140 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1144 Sets the help text of the \bt_sink_comp_cls having the ID
1145 \bt_p{_component_class_id} in the plugin having the ID
1146 \bt_p{_plugin_id} to \bt_p{_help_text}.
1148 See the \ref api-comp-cls-prop-help "help text" property.
1150 @param[in] _plugin_id
1154 ID of the plugin which contains the sink component class of which
1155 to set the help text.
1157 @param[in] _component_class_id
1161 ID of the sink component class, within the plugin having the ID
1162 \bt_p{_plugin_id}, of which to set the help text to
1165 @param[in] _help_text
1167 <code>const char *</code>
1169 Sink component class's help text.
1172 @bt_pre_not_null{_help_text}
1174 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1175 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, sink, _help_text)
1179 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID() with
1180 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1181 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1183 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _help_text) \
1184 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1189 @name Source component class methods
1195 Sets the finalization method of the \bt_src_comp_cls having the ID
1196 \bt_p{_component_class_id} in the plugin having the ID
1197 \bt_p{_plugin_id} to \bt_p{_method}.
1199 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1201 @param[in] _plugin_id
1205 ID of the plugin which contains the source component class of which
1206 to set the finalization method.
1208 @param[in] _component_class_id
1212 ID of the source component class, within the plugin having the ID
1213 \bt_p{_plugin_id}, of which to set the finalization method to
1218 #bt_component_class_source_finalize_method
1220 Source component class's finalization method.
1223 @bt_pre_not_null{_method}
1225 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1226 __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)
1231 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1232 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1233 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1235 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1236 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1240 Sets the \"get supported \bt_mip versions\" method of the
1241 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1242 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1244 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1247 @param[in] _plugin_id
1251 ID of the plugin which contains the source component class of which
1252 to set the "get supported MIP versions" method.
1254 @param[in] _component_class_id
1258 ID of the source component class, within the plugin having the ID
1259 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1260 method to \bt_p{_method}.
1264 #bt_component_class_source_get_supported_mip_versions_method
1266 Source component class's "get supported MIP versions" method.
1269 @bt_pre_not_null{_method}
1271 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1272 __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)
1277 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1278 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1279 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1281 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1282 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1286 Sets the initialization method of the \bt_src_comp_cls having the ID
1287 \bt_p{_component_class_id} in the plugin having the ID
1288 \bt_p{_plugin_id} to \bt_p{_method}.
1290 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1292 @param[in] _plugin_id
1296 ID of the plugin which contains the source component class of which
1297 to set the initialization method.
1299 @param[in] _component_class_id
1303 ID of the source component class, within the plugin having the ID
1304 \bt_p{_plugin_id}, of which to set the initialization method to
1309 #bt_component_class_source_initialize_method
1311 Source component class's initialization method.
1314 @bt_pre_not_null{_method}
1316 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1317 __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)
1322 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1323 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1324 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1326 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1327 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1331 Sets the finalization method of the \bt_msg_iter_cls of the
1332 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1333 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1335 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1337 @param[in] _plugin_id
1341 ID of the plugin which contains the source component class of which
1342 to set the finalization method of the message iterator class.
1344 @param[in] _component_class_id
1348 ID of the source component class, within the plugin having the ID
1349 \bt_p{_plugin_id}, of which to set the finalization method of the
1350 message iterator class to \bt_p{_method}.
1354 #bt_message_iterator_class_finalize_method
1356 Source component class's message iterator class's finalization method.
1359 @bt_pre_not_null{_method}
1361 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1362 __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)
1367 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1368 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1369 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1371 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1372 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1376 Sets the initialization method of the \bt_msg_iter_cls of the
1377 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1378 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1380 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1382 @param[in] _plugin_id
1386 ID of the plugin which contains the source component class of which
1387 to set the initialization method of the message iterator class.
1389 @param[in] _component_class_id
1393 ID of the source component class, within the plugin having the ID
1394 \bt_p{_plugin_id}, of which to set the initialization method of the
1395 message iterator class to \bt_p{_method}.
1399 #bt_message_iterator_class_initialize_method
1401 Source component class's message iterator class's initialization
1405 @bt_pre_not_null{_method}
1407 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1408 __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)
1413 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1414 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1415 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1417 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1418 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1422 Sets the "seek beginning" and "can seek beginning?" methods of the
1423 \bt_msg_iter_cls of the \bt_src_comp_cls having the ID
1424 \bt_p{_component_class_id} in the plugin having the ID
1425 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1426 \bt_p{_can_seek_method}.
1428 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1429 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1431 @param[in] _plugin_id
1435 ID of the plugin which contains the source component class of which
1436 to set the "seek beginning" and "can seek beginning?" methods of the
1437 message iterator class.
1439 @param[in] _component_class_id
1443 ID of the source component class, within the plugin having the ID
1444 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1445 seek beginning" methods of the message iterator class to
1446 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1448 @param[in] _seek_method
1450 #bt_message_iterator_class_seek_beginning_method
1452 Source component class's message iterator class's "seek beginning"
1455 @param[in] _can_seek_method
1457 #bt_message_iterator_class_can_seek_beginning_method
1459 Source component class's message iterator class's
1460 "can seek beginning?" method.
1462 Can be \c NULL, in which case it is equivalent to setting a method
1463 which always returns #BT_TRUE.
1466 @bt_pre_not_null{_seek_method}
1467 @bt_pre_not_null{_can_seek_method}
1469 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1470 __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); \
1471 __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)
1476 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS()
1477 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1478 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1480 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1481 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1485 Sets the "seek ns from origin" and "can seek ns from origin?"
1486 methods of the \bt_msg_iter_cls of the \bt_src_comp_cls having the
1487 ID \bt_p{_component_class_id} in the plugin having the ID
1488 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1489 \bt_p{_can_seek_method}.
1491 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1492 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
1495 @param[in] _plugin_id
1499 ID of the plugin which contains the source component class of which
1500 to set the "seek ns from origin" and "can seek ns from origin?"
1501 methods of the message iterator class.
1503 @param[in] _component_class_id
1507 ID of the source component class, within the plugin having the ID
1508 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
1509 "can seek ns from origin" methods of the message iterator class to
1510 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1512 @param[in] _seek_method
1514 #bt_message_iterator_class_seek_ns_from_origin_method
1516 Source component class's message iterator class's "seek ns from
1519 @param[in] _can_seek_method
1521 #bt_message_iterator_class_can_seek_ns_from_origin_method
1523 Source component class's message iterator class's "can seek ns from
1526 Can be \c NULL, in which case it is equivalent to setting a method
1527 which always returns #BT_TRUE.
1530 @bt_pre_not_null{_seek_method}
1531 @bt_pre_not_null{_can_seek_method}
1533 #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) \
1534 __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); \
1535 __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)
1540 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
1541 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1542 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1544 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
1545 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1549 Sets the "output port connected" method of the \bt_src_comp_cls
1550 having the ID \bt_p{_component_class_id} in the plugin having the ID
1551 \bt_p{_plugin_id} to \bt_p{_method}.
1554 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
1557 @param[in] _plugin_id
1561 ID of the plugin which contains the source component class of which
1562 to set the "output port connected" method.
1564 @param[in] _component_class_id
1568 ID of the source component class, within the plugin having the ID
1569 \bt_p{_plugin_id}, of which to set the "output port connected"
1570 method to \bt_p{_method}.
1574 #bt_component_class_source_output_port_connected_method
1576 Source component class's "output port connected" method.
1579 @bt_pre_not_null{_method}
1581 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1582 __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)
1587 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
1588 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1589 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1591 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
1592 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1596 Sets the query method of the \bt_src_comp_cls
1597 having the ID \bt_p{_component_class_id} in the plugin having the ID
1598 \bt_p{_plugin_id} to \bt_p{_method}.
1600 See the \ref api-comp-cls-dev-meth-query "query" method.
1602 @param[in] _plugin_id
1606 ID of the plugin which contains the source component class of which
1607 to set the query method.
1609 @param[in] _component_class_id
1613 ID of the source component class, within the plugin having the ID
1614 \bt_p{_plugin_id}, of which to set the query
1615 method to \bt_p{_method}.
1619 #bt_component_class_source_query_method
1621 Source component class's query method.
1624 @bt_pre_not_null{_method}
1626 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1627 __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)
1632 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
1633 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1634 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1636 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
1637 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
1642 @name Filter component class methods
1648 Sets the finalization method of the \bt_flt_comp_cls having the ID
1649 \bt_p{_component_class_id} in the plugin having the ID
1650 \bt_p{_plugin_id} to \bt_p{_method}.
1652 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1654 @param[in] _plugin_id
1658 ID of the plugin which contains the filter component class of which
1659 to set the finalization method.
1661 @param[in] _component_class_id
1665 ID of the filter component class, within the plugin having the ID
1666 \bt_p{_plugin_id}, of which to set the finalization method to
1671 #bt_component_class_filter_finalize_method
1673 Filter component class's finalization method.
1676 @bt_pre_not_null{_method}
1678 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1679 __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)
1684 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1685 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1686 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1688 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1689 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1693 Sets the \"get supported \bt_mip versions\" method of the
1694 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1695 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1697 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1700 @param[in] _plugin_id
1704 ID of the plugin which contains the filter component class of which
1705 to set the "get supported MIP versions" method.
1707 @param[in] _component_class_id
1711 ID of the filter component class, within the plugin having the ID
1712 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1713 method to \bt_p{_method}.
1717 #bt_component_class_filter_get_supported_mip_versions_method
1719 Filter component class's "get supported MIP versions" method.
1722 @bt_pre_not_null{_method}
1724 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1725 __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)
1730 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1731 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1732 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1734 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1735 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1739 Sets the initialization method of the \bt_flt_comp_cls having the ID
1740 \bt_p{_component_class_id} in the plugin having the ID
1741 \bt_p{_plugin_id} to \bt_p{_method}.
1743 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1745 @param[in] _plugin_id
1749 ID of the plugin which contains the filter component class of which
1750 to set the initialization method.
1752 @param[in] _component_class_id
1756 ID of the filter component class, within the plugin having the ID
1757 \bt_p{_plugin_id}, of which to set the initialization method to
1762 #bt_component_class_filter_initialize_method
1764 Filter component class's initialization method.
1767 @bt_pre_not_null{_method}
1769 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1770 __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)
1775 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1776 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1777 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1779 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1780 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1784 Sets the "input port connected" method of the \bt_flt_comp_cls
1785 having the ID \bt_p{_component_class_id} in the plugin having the ID
1786 \bt_p{_plugin_id} to \bt_p{_method}.
1789 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
1792 @param[in] _plugin_id
1796 ID of the plugin which contains the filter component class of which
1797 to set the "input port connected" method.
1799 @param[in] _component_class_id
1803 ID of the filter component class, within the plugin having the ID
1804 \bt_p{_plugin_id}, of which to set the "input port connected"
1805 method to \bt_p{_method}.
1809 #bt_component_class_filter_input_port_connected_method
1811 Filter component class's "input port connected" method.
1814 @bt_pre_not_null{_method}
1816 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1817 __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)
1822 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
1823 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1824 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1826 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
1827 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1831 Sets the finalization method of the \bt_msg_iter_cls of the
1832 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1833 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1835 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1837 @param[in] _plugin_id
1841 ID of the plugin which contains the filter component class of which
1842 to set the finalization method of the message iterator class.
1844 @param[in] _component_class_id
1848 ID of the filter component class, within the plugin having the ID
1849 \bt_p{_plugin_id}, of which to set the finalization method of the
1850 message iterator class to \bt_p{_method}.
1854 #bt_message_iterator_class_finalize_method
1856 Filter component class's message iterator class's finalization method.
1859 @bt_pre_not_null{_method}
1861 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1862 __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)
1867 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1868 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1869 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1871 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1872 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1876 Sets the initialization method of the \bt_msg_iter_cls of the
1877 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1878 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1880 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1882 @param[in] _plugin_id
1886 ID of the plugin which contains the filter component class of which
1887 to set the initialization method of the message iterator class.
1889 @param[in] _component_class_id
1893 ID of the filter component class, within the plugin having the ID
1894 \bt_p{_plugin_id}, of which to set the initialization method of the
1895 message iterator class to \bt_p{_method}.
1899 #bt_message_iterator_class_initialize_method
1901 Filter component class's message iterator class's initialization
1905 @bt_pre_not_null{_method}
1907 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1908 __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)
1913 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1914 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1915 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1917 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1918 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1922 Sets the "seek beginning" and "can seek beginning?" methods of the
1923 \bt_msg_iter_cls of the \bt_flt_comp_cls having the ID
1924 \bt_p{_component_class_id} in the plugin having the ID
1925 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1926 \bt_p{_can_seek_method}.
1928 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1929 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1931 @param[in] _plugin_id
1935 ID of the plugin which contains the filter component class of which
1936 to set the "seek beginning" and "can seek beginning?" methods of the
1937 message iterator class.
1939 @param[in] _component_class_id
1943 ID of the filter component class, within the plugin having the ID
1944 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1945 seek beginning" methods of the message iterator class to
1946 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1948 @param[in] _seek_method
1950 #bt_message_iterator_class_seek_beginning_method
1952 Filter component class's message iterator class's "seek beginning"
1955 @param[in] _can_seek_method
1957 #bt_message_iterator_class_can_seek_beginning_method
1959 Filter component class's message iterator class's
1960 "can seek beginning?" method.
1962 Can be \c NULL, in which case it is equivalent to setting a method
1963 which always returns #BT_TRUE.
1966 @bt_pre_not_null{_seek_method}
1967 @bt_pre_not_null{_can_seek_method}
1969 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1970 __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); \
1971 __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);
1976 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID()
1977 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1978 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1980 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1981 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1985 Sets the "seek ns from origin" and "can seek ns from origin?"
1986 methods of the \bt_msg_iter_cls of the \bt_flt_comp_cls having the
1987 ID \bt_p{_component_class_id} in the plugin having the ID
1988 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1989 \bt_p{_can_seek_method}.
1991 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1992 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
1995 @param[in] _plugin_id
1999 ID of the plugin which contains the filter component class of which
2000 to set the "seek ns from origin" and "can seek ns from origin?"
2001 methods of the message iterator class.
2003 @param[in] _component_class_id
2007 ID of the filter component class, within the plugin having the ID
2008 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
2009 "can seek ns from origin" methods of the message iterator class to
2010 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
2012 @param[in] _seek_method
2014 #bt_message_iterator_class_seek_ns_from_origin_method
2016 Filter component class's message iterator class's "seek ns from
2019 @param[in] _can_seek_method
2021 #bt_message_iterator_class_can_seek_ns_from_origin_method
2023 Filter component class's message iterator class's "can seek ns from
2026 Can be \c NULL, in which case it is equivalent to setting a method
2027 which always returns #BT_TRUE.
2030 @bt_pre_not_null{_seek_method}
2031 @bt_pre_not_null{_can_seek_method}
2033 #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) \
2034 __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); \
2035 __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)
2040 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
2041 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2042 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2044 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
2045 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
2049 Sets the "output port connected" method of the \bt_flt_comp_cls
2050 having the ID \bt_p{_component_class_id} in the plugin having the ID
2051 \bt_p{_plugin_id} to \bt_p{_method}.
2054 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
2057 @param[in] _plugin_id
2061 ID of the plugin which contains the filter component class of which
2062 to set the "output port connected" method.
2064 @param[in] _component_class_id
2068 ID of the filter component class, within the plugin having the ID
2069 \bt_p{_plugin_id}, of which to set the "output port connected"
2070 method to \bt_p{_method}.
2074 #bt_component_class_filter_output_port_connected_method
2076 Filter component class's "output port connected" method.
2079 @bt_pre_not_null{_method}
2081 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2082 __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)
2087 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
2088 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2089 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2091 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
2092 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2096 Sets the query method of the \bt_flt_comp_cls
2097 having the ID \bt_p{_component_class_id} in the plugin having the ID
2098 \bt_p{_plugin_id} to \bt_p{_method}.
2100 See the \ref api-comp-cls-dev-meth-query "query" method.
2102 @param[in] _plugin_id
2106 ID of the plugin which contains the filter component class of which
2107 to set the query method.
2109 @param[in] _component_class_id
2113 ID of the filter component class, within the plugin having the ID
2114 \bt_p{_plugin_id}, of which to set the query
2115 method to \bt_p{_method}.
2119 #bt_component_class_filter_query_method
2121 Filter component class's query method.
2124 @bt_pre_not_null{_method}
2126 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2127 __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)
2132 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2133 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2134 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2136 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2137 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2142 @name Sink component class methods
2148 Sets the finalization method of the \bt_sink_comp_cls having the ID
2149 \bt_p{_component_class_id} in the plugin having the ID
2150 \bt_p{_plugin_id} to \bt_p{_method}.
2152 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
2154 @param[in] _plugin_id
2158 ID of the plugin which contains the sink component class of which
2159 to set the finalization method.
2161 @param[in] _component_class_id
2165 ID of the sink component class, within the plugin having the ID
2166 \bt_p{_plugin_id}, of which to set the finalization method to
2171 #bt_component_class_sink_finalize_method
2173 Sink component class's finalization method.
2176 @bt_pre_not_null{_method}
2178 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2179 __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)
2184 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
2185 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2186 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2188 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
2189 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
2193 Sets the \"get supported \bt_mip versions\" method of the
2194 \bt_sink_comp_cls having the ID \bt_p{_component_class_id} in the
2195 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
2197 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
2200 @param[in] _plugin_id
2204 ID of the plugin which contains the sink component class of which
2205 to set the "get supported MIP versions" method.
2207 @param[in] _component_class_id
2211 ID of the sink component class, within the plugin having the ID
2212 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
2213 method to \bt_p{_method}.
2217 #bt_component_class_sink_get_supported_mip_versions_method
2219 Sink component class's "get supported MIP versions" method.
2222 @bt_pre_not_null{_method}
2224 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2225 __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)
2230 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
2231 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2232 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2234 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
2235 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
2239 Sets the "graph is configured" method of the \bt_sink_comp_cls
2240 having the ID \bt_p{_component_class_id} in the plugin having the ID
2241 \bt_p{_plugin_id} to \bt_p{_method}.
2244 \ref api-comp-cls-dev-meth-graph-configured "graph is configured"
2247 @param[in] _plugin_id
2251 ID of the plugin which contains the sink component class of which
2252 to set the "graph is configured" method.
2254 @param[in] _component_class_id
2258 ID of the sink component class, within the plugin having the ID
2259 \bt_p{_plugin_id}, of which to set the "graph is configured"
2260 method to \bt_p{_method}.
2264 #bt_component_class_sink_graph_is_configured_method
2266 Sink component class's "graph is configured" method.
2269 @bt_pre_not_null{_method}
2271 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2272 __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)
2277 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID()
2278 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2279 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2281 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _method) \
2282 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _method)
2286 Sets the initialization method of the \bt_sink_comp_cls having the
2287 ID \bt_p{_component_class_id} in the plugin having the ID
2288 \bt_p{_plugin_id} to \bt_p{_method}.
2290 See the \ref api-comp-cls-dev-meth-init "initialize" method.
2292 @param[in] _plugin_id
2296 ID of the plugin which contains the sink component class of which
2297 to set the initialization method.
2299 @param[in] _component_class_id
2303 ID of the sink component class, within the plugin having the ID
2304 \bt_p{_plugin_id}, of which to set the initialization method to
2309 #bt_component_class_sink_initialize_method
2311 Sink component class's initialization method.
2314 @bt_pre_not_null{_method}
2316 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2317 __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)
2322 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
2323 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2324 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2326 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
2327 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
2331 Sets the "input port connected" method of the \bt_sink_comp_cls
2332 having the ID \bt_p{_component_class_id} in the plugin having the ID
2333 \bt_p{_plugin_id} to \bt_p{_method}.
2336 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
2339 @param[in] _plugin_id
2343 ID of the plugin which contains the sink component class of which
2344 to set the "input port connected" method.
2346 @param[in] _component_class_id
2350 ID of the sink component class, within the plugin having the ID
2351 \bt_p{_plugin_id}, of which to set the "input port connected"
2352 method to \bt_p{_method}.
2356 #bt_component_class_sink_input_port_connected_method
2358 Sink component class's "input port connected" method.
2361 @bt_pre_not_null{_method}
2363 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2364 __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)
2369 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
2370 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2371 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2373 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
2374 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2378 Sets the query method of the \bt_sink_comp_cls
2379 having the ID \bt_p{_component_class_id} in the plugin having the ID
2380 \bt_p{_plugin_id} to \bt_p{_method}.
2382 See the \ref api-comp-cls-dev-meth-query "query" method.
2384 @param[in] _plugin_id
2388 ID of the plugin which contains the sink component class of which
2389 to set the query method.
2391 @param[in] _component_class_id
2395 ID of the sink component class, within the plugin having the ID
2396 \bt_p{_plugin_id}, of which to set the query
2397 method to \bt_p{_method}.
2401 #bt_component_class_sink_query_method
2403 Sink component class's query method.
2406 @bt_pre_not_null{_method}
2408 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2409 __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)
2414 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2415 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2416 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2418 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2419 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2425 /* Plugin descriptor: describes a single plugin (internal use) */
2426 struct __bt_plugin_descriptor
{
2429 } __attribute__((packed
));
2431 /* Type of a plugin attribute (internal use) */
2432 enum __bt_plugin_descriptor_attribute_type
{
2433 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
2434 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
2435 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
2436 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
2437 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
2438 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
2441 /* Plugin (user) version */
2442 struct __bt_plugin_descriptor_version
{
2449 /* Plugin attribute (internal use) */
2450 struct __bt_plugin_descriptor_attribute
{
2451 /* Plugin descriptor to which to associate this attribute */
2452 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2454 /* Name of the attribute's type for debug purposes */
2455 const char *type_name
;
2457 /* Attribute's type */
2458 enum __bt_plugin_descriptor_attribute_type type
;
2460 /* Attribute's value (depends on attribute's type) */
2462 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
2463 bt_plugin_initialize_func init
;
2465 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
2466 bt_plugin_finalize_func exit
;
2468 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
2471 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
2472 const char *license
;
2474 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2475 const char *description
;
2477 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
2478 struct __bt_plugin_descriptor_version version
;
2480 } __attribute__((packed
));
2482 /* Component class descriptor (internal use) */
2483 struct __bt_plugin_component_class_descriptor
{
2485 * Plugin descriptor to which to associate this component
2488 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2490 /* Component class name */
2493 /* Component class type */
2494 bt_component_class_type type
;
2496 /* Mandatory methods (depends on component class type) */
2498 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
2500 bt_message_iterator_class_next_method msg_iter_next
;
2503 /* BT_COMPONENT_CLASS_TYPE_FILTER */
2505 bt_message_iterator_class_next_method msg_iter_next
;
2508 /* BT_COMPONENT_CLASS_TYPE_SINK */
2510 bt_component_class_sink_consume_method consume
;
2513 } __attribute__((packed
));
2515 /* Type of a component class attribute (internal use) */
2516 enum __bt_plugin_component_class_descriptor_attribute_type
{
2517 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
2518 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
2519 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD
= 2,
2520 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD
= 3,
2521 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 4,
2522 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 5,
2523 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 6,
2524 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 7,
2525 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD
= 8,
2526 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD
= 9,
2527 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 10,
2528 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD
= 11,
2529 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD
= 12,
2530 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD
= 13,
2531 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD
= 14,
2534 /* Component class attribute (internal use) */
2535 struct __bt_plugin_component_class_descriptor_attribute
{
2537 * Component class plugin attribute to which to associate this
2538 * component class attribute.
2540 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
2542 /* Name of the attribute's type for debug purposes */
2543 const char *type_name
;
2545 /* Attribute's type */
2546 enum __bt_plugin_component_class_descriptor_attribute_type type
;
2548 /* Attribute's value (depends on attribute's type) */
2550 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2551 const char *description
;
2553 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
2556 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD */
2557 bt_component_class_source_get_supported_mip_versions_method source_get_supported_mip_versions_method
;
2558 bt_component_class_filter_get_supported_mip_versions_method filter_get_supported_mip_versions_method
;
2559 bt_component_class_sink_get_supported_mip_versions_method sink_get_supported_mip_versions_method
;
2561 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD */
2562 bt_component_class_source_initialize_method source_initialize_method
;
2563 bt_component_class_filter_initialize_method filter_initialize_method
;
2564 bt_component_class_sink_initialize_method sink_initialize_method
;
2566 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
2567 bt_component_class_source_finalize_method source_finalize_method
;
2568 bt_component_class_filter_finalize_method filter_finalize_method
;
2569 bt_component_class_sink_finalize_method sink_finalize_method
;
2571 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
2572 bt_component_class_source_query_method source_query_method
;
2573 bt_component_class_filter_query_method filter_query_method
;
2574 bt_component_class_sink_query_method sink_query_method
;
2576 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
2577 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
2578 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
2580 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
2581 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
2582 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
2584 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */
2585 bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method
;
2587 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD */
2588 bt_message_iterator_class_initialize_method msg_iter_initialize_method
;
2590 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
2591 bt_message_iterator_class_finalize_method msg_iter_finalize_method
;
2593 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
2594 bt_message_iterator_class_seek_ns_from_origin_method msg_iter_seek_ns_from_origin_method
;
2596 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
2597 bt_message_iterator_class_seek_beginning_method msg_iter_seek_beginning_method
;
2599 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
2600 bt_message_iterator_class_can_seek_ns_from_origin_method msg_iter_can_seek_ns_from_origin_method
;
2602 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
2603 bt_message_iterator_class_can_seek_beginning_method msg_iter_can_seek_beginning_method
;
2605 } __attribute__((packed
));
2607 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
2608 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
2609 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
2610 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
2611 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
2612 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
2613 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
2614 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
2617 * Defines a plugin attribute (generic, internal use).
2619 * _attr_name: Name of the attribute (C identifier).
2620 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
2621 * _id: Plugin descriptor ID (C identifier).
2624 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
2625 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
2626 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
2627 .type_name = #_attr_name, \
2628 .type = _attr_type, \
2629 .value = { ._attr_name = _x }, \
2631 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
2633 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
2634 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
2637 * Defines a component class descriptor attribute (generic, internal
2640 * _id: Plugin descriptor ID (C identifier).
2641 * _component_class_id: Component class ID (C identifier).
2642 * _type: Component class type (`source`, `filter`, or `sink`).
2643 * _attr_name: Name of the attribute (C identifier).
2644 * _attr_type: Type of the attribute
2645 * (enum __bt_plugin_descriptor_attribute_type).
2648 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _component_class_id, _type, _x) \
2649 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name = { \
2650 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_component_class_id, \
2651 .type_name = #_attr_name, \
2652 .type = _attr_type, \
2653 .value = { ._attr_name = _x }, \
2655 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
2658 * Clang supports the no_sanitize variable attribute on global variables.
2659 * GCC only supports the no_sanitize_address function attribute, which is
2660 * not what we need. This is fine because, as far as we have seen, gcc
2661 * does not insert red zones around global variables.
2663 #if defined(__clang__)
2664 # if __has_feature(address_sanitizer)
2665 # define __bt_plugin_variable_attribute_no_sanitize_address \
2666 __attribute__((no_sanitize("address")))
2668 # define __bt_plugin_variable_attribute_no_sanitize_address
2671 # define __bt_plugin_variable_attribute_no_sanitize_address
2675 * Variable attributes for a plugin descriptor pointer to be added to
2676 * the plugin descriptor section (internal use).
2679 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2680 __attribute__((section("__DATA,btp_desc"), used)) \
2681 __bt_plugin_variable_attribute_no_sanitize_address
2683 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2684 __start___bt_plugin_descriptors
2686 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2687 __stop___bt_plugin_descriptors
2689 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
2690 __asm("section$start$__DATA$btp_desc")
2692 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
2693 __asm("section$end$__DATA$btp_desc")
2697 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2698 __attribute__((section("__bt_plugin_descriptors"), used)) \
2699 __bt_plugin_variable_attribute_no_sanitize_address
2701 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2702 __start___bt_plugin_descriptors
2704 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2705 __stop___bt_plugin_descriptors
2707 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
2709 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
2713 * Variable attributes for a plugin attribute pointer to be added to
2714 * the plugin attribute section (internal use).
2717 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2718 __attribute__((section("__DATA,btp_desc_att"), used)) \
2719 __bt_plugin_variable_attribute_no_sanitize_address
2721 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2722 __start___bt_plugin_descriptor_attributes
2724 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2725 __stop___bt_plugin_descriptor_attributes
2727 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2728 __asm("section$start$__DATA$btp_desc_att")
2730 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2731 __asm("section$end$__DATA$btp_desc_att")
2735 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2736 __attribute__((section("__bt_plugin_descriptor_attributes"), used)) \
2737 __bt_plugin_variable_attribute_no_sanitize_address
2739 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2740 __start___bt_plugin_descriptor_attributes
2742 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2743 __stop___bt_plugin_descriptor_attributes
2745 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2747 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2751 * Variable attributes for a component class descriptor pointer to be
2752 * added to the component class descriptor section (internal use).
2755 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2756 __attribute__((section("__DATA,btp_cc_desc"), used)) \
2757 __bt_plugin_variable_attribute_no_sanitize_address
2759 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2760 __start___bt_plugin_component_class_descriptors
2762 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2763 __stop___bt_plugin_component_class_descriptors
2765 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
2766 __asm("section$start$__DATA$btp_cc_desc")
2768 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
2769 __asm("section$end$__DATA$btp_cc_desc")
2773 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2774 __attribute__((section("__bt_plugin_component_class_descriptors"), used)) \
2775 __bt_plugin_variable_attribute_no_sanitize_address
2777 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2778 __start___bt_plugin_component_class_descriptors
2780 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2781 __stop___bt_plugin_component_class_descriptors
2783 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
2785 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
2789 * Variable attributes for a component class descriptor attribute
2790 * pointer to be added to the component class descriptor attribute
2791 * section (internal use).
2794 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2795 __attribute__((section("__DATA,btp_cc_desc_att"), used)) \
2796 __bt_plugin_variable_attribute_no_sanitize_address
2798 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2799 __start___bt_plugin_component_class_descriptor_attributes
2801 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2802 __stop___bt_plugin_component_class_descriptor_attributes
2804 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2805 __asm("section$start$__DATA$btp_cc_desc_att")
2807 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2808 __asm("section$end$__DATA$btp_cc_desc_att")
2812 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2813 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) \
2814 __bt_plugin_variable_attribute_no_sanitize_address
2816 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2817 __start___bt_plugin_component_class_descriptor_attributes
2819 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2820 __stop___bt_plugin_component_class_descriptor_attributes
2822 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2824 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2831 #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */