Babeltrace 2 C API
2.1.1
Open-source trace manipulation framework
|
Plugin loading functions.
A plugin is a package of component classes:
There are three types of plugins:
.so
file on Unix systems; .dll
file on Windows systems.
.py
file which starts with the bt_plugin_
prefix.
libbabeltrace2 loads shared object and Python plugins. Those plugins need libbabeltrace2 in turn to create and use Babeltrace 2 objects:
A plugin is a shared object: get a new reference with bt_plugin_get_ref() and put an existing reference with bt_plugin_put_ref().
Get the number of component class in a plugin with bt_plugin_get_source_component_class_count(), bt_plugin_get_filter_component_class_count(), and bt_plugin_get_sink_component_class_count().
Borrow a component class by index from a plugin with bt_plugin_borrow_source_component_class_by_index_const(), bt_plugin_borrow_filter_component_class_by_index_const(), and bt_plugin_borrow_sink_component_class_by_index_const().
Borrow a component class by name from a plugin with bt_plugin_borrow_source_component_class_by_name_const(), bt_plugin_borrow_filter_component_class_by_name_const(), and bt_plugin_borrow_sink_component_class_by_name_const().
The bt_plugin_find_all(), bt_plugin_find_all_from_file(), bt_plugin_find_all_from_dir(), and bt_plugin_find_all_from_static() functions return a plugin set, that is, a shared object containing one or more plugins.
The bt_plugin_find() and bt_plugin_find_all() functions find and load plugins from the default plugin search directories and from the static plugins.
The plugin search order is:
The colon-separated (or semicolon-separated on Windows) list of directories in the BABELTRACE_PLUGIN_PATH
environment variable, if it's set.
The function searches each directory in this list, without recursing.
$HOME/.local/lib/babeltrace2/plugins
, without recursing./usr/lib/babeltrace2/plugins
or /usr/local/lib/babeltrace2/plugins
on Linux, without recursing.Both bt_plugin_find() and bt_plugin_find_all() functions have dedicated boolean parameters to include or exclude each of the four locations above.
Find and load a plugin by name with bt_plugin_find().
bt_plugin_find() tries to find a plugin with a specific name within the default plugin search directories and static plugins.
Load all the plugins found in the default plugin search directories and static plugins with bt_plugin_find_all().
Find and load plugins from a specific file (.so
, .dll
, or .py
) with bt_plugin_find_all_from_file().
A single shared object file can contain multiple plugins, although it's not common practice to do so.
Find and load plugins from a specific directory with bt_plugin_find_all_from_dir(). This function can search for plugins within the given directory recursively or not.
Find and load static plugins with bt_plugin_find_all_from_static().
A static plugin is built directly into the application or library instead of being a separate shared object file.
A plugin has the following properties:
Name of the plugin.
The name of the plugin isn't related to its file name. For example, a plugin found in the file patente.so
can be named Dan
.
Use bt_plugin_get_name().
Description of the plugin.
Name(s) of the author(s) of the plugin.
License or license name of the plugin.
Path of the file which contains the plugin.
A static plugin has no path property.
Get bt_plugin_get_path().
Version of the plugin (major, minor, patch, and extra information).
The version of the plugin is completely user-defined: the library doesn't use this property in any way to verify the compatibility of the plugin.
Type | |
typedef struct bt_plugin | bt_plugin |
Plugin. | |
typedef struct bt_plugin_set | bt_plugin_set |
Set of plugins. | |
Plugin properties | |
const char * | bt_plugin_get_name (const bt_plugin *plugin) |
Returns the name of the plugin plugin . More... | |
const char * | bt_plugin_get_description (const bt_plugin *plugin) |
Returns the description of the plugin plugin . More... | |
const char * | bt_plugin_get_author (const bt_plugin *plugin) |
Returns the name(s) of the author(s) of the plugin plugin . More... | |
const char * | bt_plugin_get_license (const bt_plugin *plugin) |
Returns the license text or the license name of the plugin plugin . More... | |
const char * | bt_plugin_get_path (const bt_plugin *plugin) |
Returns the path of the file which contains the plugin plugin . More... | |
bt_property_availability | bt_plugin_get_version (const bt_plugin *plugin, unsigned int *major, unsigned int *minor, unsigned int *patch, const char **extra) |
Returns the version of the plugin plugin . More... | |
Plugin component class access | |
uint64_t | bt_plugin_get_source_component_class_count (const bt_plugin *plugin) |
Returns the number of source component classes contained in the plugin plugin . More... | |
uint64_t | bt_plugin_get_filter_component_class_count (const bt_plugin *plugin) |
Returns the number of filter component classes contained in the plugin plugin . More... | |
uint64_t | bt_plugin_get_sink_component_class_count (const bt_plugin *plugin) |
Returns the number of sink component classes contained in the plugin plugin . More... | |
const bt_component_class_source * | bt_plugin_borrow_source_component_class_by_index_const (const bt_plugin *plugin, uint64_t index) |
Borrows the source component class at index index from the plugin plugin . More... | |
const bt_component_class_filter * | bt_plugin_borrow_filter_component_class_by_index_const (const bt_plugin *plugin, uint64_t index) |
Borrows the filter component class at index index from the plugin plugin . More... | |
const bt_component_class_sink * | bt_plugin_borrow_sink_component_class_by_index_const (const bt_plugin *plugin, uint64_t index) |
Borrows the sink component class at index index from the plugin plugin . More... | |
const bt_component_class_source * | bt_plugin_borrow_source_component_class_by_name_const (const bt_plugin *plugin, const char *name) |
Borrows the source component class named name from the plugin plugin . More... | |
const bt_component_class_filter * | bt_plugin_borrow_filter_component_class_by_name_const (const bt_plugin *plugin, const char *name) |
Borrows the filter component class named name from the plugin plugin . More... | |
const bt_component_class_sink * | bt_plugin_borrow_sink_component_class_by_name_const (const bt_plugin *plugin, const char *name) |
Borrows the sink component class named name from the plugin plugin . More... | |
Plugin reference count | |
void | bt_plugin_get_ref (const bt_plugin *plugin) |
Increments the reference count of the plugin plugin . More... | |
void | bt_plugin_put_ref (const bt_plugin *plugin) |
Decrements the reference count of the plugin plugin . More... | |
#define | BT_PLUGIN_PUT_REF_AND_RESET(_plugin) |
Decrements the reference count of the plugin _plugin , and then sets _plugin to NULL . More... | |
#define | BT_PLUGIN_MOVE_REF(_dst, _src) |
Decrements the reference count of the plugin _dst , sets _dst to _src , and then sets _src to NULL . More... | |
Plugin set plugin access | |
uint64_t | bt_plugin_set_get_plugin_count (const bt_plugin_set *plugin_set) |
Returns the number of plugins contained in the plugin set plugin_set . More... | |
const bt_plugin * | bt_plugin_set_borrow_plugin_by_index_const (const bt_plugin_set *plugin_set, uint64_t index) |
Borrows the plugin at index index from the plugin set plugin_set . More... | |
Plugin set reference count | |
void | bt_plugin_set_get_ref (const bt_plugin_set *plugin_set) |
Increments the reference count of the plugin set plugin_set . More... | |
void | bt_plugin_set_put_ref (const bt_plugin_set *plugin_set) |
Decrements the reference count of the plugin set plugin_set . More... | |
#define | BT_PLUGIN_SET_PUT_REF_AND_RESET(_plugin_set) |
Decrements the reference count of the plugin set _plugin_set , and then sets _plugin_set to NULL . More... | |
#define | BT_PLUGIN_SET_MOVE_REF(_dst, _src) |
Decrements the reference count of the plugin set _dst , sets _dst to _src , and then sets _src to NULL . More... | |
Status codes for bt_plugin_find().
Enumerator | |
---|---|
BT_PLUGIN_FIND_STATUS_OK |
Success. |
BT_PLUGIN_FIND_STATUS_NOT_FOUND |
Plugin not found. |
BT_PLUGIN_FIND_STATUS_MEMORY_ERROR |
Out of memory. |
BT_PLUGIN_FIND_STATUS_ERROR |
Error. |
Status codes for bt_plugin_find_all().
Enumerator | |
---|---|
BT_PLUGIN_FIND_ALL_STATUS_OK |
Success. |
BT_PLUGIN_FIND_ALL_STATUS_NOT_FOUND |
No plugins found. |
BT_PLUGIN_FIND_ALL_STATUS_MEMORY_ERROR |
Out of memory. |
BT_PLUGIN_FIND_ALL_STATUS_ERROR |
Error. |
Status codes for bt_plugin_find_all_from_file().
Status codes for bt_plugin_find_all_from_dir().
Status codes for bt_plugin_find_all_from_static().
#define BT_PLUGIN_PUT_REF_AND_RESET | ( | _plugin | ) |
Decrements the reference count of the plugin _plugin
, and then sets _plugin
to NULL
.
_plugin | Plugin of which to decrement the reference count. Can contain |
_plugin
is an assignable expression. #define BT_PLUGIN_MOVE_REF | ( | _dst, | |
_src | |||
) |
Decrements the reference count of the plugin _dst
, sets _dst
to _src
, and then sets _src
to NULL
.
This macro effectively moves a plugin reference from the expression _src
to the expression _dst
, putting the existing _dst
reference.
_dst | Destination expression. Can contain |
_src | Source expression. Can contain |
_dst
is an assignable expression. _src
is an assignable expression. #define BT_PLUGIN_SET_PUT_REF_AND_RESET | ( | _plugin_set | ) |
Decrements the reference count of the plugin set _plugin_set
, and then sets _plugin_set
to NULL
.
_plugin_set | Plugin set of which to decrement the reference count. Can contain |
_plugin_set
is an assignable expression. #define BT_PLUGIN_SET_MOVE_REF | ( | _dst, | |
_src | |||
) |
Decrements the reference count of the plugin set _dst
, sets _dst
to _src
, and then sets _src
to NULL
.
This macro effectively moves a plugin set reference from the expression _src
to the expression _dst
, putting the existing _dst
reference.
_dst | Destination expression. Can contain |
_src | Source expression. Can contain |
_dst
is an assignable expression. _src
is an assignable expression. bt_plugin_find_status bt_plugin_find | ( | const char * | plugin_name, |
bt_bool | find_in_std_env_var, | ||
bt_bool | find_in_user_dir, | ||
bt_bool | find_in_sys_dir, | ||
bt_bool | find_in_static, | ||
bt_bool | fail_on_load_error, | ||
const bt_plugin ** | plugin | ||
) |
Finds and loads a single plugin which has the name plugin_name
from the default plugin search directories and static plugins, setting *plugin
to the result.
This function returns the first plugin which has the name plugin_name
within, in order:
If the find_in_std_env_var
parameter is BT_TRUE, the colon-separated (or semicolon-separated on Windows) list of directories in the BABELTRACE_PLUGIN_PATH
environment variable, if it's set.
The function searches each directory in this list, without recursing.
find_in_user_dir
parameter is BT_TRUE, $HOME/.local/lib/babeltrace2/plugins
, without recursing.find_in_sys_dir
is BT_TRUE, the system Babeltrace 2 plugin directory, typically /usr/lib/babeltrace2/plugins
or /usr/local/lib/babeltrace2/plugins
on Linux, without recursing.find_in_static
is BT_TRUE, the static plugins.patente.so
can be named Dan
.If this function finds a file which looks like a plugin (shared object file or Python file with the bt_plugin_
prefix), but it fails to load it for any reason, then this function:
fail_on_load_error
is BT_TRUE Returns BT_PLUGIN_FIND_STATUS_ERROR.
fail_on_load_error
is BT_FALSE If this function doesn't find any plugin, it returns BT_PLUGIN_FIND_STATUS_NOT_FOUND and does not set *plugin
.
[in] | plugin_name | Name of the plugin to find and load. |
[in] | find_in_std_env_var | BT_TRUE to try to find the plugin named plugin_name in the colon-separated (or semicolon-separated on Windows) list of directories in the BABELTRACE_PLUGIN_PATH environment variable. |
[in] | find_in_user_dir | BT_TRUE to try to find the plugin named plugin_name in the $HOME/.local/lib/babeltrace2/plugins directory, without recursing. |
[in] | find_in_sys_dir | BT_TRUE to try to find the plugin named plugin_name in the system Babeltrace 2 plugin directory. |
[in] | find_in_static | BT_TRUE to try to find the plugin named plugin_name in the static plugins. |
[in] | fail_on_load_error | BT_TRUE to make this function return BT_PLUGIN_FIND_STATUS_ERROR on any plugin loading error instead of ignoring it. |
[out] | plugin | On success, *plugin is a new plugin reference of named plugin_name . |
BT_PLUGIN_FIND_STATUS_OK | Success. |
BT_PLUGIN_FIND_STATUS_NOT_FOUND | Plugin not found. |
BT_PLUGIN_FIND_STATUS_MEMORY_ERROR | Out of memory. |
BT_PLUGIN_FIND_STATUS_ERROR | Error. |
plugin_name
is not NULL
. find_in_std_env_var
, find_in_user_dir
, find_in_sys_dir
, and find_in_static
parameters is BT_TRUE. plugin
is not NULL
.bt_plugin_find_all_status bt_plugin_find_all | ( | bt_bool | find_in_std_env_var, |
bt_bool | find_in_user_dir, | ||
bt_bool | find_in_sys_dir, | ||
bt_bool | find_in_static, | ||
bt_bool | fail_on_load_error, | ||
const bt_plugin_set ** | plugins | ||
) |
Finds and loads all the plugins from the default plugin search directories and static plugins, setting *plugins
to the result.
This function returns all the plugins within, in order:
If the find_in_std_env_var
parameter is BT_TRUE, the colon-separated (or semicolon-separated on Windows) list of directories in the BABELTRACE_PLUGIN_PATH
environment variable, if it's set.
The function searches each directory in this list, without recursing.
find_in_user_dir
parameter is BT_TRUE, $HOME/.local/lib/babeltrace2/plugins
, without recursing.find_in_sys_dir
is BT_TRUE, the system Babeltrace 2 plugin directory, typically /usr/lib/babeltrace2/plugins
or /usr/local/lib/babeltrace2/plugins
on Linux, without recursing.find_in_static
is BT_TRUE, the static plugins.During the search process, if a found plugin shares the name of an already loaded plugin, this function ignores it and continues.
If this function finds a file which looks like a plugin (shared object file or Python file with the bt_plugin_
prefix), but it fails to load it for any reason, the function:
fail_on_load_error
is BT_TRUE Returns BT_PLUGIN_FIND_ALL_STATUS_ERROR.
fail_on_load_error
is BT_FALSE If this function doesn't find any plugin, then it returns BT_PLUGIN_FIND_ALL_STATUS_NOT_FOUND and does not set *plugins
.
[in] | find_in_std_env_var | BT_TRUE to try to find all the plugins in the colon-separated (or semicolon-separated on Windows) list of directories in the BABELTRACE_PLUGIN_PATH environment variable. |
[in] | find_in_user_dir | BT_TRUE to try to find all the plugins in the $HOME/.local/lib/babeltrace2/plugins directory, without recursing. |
[in] | find_in_sys_dir | BT_TRUE to try to find all the plugins in the system Babeltrace 2 plugin directory. |
[in] | find_in_static | BT_TRUE to try to find all the plugins in the static plugins. |
[in] | fail_on_load_error | BT_TRUE to make this function return BT_PLUGIN_FIND_ALL_STATUS_ERROR on any plugin loading error instead of ignoring it. |
[out] | plugins | On success, *plugins is a new plugin set reference which contains all the plugins found from the default plugin search directories and static plugins. |
BT_PLUGIN_FIND_ALL_STATUS_OK | Success. |
BT_PLUGIN_FIND_ALL_STATUS_NOT_FOUND | No plugins found. |
BT_PLUGIN_FIND_ALL_STATUS_MEMORY_ERROR | Out of memory. |
BT_PLUGIN_FIND_ALL_STATUS_ERROR | Error. |
find_in_std_env_var
, find_in_user_dir
, find_in_sys_dir
, and find_in_static
parameters is BT_TRUE. plugins
is not NULL
.bt_plugin_find_all_from_file_status bt_plugin_find_all_from_file | ( | const char * | path, |
bt_bool | fail_on_load_error, | ||
const bt_plugin_set ** | plugins | ||
) |
Finds and loads all the plugins from the file with path path
, setting *plugins
to the result.
patente.so
can be named Dan
.If any plugin loading error occurs during the execution of this function, then it:
fail_on_load_error
is BT_TRUE fail_on_load_error
is BT_FALSE If this function doesn't find any plugin, then it returns BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_NOT_FOUND and does not set *plugins
.
[in] | path | Path of the file in which to find and load all the plugins. |
[in] | fail_on_load_error | BT_TRUE to make this function return BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_ERROR on any plugin loading error instead of ignoring it. |
[out] | plugins | On success, *plugins is a new plugin set reference which contains all the plugins found in the file with path path . |
BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_OK | Success. |
BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_NOT_FOUND | No plugins found. |
BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_MEMORY_ERROR | Out of memory. |
BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_ERROR | Error. |
path
is not NULL
. path
is the path of a regular file. plugins
is not NULL
.bt_plugin_find_all_from_dir_status bt_plugin_find_all_from_dir | ( | const char * | path, |
bt_bool | recurse, | ||
bt_bool | fail_on_load_error, | ||
const bt_plugin_set ** | plugins | ||
) |
Finds and loads all the plugins from the directory with path path
, setting *plugins
to the result.
If recurse
is BT_TRUE, then this function recurses into the subdirectories of path
to find plugins.
During the search process, if a found plugin shares the name of an already loaded plugin, this function ignores it and continues.
If any plugin loading error occurs during the execution of this function, then it:
fail_on_load_error
is BT_TRUE fail_on_load_error
is BT_FALSE If this function doesn't find any plugin, then it returns BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_NOT_FOUND and does not set *plugins
.
[in] | path | Path of the directory in which to find and load all the plugins. |
[in] | recurse | BT_TRUE to make this function recurse into the subdirectories of path . |
[in] | fail_on_load_error | BT_TRUE to make this function return BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_ERROR on any plugin loading error instead of ignoring it. |
[out] | plugins | On success, *plugins is a new plugin set reference which contains all the plugins found in the directory with path path . |
BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_OK | Success. |
BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_NOT_FOUND | No plugins found. |
BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_MEMORY_ERROR | Out of memory. |
BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_ERROR | Error. |
path
is not NULL
. path
is the path of a directory. plugins
is not NULL
.bt_plugin_find_all_from_static_status bt_plugin_find_all_from_static | ( | bt_bool | fail_on_load_error, |
const bt_plugin_set ** | plugins | ||
) |
Finds and loads all the static plugins, setting *plugins
to the result.
A static plugin is built directly into the application or library instead of being a separate shared object file.
If any plugin loading error occurs during the execution of this function, then it:
fail_on_load_error
is BT_TRUE fail_on_load_error
is BT_FALSE If this function doesn't find any plugin, then it returns BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_NOT_FOUND and does not set *plugins
.
[in] | fail_on_load_error | BT_TRUE to make this function return BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_ERROR on any plugin loading error instead of ignoring it. |
[out] | plugins | On success, *plugins is a new plugin set reference which contains all the static plugins. |
BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_OK | Success. |
BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_NOT_FOUND | No static plugins found. |
BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_MEMORY_ERROR | Out of memory. |
BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_ERROR | Error. |
path
is not NULL
. plugins
is not NULL
. const char* bt_plugin_get_name | ( | const bt_plugin * | plugin | ) |
Returns the name of the plugin plugin
.
See the name property.
[in] | plugin | Plugin of which to get the name. |
Name of plugin
.
The returned pointer remains valid as long as plugin
exists.
plugin
is not NULL
. const char* bt_plugin_get_description | ( | const bt_plugin * | plugin | ) |
Returns the description of the plugin plugin
.
See the description property.
[in] | plugin | Plugin of which to get description. |
Description of plugin
, or NULL
if not available.
The returned pointer remains valid as long as plugin
exists.
plugin
is not NULL
. const char* bt_plugin_get_author | ( | const bt_plugin * | plugin | ) |
Returns the name(s) of the author(s) of the plugin plugin
.
See the author name(s) property.
[in] | plugin | Plugin of which to get the author name(s). |
Author name(s) of plugin
, or NULL
if not available.
The returned pointer remains valid as long as plugin
exists.
plugin
is not NULL
. const char* bt_plugin_get_license | ( | const bt_plugin * | plugin | ) |
Returns the license text or the license name of the plugin plugin
.
See the license property.
[in] | plugin | Plugin of which to get the license. |
License of plugin
, or NULL
if not available.
The returned pointer remains valid as long as plugin
exists.
plugin
is not NULL
. const char* bt_plugin_get_path | ( | const bt_plugin * | plugin | ) |
Returns the path of the file which contains the plugin plugin
.
See the path property.
This function returns NULL
if plugin
is a static plugin because a static plugin has no path property.
[in] | plugin | Plugin of which to get the path of the containing file. |
Path of the file which contains plugin
, or NULL
if not available.
The returned pointer remains valid as long as plugin
exists.
plugin
is not NULL
. bt_property_availability bt_plugin_get_version | ( | const bt_plugin * | plugin, |
unsigned int * | major, | ||
unsigned int * | minor, | ||
unsigned int * | patch, | ||
const char ** | extra | ||
) |
Returns the version of the plugin plugin
.
See the version property.
[in] | plugin | Plugin of which to get the version. |
[out] | major | If not NULL and this function returns BT_PROPERTY_AVAILABILITY_AVAILABLE, *major is the major version of plugin . |
[out] | minor | If not NULL and this function returns BT_PROPERTY_AVAILABILITY_AVAILABLE, *minor is the minor version of plugin . |
[out] | patch | If not NULL and this function returns BT_PROPERTY_AVAILABILITY_AVAILABLE, *patch is the patch version of plugin . |
[out] | extra | If not
|
BT_PROPERTY_AVAILABILITY_AVAILABLE | The version of plugin is available. |
BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE | The version of plugin isn't available. |
plugin
is not NULL
. uint64_t bt_plugin_get_source_component_class_count | ( | const bt_plugin * | plugin | ) |
Returns the number of source component classes contained in the plugin plugin
.
[in] | plugin | Plugin of which to get the number of contained source component classes. |
plugin
.plugin
is not NULL
. uint64_t bt_plugin_get_filter_component_class_count | ( | const bt_plugin * | plugin | ) |
Returns the number of filter component classes contained in the plugin plugin
.
[in] | plugin | Plugin of which to get the number of contained filter component classes. |
plugin
.plugin
is not NULL
. uint64_t bt_plugin_get_sink_component_class_count | ( | const bt_plugin * | plugin | ) |
Returns the number of sink component classes contained in the plugin plugin
.
[in] | plugin | Plugin of which to get the number of contained sink component classes. |
plugin
.plugin
is not NULL
. const bt_component_class_source* bt_plugin_borrow_source_component_class_by_index_const | ( | const bt_plugin * | plugin, |
uint64_t | index | ||
) |
Borrows the source component class at index index
from the plugin plugin
.
[in] | plugin | Plugin from which to borrow the source component class at index index . |
[in] | index | Index of the source component class to borrow from plugin . |
Borrowed reference of the source component class of plugin
at index index
.
The returned pointer remains valid as long as plugin
exists.
plugin
is not NULL
. index
is less than the number of source component classes in plugin
(as returned by bt_plugin_get_source_component_class_count()).const bt_component_class_filter* bt_plugin_borrow_filter_component_class_by_index_const | ( | const bt_plugin * | plugin, |
uint64_t | index | ||
) |
Borrows the filter component class at index index
from the plugin plugin
.
[in] | plugin | Plugin from which to borrow the filter component class at index index . |
[in] | index | Index of the filter component class to borrow from plugin . |
Borrowed reference of the filter component class of plugin
at index index
.
The returned pointer remains valid as long as plugin
exists.
plugin
is not NULL
. index
is less than the number of filter component classes in plugin
(as returned by bt_plugin_get_source_component_class_count()).const bt_component_class_sink* bt_plugin_borrow_sink_component_class_by_index_const | ( | const bt_plugin * | plugin, |
uint64_t | index | ||
) |
Borrows the sink component class at index index
from the plugin plugin
.
[in] | plugin | Plugin from which to borrow the sink component class at index index . |
[in] | index | Index of the sink component class to borrow from plugin . |
Borrowed reference of the sink component class of plugin
at index index
.
The returned pointer remains valid as long as plugin
exists.
plugin
is not NULL
. index
is less than the number of sink component classes in plugin
(as returned by bt_plugin_get_source_component_class_count()).const bt_component_class_source* bt_plugin_borrow_source_component_class_by_name_const | ( | const bt_plugin * | plugin, |
const char * | name | ||
) |
Borrows the source component class named name
from the plugin plugin
.
If no source component class has the name name
within plugin
, then this function returns NULL
.
[in] | plugin | Plugin from which to borrow the source component class named name . |
[in] | name | Name of the source component class to borrow from plugin . |
Borrowed reference of the source component class of plugin
named name
, or NULL
if no source component class is named name
within plugin
.
The returned pointer remains valid as long as plugin
exists.
plugin
is not NULL
. name
is not NULL
.const bt_component_class_filter* bt_plugin_borrow_filter_component_class_by_name_const | ( | const bt_plugin * | plugin, |
const char * | name | ||
) |
Borrows the filter component class named name
from the plugin plugin
.
If no filter component class has the name name
within plugin
, then this function returns NULL
.
[in] | plugin | Plugin from which to borrow the filter component class named name . |
[in] | name | Name of the filter component class to borrow from plugin . |
Borrowed reference of the filter component class of plugin
named name
, or NULL
if no filter component class is named name
within plugin
.
The returned pointer remains valid as long as plugin
exists.
plugin
is not NULL
. name
is not NULL
.const bt_component_class_sink* bt_plugin_borrow_sink_component_class_by_name_const | ( | const bt_plugin * | plugin, |
const char * | name | ||
) |
Borrows the sink component class named name
from the plugin plugin
.
If no sink component class has the name name
within plugin
, then this function returns NULL
.
[in] | plugin | Plugin from which to borrow the sink component class named name . |
[in] | name | Name of the sink component class to borrow from plugin . |
Borrowed reference of the sink component class of plugin
named name
, or NULL
if no sink component class is named name
within plugin
.
The returned pointer remains valid as long as plugin
exists.
plugin
is not NULL
. name
is not NULL
.void bt_plugin_get_ref | ( | const bt_plugin * | plugin | ) |
Increments the reference count of the plugin plugin
.
[in] | plugin | Plugin of which to increment the reference count. Can be |
void bt_plugin_put_ref | ( | const bt_plugin * | plugin | ) |
Decrements the reference count of the plugin plugin
.
[in] | plugin | Plugin of which to decrement the reference count. Can be |
uint64_t bt_plugin_set_get_plugin_count | ( | const bt_plugin_set * | plugin_set | ) |
Returns the number of plugins contained in the plugin set plugin_set
.
[in] | plugin_set | Plugin set of which to get the number of contained plugins. |
plugin_set
.plugin
is not NULL
. const bt_plugin* bt_plugin_set_borrow_plugin_by_index_const | ( | const bt_plugin_set * | plugin_set, |
uint64_t | index | ||
) |
Borrows the plugin at index index
from the plugin set plugin_set
.
[in] | plugin_set | Plugin set from which to borrow the plugin at index index . |
[in] | index | Index of the plugin to borrow from plugin_set . |
Borrowed reference of the plugin of plugin_set
at index index
.
The returned pointer remains valid until plugin_set
is modified.
plugin_set
is not NULL
. index
is less than the number of plugins in plugin_set
(as returned by bt_plugin_set_get_plugin_count()). void bt_plugin_set_get_ref | ( | const bt_plugin_set * | plugin_set | ) |
Increments the reference count of the plugin set plugin_set
.
[in] | plugin_set | Plugin set of which to increment the reference count. Can be |
void bt_plugin_set_put_ref | ( | const bt_plugin_set * | plugin_set | ) |
Decrements the reference count of the plugin set plugin_set
.
[in] | plugin_set | Plugin set of which to decrement the reference count. Can be |