lib: remove unused public `enum bt_plugin_status`
[babeltrace.git] / include / babeltrace / plugin / plugin-const.h
1 #ifndef BABELTRACE_PLUGIN_PLUGIN_CONST_H
2 #define BABELTRACE_PLUGIN_PLUGIN_CONST_H
3
4 /*
5 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
6 * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 *
8 * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining a copy
11 * of this software and associated documentation files (the "Software"), to deal
12 * in the Software without restriction, including without limitation the rights
13 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 * copies of the Software, and to permit persons to whom the Software is
15 * furnished to do so, subject to the following conditions:
16 *
17 * The above copyright notice and this permission notice shall be included in
18 * all copies or substantial portions of the Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26 * SOFTWARE.
27 */
28
29 #include <stdint.h>
30 #include <stddef.h>
31
32 /*
33 * For bt_bool, bt_plugin, bt_plugin_set, bt_component_class,
34 * bt_component_class_source, bt_component_class_filter,
35 * bt_component_class_sink
36 */
37 #include <babeltrace/types.h>
38
39 /* For enum bt_component_class_type */
40 #include <babeltrace/graph/component-class.h>
41
42 /* For enum bt_component_class_source */
43 #include <babeltrace/graph/component-class-source.h>
44
45 /* For enum bt_component_class_filter */
46 #include <babeltrace/graph/component-class-filter.h>
47
48 /* For enum bt_component_class_sink */
49 #include <babeltrace/graph/component-class-sink.h>
50
51 /* For enum bt_property_availability */
52 #include <babeltrace/property.h>
53
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57
58 extern const bt_plugin *bt_plugin_find(const char *plugin_name);
59
60 extern const bt_plugin_set *bt_plugin_find_all_from_file(
61 const char *path);
62
63 extern const bt_plugin_set *bt_plugin_find_all_from_dir(
64 const char *path, bt_bool recurse);
65
66 extern const bt_plugin_set *bt_plugin_find_all_from_static(void);
67
68 extern const char *bt_plugin_get_name(const bt_plugin *plugin);
69
70 extern const char *bt_plugin_get_author(const bt_plugin *plugin);
71
72 extern const char *bt_plugin_get_license(const bt_plugin *plugin);
73
74 extern const char *bt_plugin_get_description(const bt_plugin *plugin);
75
76 extern const char *bt_plugin_get_path(const bt_plugin *plugin);
77
78 extern enum bt_property_availability bt_plugin_get_version(
79 const bt_plugin *plugin, unsigned int *major,
80 unsigned int *minor, unsigned int *patch, const char **extra);
81
82 extern uint64_t bt_plugin_get_source_component_class_count(
83 const bt_plugin *plugin);
84
85 extern uint64_t bt_plugin_get_filter_component_class_count(
86 const bt_plugin *plugin);
87
88 extern uint64_t bt_plugin_get_sink_component_class_count(
89 const bt_plugin *plugin);
90
91 extern const bt_component_class_source *
92 bt_plugin_borrow_source_component_class_by_index_const_const(
93 const bt_plugin *plugin, uint64_t index);
94
95 extern const bt_component_class_filter *
96 bt_plugin_borrow_filter_component_class_by_index_const(
97 const bt_plugin *plugin, uint64_t index);
98
99 extern const bt_component_class_sink *
100 bt_plugin_borrow_sink_component_class_by_index_const(
101 const bt_plugin *plugin, uint64_t index);
102
103 extern const bt_component_class_source *
104 bt_plugin_borrow_source_component_class_by_name_const(
105 const bt_plugin *plugin, const char *name);
106
107 extern const bt_component_class_filter *
108 bt_plugin_borrow_filter_component_class_by_name_const(
109 const bt_plugin *plugin, const char *name);
110
111 extern const bt_component_class_sink *
112 bt_plugin_borrow_sink_component_class_by_name_const(
113 const bt_plugin *plugin, const char *name);
114
115 extern void bt_plugin_get_ref(const bt_plugin *plugin);
116
117 extern void bt_plugin_put_ref(const bt_plugin *plugin);
118
119 #define BT_PLUGIN_PUT_REF_AND_RESET(_var) \
120 do { \
121 bt_plugin_put_ref(_var); \
122 (_var) = NULL; \
123 } while (0)
124
125 #define BT_PLUGIN_MOVE_REF(_var_dst, _var_src) \
126 do { \
127 bt_plugin_put_ref(_var_dst); \
128 (_var_dst) = (_var_src); \
129 (_var_src) = NULL; \
130 } while (0)
131
132 #ifdef __cplusplus
133 }
134 #endif
135
136 #endif /* BABELTRACE_PLUGIN_PLUGIN_CONST_H */
This page took 0.032616 seconds and 4 git commands to generate.