lib: remove unused _NO_SINK graph status
[babeltrace.git] / include / babeltrace / graph / query-executor-const.h
index c5cfd9370c699df50594a94973cfae7b29a4bd0e..faec5f8c3ace52228b0487b98ffbeab72b8d5453 100644 (file)
@@ -2,7 +2,7 @@
 #define BABELTRACE_GRAPH_QUERY_EXECUTOR_CONST_H
 
 /*
- * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  *
  * 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_bool */
+/* For bt_bool, bt_query_executor */
 #include <babeltrace/types.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-struct bt_query_executor;
-
-enum bt_query_executor_status {
+typedef enum bt_query_executor_status {
        BT_QUERY_EXECUTOR_STATUS_OK = 0,
        BT_QUERY_EXECUTOR_STATUS_AGAIN = 11,
        BT_QUERY_EXECUTOR_STATUS_UNSUPPORTED = 95,
@@ -41,11 +39,30 @@ enum bt_query_executor_status {
        BT_QUERY_EXECUTOR_STATUS_NOMEM = -12,
        BT_QUERY_EXECUTOR_STATUS_INVALID_OBJECT = -23,
        BT_QUERY_EXECUTOR_STATUS_INVALID_PARAMS = -24,
-};
+} bt_query_executor_status;
 
 extern
 bt_bool bt_query_executor_is_canceled(
-               const struct bt_query_executor *query_executor);
+               const bt_query_executor *query_executor);
+
+extern void bt_query_executor_get_ref(
+               const bt_query_executor *query_executor);
+
+extern void bt_query_executor_put_ref(
+               const bt_query_executor *query_executor);
+
+#define BT_QUERY_EXECUTOR_PUT_REF_AND_RESET(_var)              \
+       do {                                                    \
+               bt_query_executor_put_ref(_var);                \
+               (_var) = NULL;                                  \
+       } while (0)
+
+#define BT_QUERY_EXECUTOR_MOVE_REF(_var_dst, _var_src)         \
+       do {                                                    \
+               bt_query_executor_put_ref(_var_dst);            \
+               (_var_dst) = (_var_src);                        \
+               (_var_src) = NULL;                              \
+       } while (0)
 
 #ifdef __cplusplus
 }
This page took 0.026416 seconds and 4 git commands to generate.