Commit | Line | Data |
---|---|---|
3a2cb327 PP |
1 | #ifndef BABELTRACE_PLUGIN_PLUGIN_CONST_H |
2 | #define BABELTRACE_PLUGIN_PLUGIN_CONST_H | |
90354d3a JG |
3 | |
4 | /* | |
38b48196 | 5 | * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com> |
33b34c43 | 6 | * Copyright 2017 Philippe Proulx <pproulx@efficios.com> |
90354d3a JG |
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 | ||
544d0515 | 29 | #include <stdint.h> |
33b34c43 | 30 | #include <stddef.h> |
e0831b38 PP |
31 | |
32 | /* For bt_bool */ | |
c55a9f58 | 33 | #include <babeltrace/types.h> |
33b34c43 | 34 | |
e0831b38 PP |
35 | /* For enum bt_component_class_type */ |
36 | #include <babeltrace/graph/component-class.h> | |
37 | ||
834e9996 PP |
38 | /* For enum bt_component_class_source */ |
39 | #include <babeltrace/graph/component-class-source.h> | |
40 | ||
41 | /* For enum bt_component_class_filter */ | |
42 | #include <babeltrace/graph/component-class-filter.h> | |
43 | ||
44 | /* For enum bt_component_class_sink */ | |
45 | #include <babeltrace/graph/component-class-sink.h> | |
46 | ||
47 | /* For enum bt_property_availability */ | |
48 | #include <babeltrace/property.h> | |
49 | ||
38b48196 JG |
50 | #ifdef __cplusplus |
51 | extern "C" { | |
52 | #endif | |
633edee0 | 53 | |
38b48196 | 54 | struct bt_plugin; |
a8ff38ef | 55 | struct bt_plugin_set; |
33b34c43 | 56 | struct bt_component_class; |
834e9996 PP |
57 | struct bt_component_class_source; |
58 | struct bt_component_class_filter; | |
59 | struct bt_component_class_sink; | |
33b34c43 | 60 | |
33b34c43 | 61 | enum bt_plugin_status { |
33b34c43 | 62 | BT_PLUGIN_STATUS_OK = 0, |
33b34c43 | 63 | BT_PLUGIN_STATUS_ERROR = -1, |
834e9996 | 64 | BT_PLUGIN_STATUS_NOMEM = -12, |
33b34c43 PP |
65 | }; |
66 | ||
3a2cb327 | 67 | extern const struct bt_plugin *bt_plugin_find(const char *plugin_name); |
2b43acf9 | 68 | |
3a2cb327 PP |
69 | extern const struct bt_plugin_set *bt_plugin_create_all_from_file( |
70 | const char *path); | |
33b34c43 | 71 | |
3a2cb327 PP |
72 | extern const struct bt_plugin_set *bt_plugin_create_all_from_dir( |
73 | const char *path, bt_bool recurse); | |
33b34c43 | 74 | |
3a2cb327 | 75 | extern const struct bt_plugin_set *bt_plugin_create_all_from_static(void); |
73299554 | 76 | |
3a2cb327 | 77 | extern const char *bt_plugin_get_name(const struct bt_plugin *plugin); |
633edee0 | 78 | |
3a2cb327 | 79 | extern const char *bt_plugin_get_author(const struct bt_plugin *plugin); |
633edee0 | 80 | |
3a2cb327 | 81 | extern const char *bt_plugin_get_license(const struct bt_plugin *plugin); |
633edee0 | 82 | |
3a2cb327 | 83 | extern const char *bt_plugin_get_description(const struct bt_plugin *plugin); |
f3bc2010 | 84 | |
3a2cb327 | 85 | extern const char *bt_plugin_get_path(const struct bt_plugin *plugin); |
7c7c0433 | 86 | |
834e9996 | 87 | extern enum bt_property_availability bt_plugin_get_version( |
3a2cb327 | 88 | const struct bt_plugin *plugin, unsigned int *major, |
834e9996 PP |
89 | unsigned int *minor, unsigned int *patch, const char **extra); |
90 | ||
91 | extern uint64_t bt_plugin_get_source_component_class_count( | |
3a2cb327 | 92 | const struct bt_plugin *plugin); |
834e9996 PP |
93 | |
94 | extern uint64_t bt_plugin_get_filter_component_class_count( | |
3a2cb327 | 95 | const struct bt_plugin *plugin); |
b6de043b | 96 | |
834e9996 | 97 | extern uint64_t bt_plugin_get_sink_component_class_count( |
3a2cb327 | 98 | const struct bt_plugin *plugin); |
33b34c43 | 99 | |
7b53201c | 100 | extern const struct bt_component_class_source * |
3a2cb327 PP |
101 | bt_plugin_borrow_source_component_class_by_index_const_const( |
102 | const struct bt_plugin *plugin, uint64_t index); | |
33b34c43 | 103 | |
7b53201c | 104 | extern const struct bt_component_class_filter * |
3a2cb327 PP |
105 | bt_plugin_borrow_filter_component_class_by_index_const( |
106 | const struct bt_plugin *plugin, uint64_t index); | |
834e9996 | 107 | |
7b53201c | 108 | extern const struct bt_component_class_sink * |
3a2cb327 PP |
109 | bt_plugin_borrow_sink_component_class_by_index_const( |
110 | const struct bt_plugin *plugin, uint64_t index); | |
834e9996 | 111 | |
7b53201c PP |
112 | extern const struct bt_component_class_source * |
113 | bt_plugin_borrow_source_component_class_by_name_const( | |
114 | const struct bt_plugin *plugin, const char *name); | |
834e9996 | 115 | |
7b53201c PP |
116 | extern const struct bt_component_class_filter * |
117 | bt_plugin_borrow_filter_component_class_by_name_const( | |
118 | const struct bt_plugin *plugin, const char *name); | |
834e9996 | 119 | |
7b53201c PP |
120 | extern const struct bt_component_class_sink * |
121 | bt_plugin_borrow_sink_component_class_by_name_const( | |
122 | const struct bt_plugin *plugin, const char *name); | |
33b34c43 | 123 | |
38b48196 JG |
124 | #ifdef __cplusplus |
125 | } | |
126 | #endif | |
90354d3a | 127 | |
3a2cb327 | 128 | #endif /* BABELTRACE_PLUGIN_PLUGIN_CONST_H */ |