2 * SPDX-License-Identifier: MIT
4 * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
7 /* Output argument typemap for plugin output (always appends) */
8 %typemap(in, numinputs=0)
10 (bt_plugin *temp_plugin = NULL) {
15 (const bt_plugin **) {
17 /* SWIG_Python_AppendOutput() steals the created object */
18 $result = SWIG_Python_AppendOutput($result,
19 SWIG_NewPointerObj(SWIG_as_voidptr(*$1),
20 SWIGTYPE_p_bt_plugin, 0));
22 /* SWIG_Python_AppendOutput() steals Py_None */
24 $result = SWIG_Python_AppendOutput($result, Py_None);
28 /* Output argument typemap for plugin set output (always appends) */
29 %typemap(in, numinputs=0)
30 (const bt_plugin_set **)
31 (bt_plugin_set *temp_plugin_set = NULL) {
32 $1 = &temp_plugin_set;
36 (const bt_plugin_set **) {
38 /* SWIG_Python_AppendOutput() steals the created object */
39 $result = SWIG_Python_AppendOutput($result,
40 SWIG_NewPointerObj(SWIG_as_voidptr(*$1),
41 SWIGTYPE_p_bt_plugin_set, 0));
43 /* SWIG_Python_AppendOutput() steals Py_None */
45 $result = SWIG_Python_AppendOutput($result, Py_None);
49 %include <babeltrace2/plugin/plugin-loading.h>
54 #include "native_bt_plugin.i.h"
57 bt_property_availability bt_bt2_plugin_get_version(
58 const bt_plugin *plugin, unsigned int *major,
59 unsigned int *minor, unsigned int *patch, const char **extra);
61 bt_plugin_find_status bt_bt2_plugin_find(const char *plugin_name,
62 bt_bool find_in_std_env_var, bt_bool find_in_user_dir,
63 bt_bool find_in_sys_dir, bt_bool find_in_static,
64 bt_bool fail_on_load_error, const bt_plugin **plugin);
66 bt_plugin_find_all_status bt_bt2_plugin_find_all(bt_bool find_in_std_env_var,
67 bt_bool find_in_user_dir, bt_bool find_in_sys_dir,
68 bt_bool find_in_static, bt_bool fail_on_load_error,
69 const bt_plugin_set **plugin_set);
71 bt_plugin_find_all_from_file_status bt_bt2_plugin_find_all_from_file(
72 const char *path, bt_bool fail_on_load_error,
73 const bt_plugin_set **plugin_set);
75 bt_plugin_find_all_from_dir_status bt_bt2_plugin_find_all_from_dir(
76 const char *path, bt_bool recurse, bt_bool fail_on_load_error,
77 const bt_plugin_set **plugin_set);