lib: add aliases for Babeltrace enumeration types
[deliverable/babeltrace.git] / include / babeltrace / plugin / plugin-const.h
CommitLineData
41c0a8aa
PP
1#ifndef BABELTRACE_PLUGIN_PLUGIN_CONST_H
2#define BABELTRACE_PLUGIN_PLUGIN_CONST_H
90354d3a
JG
3
4/*
0554db57 5 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
38b48196 6 * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@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>
9d408fca 31
b9879703
PP
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 */
c55a9f58 37#include <babeltrace/types.h>
33b34c43 38
b7c5b62e 39/* For bt_property_availability */
d27a81b2
PP
40#include <babeltrace/property.h>
41
38b48196
JG
42#ifdef __cplusplus
43extern "C" {
44#endif
633edee0 45
b9879703 46extern const bt_plugin *bt_plugin_find(const char *plugin_name);
2b43acf9 47
47ab48dc 48extern const bt_plugin_set *bt_plugin_find_all_from_file(
41c0a8aa 49 const char *path);
33b34c43 50
47ab48dc 51extern const bt_plugin_set *bt_plugin_find_all_from_dir(
41c0a8aa 52 const char *path, bt_bool recurse);
33b34c43 53
47ab48dc 54extern const bt_plugin_set *bt_plugin_find_all_from_static(void);
73299554 55
b9879703 56extern const char *bt_plugin_get_name(const bt_plugin *plugin);
633edee0 57
b9879703 58extern const char *bt_plugin_get_author(const bt_plugin *plugin);
633edee0 59
b9879703 60extern const char *bt_plugin_get_license(const bt_plugin *plugin);
633edee0 61
b9879703 62extern const char *bt_plugin_get_description(const bt_plugin *plugin);
f3bc2010 63
b9879703 64extern const char *bt_plugin_get_path(const bt_plugin *plugin);
7c7c0433 65
b7c5b62e 66extern bt_property_availability bt_plugin_get_version(
b9879703 67 const bt_plugin *plugin, unsigned int *major,
d27a81b2
PP
68 unsigned int *minor, unsigned int *patch, const char **extra);
69
70extern uint64_t bt_plugin_get_source_component_class_count(
b9879703 71 const bt_plugin *plugin);
d27a81b2
PP
72
73extern uint64_t bt_plugin_get_filter_component_class_count(
b9879703 74 const bt_plugin *plugin);
b6de043b 75
d27a81b2 76extern uint64_t bt_plugin_get_sink_component_class_count(
b9879703 77 const bt_plugin *plugin);
33b34c43 78
b9879703 79extern const bt_component_class_source *
41c0a8aa 80bt_plugin_borrow_source_component_class_by_index_const_const(
b9879703 81 const bt_plugin *plugin, uint64_t index);
33b34c43 82
b9879703 83extern const bt_component_class_filter *
41c0a8aa 84bt_plugin_borrow_filter_component_class_by_index_const(
b9879703 85 const bt_plugin *plugin, uint64_t index);
d27a81b2 86
b9879703 87extern const bt_component_class_sink *
41c0a8aa 88bt_plugin_borrow_sink_component_class_by_index_const(
b9879703 89 const bt_plugin *plugin, uint64_t index);
d27a81b2 90
b9879703 91extern const bt_component_class_source *
96ffdc46 92bt_plugin_borrow_source_component_class_by_name_const(
b9879703 93 const bt_plugin *plugin, const char *name);
d27a81b2 94
b9879703 95extern const bt_component_class_filter *
96ffdc46 96bt_plugin_borrow_filter_component_class_by_name_const(
b9879703 97 const bt_plugin *plugin, const char *name);
d27a81b2 98
b9879703 99extern const bt_component_class_sink *
96ffdc46 100bt_plugin_borrow_sink_component_class_by_name_const(
b9879703 101 const bt_plugin *plugin, const char *name);
33b34c43 102
b9879703 103extern void bt_plugin_get_ref(const bt_plugin *plugin);
317e35ec 104
b9879703 105extern void bt_plugin_put_ref(const bt_plugin *plugin);
317e35ec
PP
106
107#define BT_PLUGIN_PUT_REF_AND_RESET(_var) \
108 do { \
109 bt_plugin_put_ref(_var); \
110 (_var) = NULL; \
111 } while (0)
112
113#define BT_PLUGIN_MOVE_REF(_var_dst, _var_src) \
114 do { \
115 bt_plugin_put_ref(_var_dst); \
116 (_var_dst) = (_var_src); \
117 (_var_src) = NULL; \
118 } while (0)
119
38b48196
JG
120#ifdef __cplusplus
121}
122#endif
90354d3a 123
41c0a8aa 124#endif /* BABELTRACE_PLUGIN_PLUGIN_CONST_H */
This page took 0.04577 seconds and 5 git commands to generate.