Babeltrace 2 C API 2.1.0
Open-source trace manipulation framework
Loading...
Searching...
No Matches
query-executor.h
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
5 */
6
7#ifndef BABELTRACE2_GRAPH_QUERY_EXECUTOR_H
8#define BABELTRACE2_GRAPH_QUERY_EXECUTOR_H
9
10/* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
11
12#ifndef __BT_IN_BABELTRACE_H
13# error "Please include <babeltrace2/babeltrace.h> instead."
14#endif
15
16#include <babeltrace2/types.h>
17#include <babeltrace2/logging.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
144extern
146 const bt_component_class *component_class,
147 const char *object_name, const bt_value *params)
148 __BT_NOEXCEPT;
149
197extern
199 const bt_component_class *component_class,
200 const char *object_name, const bt_value *params,
201 void *method_data) __BT_NOEXCEPT;
202
245
288extern
290 bt_query_executor *query_executor, const bt_value **result)
291 __BT_NOEXCEPT;
292
311
335 bt_logging_level logging_level) __BT_NOEXCEPT;
336
356 const bt_query_executor *query_executor) __BT_NOEXCEPT;
357
382
424 const bt_interrupter *interrupter) __BT_NOEXCEPT;
425
449 bt_query_executor *query_executor) __BT_NOEXCEPT;
450
467 const bt_query_executor *query_executor) __BT_NOEXCEPT;
468
491extern void bt_query_executor_get_ref(const bt_query_executor *query_executor)
492 __BT_NOEXCEPT;
493
509extern void bt_query_executor_put_ref(const bt_query_executor *query_executor)
510 __BT_NOEXCEPT;
511
526#define BT_QUERY_EXECUTOR_PUT_REF_AND_RESET(_query_executor) \
527 do { \
528 bt_query_executor_put_ref(_query_executor); \
529 (_query_executor) = NULL; \
530 } while (0)
531
557#define BT_QUERY_EXECUTOR_MOVE_REF(_dst, _src) \
558 do { \
559 bt_query_executor_put_ref(_dst); \
560 (_dst) = (_src); \
561 (_src) = NULL; \
562 } while (0)
563
568#ifdef __cplusplus
569}
570#endif
571
572#endif /* BABELTRACE2_GRAPH_QUERY_EXECUTOR_H */
int bt_bool
Babeltrace&#160;2 boolean type.
Definition types.h:126
struct bt_component_class bt_component_class
Component class.
Definition types.h:25
struct bt_interrupter bt_interrupter
Interrupter.
Definition types.h:57
bt_logging_level
Logging level enumerators.
Definition logging.h:97
bt_query_executor * bt_query_executor_create(const bt_component_class *component_class, const char *object_name, const bt_value *params)
Alias of bt_query_executor_create_with_method_data() with the method_data parameter set to NULL.
bt_query_executor_add_interrupter_status
Status codes for bt_query_executor_add_interrupter().
Definition query-executor.h:369
bt_logging_level bt_query_executor_get_logging_level(const bt_query_executor *query_executor)
Returns the logging level of the query executor query_executor.
bt_query_executor_query_status
Status codes for bt_query_executor_query().
Definition query-executor.h:214
bt_query_executor_set_logging_level_status
Status codes for bt_query_executor_set_logging_level().
Definition query-executor.h:304
void bt_query_executor_put_ref(const bt_query_executor *query_executor)
Decrements the reference count of the query executor query_executor.
bt_query_executor_add_interrupter_status bt_query_executor_add_interrupter(bt_query_executor *query_executor, const bt_interrupter *interrupter)
Adds the interrupter interrupter to the query executor query_executor.
bt_interrupter * bt_query_executor_borrow_default_interrupter(bt_query_executor *query_executor)
Borrows the default interrupter from the query executor query_executor.
bt_query_executor_set_logging_level_status bt_query_executor_set_logging_level(bt_query_executor *query_executor, bt_logging_level logging_level)
Sets the logging level of the query executor query_executor to logging_level.
bt_query_executor_query_status bt_query_executor_query(bt_query_executor *query_executor, const bt_value **result)
Performs a query operation using the query executor query_executor, setting *result to the result of ...
bt_bool bt_query_executor_is_interrupted(const bt_query_executor *query_executor)
Returns whether or not the query executor query_executor is interrupted, that is, whether or not any ...
struct bt_query_executor bt_query_executor
Query executor.
Definition types.h:70
bt_query_executor * bt_query_executor_create_with_method_data(const bt_component_class *component_class, const char *object_name, const bt_value *params, void *method_data)
Creates a query executor to query the object named object_name from the component class component_cla...
void bt_query_executor_get_ref(const bt_query_executor *query_executor)
Increments the reference count of the query executor query_executor.
@ BT_QUERY_EXECUTOR_ADD_INTERRUPTER_STATUS_MEMORY_ERROR
Out of memory.
Definition query-executor.h:380
@ BT_QUERY_EXECUTOR_ADD_INTERRUPTER_STATUS_OK
Success.
Definition query-executor.h:374
@ BT_QUERY_EXECUTOR_QUERY_STATUS_AGAIN
Try again.
Definition query-executor.h:231
@ BT_QUERY_EXECUTOR_QUERY_STATUS_ERROR
Other error.
Definition query-executor.h:243
@ BT_QUERY_EXECUTOR_QUERY_STATUS_UNKNOWN_OBJECT
Unknown object to query.
Definition query-executor.h:225
@ BT_QUERY_EXECUTOR_QUERY_STATUS_MEMORY_ERROR
Out of memory.
Definition query-executor.h:237
@ BT_QUERY_EXECUTOR_QUERY_STATUS_OK
Success.
Definition query-executor.h:219
@ BT_QUERY_EXECUTOR_SET_LOGGING_LEVEL_STATUS_OK
Success.
Definition query-executor.h:309
struct bt_value bt_value
Value.
Definition types.h:93