7#ifndef BABELTRACE2_PLUGIN_PLUGIN_LOADING_H
8#define BABELTRACE2_PLUGIN_PLUGIN_LOADING_H
12#ifndef __BT_IN_BABELTRACE_H
13# error "Please include <babeltrace2/babeltrace.h> instead."
19#include <babeltrace2/types.h>
591 const char *path,
bt_bool fail_on_load_error,
920 const bt_plugin *plugin,
unsigned int *major,
921 unsigned int *minor,
unsigned int *patch,
const char **extra)
1012 const bt_plugin *plugin, uint64_t index) __BT_NOEXCEPT;
1044 const bt_plugin *plugin, uint64_t index) __BT_NOEXCEPT;
1076 const bt_plugin *plugin, uint64_t index) __BT_NOEXCEPT;
1109 const bt_plugin *plugin,
const char *name) __BT_NOEXCEPT;
1142 const bt_plugin *plugin,
const char *name) __BT_NOEXCEPT;
1175 const bt_plugin *plugin,
const char *name) __BT_NOEXCEPT;
1232#define BT_PLUGIN_PUT_REF_AND_RESET(_plugin) \
1234 bt_plugin_put_ref(_plugin); \
1263#define BT_PLUGIN_MOVE_REF(_dst, _src) \
1265 bt_plugin_put_ref(_dst); \
1318 const bt_plugin_set *plugin_set, uint64_t index) __BT_NOEXCEPT;
1377#define BT_PLUGIN_SET_PUT_REF_AND_RESET(_plugin_set) \
1379 bt_plugin_set_put_ref(_plugin_set); \
1380 (_plugin_set) = NULL; \
1408#define BT_PLUGIN_SET_MOVE_REF(_dst, _src) \
1410 bt_plugin_set_put_ref(_dst); \
bt_property_availability
Availability of an object property.
Definition types.h:159
int bt_bool
Babeltrace 2 boolean type.
Definition types.h:126
struct bt_component_class_sink bt_component_class_sink
Sink component class.
Definition types.h:27
struct bt_component_class_source bt_component_class_source
Source component class.
Definition types.h:28
struct bt_component_class_filter bt_component_class_filter
Filter component class.
Definition types.h:26
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:511
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:63
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:64
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:693
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:387
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:258
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:598
@ BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_OK
Success.
Definition plugin-loading.h:516
@ BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_ERROR
Error.
Definition plugin-loading.h:534
@ BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_MEMORY_ERROR
Out of memory.
Definition plugin-loading.h:528
@ BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_NOT_FOUND
No plugins found.
Definition plugin-loading.h:522
@ BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_ERROR
Error.
Definition plugin-loading.h:716
@ BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_NOT_FOUND
No static plugins found.
Definition plugin-loading.h:704
@ BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_MEMORY_ERROR
Out of memory.
Definition plugin-loading.h:710
@ BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_OK
Success.
Definition plugin-loading.h:698
@ BT_PLUGIN_FIND_ALL_STATUS_NOT_FOUND
No plugins found.
Definition plugin-loading.h:398
@ BT_PLUGIN_FIND_ALL_STATUS_OK
Success.
Definition plugin-loading.h:392
@ BT_PLUGIN_FIND_ALL_STATUS_ERROR
Error.
Definition plugin-loading.h:410
@ BT_PLUGIN_FIND_ALL_STATUS_MEMORY_ERROR
Out of memory.
Definition plugin-loading.h:404
@ BT_PLUGIN_FIND_STATUS_MEMORY_ERROR
Out of memory.
Definition plugin-loading.h:275
@ BT_PLUGIN_FIND_STATUS_NOT_FOUND
Plugin not found.
Definition plugin-loading.h:269
@ BT_PLUGIN_FIND_STATUS_OK
Success.
Definition plugin-loading.h:263
@ BT_PLUGIN_FIND_STATUS_ERROR
Error.
Definition plugin-loading.h:281
@ BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_ERROR
Error.
Definition plugin-loading.h:621
@ BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_MEMORY_ERROR
Out of memory.
Definition plugin-loading.h:615
@ BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_NOT_FOUND
No plugins found.
Definition plugin-loading.h:609
@ BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_OK
Success.
Definition plugin-loading.h:603