2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
7 #ifndef BABELTRACE2_PLUGIN_PLUGIN_DEV_H
8 #define BABELTRACE2_PLUGIN_PLUGIN_DEV_H
10 #ifndef __BT_IN_BABELTRACE_H
11 # error "Please include <babeltrace2/babeltrace.h> instead."
16 #include <babeltrace2/graph/component-class-dev.h>
17 #include <babeltrace2/graph/message-iterator-class.h>
18 #include <babeltrace2/types.h>
21 * _BT_EXPORT: set the visibility for exported functions.
23 #if defined(_WIN32) || defined(__CYGWIN__)
26 #define _BT_EXPORT __attribute__((visibility("default")))
34 @defgroup api-plugin-dev Plugin development
37 Shared object plugin development.
39 This module offers macros to create a \bt_name shared object plugin.
41 Behind the scenes, the <code>BT_PLUGIN_*()</code> macros of this module
42 create and fill global tables which are located in sections of the
43 shared object with specific names. The \ref api-plugin functions can
44 load the resulting shared object file and create corresponding
47 See \ref guide-comp-link-plugin-so.
49 <h1>Plugin definition C file structure</h1>
51 The structure of a \bt_name plugin definition C file is as such:
63 Define a \bt_name plugin with BT_PLUGIN() if the plugin's name is a
64 valid C identifier, or with BT_PLUGIN_WITH_ID() otherwise.
66 See \ref api-plugin-dev-custom-plugin-id "Custom plugin ID" to
67 learn more about plugin IDs.
70 When you use BT_PLUGIN(), the plugin's ID is <code>auto</code>.
74 \bt_dt_opt Use any of the following macros (or their
75 <code>*_WITH_ID()</code> counterpart) \em once to set the properties
79 - BT_PLUGIN_DESCRIPTION()
85 \bt_dt_opt Use any of the following macros (or their
86 <code>*_WITH_ID()</code> counterpart) \em once to set the
87 initialization and finalization functions of the plugin:
89 - BT_PLUGIN_INITIALIZE_FUNC()
90 - BT_PLUGIN_FINALIZE_FUNC()
92 A plugin's initialization function is executed when the shared
93 object is loaded (see \ref api-plugin).
95 A plugin's finalization function is executed when the \bt_plugin
96 object is destroyed, if the initialization function (if any)
101 Use any of the following macros (or their <code>*_WITH_ID()</code>
102 counterpart) to add a component class to the plugin:
104 - BT_PLUGIN_SOURCE_COMPONENT_CLASS()
105 - BT_PLUGIN_FILTER_COMPONENT_CLASS()
106 - BT_PLUGIN_SINK_COMPONENT_CLASS()
110 \bt_dt_opt Depending on the type of the component class of step 5,
111 use any of the following macros (or their <code>*_WITH_ID()</code>
113 \em once to set its properties:
116 <dt>\bt_c_src_comp_cls</dt>
118 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION()
119 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP()
122 <dt>\bt_c_flt_comp_cls</dt>
124 - BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION()
125 - BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP()
128 <dt>\bt_c_sink_comp_cls</dt>
130 - BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION()
131 - BT_PLUGIN_SINK_COMPONENT_CLASS_HELP()
137 \bt_dt_opt Depending on the type of the component class of step 5,
138 use any of the following macros (or their <code>*_WITH_ID()</code>
139 counterpart) to set its optional methods:
142 <dt>Source component class</dt>
144 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD()
145 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
146 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD()
147 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
148 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
149 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
150 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD()
153 <dt>Filter component class</dt>
155 - BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD()
156 - BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
157 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD()
158 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
159 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
160 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
161 - BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
162 - BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD()
165 <dt>Sink component class</dt>
167 - BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD()
168 - BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
169 - BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD()
170 - BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD()
171 - BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
172 - BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD()
178 You can repeat steps 5 to 7 to add more than one component class to a
181 See \ref example-simple-plugin-def-file for a concrete example of how
182 to use the macros of this module.
184 <h1>\anchor api-plugin-dev-custom-plugin-id Custom plugin ID</h1>
186 The BT_PLUGIN() macro defines a plugin with a specific name and the
187 ID <code>auto</code>.
189 All the <code>BT_PLUGIN_*()</code> macros which do not end with
190 <code>_WITH_ID</code> refer to the <code>auto</code> plugin.
192 There are two situations which demand that you use a custom plugin ID:
194 - You want more than one plugin contained in your shared object file.
196 Although the \bt_name project does not recommend this, it is possible.
197 This is why bt_plugin_find_all_from_file() returns a \bt_plugin_set
198 instead of a single \bt_plugin.
200 In this case, each plugin of the shared object needs its own, unique
203 - You want to give the plugin a name which is not a valid C identifier.
205 The BT_PLUGIN() macro accepts a C identifier as the plugin name, while
206 the BT_PLUGIN_WITH_ID() accepts a C identifier for the ID and a C
209 To define a plugin with a specific ID, use BT_PLUGIN_WITH_ID(), for
213 BT_PLUGIN_WITH_ID(my_plugin_id, "my-plugin-name");
216 Then, use the <code>BT_PLUGIN_*_WITH_ID()</code> macros to refer to
217 this specific plugin, for example:
220 BT_PLUGIN_AUTHOR_WITH_ID(my_plugin_id, "Patrick Bouchard");
225 You can still use the <code>auto</code> ID with BT_PLUGIN_WITH_ID()
226 to use the simpler macros afterwards while still giving the plugin a
227 name which is not a valid C identifier, for example:
230 BT_PLUGIN_WITH_ID(auto, "my-plugin-name");
231 BT_PLUGIN_AUTHOR("Patrick Bouchard");
235 <h1>Custom component class ID</h1>
237 The BT_PLUGIN_SOURCE_COMPONENT_CLASS(),
238 BT_PLUGIN_FILTER_COMPONENT_CLASS(), and
239 BT_PLUGIN_SINK_COMPONENT_CLASS() add a component class with a specific
240 name to the plugin having the ID <code>auto</code>.
242 The name you pass to those macros must be a valid C identifier and it
243 also serves as the component class's ID within the <code>auto</code>
246 There are two situations which demand that you use a custom component
249 - You want to add the component class to a specific plugin (other than
250 <code>auto</code>, if you have more than one).
252 - You want to give the component class a name which is not a valid C
255 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros accept a
256 C identifier for the component class ID and a string for its name.
258 For a given plugin and for a given component class type, all component
259 class IDs must be unique.
261 To add a component class having a specific ID to a plugin,
262 use the BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(),
263 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(), and
264 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() macros, for example:
267 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(my_plugin_id, my_comp_class_id,
268 "my-source", my_source_iter_next);
273 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros
274 specify the ID of the plugin to which to add the component class.
276 If you use the BT_PLUGIN() macro to define your plugin, then its
277 ID is <code>auto</code>:
280 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, my_comp_class_id,
281 "my-source", my_source_iter_next);
285 Then, use the <code>BT_PLUGIN_*_COMPONENT_CLASS_*_WITH_ID()</code>
286 macros to refer to this specific component class, for example:
289 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(my_plugin_id,
290 my_comp_class_id, my_source_finalize);
300 @typedef struct bt_self_plugin bt_self_plugin;
315 Defines a plugin module.
317 In a plugin define C file, you must use this macro before you use any
318 other <code>BT_PLUGIN*()</code> macro.
320 #define BT_PLUGIN_MODULE() \
321 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
322 extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
323 extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
325 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
326 extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
327 extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
329 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
330 extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
331 extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
333 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; \
334 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; \
335 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; \
337 _BT_EXPORT struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
339 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
341 _BT_EXPORT struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
343 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
345 _BT_EXPORT struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
347 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
349 _BT_EXPORT struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
351 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
353 _BT_EXPORT struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
355 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
357 _BT_EXPORT struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
359 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
361 _BT_EXPORT struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
363 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
365 _BT_EXPORT struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
367 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
373 @name Plugin definition
379 Defines a plugin named \bt_p{_name} and having the ID \bt_p{_id}.
385 Plugin's ID, unique amongst all the plugin IDs of the same shared
390 <code>const char *</code>
395 @bt_pre_not_null{_name}
397 #define BT_PLUGIN_WITH_ID(_id, _name) \
398 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
401 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
405 Alias of BT_PLUGIN_WITH_ID() with the \bt_p{_id} parameter set to
408 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
413 @name Plugin properties
419 Sets the description of the plugin having the ID \bt_p{_id} to
422 See the \ref api-comp-cls-prop-descr "description" property.
428 ID of the plugin of which to set the description.
430 @param[in] _description
432 <code>const char *</code>
434 Plugin's description.
437 @bt_pre_not_null{_description}
439 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _description) \
440 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _description)
444 Alias of BT_PLUGIN_DESCRIPTION_WITH_ID() with the \bt_p{_id}
445 parameter set to <code>auto</code>.
447 #define BT_PLUGIN_DESCRIPTION(_description) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _description)
451 Sets the name(s) of the author(s) of the plugin having the ID
452 \bt_p{_id} to \bt_p{_author}.
454 See the \ref api-plugin-prop-author "author name(s)" property.
460 ID of the plugin of which to set the author(s).
464 <code>const char *</code>
469 @bt_pre_not_null{_author}
471 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _author) \
472 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _author)
476 Alias of BT_PLUGIN_AUTHOR_WITH_ID() with the \bt_p{_id}
477 parameter set to <code>auto</code>.
479 #define BT_PLUGIN_AUTHOR(_author) BT_PLUGIN_AUTHOR_WITH_ID(auto, _author)
483 Sets the license (name or full) of the plugin having the ID
484 \bt_p{_id} to \bt_p{_license}.
486 See the \ref api-plugin-prop-license "license" property.
492 ID of the plugin of which to set the license.
496 <code>const char *</code>
501 @bt_pre_not_null{_license}
503 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _license) \
504 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _license)
508 Alias of BT_PLUGIN_LICENSE_WITH_ID() with the \bt_p{_id}
509 parameter set to <code>auto</code>.
511 #define BT_PLUGIN_LICENSE(_license) BT_PLUGIN_LICENSE_WITH_ID(auto, _license)
515 Sets the version of the plugin having the ID \bt_p{_id} to
518 See the \ref api-plugin-prop-version "version" property.
524 ID of the plugin of which to set the version.
528 <code>unsigned int</code>
530 Plugin's major version.
534 <code>unsigned int</code>
536 Plugin's minor version.
540 <code>unsigned int</code>
542 Plugin's patch version.
546 <code>const char *</code>
548 Plugin's version's extra information.
550 Can be \c NULL if the plugin's version has no extra information.
553 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
554 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
558 Alias of BT_PLUGIN_VERSION_WITH_ID() with the \bt_p{_id}
559 parameter set to <code>auto</code>.
561 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
566 @name Plugin functions
572 Status codes for #bt_plugin_initialize_func.
574 typedef enum bt_plugin_initialize_func_status
{
579 BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
= __BT_FUNC_STATUS_OK
,
585 BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
591 BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
592 } bt_plugin_initialize_func_status
;
596 User plugin initialization function.
598 @param[in] self_plugin
602 This parameter is a private view of the \bt_plugin object for
605 As of \bt_name_version_min_maj, there's no self plugin API.
608 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
610 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
612 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
615 @bt_pre_not_null{self_plugin}
617 typedef bt_plugin_initialize_func_status (*bt_plugin_initialize_func
)(
618 bt_self_plugin
*self_plugin
);
622 Sets the initialization function of the plugin having the ID
623 \bt_p{_id} to \bt_p{_func}.
629 ID of the plugin of which to set the initialization function.
633 #bt_plugin_initialize_func
635 Plugin's initialization function.
638 @bt_pre_not_null{_func}
640 #define BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(_id, _func) \
641 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _func)
645 Alias of BT_PLUGIN_INITIALIZE_FUNC_WITH_ID() with the \bt_p{_id}
646 parameter set to <code>auto</code>.
648 #define BT_PLUGIN_INITIALIZE_FUNC(_func) BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(auto, _func)
652 User plugin finalization function.
654 typedef void (*bt_plugin_finalize_func
)(void);
658 Sets the finalization function of the plugin having the ID
659 \bt_p{_id} to \bt_p{_func}.
665 ID of the plugin of which to set the finalization function.
669 #bt_plugin_finalize_func
671 Plugin's finalization function.
674 @bt_pre_not_null{_func}
676 #define BT_PLUGIN_FINALIZE_FUNC_WITH_ID(_id, _func) \
677 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _func)
681 Alias of BT_PLUGIN_FINALIZE_FUNC_WITH_ID() with the \bt_p{_id}
682 parameter set to <code>auto</code>.
684 #define BT_PLUGIN_FINALIZE_FUNC(_func) BT_PLUGIN_FINALIZE_FUNC_WITH_ID(auto, _func)
689 @name Component class adding
695 Adds a \bt_src_comp_cls named \bt_p{_name}, having the ID
696 \bt_p{_component_class_id} and the message iterator class's "next"
697 method \bt_p{_message_iterator_class_next_method}, to the plugin
698 having the ID \bt_p{_plugin_id}.
700 @param[in] _plugin_id
704 ID of the plugin to which to add the source component class.
706 @param[in] _component_class_id
710 Source component class's ID, unique amongst all the source component
711 class IDs of the same plugin.
715 <code>const char *</code>
717 Source component class's name, unique amongst all the source
718 component class names of the same plugin.
720 @param[in] _message_iterator_class_next_method
722 #bt_message_iterator_class_next_method
724 Source component class's message iterator class's "next" method.
727 @bt_pre_not_null{_name}
728 @bt_pre_not_null{_message_iterator_class_next_method}
730 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
731 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
732 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
734 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
735 .methods = { .source = { .msg_iter_next = _message_iterator_class_next_method } }, \
737 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
741 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID() with the
742 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
743 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
744 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
750 Passed as both the \bt_p{_component_class_id} and the
751 \bt_p{_name} (once converted to a string) parameters of
752 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID().
755 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
756 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
760 Adds a \bt_flt_comp_cls named \bt_p{_name}, having the ID
761 \bt_p{_component_class_id} and the message iterator class's "next"
762 method \bt_p{_message_iterator_class_next_method}, to the plugin
763 having the ID \bt_p{_plugin_id}.
765 @param[in] _plugin_id
769 ID of the plugin to which to add the filter component class.
771 @param[in] _component_class_id
775 Filter component class's ID, unique amongst all the filter component
776 class IDs of the same plugin.
780 <code>const char *</code>
782 Filter component class's name, unique amongst all the filter
783 component class names of the same plugin.
785 @param[in] _message_iterator_class_next_method
787 #bt_message_iterator_class_next_method
789 Filter component class's message iterator class's "next" method.
792 @bt_pre_not_null{_name}
793 @bt_pre_not_null{_message_iterator_class_next_method}
795 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
796 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
797 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
799 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
800 .methods = { .filter = { .msg_iter_next = _message_iterator_class_next_method } }, \
802 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
806 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID() with the
807 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
808 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
809 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
815 Passed as both the \bt_p{_component_class_id} and the
816 \bt_p{_name} (once converted to a string) parameters of
817 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID().
820 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
821 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
825 Adds a \bt_sink_comp_cls named \bt_p{_name}, having the ID
826 \bt_p{_component_class_id} and the consuming method
827 \bt_p{_consume_method}, to the plugin
828 having the ID \bt_p{_plugin_id}.
830 @param[in] _plugin_id
834 ID of the plugin to which to add the sink component class.
836 @param[in] _component_class_id
840 Sink component class's ID, unique amongst all the sink component
841 class IDs of the same plugin.
845 <code>const char *</code>
847 Sink component class's name, unique amongst all the sink
848 component class names of the same plugin.
850 @param[in] _consume_method
852 #bt_component_class_sink_consume_method
854 Sink component class's message iterator class's "next" method.
857 @bt_pre_not_null{_name}
858 @bt_pre_not_null{_consume_method}
860 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _consume_method) \
861 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
862 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
864 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
865 .methods = { .sink = { .consume = _consume_method } }, \
867 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
871 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() with the
872 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
873 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
874 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
880 Passed as both the \bt_p{_component_class_id} and the
881 \bt_p{_name} (once converted to a string) parameters of
882 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID().
885 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
886 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
891 @name Source component class properties
897 Sets the description of the \bt_src_comp_cls having the ID
898 \bt_p{_component_class_id} in the plugin having the ID
899 \bt_p{_plugin_id} to \bt_p{_description}.
901 See the \ref api-comp-cls-prop-descr "description" property.
903 @param[in] _plugin_id
907 ID of the plugin which contains the source component class of which
908 to set the description.
910 @param[in] _component_class_id
914 ID of the source component class, within the plugin having the ID
915 \bt_p{_plugin_id}, of which to set the description to
918 @param[in] _description
920 <code>const char *</code>
922 Source component class's description.
925 @bt_pre_not_null{_description}
927 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
928 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, source, _description)
932 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
933 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
934 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
936 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
937 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
941 Sets the help text of the \bt_src_comp_cls having the ID
942 \bt_p{_component_class_id} in the plugin having the ID
943 \bt_p{_plugin_id} to \bt_p{_help_text}.
945 See the \ref api-comp-cls-prop-help "help text" property.
947 @param[in] _plugin_id
951 ID of the plugin which contains the source component class of which
952 to set the help text.
954 @param[in] _component_class_id
958 ID of the source component class, within the plugin having the ID
959 \bt_p{_plugin_id}, of which to set the help text to
962 @param[in] _help_text
964 <code>const char *</code>
966 Source component class's help text.
969 @bt_pre_not_null{_help_text}
971 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
972 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, source, _help_text)
976 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID() with the
977 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
978 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
980 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _help_text) \
981 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
986 @name Filter component class properties
992 Sets the description of the \bt_flt_comp_cls having the ID
993 \bt_p{_component_class_id} in the plugin having the ID
994 \bt_p{_plugin_id} to \bt_p{_description}.
996 See the \ref api-comp-cls-prop-descr "description" property.
998 @param[in] _plugin_id
1002 ID of the plugin which contains the filter component class of which
1003 to set the description.
1005 @param[in] _component_class_id
1009 ID of the filter component class, within the plugin having the ID
1010 \bt_p{_plugin_id}, of which to set the description to
1011 \bt_p{_description}.
1013 @param[in] _description
1015 <code>const char *</code>
1017 Filter component class's description.
1020 @bt_pre_not_null{_description}
1022 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1023 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, filter, _description)
1027 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1028 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1029 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1031 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1032 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1036 Sets the help text of the \bt_flt_comp_cls having the ID
1037 \bt_p{_component_class_id} in the plugin having the ID
1038 \bt_p{_plugin_id} to \bt_p{_help_text}.
1040 See the \ref api-comp-cls-prop-help "help text" property.
1042 @param[in] _plugin_id
1046 ID of the plugin which contains the filter component class of which
1047 to set the help text.
1049 @param[in] _component_class_id
1053 ID of the filter component class, within the plugin having the ID
1054 \bt_p{_plugin_id}, of which to set the help text to
1057 @param[in] _help_text
1059 <code>const char *</code>
1061 Filter component class's help text.
1064 @bt_pre_not_null{_help_text}
1066 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1067 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, filter, _help_text)
1071 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID() with the
1072 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1073 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1075 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _help_text) \
1076 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1081 @name Sink component class properties
1087 Sets the description of the \bt_sink_comp_cls having the ID
1088 \bt_p{_component_class_id} in the plugin having the ID
1089 \bt_p{_plugin_id} to \bt_p{_description}.
1091 See the \ref api-comp-cls-prop-descr "description" property.
1093 @param[in] _plugin_id
1097 ID of the plugin which contains the sink component class of which
1098 to set the description.
1100 @param[in] _component_class_id
1104 ID of the sink component class, within the plugin having the ID
1105 \bt_p{_plugin_id}, of which to set the description to
1106 \bt_p{_description}.
1108 @param[in] _description
1110 <code>const char *</code>
1112 Sink component class's description.
1115 @bt_pre_not_null{_description}
1117 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1118 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, sink, _description)
1122 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1123 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1124 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1126 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1127 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1131 Sets the help text of the \bt_sink_comp_cls having the ID
1132 \bt_p{_component_class_id} in the plugin having the ID
1133 \bt_p{_plugin_id} to \bt_p{_help_text}.
1135 See the \ref api-comp-cls-prop-help "help text" property.
1137 @param[in] _plugin_id
1141 ID of the plugin which contains the sink component class of which
1142 to set the help text.
1144 @param[in] _component_class_id
1148 ID of the sink component class, within the plugin having the ID
1149 \bt_p{_plugin_id}, of which to set the help text to
1152 @param[in] _help_text
1154 <code>const char *</code>
1156 Sink component class's help text.
1159 @bt_pre_not_null{_help_text}
1161 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1162 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, sink, _help_text)
1166 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID() with
1167 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1168 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1170 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _help_text) \
1171 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1176 @name Source component class methods
1182 Sets the finalization method of the \bt_src_comp_cls having the ID
1183 \bt_p{_component_class_id} in the plugin having the ID
1184 \bt_p{_plugin_id} to \bt_p{_method}.
1186 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1188 @param[in] _plugin_id
1192 ID of the plugin which contains the source component class of which
1193 to set the finalization method.
1195 @param[in] _component_class_id
1199 ID of the source component class, within the plugin having the ID
1200 \bt_p{_plugin_id}, of which to set the finalization method to
1205 #bt_component_class_source_finalize_method
1207 Source component class's finalization method.
1210 @bt_pre_not_null{_method}
1212 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1213 __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)
1218 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1219 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1220 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1222 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1223 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1227 Sets the \"get supported \bt_mip versions\" method of the
1228 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1229 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1231 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1234 @param[in] _plugin_id
1238 ID of the plugin which contains the source component class of which
1239 to set the "get supported MIP versions" method.
1241 @param[in] _component_class_id
1245 ID of the source component class, within the plugin having the ID
1246 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1247 method to \bt_p{_method}.
1251 #bt_component_class_source_get_supported_mip_versions_method
1253 Source component class's "get supported MIP versions" method.
1256 @bt_pre_not_null{_method}
1258 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1259 __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)
1264 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1265 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1266 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1268 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1269 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1273 Sets the initialization method of the \bt_src_comp_cls having the ID
1274 \bt_p{_component_class_id} in the plugin having the ID
1275 \bt_p{_plugin_id} to \bt_p{_method}.
1277 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1279 @param[in] _plugin_id
1283 ID of the plugin which contains the source component class of which
1284 to set the initialization method.
1286 @param[in] _component_class_id
1290 ID of the source component class, within the plugin having the ID
1291 \bt_p{_plugin_id}, of which to set the initialization method to
1296 #bt_component_class_source_initialize_method
1298 Source component class's initialization method.
1301 @bt_pre_not_null{_method}
1303 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1304 __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)
1309 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1310 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1311 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1313 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1314 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1318 Sets the finalization method of the \bt_msg_iter_cls of the
1319 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1320 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1322 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1324 @param[in] _plugin_id
1328 ID of the plugin which contains the source component class of which
1329 to set the finalization method of the message iterator class.
1331 @param[in] _component_class_id
1335 ID of the source component class, within the plugin having the ID
1336 \bt_p{_plugin_id}, of which to set the finalization method of the
1337 message iterator class to \bt_p{_method}.
1341 #bt_message_iterator_class_finalize_method
1343 Source component class's message iterator class's finalization method.
1346 @bt_pre_not_null{_method}
1348 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1349 __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)
1354 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1355 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1356 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1358 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1359 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1363 Sets the initialization method of the \bt_msg_iter_cls of the
1364 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1365 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1367 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1369 @param[in] _plugin_id
1373 ID of the plugin which contains the source component class of which
1374 to set the initialization method of the message iterator class.
1376 @param[in] _component_class_id
1380 ID of the source component class, within the plugin having the ID
1381 \bt_p{_plugin_id}, of which to set the initialization method of the
1382 message iterator class to \bt_p{_method}.
1386 #bt_message_iterator_class_initialize_method
1388 Source component class's message iterator class's initialization
1392 @bt_pre_not_null{_method}
1394 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1395 __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)
1400 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1401 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1402 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1404 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1405 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1409 Sets the "seek beginning" and "can seek beginning?" methods of the
1410 \bt_msg_iter_cls of the \bt_src_comp_cls having the ID
1411 \bt_p{_component_class_id} in the plugin having the ID
1412 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1413 \bt_p{_can_seek_method}.
1415 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1416 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1418 @param[in] _plugin_id
1422 ID of the plugin which contains the source component class of which
1423 to set the "seek beginning" and "can seek beginning?" methods of the
1424 message iterator class.
1426 @param[in] _component_class_id
1430 ID of the source component class, within the plugin having the ID
1431 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1432 seek beginning" methods of the message iterator class to
1433 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1435 @param[in] _seek_method
1437 #bt_message_iterator_class_seek_beginning_method
1439 Source component class's message iterator class's "seek beginning"
1442 @param[in] _can_seek_method
1444 #bt_message_iterator_class_can_seek_beginning_method
1446 Source component class's message iterator class's
1447 "can seek beginning?" method.
1449 Can be \c NULL, in which case it is equivalent to setting a method
1450 which always returns #BT_TRUE.
1453 @bt_pre_not_null{_seek_method}
1454 @bt_pre_not_null{_can_seek_method}
1456 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1457 __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); \
1458 __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)
1463 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS()
1464 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1465 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1467 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1468 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1472 Sets the "seek ns from origin" and "can seek ns from origin?"
1473 methods of the \bt_msg_iter_cls of the \bt_src_comp_cls having the
1474 ID \bt_p{_component_class_id} in the plugin having the ID
1475 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1476 \bt_p{_can_seek_method}.
1478 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1479 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
1482 @param[in] _plugin_id
1486 ID of the plugin which contains the source component class of which
1487 to set the "seek ns from origin" and "can seek ns from origin?"
1488 methods of the message iterator class.
1490 @param[in] _component_class_id
1494 ID of the source component class, within the plugin having the ID
1495 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
1496 "can seek ns from origin" methods of the message iterator class to
1497 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1499 @param[in] _seek_method
1501 #bt_message_iterator_class_seek_ns_from_origin_method
1503 Source component class's message iterator class's "seek ns from
1506 @param[in] _can_seek_method
1508 #bt_message_iterator_class_can_seek_ns_from_origin_method
1510 Source component class's message iterator class's "can seek ns from
1513 Can be \c NULL, in which case it is equivalent to setting a method
1514 which always returns #BT_TRUE.
1517 @bt_pre_not_null{_seek_method}
1518 @bt_pre_not_null{_can_seek_method}
1520 #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) \
1521 __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); \
1522 __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)
1527 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
1528 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1529 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1531 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
1532 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1536 Sets the "output port connected" method of the \bt_src_comp_cls
1537 having the ID \bt_p{_component_class_id} in the plugin having the ID
1538 \bt_p{_plugin_id} to \bt_p{_method}.
1541 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
1544 @param[in] _plugin_id
1548 ID of the plugin which contains the source component class of which
1549 to set the "output port connected" method.
1551 @param[in] _component_class_id
1555 ID of the source component class, within the plugin having the ID
1556 \bt_p{_plugin_id}, of which to set the "output port connected"
1557 method to \bt_p{_method}.
1561 #bt_component_class_source_output_port_connected_method
1563 Source component class's "output port connected" method.
1566 @bt_pre_not_null{_method}
1568 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1569 __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)
1574 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
1575 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1576 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1578 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
1579 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1583 Sets the query method of the \bt_src_comp_cls
1584 having the ID \bt_p{_component_class_id} in the plugin having the ID
1585 \bt_p{_plugin_id} to \bt_p{_method}.
1587 See the \ref api-comp-cls-dev-meth-query "query" method.
1589 @param[in] _plugin_id
1593 ID of the plugin which contains the source component class of which
1594 to set the query method.
1596 @param[in] _component_class_id
1600 ID of the source component class, within the plugin having the ID
1601 \bt_p{_plugin_id}, of which to set the query
1602 method to \bt_p{_method}.
1606 #bt_component_class_source_query_method
1608 Source component class's query method.
1611 @bt_pre_not_null{_method}
1613 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1614 __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)
1619 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
1620 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1621 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1623 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
1624 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
1629 @name Filter component class methods
1635 Sets the finalization method of the \bt_flt_comp_cls having the ID
1636 \bt_p{_component_class_id} in the plugin having the ID
1637 \bt_p{_plugin_id} to \bt_p{_method}.
1639 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1641 @param[in] _plugin_id
1645 ID of the plugin which contains the filter component class of which
1646 to set the finalization method.
1648 @param[in] _component_class_id
1652 ID of the filter component class, within the plugin having the ID
1653 \bt_p{_plugin_id}, of which to set the finalization method to
1658 #bt_component_class_filter_finalize_method
1660 Filter component class's finalization method.
1663 @bt_pre_not_null{_method}
1665 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1666 __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)
1671 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1672 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1673 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1675 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1676 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1680 Sets the \"get supported \bt_mip versions\" method of the
1681 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1682 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1684 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1687 @param[in] _plugin_id
1691 ID of the plugin which contains the filter component class of which
1692 to set the "get supported MIP versions" method.
1694 @param[in] _component_class_id
1698 ID of the filter component class, within the plugin having the ID
1699 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1700 method to \bt_p{_method}.
1704 #bt_component_class_filter_get_supported_mip_versions_method
1706 Filter component class's "get supported MIP versions" method.
1709 @bt_pre_not_null{_method}
1711 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1712 __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)
1717 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1718 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1719 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1721 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1722 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1726 Sets the initialization method of the \bt_flt_comp_cls having the ID
1727 \bt_p{_component_class_id} in the plugin having the ID
1728 \bt_p{_plugin_id} to \bt_p{_method}.
1730 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1732 @param[in] _plugin_id
1736 ID of the plugin which contains the filter component class of which
1737 to set the initialization method.
1739 @param[in] _component_class_id
1743 ID of the filter component class, within the plugin having the ID
1744 \bt_p{_plugin_id}, of which to set the initialization method to
1749 #bt_component_class_filter_initialize_method
1751 Filter component class's initialization method.
1754 @bt_pre_not_null{_method}
1756 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1757 __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)
1762 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1763 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1764 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1766 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1767 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1771 Sets the "input port connected" method of the \bt_flt_comp_cls
1772 having the ID \bt_p{_component_class_id} in the plugin having the ID
1773 \bt_p{_plugin_id} to \bt_p{_method}.
1776 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
1779 @param[in] _plugin_id
1783 ID of the plugin which contains the filter component class of which
1784 to set the "input port connected" method.
1786 @param[in] _component_class_id
1790 ID of the filter component class, within the plugin having the ID
1791 \bt_p{_plugin_id}, of which to set the "input port connected"
1792 method to \bt_p{_method}.
1796 #bt_component_class_filter_input_port_connected_method
1798 Filter component class's "input port connected" method.
1801 @bt_pre_not_null{_method}
1803 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1804 __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)
1809 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
1810 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1811 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1813 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
1814 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1818 Sets the finalization method of the \bt_msg_iter_cls of the
1819 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1820 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1822 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1824 @param[in] _plugin_id
1828 ID of the plugin which contains the filter component class of which
1829 to set the finalization method of the message iterator class.
1831 @param[in] _component_class_id
1835 ID of the filter component class, within the plugin having the ID
1836 \bt_p{_plugin_id}, of which to set the finalization method of the
1837 message iterator class to \bt_p{_method}.
1841 #bt_message_iterator_class_finalize_method
1843 Filter component class's message iterator class's finalization method.
1846 @bt_pre_not_null{_method}
1848 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1849 __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)
1854 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1855 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1856 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1858 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1859 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1863 Sets the initialization method of the \bt_msg_iter_cls of the
1864 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1865 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1867 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1869 @param[in] _plugin_id
1873 ID of the plugin which contains the filter component class of which
1874 to set the initialization method of the message iterator class.
1876 @param[in] _component_class_id
1880 ID of the filter component class, within the plugin having the ID
1881 \bt_p{_plugin_id}, of which to set the initialization method of the
1882 message iterator class to \bt_p{_method}.
1886 #bt_message_iterator_class_initialize_method
1888 Filter component class's message iterator class's initialization
1892 @bt_pre_not_null{_method}
1894 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1895 __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)
1900 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1901 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1902 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1904 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1905 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1909 Sets the "seek beginning" and "can seek beginning?" methods of the
1910 \bt_msg_iter_cls of the \bt_flt_comp_cls having the ID
1911 \bt_p{_component_class_id} in the plugin having the ID
1912 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1913 \bt_p{_can_seek_method}.
1915 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1916 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1918 @param[in] _plugin_id
1922 ID of the plugin which contains the filter component class of which
1923 to set the "seek beginning" and "can seek beginning?" methods of the
1924 message iterator class.
1926 @param[in] _component_class_id
1930 ID of the filter component class, within the plugin having the ID
1931 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1932 seek beginning" methods of the message iterator class to
1933 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1935 @param[in] _seek_method
1937 #bt_message_iterator_class_seek_beginning_method
1939 Filter component class's message iterator class's "seek beginning"
1942 @param[in] _can_seek_method
1944 #bt_message_iterator_class_can_seek_beginning_method
1946 Filter component class's message iterator class's
1947 "can seek beginning?" method.
1949 Can be \c NULL, in which case it is equivalent to setting a method
1950 which always returns #BT_TRUE.
1953 @bt_pre_not_null{_seek_method}
1954 @bt_pre_not_null{_can_seek_method}
1956 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1957 __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); \
1958 __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);
1963 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID()
1964 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1965 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1967 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1968 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1972 Sets the "seek ns from origin" and "can seek ns from origin?"
1973 methods of the \bt_msg_iter_cls of the \bt_flt_comp_cls having the
1974 ID \bt_p{_component_class_id} in the plugin having the ID
1975 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1976 \bt_p{_can_seek_method}.
1978 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1979 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
1982 @param[in] _plugin_id
1986 ID of the plugin which contains the filter component class of which
1987 to set the "seek ns from origin" and "can seek ns from origin?"
1988 methods of the message iterator class.
1990 @param[in] _component_class_id
1994 ID of the filter component class, within the plugin having the ID
1995 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
1996 "can seek ns from origin" methods of the message iterator class to
1997 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1999 @param[in] _seek_method
2001 #bt_message_iterator_class_seek_ns_from_origin_method
2003 Filter component class's message iterator class's "seek ns from
2006 @param[in] _can_seek_method
2008 #bt_message_iterator_class_can_seek_ns_from_origin_method
2010 Filter component class's message iterator class's "can seek ns from
2013 Can be \c NULL, in which case it is equivalent to setting a method
2014 which always returns #BT_TRUE.
2017 @bt_pre_not_null{_seek_method}
2018 @bt_pre_not_null{_can_seek_method}
2020 #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) \
2021 __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); \
2022 __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)
2027 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
2028 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2029 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2031 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
2032 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
2036 Sets the "output port connected" method of the \bt_flt_comp_cls
2037 having the ID \bt_p{_component_class_id} in the plugin having the ID
2038 \bt_p{_plugin_id} to \bt_p{_method}.
2041 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
2044 @param[in] _plugin_id
2048 ID of the plugin which contains the filter component class of which
2049 to set the "output port connected" method.
2051 @param[in] _component_class_id
2055 ID of the filter component class, within the plugin having the ID
2056 \bt_p{_plugin_id}, of which to set the "output port connected"
2057 method to \bt_p{_method}.
2061 #bt_component_class_filter_output_port_connected_method
2063 Filter component class's "output port connected" method.
2066 @bt_pre_not_null{_method}
2068 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2069 __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)
2074 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
2075 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2076 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2078 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
2079 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2083 Sets the query method of the \bt_flt_comp_cls
2084 having the ID \bt_p{_component_class_id} in the plugin having the ID
2085 \bt_p{_plugin_id} to \bt_p{_method}.
2087 See the \ref api-comp-cls-dev-meth-query "query" method.
2089 @param[in] _plugin_id
2093 ID of the plugin which contains the filter component class of which
2094 to set the query method.
2096 @param[in] _component_class_id
2100 ID of the filter component class, within the plugin having the ID
2101 \bt_p{_plugin_id}, of which to set the query
2102 method to \bt_p{_method}.
2106 #bt_component_class_filter_query_method
2108 Filter component class's query method.
2111 @bt_pre_not_null{_method}
2113 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2114 __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)
2119 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2120 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2121 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2123 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2124 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2129 @name Sink component class methods
2135 Sets the finalization method of the \bt_sink_comp_cls having the ID
2136 \bt_p{_component_class_id} in the plugin having the ID
2137 \bt_p{_plugin_id} to \bt_p{_method}.
2139 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
2141 @param[in] _plugin_id
2145 ID of the plugin which contains the sink component class of which
2146 to set the finalization method.
2148 @param[in] _component_class_id
2152 ID of the sink component class, within the plugin having the ID
2153 \bt_p{_plugin_id}, of which to set the finalization method to
2158 #bt_component_class_sink_finalize_method
2160 Sink component class's finalization method.
2163 @bt_pre_not_null{_method}
2165 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2166 __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)
2171 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
2172 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2173 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2175 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
2176 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
2180 Sets the \"get supported \bt_mip versions\" method of the
2181 \bt_sink_comp_cls having the ID \bt_p{_component_class_id} in the
2182 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
2184 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
2187 @param[in] _plugin_id
2191 ID of the plugin which contains the sink component class of which
2192 to set the "get supported MIP versions" method.
2194 @param[in] _component_class_id
2198 ID of the sink component class, within the plugin having the ID
2199 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
2200 method to \bt_p{_method}.
2204 #bt_component_class_sink_get_supported_mip_versions_method
2206 Sink component class's "get supported MIP versions" method.
2209 @bt_pre_not_null{_method}
2211 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2212 __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)
2217 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
2218 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2219 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2221 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
2222 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
2226 Sets the "graph is configured" method of the \bt_sink_comp_cls
2227 having the ID \bt_p{_component_class_id} in the plugin having the ID
2228 \bt_p{_plugin_id} to \bt_p{_method}.
2231 \ref api-comp-cls-dev-meth-graph-configured "graph is configured"
2234 @param[in] _plugin_id
2238 ID of the plugin which contains the sink component class of which
2239 to set the "graph is configured" method.
2241 @param[in] _component_class_id
2245 ID of the sink component class, within the plugin having the ID
2246 \bt_p{_plugin_id}, of which to set the "graph is configured"
2247 method to \bt_p{_method}.
2251 #bt_component_class_sink_graph_is_configured_method
2253 Sink component class's "graph is configured" method.
2256 @bt_pre_not_null{_method}
2258 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2259 __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)
2264 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID()
2265 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2266 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2268 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _method) \
2269 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _method)
2273 Sets the initialization method of the \bt_sink_comp_cls having the
2274 ID \bt_p{_component_class_id} in the plugin having the ID
2275 \bt_p{_plugin_id} to \bt_p{_method}.
2277 See the \ref api-comp-cls-dev-meth-init "initialize" method.
2279 @param[in] _plugin_id
2283 ID of the plugin which contains the sink component class of which
2284 to set the initialization method.
2286 @param[in] _component_class_id
2290 ID of the sink component class, within the plugin having the ID
2291 \bt_p{_plugin_id}, of which to set the initialization method to
2296 #bt_component_class_sink_initialize_method
2298 Sink component class's initialization method.
2301 @bt_pre_not_null{_method}
2303 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2304 __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)
2309 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
2310 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2311 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2313 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
2314 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
2318 Sets the "input port connected" method of the \bt_sink_comp_cls
2319 having the ID \bt_p{_component_class_id} in the plugin having the ID
2320 \bt_p{_plugin_id} to \bt_p{_method}.
2323 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
2326 @param[in] _plugin_id
2330 ID of the plugin which contains the sink component class of which
2331 to set the "input port connected" method.
2333 @param[in] _component_class_id
2337 ID of the sink component class, within the plugin having the ID
2338 \bt_p{_plugin_id}, of which to set the "input port connected"
2339 method to \bt_p{_method}.
2343 #bt_component_class_sink_input_port_connected_method
2345 Sink component class's "input port connected" method.
2348 @bt_pre_not_null{_method}
2350 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2351 __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)
2356 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
2357 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2358 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2360 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
2361 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2365 Sets the query method of the \bt_sink_comp_cls
2366 having the ID \bt_p{_component_class_id} in the plugin having the ID
2367 \bt_p{_plugin_id} to \bt_p{_method}.
2369 See the \ref api-comp-cls-dev-meth-query "query" method.
2371 @param[in] _plugin_id
2375 ID of the plugin which contains the sink component class of which
2376 to set the query method.
2378 @param[in] _component_class_id
2382 ID of the sink component class, within the plugin having the ID
2383 \bt_p{_plugin_id}, of which to set the query
2384 method to \bt_p{_method}.
2388 #bt_component_class_sink_query_method
2390 Sink component class's query method.
2393 @bt_pre_not_null{_method}
2395 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2396 __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)
2401 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2402 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2403 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2405 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2406 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2412 /* Plugin descriptor: describes a single plugin (internal use) */
2413 struct __bt_plugin_descriptor
{
2416 } __attribute__((packed
));
2418 /* Type of a plugin attribute (internal use) */
2419 enum __bt_plugin_descriptor_attribute_type
{
2420 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
2421 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
2422 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
2423 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
2424 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
2425 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
2428 /* Plugin (user) version */
2429 struct __bt_plugin_descriptor_version
{
2436 /* Plugin attribute (internal use) */
2437 struct __bt_plugin_descriptor_attribute
{
2438 /* Plugin descriptor to which to associate this attribute */
2439 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2441 /* Name of the attribute's type for debug purposes */
2442 const char *type_name
;
2444 /* Attribute's type */
2445 enum __bt_plugin_descriptor_attribute_type type
;
2447 /* Attribute's value (depends on attribute's type) */
2449 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
2450 bt_plugin_initialize_func init
;
2452 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
2453 bt_plugin_finalize_func exit
;
2455 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
2458 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
2459 const char *license
;
2461 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2462 const char *description
;
2464 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
2465 struct __bt_plugin_descriptor_version version
;
2467 } __attribute__((packed
));
2469 /* Component class descriptor (internal use) */
2470 struct __bt_plugin_component_class_descriptor
{
2472 * Plugin descriptor to which to associate this component
2475 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2477 /* Component class name */
2480 /* Component class type */
2481 bt_component_class_type type
;
2483 /* Mandatory methods (depends on component class type) */
2485 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
2487 bt_message_iterator_class_next_method msg_iter_next
;
2490 /* BT_COMPONENT_CLASS_TYPE_FILTER */
2492 bt_message_iterator_class_next_method msg_iter_next
;
2495 /* BT_COMPONENT_CLASS_TYPE_SINK */
2497 bt_component_class_sink_consume_method consume
;
2500 } __attribute__((packed
));
2502 /* Type of a component class attribute (internal use) */
2503 enum __bt_plugin_component_class_descriptor_attribute_type
{
2504 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
2505 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
2506 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD
= 2,
2507 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD
= 3,
2508 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 4,
2509 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 5,
2510 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 6,
2511 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 7,
2512 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD
= 8,
2513 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD
= 9,
2514 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 10,
2515 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD
= 11,
2516 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD
= 12,
2517 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD
= 13,
2518 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD
= 14,
2521 /* Component class attribute (internal use) */
2522 struct __bt_plugin_component_class_descriptor_attribute
{
2524 * Component class plugin attribute to which to associate this
2525 * component class attribute.
2527 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
2529 /* Name of the attribute's type for debug purposes */
2530 const char *type_name
;
2532 /* Attribute's type */
2533 enum __bt_plugin_component_class_descriptor_attribute_type type
;
2535 /* Attribute's value (depends on attribute's type) */
2537 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2538 const char *description
;
2540 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
2543 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD */
2544 bt_component_class_source_get_supported_mip_versions_method source_get_supported_mip_versions_method
;
2545 bt_component_class_filter_get_supported_mip_versions_method filter_get_supported_mip_versions_method
;
2546 bt_component_class_sink_get_supported_mip_versions_method sink_get_supported_mip_versions_method
;
2548 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD */
2549 bt_component_class_source_initialize_method source_initialize_method
;
2550 bt_component_class_filter_initialize_method filter_initialize_method
;
2551 bt_component_class_sink_initialize_method sink_initialize_method
;
2553 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
2554 bt_component_class_source_finalize_method source_finalize_method
;
2555 bt_component_class_filter_finalize_method filter_finalize_method
;
2556 bt_component_class_sink_finalize_method sink_finalize_method
;
2558 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
2559 bt_component_class_source_query_method source_query_method
;
2560 bt_component_class_filter_query_method filter_query_method
;
2561 bt_component_class_sink_query_method sink_query_method
;
2563 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
2564 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
2565 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
2567 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
2568 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
2569 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
2571 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */
2572 bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method
;
2574 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD */
2575 bt_message_iterator_class_initialize_method msg_iter_initialize_method
;
2577 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
2578 bt_message_iterator_class_finalize_method msg_iter_finalize_method
;
2580 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
2581 bt_message_iterator_class_seek_ns_from_origin_method msg_iter_seek_ns_from_origin_method
;
2583 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
2584 bt_message_iterator_class_seek_beginning_method msg_iter_seek_beginning_method
;
2586 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
2587 bt_message_iterator_class_can_seek_ns_from_origin_method msg_iter_can_seek_ns_from_origin_method
;
2589 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
2590 bt_message_iterator_class_can_seek_beginning_method msg_iter_can_seek_beginning_method
;
2592 } __attribute__((packed
));
2594 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
2595 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
2596 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
2597 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
2598 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
2599 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
2600 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
2601 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
2604 * Defines a plugin attribute (generic, internal use).
2606 * _attr_name: Name of the attribute (C identifier).
2607 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
2608 * _id: Plugin descriptor ID (C identifier).
2611 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
2612 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
2613 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
2614 .type_name = #_attr_name, \
2615 .type = _attr_type, \
2616 .value = { ._attr_name = _x }, \
2618 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
2620 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
2621 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
2624 * Defines a component class descriptor attribute (generic, internal
2627 * _id: Plugin descriptor ID (C identifier).
2628 * _component_class_id: Component class ID (C identifier).
2629 * _type: Component class type (`source`, `filter`, or `sink`).
2630 * _attr_name: Name of the attribute (C identifier).
2631 * _attr_type: Type of the attribute
2632 * (enum __bt_plugin_descriptor_attribute_type).
2635 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _component_class_id, _type, _x) \
2636 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name = { \
2637 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_component_class_id, \
2638 .type_name = #_attr_name, \
2639 .type = _attr_type, \
2640 .value = { ._attr_name = _x }, \
2642 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
2645 * Clang supports the no_sanitize variable attribute on global variables.
2646 * GCC only supports the no_sanitize_address function attribute, which is
2647 * not what we need. This is fine because, as far as we have seen, gcc
2648 * does not insert red zones around global variables.
2650 #if defined(__clang__)
2651 # if __has_feature(address_sanitizer)
2652 # define __bt_plugin_variable_attribute_no_sanitize_address \
2653 __attribute__((no_sanitize("address")))
2655 # define __bt_plugin_variable_attribute_no_sanitize_address
2658 # define __bt_plugin_variable_attribute_no_sanitize_address
2662 * Variable attributes for a plugin descriptor pointer to be added to
2663 * the plugin descriptor section (internal use).
2666 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2667 __attribute__((section("__DATA,btp_desc"), used)) \
2668 __bt_plugin_variable_attribute_no_sanitize_address
2670 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2671 __start___bt_plugin_descriptors
2673 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2674 __stop___bt_plugin_descriptors
2676 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
2677 __asm("section$start$__DATA$btp_desc")
2679 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
2680 __asm("section$end$__DATA$btp_desc")
2684 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2685 __attribute__((section("__bt_plugin_descriptors"), used)) \
2686 __bt_plugin_variable_attribute_no_sanitize_address
2688 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2689 __start___bt_plugin_descriptors
2691 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2692 __stop___bt_plugin_descriptors
2694 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
2696 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
2700 * Variable attributes for a plugin attribute pointer to be added to
2701 * the plugin attribute section (internal use).
2704 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2705 __attribute__((section("__DATA,btp_desc_att"), used)) \
2706 __bt_plugin_variable_attribute_no_sanitize_address
2708 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2709 __start___bt_plugin_descriptor_attributes
2711 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2712 __stop___bt_plugin_descriptor_attributes
2714 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2715 __asm("section$start$__DATA$btp_desc_att")
2717 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2718 __asm("section$end$__DATA$btp_desc_att")
2722 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2723 __attribute__((section("__bt_plugin_descriptor_attributes"), used)) \
2724 __bt_plugin_variable_attribute_no_sanitize_address
2726 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2727 __start___bt_plugin_descriptor_attributes
2729 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2730 __stop___bt_plugin_descriptor_attributes
2732 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2734 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2738 * Variable attributes for a component class descriptor pointer to be
2739 * added to the component class descriptor section (internal use).
2742 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2743 __attribute__((section("__DATA,btp_cc_desc"), used)) \
2744 __bt_plugin_variable_attribute_no_sanitize_address
2746 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2747 __start___bt_plugin_component_class_descriptors
2749 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2750 __stop___bt_plugin_component_class_descriptors
2752 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
2753 __asm("section$start$__DATA$btp_cc_desc")
2755 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
2756 __asm("section$end$__DATA$btp_cc_desc")
2760 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2761 __attribute__((section("__bt_plugin_component_class_descriptors"), used)) \
2762 __bt_plugin_variable_attribute_no_sanitize_address
2764 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2765 __start___bt_plugin_component_class_descriptors
2767 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2768 __stop___bt_plugin_component_class_descriptors
2770 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
2772 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
2776 * Variable attributes for a component class descriptor attribute
2777 * pointer to be added to the component class descriptor attribute
2778 * section (internal use).
2781 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2782 __attribute__((section("__DATA,btp_cc_desc_att"), used)) \
2783 __bt_plugin_variable_attribute_no_sanitize_address
2785 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2786 __start___bt_plugin_component_class_descriptor_attributes
2788 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2789 __stop___bt_plugin_component_class_descriptor_attributes
2791 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2792 __asm("section$start$__DATA$btp_cc_desc_att")
2794 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2795 __asm("section$end$__DATA$btp_cc_desc_att")
2799 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2800 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) \
2801 __bt_plugin_variable_attribute_no_sanitize_address
2803 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2804 __start___bt_plugin_component_class_descriptor_attributes
2806 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2807 __stop___bt_plugin_component_class_descriptor_attributes
2809 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2811 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2818 #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */