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); \
Out of memory.
Definition: plugin-loading.h:528
bt_plugin_find_all_status
Status codes for bt_plugin_find_all().
Definition: plugin-loading.h:387
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.
No plugins found.
Definition: plugin-loading.h:609
struct bt_component_class_source bt_component_class_source
Source component class.
Definition: types.h:28
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_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...
Error.
Definition: plugin-loading.h:534
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.
Success.
Definition: plugin-loading.h:516
No plugins found.
Definition: plugin-loading.h:398
struct bt_component_class_filter bt_component_class_filter
Filter component class.
Definition: types.h:26
Success.
Definition: plugin-loading.h:392
void bt_plugin_set_put_ref(const bt_plugin_set *plugin_set)
Decrements the reference count of the plugin set plugin_set.
No static plugins found.
Definition: plugin-loading.h:704
Success.
Definition: plugin-loading.h:263
Error.
Definition: plugin-loading.h:621
Out of memory.
Definition: plugin-loading.h:615
bt_property_availability
Availability of an object property.
Definition: types.h:159
Error.
Definition: plugin-loading.h:716
No plugins found.
Definition: plugin-loading.h:522
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...
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.
bt_plugin_find_all_from_dir_status
Status codes for bt_plugin_find_all_from_dir().
Definition: plugin-loading.h:598
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.
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.
Success.
Definition: plugin-loading.h:698
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.
Out of memory.
Definition: plugin-loading.h:404
Plugin not found.
Definition: plugin-loading.h:269
Error.
Definition: plugin-loading.h:281
void bt_plugin_set_get_ref(const bt_plugin_set *plugin_set)
Increments the reference count of the plugin set plugin_set.
Out of memory.
Definition: plugin-loading.h:275
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.
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.
struct bt_plugin bt_plugin
Plugin.
Definition: types.h:63
Out of memory.
Definition: plugin-loading.h:710
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_component_class_sink bt_component_class_sink
Sink component class.
Definition: types.h:27
int bt_bool
Babeltrace 2 boolean type.
Definition: types.h:126
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_license(const bt_plugin *plugin)
Returns the license text or the license name of the plugin plugin.
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.
const char * bt_plugin_get_path(const bt_plugin *plugin)
Returns the path of the file which contains 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_all_from_static_status
Status codes for bt_plugin_find_all_from_static().
Definition: plugin-loading.h:693
Error.
Definition: plugin-loading.h:410
bt_plugin_find_status
Status codes for bt_plugin_find().
Definition: plugin-loading.h:258
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_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...
Success.
Definition: plugin-loading.h:603
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.
void bt_plugin_get_ref(const bt_plugin *plugin)
Increments the reference count 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
Status codes for bt_plugin_find_all_from_file().
Definition: plugin-loading.h:511
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.
const char * bt_plugin_get_description(const bt_plugin *plugin)
Returns the description of the plugin plugin.