This function wraps bt_plugin_create_from_name().
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
struct bt_component_class *bt_plugin_get_component_class_by_name_and_type(
struct bt_plugin *plugin, const char *name,
enum bt_component_class_type type);
+struct bt_plugin *bt_plugin_create_from_name(const char *plugin_name);
%{
static PyObject *bt_py3_plugin_ptrs_list_from_bt_plugins(struct bt_plugin **plugins)
return _plugin_ptrs_to_plugins(plugin_ptrs)
+def create_plugin_from_name(name):
+ utils._check_str(name)
+ plugin_ptr = native_bt.plugin_create_from_name(name)
+
+ if plugin_ptr is None:
+ return
+
+ return _Plugin._create_from_ptr(plugin_ptr)
+
+
class _PluginVersion:
def __init__(self, major, minor, patch, extra):
self._major = major