-#ifndef BABELTRACE_GRAPH_QUERY_EXECUTOR_H
-#define BABELTRACE_GRAPH_QUERY_EXECUTOR_H
+#ifndef BABELTRACE2_GRAPH_QUERY_EXECUTOR_H
+#define BABELTRACE2_GRAPH_QUERY_EXECUTOR_H
/*
- * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
+ * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* SOFTWARE.
*/
-/* For bt_query_executor, bt_component_class, bt_value */
-#include <babeltrace2/types.h>
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
-/* For bt_logging_level */
+#include <babeltrace2/types.h>
#include <babeltrace2/logging.h>
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
#ifdef __cplusplus
extern "C" {
#endif
extern
-bt_query_executor *bt_query_executor_create(void);
+bt_query_executor *bt_query_executor_create(
+ const bt_component_class *component_class, const char *object,
+ const bt_value *params);
+
+extern
+bt_query_executor *bt_query_executor_create_with_method_data(
+ const bt_component_class *component_class, const char *object,
+ const bt_value *params, void *method_data);
typedef enum bt_query_executor_query_status {
BT_QUERY_EXECUTOR_QUERY_STATUS_OK = __BT_FUNC_STATUS_OK,
BT_QUERY_EXECUTOR_QUERY_STATUS_AGAIN = __BT_FUNC_STATUS_AGAIN,
- BT_QUERY_EXECUTOR_QUERY_STATUS_UNSUPPORTED = __BT_FUNC_STATUS_UNSUPPORTED,
- BT_QUERY_EXECUTOR_QUERY_STATUS_CANCELED = __BT_FUNC_STATUS_CANCELED,
BT_QUERY_EXECUTOR_QUERY_STATUS_ERROR = __BT_FUNC_STATUS_ERROR,
BT_QUERY_EXECUTOR_QUERY_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
- BT_QUERY_EXECUTOR_QUERY_STATUS_INVALID_OBJECT = __BT_FUNC_STATUS_INVALID_OBJECT,
- BT_QUERY_EXECUTOR_QUERY_STATUS_INVALID_PARAMS = __BT_FUNC_STATUS_INVALID_PARAMS,
+ BT_QUERY_EXECUTOR_QUERY_STATUS_UNKNOWN_OBJECT = __BT_FUNC_STATUS_UNKNOWN_OBJECT,
} bt_query_executor_query_status;
extern
bt_query_executor_query_status bt_query_executor_query(
- bt_query_executor *query_executor,
- const bt_component_class *component_class,
- const char *object, const bt_value *params,
- bt_logging_level logging_level, const bt_value **result);
+ bt_query_executor *query_executor, const bt_value **result);
-typedef enum bt_query_executor_cancel_status {
- BT_QUERY_EXECUTOR_CANCEL_STATUS_OK = __BT_FUNC_STATUS_OK,
-} bt_query_executor_cancel_status;
+typedef enum bt_query_executor_add_interrupter_status {
+ BT_QUERY_EXECUTOR_ADD_INTERRUPTER_STATUS_OK = __BT_FUNC_STATUS_OK,
+ BT_QUERY_EXECUTOR_ADD_INTERRUPTER_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
+} bt_query_executor_add_interrupter_status;
-extern
-bt_query_executor_cancel_status bt_query_executor_cancel(
+extern bt_query_executor_add_interrupter_status
+bt_query_executor_add_interrupter(bt_query_executor *query_executor,
+ const bt_interrupter *interrupter);
+
+extern bt_interrupter *bt_query_executor_borrow_default_interrupter(
bt_query_executor *query_executor);
+typedef enum bt_query_executor_set_logging_level_status {
+ BT_QUERY_EXECUTOR_SET_LOGGING_LEVEL_STATUS_OK = __BT_FUNC_STATUS_OK,
+} bt_query_executor_set_logging_level_status;
+
+extern bt_query_executor_set_logging_level_status
+bt_query_executor_set_logging_level(bt_query_executor *query_executor,
+ bt_logging_level logging_level);
+
#ifdef __cplusplus
}
#endif
-#include <babeltrace2/undef-func-status.h>
-
-#endif /* BABELTRACE_GRAPH_QUERY_EXECUTOR_H */
+#endif /* BABELTRACE2_GRAPH_QUERY_EXECUTOR_H */