1#ifndef BABELTRACE2_PLUGIN_PLUGIN_LOADING_H
2#define BABELTRACE2_PLUGIN_PLUGIN_LOADING_H
26#ifndef __BT_IN_BABELTRACE_H
27# error "Please include <babeltrace2/babeltrace.h> instead."
33#include <babeltrace2/types.h>
605 const char *path,
bt_bool fail_on_load_error,
932 const bt_plugin *plugin,
unsigned int *major,
933 unsigned int *minor,
unsigned int *patch,
const char **extra);
1023 const bt_plugin *plugin, uint64_t index);
1055 const bt_plugin *plugin, uint64_t index);
1087 const bt_plugin *plugin, uint64_t index);
1120 const bt_plugin *plugin,
const char *name);
1153 const bt_plugin *plugin,
const char *name);
1186 const bt_plugin *plugin,
const char *name);
1243#define BT_PLUGIN_PUT_REF_AND_RESET(_plugin) \
1245 bt_plugin_put_ref(_plugin); \
1274#define BT_PLUGIN_MOVE_REF(_dst, _src) \
1276 bt_plugin_put_ref(_dst); \
1386#define BT_PLUGIN_SET_PUT_REF_AND_RESET(_plugin_set) \
1388 bt_plugin_set_put_ref(_plugin_set); \
1389 (_plugin_set) = NULL; \
1417#define BT_PLUGIN_SET_MOVE_REF(_dst, _src) \
1419 bt_plugin_set_put_ref(_dst); \
bt_property_availability
Availability of an object's property.
Definition types.h:173
int bt_bool
Babeltrace 2 boolean type.
Definition types.h:140
struct bt_component_class_sink bt_component_class_sink
Sink component class.
Definition types.h:41
struct bt_component_class_source bt_component_class_source
Source component class.
Definition types.h:42
struct bt_component_class_filter bt_component_class_filter
Filter component class.
Definition types.h:40
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.
const char * bt_plugin_get_author(const bt_plugin *plugin)
Returns the name(s) of the author(s) of the plugin plugin.
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.
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,...
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.
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 directo...
bt_plugin_find_all_from_file_status
Status codes for bt_plugin_find_all_from_file().
Definition plugin-loading.h:525
const char * bt_plugin_get_path(const bt_plugin *plugin)
Returns the path of the file which contains the plugin plugin.
const char * bt_plugin_get_license(const bt_plugin *plugin)
Returns the license text or the license name of the plugin plugin.
void bt_plugin_put_ref(const bt_plugin *plugin)
Decrements the reference count of the plugin plugin.
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.
void bt_plugin_get_ref(const bt_plugin *plugin)
Increments the reference count of the plugin plugin.
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.
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.
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.
void bt_plugin_set_put_ref(const bt_plugin_set *plugin_set)
Decrements the reference count of the plugin set plugin_set.
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.
const char * bt_plugin_get_description(const bt_plugin *plugin)
Returns the description of the plugin plugin.
struct bt_plugin bt_plugin
Plugin.
Definition types.h:76
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.
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.
struct bt_plugin_set bt_plugin_set
Set of plugins.
Definition types.h:77
const char * bt_plugin_get_name(const bt_plugin *plugin)
Returns the name of the plugin plugin.
bt_plugin_find_all_from_static_status
Status codes for bt_plugin_find_all_from_static().
Definition plugin-loading.h:707
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.
bt_plugin_find_all_status
Status codes for bt_plugin_find_all().
Definition plugin-loading.h:401
void bt_plugin_set_get_ref(const bt_plugin_set *plugin_set)
Increments the reference count of the plugin set plugin_set.
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.
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.
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.
bt_plugin_find_status
Status codes for bt_plugin_find().
Definition plugin-loading.h:273
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.
bt_plugin_find_all_from_dir_status
Status codes for bt_plugin_find_all_from_dir().
Definition plugin-loading.h:612
@ BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_OK
Success.
Definition plugin-loading.h:530
@ BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_ERROR
Error.
Definition plugin-loading.h:548
@ BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_MEMORY_ERROR
Out of memory.
Definition plugin-loading.h:542
@ BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_NOT_FOUND
No plugins found.
Definition plugin-loading.h:536
@ BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_ERROR
Error.
Definition plugin-loading.h:730
@ BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_NOT_FOUND
No static plugins found.
Definition plugin-loading.h:718
@ BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_MEMORY_ERROR
Out of memory.
Definition plugin-loading.h:724
@ BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_OK
Success.
Definition plugin-loading.h:712
@ BT_PLUGIN_FIND_ALL_STATUS_NOT_FOUND
No plugins found.
Definition plugin-loading.h:412
@ BT_PLUGIN_FIND_ALL_STATUS_OK
Success.
Definition plugin-loading.h:406
@ BT_PLUGIN_FIND_ALL_STATUS_ERROR
Error.
Definition plugin-loading.h:424
@ BT_PLUGIN_FIND_ALL_STATUS_MEMORY_ERROR
Out of memory.
Definition plugin-loading.h:418
@ BT_PLUGIN_FIND_STATUS_MEMORY_ERROR
Out of memory.
Definition plugin-loading.h:290
@ BT_PLUGIN_FIND_STATUS_NOT_FOUND
Plugin not found.
Definition plugin-loading.h:284
@ BT_PLUGIN_FIND_STATUS_OK
Success.
Definition plugin-loading.h:278
@ BT_PLUGIN_FIND_STATUS_ERROR
Error.
Definition plugin-loading.h:296
@ BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_ERROR
Error.
Definition plugin-loading.h:635
@ BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_MEMORY_ERROR
Out of memory.
Definition plugin-loading.h:629
@ BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_NOT_FOUND
No plugins found.
Definition plugin-loading.h:623
@ BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_OK
Success.
Definition plugin-loading.h:617