1 #ifndef BABELTRACE2_PLUGIN_PLUGIN_DEV_H
2 #define BABELTRACE2_PLUGIN_PLUGIN_DEV_H
5 * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26 #ifndef __BT_IN_BABELTRACE_H
27 # error "Please include <babeltrace2/babeltrace.h> instead."
32 #include <babeltrace2/graph/component-class-dev.h>
33 #include <babeltrace2/graph/message-iterator-class.h>
34 #include <babeltrace2/types.h>
37 * _BT_HIDDEN: set the hidden attribute for internal functions
38 * On Windows, symbols are local unless explicitly exported,
39 * see https://gcc.gnu.org/wiki/Visibility
41 #if defined(_WIN32) || defined(__CYGWIN__)
44 #define _BT_HIDDEN __attribute__((visibility("hidden")))
52 @defgroup api-plugin-dev Plugin development
55 Shared object plugin development.
57 This module offers macros to create a \bt_name shared object plugin.
59 Behind the scenes, the <code>BT_PLUGIN_*()</code> macros of this module
60 create and fill global tables which are located in sections of the
61 shared object with specific names. The \ref api-plugin functions can
62 load the resulting shared object file and create corresponding
65 See \ref guide-comp-link-plugin-so.
67 <h1>Plugin definition C file structure</h1>
69 The structure of a \bt_name plugin definition C file is as such:
81 Define a \bt_name plugin with BT_PLUGIN() if the plugin's name is a
82 valid C identifier, or with BT_PLUGIN_WITH_ID() otherwise.
84 See \ref api-plugin-dev-custom-plugin-id "Custom plugin ID" to
85 learn more about plugin IDs.
88 When you use BT_PLUGIN(), the plugin's ID is <code>auto</code>.
92 \bt_dt_opt Use any of the following macros (or their
93 <code>*_WITH_ID()</code> counterpart) \em once to set the properties
97 - BT_PLUGIN_DESCRIPTION()
103 \bt_dt_opt Use any of the following macros (or their
104 <code>*_WITH_ID()</code> counterpart) \em once to set the
105 initialization and finalization functions of the plugin:
107 - BT_PLUGIN_INITIALIZE_FUNC()
108 - BT_PLUGIN_FINALIZE_FUNC()
110 A plugin's initialization function is executed when the shared
111 object is loaded (see \ref api-plugin).
113 A plugin's finalization function is executed when the \bt_plugin
114 object is destroyed, if the initialization function (if any)
119 Use any of the following macros (or their <code>*_WITH_ID()</code>
120 counterpart) to add a component class to the plugin:
122 - BT_PLUGIN_SOURCE_COMPONENT_CLASS()
123 - BT_PLUGIN_FILTER_COMPONENT_CLASS()
124 - BT_PLUGIN_SINK_COMPONENT_CLASS()
128 \bt_dt_opt Depending on the type of the component class of step 5,
129 use any of the following macros (or their <code>*_WITH_ID()</code>
131 \em once to set its properties:
134 <dt>\bt_c_src_comp_cls</dt>
136 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION()
137 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP()
140 <dt>\bt_c_flt_comp_cls</dt>
142 - BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION()
143 - BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP()
146 <dt>\bt_c_sink_comp_cls</dt>
148 - BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION()
149 - BT_PLUGIN_SINK_COMPONENT_CLASS_HELP()
155 \bt_dt_opt Depending on the type of the component class of step 5,
156 use any of the following macros (or their <code>*_WITH_ID()</code>
157 counterpart) to set its optional methods:
160 <dt>Source component class</dt>
162 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD()
163 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
164 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD()
165 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
166 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
167 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
168 - BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD()
171 <dt>Filter component class</dt>
173 - BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD()
174 - BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
175 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD()
176 - BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
177 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD()
178 - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD()
179 - BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD()
180 - BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD()
183 <dt>Sink component class</dt>
185 - BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD()
186 - BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD()
187 - BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD()
188 - BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD()
189 - BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD()
190 - BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD()
196 You can repeat steps 5 to 7 to add more than one component class to a
199 See \ref example-simple-plugin-def-file for a concrete example of how
200 to use the macros of this module.
202 <h1>\anchor api-plugin-dev-custom-plugin-id Custom plugin ID</h1>
204 The BT_PLUGIN() macro defines a plugin with a specific name and the
205 ID <code>auto</code>.
207 All the <code>BT_PLUGIN_*()</code> macros which do not end with
208 <code>_WITH_ID</code> refer to the <code>auto</code> plugin.
210 There are two situations which demand that you use a custom plugin ID:
212 - You want more than one plugin contained in your shared object file.
214 Although the \bt_name project does not recommend this, it is possible.
215 This is why bt_plugin_find_all_from_file() returns a \bt_plugin_set
216 instead of a single \bt_plugin.
218 In this case, each plugin of the shared object needs its own, unique
221 - You want to give the plugin a name which is not a valid C identifier.
223 The BT_PLUGIN() macro accepts a C identifier as the plugin name, while
224 the BT_PLUGIN_WITH_ID() accepts a C identifier for the ID and a C
227 To define a plugin with a specific ID, use BT_PLUGIN_WITH_ID(), for
231 BT_PLUGIN_WITH_ID(my_plugin_id, "my-plugin-name");
234 Then, use the <code>BT_PLUGIN_*_WITH_ID()</code> macros to refer to
235 this specific plugin, for example:
238 BT_PLUGIN_AUTHOR_WITH_ID(my_plugin_id, "Patrick Bouchard");
243 You can still use the <code>auto</code> ID with BT_PLUGIN_WITH_ID()
244 to use the simpler macros afterwards while still giving the plugin a
245 name which is not a valid C identifier, for example:
248 BT_PLUGIN_WITH_ID(auto, "my-plugin-name");
249 BT_PLUGIN_AUTHOR("Patrick Bouchard");
253 <h1>Custom component class ID</h1>
255 The BT_PLUGIN_SOURCE_COMPONENT_CLASS(),
256 BT_PLUGIN_FILTER_COMPONENT_CLASS(), and
257 BT_PLUGIN_SINK_COMPONENT_CLASS() add a component class with a specific
258 name to the plugin having the ID <code>auto</code>.
260 The name you pass to those macros must be a valid C identifier and it
261 also serves as the component class's ID within the <code>auto</code>
264 There are two situations which demand that you use a custom component
267 - You want to add the component class to a specific plugin (other than
268 <code>auto</code>, if you have more than one).
270 - You want to give the component class a name which is not a valid C
273 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros accept a
274 C identifier for the component class ID and a string for its name.
276 For a given plugin and for a given component class type, all component
277 class IDs must be unique.
279 To add a component class having a specific ID to a plugin,
280 use the BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(),
281 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(), and
282 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() macros, for example:
285 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(my_plugin_id, my_comp_class_id,
286 "my-source", my_source_iter_next);
291 The <code>BT_PLUGIN_*_COMPONENT_CLASS_WITH_ID()</code> macros
292 specify the ID of the plugin to which to add the component class.
294 If you use the BT_PLUGIN() macro to define your plugin, then its
295 ID is <code>auto</code>:
298 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, my_comp_class_id,
299 "my-source", my_source_iter_next);
303 Then, use the <code>BT_PLUGIN_*_COMPONENT_CLASS_*_WITH_ID()</code>
304 macros to refer to this specific component class, for example:
307 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(my_plugin_id,
308 my_comp_class_id, my_source_finalize);
318 @typedef struct bt_self_plugin bt_self_plugin;
333 Defines a plugin module.
335 In a plugin define C file, you must use this macro before you use any
336 other <code>BT_PLUGIN*()</code> macro.
338 #define BT_PLUGIN_MODULE() \
339 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \
340 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA; \
341 _BT_HIDDEN extern struct __bt_plugin_descriptor const *__BT_PLUGIN_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_END_EXTRA; \
343 static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_dummy __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = NULL; \
344 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA; \
345 _BT_HIDDEN extern struct __bt_plugin_descriptor_attribute const *__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA; \
347 static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_component_class_descriptor_dummy __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = NULL; \
348 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA; \
349 _BT_HIDDEN extern struct __bt_plugin_component_class_descriptor const *__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA; \
351 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; \
352 _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; \
353 _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; \
355 struct __bt_plugin_descriptor const * const *__bt_get_begin_section_plugin_descriptors(void) \
357 return &__BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL; \
359 struct __bt_plugin_descriptor const * const *__bt_get_end_section_plugin_descriptors(void) \
361 return &__BT_PLUGIN_DESCRIPTOR_END_SYMBOL; \
363 struct __bt_plugin_descriptor_attribute const * const *__bt_get_begin_section_plugin_descriptor_attributes(void) \
365 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
367 struct __bt_plugin_descriptor_attribute const * const *__bt_get_end_section_plugin_descriptor_attributes(void) \
369 return &__BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
371 struct __bt_plugin_component_class_descriptor const * const *__bt_get_begin_section_component_class_descriptors(void) \
373 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL; \
375 struct __bt_plugin_component_class_descriptor const * const *__bt_get_end_section_component_class_descriptors(void) \
377 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL; \
379 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_begin_section_component_class_descriptor_attributes(void) \
381 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL; \
383 struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_end_section_component_class_descriptor_attributes(void) \
385 return &__BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL; \
391 @name Plugin definition
397 Defines a plugin named \bt_p{_name} and having the ID \bt_p{_id}.
403 Plugin's ID, unique amongst all the plugin IDs of the same shared
408 <code>const char *</code>
413 @bt_pre_not_null{_name}
415 #define BT_PLUGIN_WITH_ID(_id, _name) \
416 struct __bt_plugin_descriptor __bt_plugin_descriptor_##_id = { \
419 static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_##_id##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRS = &__bt_plugin_descriptor_##_id
423 Alias of BT_PLUGIN_WITH_ID() with the \bt_p{_id} parameter set to
426 #define BT_PLUGIN(_name) static BT_PLUGIN_WITH_ID(auto, #_name)
431 @name Plugin properties
437 Sets the description of the plugin having the ID \bt_p{_id} to
440 See the \ref api-comp-cls-prop-descr "description" property.
446 ID of the plugin of which to set the description.
448 @param[in] _description
450 <code>const char *</code>
452 Plugin's description.
455 @bt_pre_not_null{_description}
457 #define BT_PLUGIN_DESCRIPTION_WITH_ID(_id, _description) \
458 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _id, _description)
462 Alias of BT_PLUGIN_DESCRIPTION_WITH_ID() with the \bt_p{_id}
463 parameter set to <code>auto</code>.
465 #define BT_PLUGIN_DESCRIPTION(_description) BT_PLUGIN_DESCRIPTION_WITH_ID(auto, _description)
470 Sets the name(s) of the author(s) of the plugin having the ID
471 \bt_p{_id} to \bt_p{_author}.
473 See the \ref api-plugin-prop-author "author name(s)" property.
479 ID of the plugin of which to set the author(s).
483 <code>const char *</code>
488 @bt_pre_not_null{_author}
490 #define BT_PLUGIN_AUTHOR_WITH_ID(_id, _author) \
491 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(author, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR, _id, _author)
495 Alias of BT_PLUGIN_AUTHOR_WITH_ID() with the \bt_p{_id}
496 parameter set to <code>auto</code>.
498 #define BT_PLUGIN_AUTHOR(_author) BT_PLUGIN_AUTHOR_WITH_ID(auto, _author)
502 Sets the license (name or full) of the plugin having the ID
503 \bt_p{_id} to \bt_p{_license}.
505 See the \ref api-plugin-prop-license "license" property.
511 ID of the plugin of which to set the license.
515 <code>const char *</code>
520 @bt_pre_not_null{_license}
522 #define BT_PLUGIN_LICENSE_WITH_ID(_id, _license) \
523 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(license, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE, _id, _license)
527 Alias of BT_PLUGIN_LICENSE_WITH_ID() with the \bt_p{_id}
528 parameter set to <code>auto</code>.
530 #define BT_PLUGIN_LICENSE(_license) BT_PLUGIN_LICENSE_WITH_ID(auto, _license)
534 Sets the version of the plugin having the ID \bt_p{_id} to
537 See the \ref api-plugin-prop-version "version" property.
543 ID of the plugin of which to set the version.
547 <code>unsigned int</code>
549 Plugin's major version.
553 <code>unsigned int</code>
555 Plugin's minor version.
559 <code>unsigned int</code>
561 Plugin's patch version.
565 <code>const char *</code>
567 Plugin's version's extra information.
569 Can be \c NULL if the plugin's version has no extra information.
572 #define BT_PLUGIN_VERSION_WITH_ID(_id, _major, _minor, _patch, _extra) \
573 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(version, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION, _id, __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra))
577 Alias of BT_PLUGIN_VERSION_WITH_ID() with the \bt_p{_id}
578 parameter set to <code>auto</code>.
580 #define BT_PLUGIN_VERSION(_major, _minor, _patch, _extra) BT_PLUGIN_VERSION_WITH_ID(auto, _major, _minor, _patch, _extra)
585 @name Plugin functions
591 Status codes for #bt_plugin_initialize_func.
593 typedef enum bt_plugin_initialize_func_status
{
598 BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
= __BT_FUNC_STATUS_OK
,
604 BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
610 BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
= __BT_FUNC_STATUS_ERROR
,
611 } bt_plugin_initialize_func_status
;
615 User plugin initialization function.
617 @param[in] self_plugin
621 This parameter is a private view of the \bt_plugin object for
624 As of \bt_name_version_min_maj, there's no self plugin API.
627 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK
629 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR
631 @retval #BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR
634 @bt_pre_not_null{self_plugin}
636 typedef bt_plugin_initialize_func_status (*bt_plugin_initialize_func
)(
637 bt_self_plugin
*self_plugin
);
641 Sets the initialization function of the plugin having the ID
642 \bt_p{_id} to \bt_p{_func}.
648 ID of the plugin of which to set the initialization function.
652 #bt_plugin_initialize_func
654 Plugin's initialization function.
657 @bt_pre_not_null{_func}
659 #define BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(_id, _func) \
660 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _func)
664 Alias of BT_PLUGIN_INITIALIZE_FUNC_WITH_ID() with the \bt_p{_id}
665 parameter set to <code>auto</code>.
667 #define BT_PLUGIN_INITIALIZE_FUNC(_func) BT_PLUGIN_INITIALIZE_FUNC_WITH_ID(auto, _func)
671 User plugin finalization function.
673 typedef void (*bt_plugin_finalize_func
)(void);
677 Sets the finalization function of the plugin having the ID
678 \bt_p{_id} to \bt_p{_func}.
684 ID of the plugin of which to set the finalization function.
688 #bt_plugin_finalize_func
690 Plugin's finalization function.
693 @bt_pre_not_null{_func}
695 #define BT_PLUGIN_FINALIZE_FUNC_WITH_ID(_id, _func) \
696 __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _func)
700 Alias of BT_PLUGIN_FINALIZE_FUNC_WITH_ID() with the \bt_p{_id}
701 parameter set to <code>auto</code>.
703 #define BT_PLUGIN_FINALIZE_FUNC(_func) BT_PLUGIN_FINALIZE_FUNC_WITH_ID(auto, _func)
708 @name Component class adding
714 Adds a \bt_src_comp_cls named \bt_p{_name}, having the ID
715 \bt_p{_component_class_id} and the message iterator class's "next"
716 method \bt_p{_message_iterator_class_next_method}, to the plugin
717 having the ID \bt_p{_plugin_id}.
719 @param[in] _plugin_id
723 ID of the plugin to which to add the source component class.
725 @param[in] _component_class_id
729 Source component class's ID, unique amongst all the source component
730 class IDs of the same plugin.
734 <code>const char *</code>
736 Source component class's name, unique amongst all the source
737 component class names of the same plugin.
739 @param[in] _message_iterator_class_next_method
741 #bt_message_iterator_class_next_method
743 Source component class's message iterator class's "next" method.
746 @bt_pre_not_null{_name}
747 @bt_pre_not_null{_message_iterator_class_next_method}
749 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
750 static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
751 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
753 .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \
754 .methods = { .source = { .msg_iter_next = _message_iterator_class_next_method } }, \
756 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
760 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID() with the
761 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
762 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
763 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
769 Passed as both the \bt_p{_component_class_id} and the
770 \bt_p{_name} (once converted to a string) parameters of
771 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID().
774 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
775 BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
779 Adds a \bt_flt_comp_cls named \bt_p{_name}, having the ID
780 \bt_p{_component_class_id} and the message iterator class's "next"
781 method \bt_p{_message_iterator_class_next_method}, to the plugin
782 having the ID \bt_p{_plugin_id}.
784 @param[in] _plugin_id
788 ID of the plugin to which to add the filter component class.
790 @param[in] _component_class_id
794 Filter component class's ID, unique amongst all the filter component
795 class IDs of the same plugin.
799 <code>const char *</code>
801 Filter component class's name, unique amongst all the filter
802 component class names of the same plugin.
804 @param[in] _message_iterator_class_next_method
806 #bt_message_iterator_class_next_method
808 Filter component class's message iterator class's "next" method.
811 @bt_pre_not_null{_name}
812 @bt_pre_not_null{_message_iterator_class_next_method}
814 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _message_iterator_class_next_method) \
815 static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
816 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
818 .type = BT_COMPONENT_CLASS_TYPE_FILTER, \
819 .methods = { .filter = { .msg_iter_next = _message_iterator_class_next_method } }, \
821 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
825 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID() with the
826 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
827 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
828 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
834 Passed as both the \bt_p{_component_class_id} and the
835 \bt_p{_name} (once converted to a string) parameters of
836 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID().
839 #define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _message_iterator_class_next_method) \
840 BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _message_iterator_class_next_method)
844 Adds a \bt_sink_comp_cls named \bt_p{_name}, having the ID
845 \bt_p{_component_class_id} and the consuming method
846 \bt_p{_consume_method}, to the plugin
847 having the ID \bt_p{_plugin_id}.
849 @param[in] _plugin_id
853 ID of the plugin to which to add the sink component class.
855 @param[in] _component_class_id
859 Sink component class's ID, unique amongst all the sink component
860 class IDs of the same plugin.
864 <code>const char *</code>
866 Sink component class's name, unique amongst all the sink
867 component class names of the same plugin.
869 @param[in] _consume_method
871 #bt_component_class_sink_consume_method
873 Sink component class's message iterator class's "next" method.
876 @bt_pre_not_null{_name}
877 @bt_pre_not_null{_consume_method}
879 #define BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(_plugin_id, _component_class_id, _name, _consume_method) \
880 static struct __bt_plugin_component_class_descriptor __bt_plugin_sink_component_class_descriptor_##_plugin_id##_##_component_class_id = { \
881 .plugin_descriptor = &__bt_plugin_descriptor_##_plugin_id, \
883 .type = BT_COMPONENT_CLASS_TYPE_SINK, \
884 .methods = { .sink = { .consume = _consume_method } }, \
886 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
890 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID() with the
891 \bt_p{_plugin_id} parameter set to <code>auto</code>, the
892 \bt_p{_component_class_id} parameter set to \bt_p{_name}, and
893 the \bt_p{_name} parameter set to a string version of \bt_p{_name}.
899 Passed as both the \bt_p{_component_class_id} and the
900 \bt_p{_name} (once converted to a string) parameters of
901 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID().
904 #define BT_PLUGIN_SINK_COMPONENT_CLASS(_name, _consume_method) \
905 BT_PLUGIN_SINK_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _consume_method)
910 @name Source component class properties
916 Sets the description of the \bt_src_comp_cls having the ID
917 \bt_p{_component_class_id} in the plugin having the ID
918 \bt_p{_plugin_id} to \bt_p{_description}.
920 See the \ref api-comp-cls-prop-descr "description" property.
922 @param[in] _plugin_id
926 ID of the plugin which contains the source component class of which
927 to set the description.
929 @param[in] _component_class_id
933 ID of the source component class, within the plugin having the ID
934 \bt_p{_plugin_id}, of which to set the description to
937 @param[in] _description
939 <code>const char *</code>
941 Source component class's description.
944 @bt_pre_not_null{_description}
946 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
947 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, source, _description)
951 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
952 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
953 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
955 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
956 BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
960 Sets the help text of the \bt_src_comp_cls having the ID
961 \bt_p{_component_class_id} in the plugin having the ID
962 \bt_p{_plugin_id} to \bt_p{_help_text}.
964 See the \ref api-comp-cls-prop-help "help text" property.
966 @param[in] _plugin_id
970 ID of the plugin which contains the source component class of which
971 to set the help text.
973 @param[in] _component_class_id
977 ID of the source component class, within the plugin having the ID
978 \bt_p{_plugin_id}, of which to set the help text to
981 @param[in] _help_text
983 <code>const char *</code>
985 Source component class's help text.
988 @bt_pre_not_null{_help_text}
990 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
991 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, source, _help_text)
995 Alias of BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID() with the
996 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
997 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
999 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(_name, _help_text) \
1000 BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1005 @name Filter component class properties
1011 Sets the description of the \bt_flt_comp_cls having the ID
1012 \bt_p{_component_class_id} in the plugin having the ID
1013 \bt_p{_plugin_id} to \bt_p{_description}.
1015 See the \ref api-comp-cls-prop-descr "description" property.
1017 @param[in] _plugin_id
1021 ID of the plugin which contains the filter component class of which
1022 to set the description.
1024 @param[in] _component_class_id
1028 ID of the filter component class, within the plugin having the ID
1029 \bt_p{_plugin_id}, of which to set the description to
1030 \bt_p{_description}.
1032 @param[in] _description
1034 <code>const char *</code>
1036 Filter component class's description.
1039 @bt_pre_not_null{_description}
1041 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1042 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, filter, _description)
1046 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1047 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1048 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1050 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1051 BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1055 Sets the help text of the \bt_flt_comp_cls having the ID
1056 \bt_p{_component_class_id} in the plugin having the ID
1057 \bt_p{_plugin_id} to \bt_p{_help_text}.
1059 See the \ref api-comp-cls-prop-help "help text" property.
1061 @param[in] _plugin_id
1065 ID of the plugin which contains the filter component class of which
1066 to set the help text.
1068 @param[in] _component_class_id
1072 ID of the filter component class, within the plugin having the ID
1073 \bt_p{_plugin_id}, of which to set the help text to
1076 @param[in] _help_text
1078 <code>const char *</code>
1080 Filter component class's help text.
1083 @bt_pre_not_null{_help_text}
1085 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1086 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, filter, _help_text)
1090 Alias of BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID() with the
1091 \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1092 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1094 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(_name, _help_text) \
1095 BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1100 @name Sink component class properties
1106 Sets the description of the \bt_sink_comp_cls having the ID
1107 \bt_p{_component_class_id} in the plugin having the ID
1108 \bt_p{_plugin_id} to \bt_p{_description}.
1110 See the \ref api-comp-cls-prop-descr "description" property.
1112 @param[in] _plugin_id
1116 ID of the plugin which contains the sink component class of which
1117 to set the description.
1119 @param[in] _component_class_id
1123 ID of the sink component class, within the plugin having the ID
1124 \bt_p{_plugin_id}, of which to set the description to
1125 \bt_p{_description}.
1127 @param[in] _description
1129 <code>const char *</code>
1131 Sink component class's description.
1134 @bt_pre_not_null{_description}
1136 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(_plugin_id, _component_class_id, _description) \
1137 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(description, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION, _plugin_id, _component_class_id, sink, _description)
1141 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID() with
1142 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1143 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1145 #define BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(_name, _description) \
1146 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, _name, _description)
1150 Sets the help text of the \bt_sink_comp_cls having the ID
1151 \bt_p{_component_class_id} in the plugin having the ID
1152 \bt_p{_plugin_id} to \bt_p{_help_text}.
1154 See the \ref api-comp-cls-prop-help "help text" property.
1156 @param[in] _plugin_id
1160 ID of the plugin which contains the sink component class of which
1161 to set the help text.
1163 @param[in] _component_class_id
1167 ID of the sink component class, within the plugin having the ID
1168 \bt_p{_plugin_id}, of which to set the help text to
1171 @param[in] _help_text
1173 <code>const char *</code>
1175 Sink component class's help text.
1178 @bt_pre_not_null{_help_text}
1180 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(_plugin_id, _component_class_id, _help_text) \
1181 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(help, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP, _plugin_id, _component_class_id, sink, _help_text)
1185 Alias of BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID() with
1186 the \bt_p{_plugin_id} parameter set to <code>auto</code> and the
1187 \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1189 #define BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(_name, _help_text) \
1190 BT_PLUGIN_SINK_COMPONENT_CLASS_HELP_WITH_ID(auto, _name, _help_text)
1195 @name Source component class methods
1201 Sets the finalization method of the \bt_src_comp_cls having the ID
1202 \bt_p{_component_class_id} in the plugin having the ID
1203 \bt_p{_plugin_id} to \bt_p{_method}.
1205 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1207 @param[in] _plugin_id
1211 ID of the plugin which contains the source component class of which
1212 to set the finalization method.
1214 @param[in] _component_class_id
1218 ID of the source component class, within the plugin having the ID
1219 \bt_p{_plugin_id}, of which to set the finalization method to
1224 #bt_component_class_source_finalize_method
1226 Source component class's finalization method.
1229 @bt_pre_not_null{_method}
1231 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1232 __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)
1237 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1238 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1239 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1241 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1242 BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1246 Sets the \"get supported \bt_mip versions\" method of the
1247 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1248 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1250 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1253 @param[in] _plugin_id
1257 ID of the plugin which contains the source component class of which
1258 to set the "get supported MIP versions" method.
1260 @param[in] _component_class_id
1264 ID of the source component class, within the plugin having the ID
1265 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1266 method to \bt_p{_method}.
1270 #bt_component_class_source_get_supported_mip_versions_method
1272 Source component class's "get supported MIP versions" method.
1275 @bt_pre_not_null{_method}
1277 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1278 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS, _plugin_id, _component_class_id, source, _method)
1283 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1284 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1285 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1287 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1288 BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1292 Sets the initialization method of the \bt_src_comp_cls having the ID
1293 \bt_p{_component_class_id} in the plugin having the ID
1294 \bt_p{_plugin_id} to \bt_p{_method}.
1296 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1298 @param[in] _plugin_id
1302 ID of the plugin which contains the source component class of which
1303 to set the initialization method.
1305 @param[in] _component_class_id
1309 ID of the source component class, within the plugin having the ID
1310 \bt_p{_plugin_id}, of which to set the initialization method to
1315 #bt_component_class_source_initialize_method
1317 Source component class's initialization method.
1320 @bt_pre_not_null{_method}
1322 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1323 __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)
1328 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1329 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1330 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1332 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1333 BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1337 Sets the finalization method of the \bt_msg_iter_cls of the
1338 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1339 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1341 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1343 @param[in] _plugin_id
1347 ID of the plugin which contains the source component class of which
1348 to set the finalization method of the message iterator class.
1350 @param[in] _component_class_id
1354 ID of the source component class, within the plugin having the ID
1355 \bt_p{_plugin_id}, of which to set the finalization method of the
1356 message iterator class to \bt_p{_method}.
1360 #bt_message_iterator_class_finalize_method
1362 Source component class's message iterator class's finalization method.
1365 @bt_pre_not_null{_method}
1367 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1368 __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)
1373 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1374 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1375 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1377 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1378 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1382 Sets the initialization method of the \bt_msg_iter_cls of the
1383 \bt_src_comp_cls having the ID \bt_p{_component_class_id} in the
1384 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1386 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1388 @param[in] _plugin_id
1392 ID of the plugin which contains the source component class of which
1393 to set the initialization method of the message iterator class.
1395 @param[in] _component_class_id
1399 ID of the source component class, within the plugin having the ID
1400 \bt_p{_plugin_id}, of which to set the initialization method of the
1401 message iterator class to \bt_p{_method}.
1405 #bt_message_iterator_class_initialize_method
1407 Source component class's message iterator class's initialization
1411 @bt_pre_not_null{_method}
1413 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1414 __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)
1419 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1420 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1421 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1423 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1424 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1428 Sets the "seek beginning" and "can seek beginning?" methods of the
1429 \bt_msg_iter_cls of the \bt_src_comp_cls having the ID
1430 \bt_p{_component_class_id} in the plugin having the ID
1431 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1432 \bt_p{_can_seek_method}.
1434 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1435 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1437 @param[in] _plugin_id
1441 ID of the plugin which contains the source component class of which
1442 to set the "seek beginning" and "can seek beginning?" methods of the
1443 message iterator class.
1445 @param[in] _component_class_id
1449 ID of the source component class, within the plugin having the ID
1450 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1451 seek beginning" methods of the message iterator class to
1452 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1454 @param[in] _seek_method
1456 #bt_message_iterator_class_seek_beginning_method
1458 Source component class's message iterator class's "seek beginning"
1461 @param[in] _can_seek_method
1463 #bt_message_iterator_class_can_seek_beginning_method
1465 Source component class's message iterator class's
1466 "can seek beginning?" method.
1468 Can be \c NULL, in which case it is equivalent to setting a method
1469 which always returns #BT_TRUE.
1472 @bt_pre_not_null{_seek_method}
1473 @bt_pre_not_null{_can_seek_method}
1475 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1476 __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); \
1477 __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)
1482 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS()
1483 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1484 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1486 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1487 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1491 Sets the "seek ns from origin" and "can seek ns from origin?"
1492 methods of the \bt_msg_iter_cls of the \bt_src_comp_cls having the
1493 ID \bt_p{_component_class_id} in the plugin having the ID
1494 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1495 \bt_p{_can_seek_method}.
1497 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1498 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
1501 @param[in] _plugin_id
1505 ID of the plugin which contains the source component class of which
1506 to set the "seek ns from origin" and "can seek ns from origin?"
1507 methods of the message iterator class.
1509 @param[in] _component_class_id
1513 ID of the source component class, within the plugin having the ID
1514 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
1515 "can seek ns from origin" methods of the message iterator class to
1516 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1518 @param[in] _seek_method
1520 #bt_message_iterator_class_seek_ns_from_origin_method
1522 Source component class's message iterator class's "seek ns from
1525 @param[in] _can_seek_method
1527 #bt_message_iterator_class_can_seek_ns_from_origin_method
1529 Source component class's message iterator class's "can seek ns from
1532 Can be \c NULL, in which case it is equivalent to setting a method
1533 which always returns #BT_TRUE.
1536 @bt_pre_not_null{_seek_method}
1537 @bt_pre_not_null{_can_seek_method}
1539 #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) \
1540 __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); \
1541 __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)
1546 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
1547 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1548 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1550 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
1551 BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1555 Sets the "output port connected" method of the \bt_src_comp_cls
1556 having the ID \bt_p{_component_class_id} in the plugin having the ID
1557 \bt_p{_plugin_id} to \bt_p{_method}.
1560 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
1563 @param[in] _plugin_id
1567 ID of the plugin which contains the source component class of which
1568 to set the "output port connected" method.
1570 @param[in] _component_class_id
1574 ID of the source component class, within the plugin having the ID
1575 \bt_p{_plugin_id}, of which to set the "output port connected"
1576 method to \bt_p{_method}.
1580 #bt_component_class_source_output_port_connected_method
1582 Source component class's "output port connected" method.
1585 @bt_pre_not_null{_method}
1587 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1588 __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)
1593 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
1594 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1595 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1597 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
1598 BT_PLUGIN_SOURCE_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1602 Sets the query method of the \bt_src_comp_cls
1603 having the ID \bt_p{_component_class_id} in the plugin having the ID
1604 \bt_p{_plugin_id} to \bt_p{_method}.
1606 See the \ref api-comp-cls-dev-meth-query "query" method.
1608 @param[in] _plugin_id
1612 ID of the plugin which contains the source component class of which
1613 to set the query method.
1615 @param[in] _component_class_id
1619 ID of the source component class, within the plugin having the ID
1620 \bt_p{_plugin_id}, of which to set the query
1621 method to \bt_p{_method}.
1625 #bt_component_class_source_query_method
1627 Source component class's query method.
1630 @bt_pre_not_null{_method}
1632 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1633 __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)
1638 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
1639 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1640 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1642 #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
1643 BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
1648 @name Filter component class methods
1654 Sets the finalization method of the \bt_flt_comp_cls having the ID
1655 \bt_p{_component_class_id} in the plugin having the ID
1656 \bt_p{_plugin_id} to \bt_p{_method}.
1658 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
1660 @param[in] _plugin_id
1664 ID of the plugin which contains the filter component class of which
1665 to set the finalization method.
1667 @param[in] _component_class_id
1671 ID of the filter component class, within the plugin having the ID
1672 \bt_p{_plugin_id}, of which to set the finalization method to
1677 #bt_component_class_filter_finalize_method
1679 Filter component class's finalization method.
1682 @bt_pre_not_null{_method}
1684 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1685 __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)
1690 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
1691 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1692 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1694 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
1695 BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1699 Sets the \"get supported \bt_mip versions\" method of the
1700 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1701 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1703 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
1706 @param[in] _plugin_id
1710 ID of the plugin which contains the filter component class of which
1711 to set the "get supported MIP versions" method.
1713 @param[in] _component_class_id
1717 ID of the filter component class, within the plugin having the ID
1718 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
1719 method to \bt_p{_method}.
1723 #bt_component_class_filter_get_supported_mip_versions_method
1725 Filter component class's "get supported MIP versions" method.
1728 @bt_pre_not_null{_method}
1730 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1731 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS, _plugin_id, _component_class_id, filter, _method)
1736 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
1737 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1738 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1740 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
1741 BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
1745 Sets the initialization method of the \bt_flt_comp_cls having the ID
1746 \bt_p{_component_class_id} in the plugin having the ID
1747 \bt_p{_plugin_id} to \bt_p{_method}.
1749 See the \ref api-comp-cls-dev-meth-init "initialize" method.
1751 @param[in] _plugin_id
1755 ID of the plugin which contains the filter component class of which
1756 to set the initialization method.
1758 @param[in] _component_class_id
1762 ID of the filter component class, within the plugin having the ID
1763 \bt_p{_plugin_id}, of which to set the initialization method to
1768 #bt_component_class_filter_initialize_method
1770 Filter component class's initialization method.
1773 @bt_pre_not_null{_method}
1775 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1776 __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)
1781 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
1782 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1783 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1785 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
1786 BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1790 Sets the "input port connected" method of the \bt_flt_comp_cls
1791 having the ID \bt_p{_component_class_id} in the plugin having the ID
1792 \bt_p{_plugin_id} to \bt_p{_method}.
1795 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
1798 @param[in] _plugin_id
1802 ID of the plugin which contains the filter component class of which
1803 to set the "input port connected" method.
1805 @param[in] _component_class_id
1809 ID of the filter component class, within the plugin having the ID
1810 \bt_p{_plugin_id}, of which to set the "input port connected"
1811 method to \bt_p{_method}.
1815 #bt_component_class_filter_input_port_connected_method
1817 Filter component class's "input port connected" method.
1820 @bt_pre_not_null{_method}
1822 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1823 __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)
1828 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
1829 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1830 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1832 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
1833 BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
1837 Sets the finalization method of the \bt_msg_iter_cls of the
1838 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1839 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1841 See the \ref api-msg-iter-cls-meth-fini "finalize" method.
1843 @param[in] _plugin_id
1847 ID of the plugin which contains the filter component class of which
1848 to set the finalization method of the message iterator class.
1850 @param[in] _component_class_id
1854 ID of the filter component class, within the plugin having the ID
1855 \bt_p{_plugin_id}, of which to set the finalization method of the
1856 message iterator class to \bt_p{_method}.
1860 #bt_message_iterator_class_finalize_method
1862 Filter component class's message iterator class's finalization method.
1865 @bt_pre_not_null{_method}
1867 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1868 __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)
1873 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID()
1874 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1875 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1877 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(_name, _method) \
1878 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
1882 Sets the initialization method of the \bt_msg_iter_cls of the
1883 \bt_flt_comp_cls having the ID \bt_p{_component_class_id} in the
1884 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
1886 See the \ref api-msg-iter-cls-meth-init "initialize" method.
1888 @param[in] _plugin_id
1892 ID of the plugin which contains the filter component class of which
1893 to set the initialization method of the message iterator class.
1895 @param[in] _component_class_id
1899 ID of the filter component class, within the plugin having the ID
1900 \bt_p{_plugin_id}, of which to set the initialization method of the
1901 message iterator class to \bt_p{_method}.
1905 #bt_message_iterator_class_initialize_method
1907 Filter component class's message iterator class's initialization
1911 @bt_pre_not_null{_method}
1913 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
1914 __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)
1919 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID()
1920 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1921 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1923 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(_name, _method) \
1924 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
1928 Sets the "seek beginning" and "can seek beginning?" methods of the
1929 \bt_msg_iter_cls of the \bt_flt_comp_cls having the ID
1930 \bt_p{_component_class_id} in the plugin having the ID
1931 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1932 \bt_p{_can_seek_method}.
1934 See the \ref api-msg-iter-cls-meth-seek-beg "seek beginning" and
1935 \ref api-msg-iter-cls-meth-can-seek-beg "can seek beginning?" methods.
1937 @param[in] _plugin_id
1941 ID of the plugin which contains the filter component class of which
1942 to set the "seek beginning" and "can seek beginning?" methods of the
1943 message iterator class.
1945 @param[in] _component_class_id
1949 ID of the filter component class, within the plugin having the ID
1950 \bt_p{_plugin_id}, of which to set the "seek beginning" and "can
1951 seek beginning" methods of the message iterator class to
1952 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
1954 @param[in] _seek_method
1956 #bt_message_iterator_class_seek_beginning_method
1958 Filter component class's message iterator class's "seek beginning"
1961 @param[in] _can_seek_method
1963 #bt_message_iterator_class_can_seek_beginning_method
1965 Filter component class's message iterator class's
1966 "can seek beginning?" method.
1968 Can be \c NULL, in which case it is equivalent to setting a method
1969 which always returns #BT_TRUE.
1972 @bt_pre_not_null{_seek_method}
1973 @bt_pre_not_null{_can_seek_method}
1975 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(_plugin_id, _component_class_id, _seek_method, _can_seek_method) \
1976 __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); \
1977 __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);
1982 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID()
1983 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
1984 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
1986 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \
1987 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
1991 Sets the "seek ns from origin" and "can seek ns from origin?"
1992 methods of the \bt_msg_iter_cls of the \bt_flt_comp_cls having the
1993 ID \bt_p{_component_class_id} in the plugin having the ID
1994 \bt_p{_plugin_id} to \bt_p{_seek_method} and
1995 \bt_p{_can_seek_method}.
1997 See the \ref api-msg-iter-cls-meth-seek-ns "seek ns from origin" and
1998 \ref api-msg-iter-cls-meth-can-seek-ns "can seek ns from origin?"
2001 @param[in] _plugin_id
2005 ID of the plugin which contains the filter component class of which
2006 to set the "seek ns from origin" and "can seek ns from origin?"
2007 methods of the message iterator class.
2009 @param[in] _component_class_id
2013 ID of the filter component class, within the plugin having the ID
2014 \bt_p{_plugin_id}, of which to set the "seek ns from origin" and
2015 "can seek ns from origin" methods of the message iterator class to
2016 \bt_p{_seek_method} and \bt_p{_can_seek_method}.
2018 @param[in] _seek_method
2020 #bt_message_iterator_class_seek_ns_from_origin_method
2022 Filter component class's message iterator class's "seek ns from
2025 @param[in] _can_seek_method
2027 #bt_message_iterator_class_can_seek_ns_from_origin_method
2029 Filter component class's message iterator class's "can seek ns from
2032 Can be \c NULL, in which case it is equivalent to setting a method
2033 which always returns #BT_TRUE.
2036 @bt_pre_not_null{_seek_method}
2037 @bt_pre_not_null{_can_seek_method}
2039 #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) \
2040 __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); \
2041 __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)
2046 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID()
2047 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2048 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2050 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \
2051 BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method)
2055 Sets the "output port connected" method of the \bt_flt_comp_cls
2056 having the ID \bt_p{_component_class_id} in the plugin having the ID
2057 \bt_p{_plugin_id} to \bt_p{_method}.
2060 \ref api-comp-cls-dev-meth-oport-connected "output port connected"
2063 @param[in] _plugin_id
2067 ID of the plugin which contains the filter component class of which
2068 to set the "output port connected" method.
2070 @param[in] _component_class_id
2074 ID of the filter component class, within the plugin having the ID
2075 \bt_p{_plugin_id}, of which to set the "output port connected"
2076 method to \bt_p{_method}.
2080 #bt_component_class_filter_output_port_connected_method
2082 Filter component class's "output port connected" method.
2085 @bt_pre_not_null{_method}
2087 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2088 __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)
2093 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID()
2094 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2095 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2097 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD(_name, _method) \
2098 BT_PLUGIN_FILTER_COMPONENT_CLASS_OUTPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2102 Sets the query method of the \bt_flt_comp_cls
2103 having the ID \bt_p{_component_class_id} in the plugin having the ID
2104 \bt_p{_plugin_id} to \bt_p{_method}.
2106 See the \ref api-comp-cls-dev-meth-query "query" method.
2108 @param[in] _plugin_id
2112 ID of the plugin which contains the filter component class of which
2113 to set the query method.
2115 @param[in] _component_class_id
2119 ID of the filter component class, within the plugin having the ID
2120 \bt_p{_plugin_id}, of which to set the query
2121 method to \bt_p{_method}.
2125 #bt_component_class_filter_query_method
2127 Filter component class's query method.
2130 @bt_pre_not_null{_method}
2132 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2133 __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)
2138 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2139 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2140 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2142 #define BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2143 BT_PLUGIN_FILTER_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2148 @name Sink component class methods
2154 Sets the finalization method of the \bt_sink_comp_cls having the ID
2155 \bt_p{_component_class_id} in the plugin having the ID
2156 \bt_p{_plugin_id} to \bt_p{_method}.
2158 See the \ref api-comp-cls-dev-meth-fini "finalize" method.
2160 @param[in] _plugin_id
2164 ID of the plugin which contains the sink component class of which
2165 to set the finalization method.
2167 @param[in] _component_class_id
2171 ID of the sink component class, within the plugin having the ID
2172 \bt_p{_plugin_id}, of which to set the finalization method to
2177 #bt_component_class_sink_finalize_method
2179 Sink component class's finalization method.
2182 @bt_pre_not_null{_method}
2184 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2185 __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)
2190 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID()
2191 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2192 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2194 #define BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(_name, _method) \
2195 BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(auto, _name, _method)
2199 Sets the \"get supported \bt_mip versions\" method of the
2200 \bt_sink_comp_cls having the ID \bt_p{_component_class_id} in the
2201 plugin having the ID \bt_p{_plugin_id} to \bt_p{_method}.
2203 See the \ref api-comp-cls-dev-meth-mip "get supported MIP versions"
2206 @param[in] _plugin_id
2210 ID of the plugin which contains the sink component class of which
2211 to set the "get supported MIP versions" method.
2213 @param[in] _component_class_id
2217 ID of the sink component class, within the plugin having the ID
2218 \bt_p{_plugin_id}, of which to set the "get supported MIP versions"
2219 method to \bt_p{_method}.
2223 #bt_component_class_sink_get_supported_mip_versions_method
2225 Sink component class's "get supported MIP versions" method.
2228 @bt_pre_not_null{_method}
2230 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2231 __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS, _plugin_id, _component_class_id, sink, _method)
2236 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID()
2237 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2238 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2240 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _method) \
2241 BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _method)
2245 Sets the "graph is configured" method of the \bt_sink_comp_cls
2246 having the ID \bt_p{_component_class_id} in the plugin having the ID
2247 \bt_p{_plugin_id} to \bt_p{_method}.
2250 \ref api-comp-cls-dev-meth-graph-configured "graph is configured"
2253 @param[in] _plugin_id
2257 ID of the plugin which contains the sink component class of which
2258 to set the "graph is configured" method.
2260 @param[in] _component_class_id
2264 ID of the sink component class, within the plugin having the ID
2265 \bt_p{_plugin_id}, of which to set the "graph is configured"
2266 method to \bt_p{_method}.
2270 #bt_component_class_sink_graph_is_configured_method
2272 Sink component class's "graph is configured" method.
2275 @bt_pre_not_null{_method}
2277 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2278 __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)
2283 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID()
2284 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2285 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2287 #define BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(_name, _method) \
2288 BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD_WITH_ID(auto, _name, _method)
2292 Sets the initialization method of the \bt_sink_comp_cls having the
2293 ID \bt_p{_component_class_id} in the plugin having the ID
2294 \bt_p{_plugin_id} to \bt_p{_method}.
2296 See the \ref api-comp-cls-dev-meth-init "initialize" method.
2298 @param[in] _plugin_id
2302 ID of the plugin which contains the sink component class of which
2303 to set the initialization method.
2305 @param[in] _component_class_id
2309 ID of the sink component class, within the plugin having the ID
2310 \bt_p{_plugin_id}, of which to set the initialization method to
2315 #bt_component_class_sink_initialize_method
2317 Sink component class's initialization method.
2320 @bt_pre_not_null{_method}
2322 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2323 __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)
2328 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID()
2329 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2330 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2332 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _method) \
2333 BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _method)
2337 Sets the "input port connected" method of the \bt_sink_comp_cls
2338 having the ID \bt_p{_component_class_id} in the plugin having the ID
2339 \bt_p{_plugin_id} to \bt_p{_method}.
2342 \ref api-comp-cls-dev-meth-iport-connected "input port connected"
2345 @param[in] _plugin_id
2349 ID of the plugin which contains the sink component class of which
2350 to set the "input port connected" method.
2352 @param[in] _component_class_id
2356 ID of the sink component class, within the plugin having the ID
2357 \bt_p{_plugin_id}, of which to set the "input port connected"
2358 method to \bt_p{_method}.
2362 #bt_component_class_sink_input_port_connected_method
2364 Sink component class's "input port connected" method.
2367 @bt_pre_not_null{_method}
2369 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2370 __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)
2375 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID()
2376 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2377 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2379 #define BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(_name, _method) \
2380 BT_PLUGIN_SINK_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _method)
2384 Sets the query method of the \bt_sink_comp_cls
2385 having the ID \bt_p{_component_class_id} in the plugin having the ID
2386 \bt_p{_plugin_id} to \bt_p{_method}.
2388 See the \ref api-comp-cls-dev-meth-query "query" method.
2390 @param[in] _plugin_id
2394 ID of the plugin which contains the sink component class of which
2395 to set the query method.
2397 @param[in] _component_class_id
2401 ID of the sink component class, within the plugin having the ID
2402 \bt_p{_plugin_id}, of which to set the query
2403 method to \bt_p{_method}.
2407 #bt_component_class_sink_query_method
2409 Sink component class's query method.
2412 @bt_pre_not_null{_method}
2414 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_plugin_id, _component_class_id, _method) \
2415 __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)
2420 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID()
2421 with the \bt_p{_plugin_id} parameter set to <code>auto</code> and
2422 the \bt_p{_component_class_id} parameter set to \bt_p{_name}.
2424 #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _method) \
2425 BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _method)
2431 /* Plugin descriptor: describes a single plugin (internal use) */
2432 struct __bt_plugin_descriptor
{
2435 } __attribute__((packed
));
2437 /* Type of a plugin attribute (internal use) */
2438 enum __bt_plugin_descriptor_attribute_type
{
2439 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT
= 0,
2440 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT
= 1,
2441 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR
= 2,
2442 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE
= 3,
2443 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 4,
2444 BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION
= 5,
2447 /* Plugin (user) version */
2448 struct __bt_plugin_descriptor_version
{
2455 /* Plugin attribute (internal use) */
2456 struct __bt_plugin_descriptor_attribute
{
2457 /* Plugin descriptor to which to associate this attribute */
2458 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2460 /* Name of the attribute's type for debug purposes */
2461 const char *type_name
;
2463 /* Attribute's type */
2464 enum __bt_plugin_descriptor_attribute_type type
;
2466 /* Attribute's value (depends on attribute's type) */
2468 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */
2469 bt_plugin_initialize_func init
;
2471 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */
2472 bt_plugin_finalize_func exit
;
2474 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */
2477 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_LICENSE */
2478 const char *license
;
2480 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2481 const char *description
;
2483 /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_VERSION */
2484 struct __bt_plugin_descriptor_version version
;
2486 } __attribute__((packed
));
2488 /* Component class descriptor (internal use) */
2489 struct __bt_plugin_component_class_descriptor
{
2491 * Plugin descriptor to which to associate this component
2494 const struct __bt_plugin_descriptor
*plugin_descriptor
;
2496 /* Component class name */
2499 /* Component class type */
2500 bt_component_class_type type
;
2502 /* Mandatory methods (depends on component class type) */
2504 /* BT_COMPONENT_CLASS_TYPE_SOURCE */
2506 bt_message_iterator_class_next_method msg_iter_next
;
2509 /* BT_COMPONENT_CLASS_TYPE_FILTER */
2511 bt_message_iterator_class_next_method msg_iter_next
;
2514 /* BT_COMPONENT_CLASS_TYPE_SINK */
2516 bt_component_class_sink_consume_method consume
;
2519 } __attribute__((packed
));
2521 /* Type of a component class attribute (internal use) */
2522 enum __bt_plugin_component_class_descriptor_attribute_type
{
2523 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION
= 0,
2524 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP
= 1,
2525 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD
= 2,
2526 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD
= 3,
2527 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD
= 4,
2528 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD
= 5,
2529 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD
= 6,
2530 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD
= 7,
2531 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD
= 8,
2532 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD
= 9,
2533 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD
= 10,
2534 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD
= 11,
2535 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD
= 12,
2536 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD
= 13,
2537 BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD
= 14,
2540 /* Component class attribute (internal use) */
2541 struct __bt_plugin_component_class_descriptor_attribute
{
2543 * Component class plugin attribute to which to associate this
2544 * component class attribute.
2546 const struct __bt_plugin_component_class_descriptor
*comp_class_descriptor
;
2548 /* Name of the attribute's type for debug purposes */
2549 const char *type_name
;
2551 /* Attribute's type */
2552 enum __bt_plugin_component_class_descriptor_attribute_type type
;
2554 /* Attribute's value (depends on attribute's type) */
2556 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION */
2557 const char *description
;
2559 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */
2562 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD */
2563 bt_component_class_source_get_supported_mip_versions_method source_get_supported_mip_versions_method
;
2564 bt_component_class_filter_get_supported_mip_versions_method filter_get_supported_mip_versions_method
;
2565 bt_component_class_sink_get_supported_mip_versions_method sink_get_supported_mip_versions_method
;
2567 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD */
2568 bt_component_class_source_initialize_method source_initialize_method
;
2569 bt_component_class_filter_initialize_method filter_initialize_method
;
2570 bt_component_class_sink_initialize_method sink_initialize_method
;
2572 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */
2573 bt_component_class_source_finalize_method source_finalize_method
;
2574 bt_component_class_filter_finalize_method filter_finalize_method
;
2575 bt_component_class_sink_finalize_method sink_finalize_method
;
2577 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD */
2578 bt_component_class_source_query_method source_query_method
;
2579 bt_component_class_filter_query_method filter_query_method
;
2580 bt_component_class_sink_query_method sink_query_method
;
2582 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */
2583 bt_component_class_filter_input_port_connected_method filter_input_port_connected_method
;
2584 bt_component_class_sink_input_port_connected_method sink_input_port_connected_method
;
2586 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD */
2587 bt_component_class_source_output_port_connected_method source_output_port_connected_method
;
2588 bt_component_class_filter_output_port_connected_method filter_output_port_connected_method
;
2590 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */
2591 bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method
;
2593 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD */
2594 bt_message_iterator_class_initialize_method msg_iter_initialize_method
;
2596 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */
2597 bt_message_iterator_class_finalize_method msg_iter_finalize_method
;
2599 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD */
2600 bt_message_iterator_class_seek_ns_from_origin_method msg_iter_seek_ns_from_origin_method
;
2602 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD */
2603 bt_message_iterator_class_seek_beginning_method msg_iter_seek_beginning_method
;
2605 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD */
2606 bt_message_iterator_class_can_seek_ns_from_origin_method msg_iter_can_seek_ns_from_origin_method
;
2608 /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD */
2609 bt_message_iterator_class_can_seek_beginning_method msg_iter_can_seek_beginning_method
;
2611 } __attribute__((packed
));
2613 struct __bt_plugin_descriptor
const * const *__bt_get_begin_section_plugin_descriptors(void);
2614 struct __bt_plugin_descriptor
const * const *__bt_get_end_section_plugin_descriptors(void);
2615 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_begin_section_plugin_descriptor_attributes(void);
2616 struct __bt_plugin_descriptor_attribute
const * const *__bt_get_end_section_plugin_descriptor_attributes(void);
2617 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_begin_section_component_class_descriptors(void);
2618 struct __bt_plugin_component_class_descriptor
const * const *__bt_get_end_section_component_class_descriptors(void);
2619 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_begin_section_component_class_descriptor_attributes(void);
2620 struct __bt_plugin_component_class_descriptor_attribute
const * const *__bt_get_end_section_component_class_descriptor_attributes(void);
2623 * Defines a plugin attribute (generic, internal use).
2625 * _attr_name: Name of the attribute (C identifier).
2626 * _attr_type: Type of the attribute (enum __bt_plugin_descriptor_attribute_type).
2627 * _id: Plugin descriptor ID (C identifier).
2630 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _x) \
2631 static struct __bt_plugin_descriptor_attribute __bt_plugin_descriptor_attribute_##_id##_##_attr_name = { \
2632 .plugin_descriptor = &__bt_plugin_descriptor_##_id, \
2633 .type_name = #_attr_name, \
2634 .type = _attr_type, \
2635 .value = { ._attr_name = _x }, \
2637 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
2639 #define __BT_PLUGIN_VERSION_STRUCT_VALUE(_major, _minor, _patch, _extra) \
2640 {.major = _major, .minor = _minor, .patch = _patch, .extra = _extra,}
2643 * Defines a component class descriptor attribute (generic, internal
2646 * _id: Plugin descriptor ID (C identifier).
2647 * _component_class_id: Component class ID (C identifier).
2648 * _type: Component class type (`source`, `filter`, or `sink`).
2649 * _attr_name: Name of the attribute (C identifier).
2650 * _attr_type: Type of the attribute
2651 * (enum __bt_plugin_descriptor_attribute_type).
2654 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(_attr_name, _attr_type, _id, _component_class_id, _type, _x) \
2655 static struct __bt_plugin_component_class_descriptor_attribute __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name = { \
2656 .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_component_class_id, \
2657 .type_name = #_attr_name, \
2658 .type = _attr_type, \
2659 .value = { ._attr_name = _x }, \
2661 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
2664 * Clang supports the no_sanitize variable attribute on global variables.
2665 * GCC only supports the no_sanitize_address function attribute, which is
2666 * not what we need. This is fine because, as far as we have seen, gcc
2667 * does not insert red zones around global variables.
2669 #if defined(__clang__)
2670 # if __has_feature(address_sanitizer)
2671 # define __bt_plugin_variable_attribute_no_sanitize_address \
2672 __attribute__((no_sanitize("address")))
2674 # define __bt_plugin_variable_attribute_no_sanitize_address
2677 # define __bt_plugin_variable_attribute_no_sanitize_address
2681 * Variable attributes for a plugin descriptor pointer to be added to
2682 * the plugin descriptor section (internal use).
2685 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2686 __attribute__((section("__DATA,btp_desc"), used)) \
2687 __bt_plugin_variable_attribute_no_sanitize_address
2689 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2690 __start___bt_plugin_descriptors
2692 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2693 __stop___bt_plugin_descriptors
2695 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA \
2696 __asm("section$start$__DATA$btp_desc")
2698 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA \
2699 __asm("section$end$__DATA$btp_desc")
2703 #define __BT_PLUGIN_DESCRIPTOR_ATTRS \
2704 __attribute__((section("__bt_plugin_descriptors"), used)) \
2705 __bt_plugin_variable_attribute_no_sanitize_address
2707 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
2708 __start___bt_plugin_descriptors
2710 #define __BT_PLUGIN_DESCRIPTOR_END_SYMBOL \
2711 __stop___bt_plugin_descriptors
2713 #define __BT_PLUGIN_DESCRIPTOR_BEGIN_EXTRA
2715 #define __BT_PLUGIN_DESCRIPTOR_END_EXTRA
2719 * Variable attributes for a plugin attribute pointer to be added to
2720 * the plugin attribute section (internal use).
2723 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2724 __attribute__((section("__DATA,btp_desc_att"), used)) \
2725 __bt_plugin_variable_attribute_no_sanitize_address
2727 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2728 __start___bt_plugin_descriptor_attributes
2730 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2731 __stop___bt_plugin_descriptor_attributes
2733 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2734 __asm("section$start$__DATA$btp_desc_att")
2736 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2737 __asm("section$end$__DATA$btp_desc_att")
2741 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
2742 __attribute__((section("__bt_plugin_descriptor_attributes"), used)) \
2743 __bt_plugin_variable_attribute_no_sanitize_address
2745 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2746 __start___bt_plugin_descriptor_attributes
2748 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2749 __stop___bt_plugin_descriptor_attributes
2751 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2753 #define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2757 * Variable attributes for a component class descriptor pointer to be
2758 * added to the component class descriptor section (internal use).
2761 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2762 __attribute__((section("__DATA,btp_cc_desc"), used)) \
2763 __bt_plugin_variable_attribute_no_sanitize_address
2765 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2766 __start___bt_plugin_component_class_descriptors
2768 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2769 __stop___bt_plugin_component_class_descriptors
2771 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA \
2772 __asm("section$start$__DATA$btp_cc_desc")
2774 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA \
2775 __asm("section$end$__DATA$btp_cc_desc")
2779 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
2780 __attribute__((section("__bt_plugin_component_class_descriptors"), used)) \
2781 __bt_plugin_variable_attribute_no_sanitize_address
2783 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
2784 __start___bt_plugin_component_class_descriptors
2786 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_SYMBOL \
2787 __stop___bt_plugin_component_class_descriptors
2789 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_EXTRA
2791 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_END_EXTRA
2795 * Variable attributes for a component class descriptor attribute
2796 * pointer to be added to the component class descriptor attribute
2797 * section (internal use).
2800 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2801 __attribute__((section("__DATA,btp_cc_desc_att"), used)) \
2802 __bt_plugin_variable_attribute_no_sanitize_address
2804 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2805 __start___bt_plugin_component_class_descriptor_attributes
2807 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2808 __stop___bt_plugin_component_class_descriptor_attributes
2810 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA \
2811 __asm("section$start$__DATA$btp_cc_desc_att")
2813 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA \
2814 __asm("section$end$__DATA$btp_cc_desc_att")
2818 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
2819 __attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) \
2820 __bt_plugin_variable_attribute_no_sanitize_address
2822 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
2823 __start___bt_plugin_component_class_descriptor_attributes
2825 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_SYMBOL \
2826 __stop___bt_plugin_component_class_descriptor_attributes
2828 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_EXTRA
2830 #define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_END_EXTRA
2837 #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */