Add query executor
[babeltrace.git] / include / babeltrace / graph / query-executor.h
CommitLineData
c7eee084
PP
1#ifndef BABELTRACE_GRAPH_QUERY_EXECUTOR_H
2#define BABELTRACE_GRAPH_QUERY_EXECUTOR_H
3
4/*
5 * BabelTrace - Babeltrace Component Connection Interface
6 *
7 * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 */
27
28#include <babeltrace/types.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34struct bt_value;
35struct bt_query_executor;
36struct bt_component_class;
37
38enum bt_query_status {
39 BT_QUERY_STATUS_OK = 0,
40 BT_QUERY_STATUS_AGAIN = 11,
41 BT_QUERY_STATUS_EXECUTOR_CANCELED = 125,
42 BT_QUERY_STATUS_ERROR = -1,
43 BT_QUERY_STATUS_INVALID = -22,
44 BT_QUERY_STATUS_INVALID_OBJECT = -23,
45 BT_QUERY_STATUS_INVALID_PARAMS = -24,
46 BT_QUERY_STATUS_NOMEM = -12,
47};
48
49extern
50struct bt_query_executor *bt_query_executor_create(void);
51
52extern
53enum bt_query_status bt_query_executor_query(
54 struct bt_query_executor *query_executor,
55 struct bt_component_class *component_class,
56 const char *object, struct bt_value *params,
57 struct bt_value **result);
58
59extern
60enum bt_query_status bt_query_executor_cancel(
61 struct bt_query_executor *query_executor);
62
63extern
64bt_bool bt_query_executor_is_canceled(struct bt_query_executor *query_executor);
65
66#ifdef __cplusplus
67}
68#endif
69
70#endif /* BABELTRACE_GRAPH_QUERY_EXECUTOR_H */
This page took 0.025598 seconds and 4 git commands to generate.