1 #ifndef BABELTRACE_GRAPH_QUERY_EXECUTOR_H
2 #define BABELTRACE_GRAPH_QUERY_EXECUTOR_H
5 * BabelTrace - Babeltrace Component Connection Interface
7 * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
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:
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
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
29 #include <babeltrace/types.h>
36 struct bt_query_executor
;
37 struct bt_component_class
;
39 enum bt_query_status
{
40 BT_QUERY_STATUS_OK
= 0,
41 BT_QUERY_STATUS_AGAIN
= 11,
42 BT_QUERY_STATUS_EXECUTOR_CANCELED
= 125,
43 BT_QUERY_STATUS_ERROR
= -1,
44 BT_QUERY_STATUS_INVALID
= -22,
45 BT_QUERY_STATUS_INVALID_OBJECT
= -23,
46 BT_QUERY_STATUS_INVALID_PARAMS
= -24,
47 BT_QUERY_STATUS_NOMEM
= -12,
51 struct bt_query_executor
*bt_query_executor_create(void);
54 enum bt_query_status
bt_query_executor_query(
55 struct bt_query_executor
*query_executor
,
56 struct bt_component_class
*component_class
,
57 const char *object
, struct bt_value
*params
,
58 struct bt_value
**result
);
61 enum bt_query_status
bt_query_executor_cancel(
62 struct bt_query_executor
*query_executor
);
65 bt_bool
bt_query_executor_is_canceled(struct bt_query_executor
*query_executor
);
71 #endif /* BABELTRACE_GRAPH_QUERY_EXECUTOR_H */