lib: force user to include `<babeltrace2/babeltrace.h>`
[babeltrace.git] / include / babeltrace2 / trace-ir / trace.h
index 5712867092d6164f5daf3b26600f56fb16a18f03..0e0887210634ef7076932945f9b316334022bab2 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef BABELTRACE_TRACE_IR_TRACE_H
-#define BABELTRACE_TRACE_IR_TRACE_H
+#ifndef BABELTRACE2_TRACE_IR_TRACE_H
+#define BABELTRACE2_TRACE_IR_TRACE_H
 
 /*
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  * http://www.efficios.com/ctf
  */
 
-/* For bt_bool, bt_trace, bt_trace_class, bt_stream */
-#include <babeltrace2/types.h>
-
-/* For bt_trace_status */
-#include <babeltrace2/trace-ir/trace-const.h>
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
 
 #include <stdint.h>
 
+/* For bt_bool, bt_uuid, bt_trace, bt_trace_class, bt_stream */
+#include <babeltrace2/types.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -43,9 +44,29 @@ extern bt_trace_class *bt_trace_borrow_class(bt_trace *trace);
 
 extern bt_trace *bt_trace_create(bt_trace_class *trace_class);
 
-extern bt_trace_status bt_trace_set_name(bt_trace *trace,
+typedef enum bt_trace_set_name_status {
+       BT_TRACE_SET_NAME_STATUS_MEMORY_ERROR   = __BT_FUNC_STATUS_MEMORY_ERROR,
+       BT_TRACE_SET_NAME_STATUS_OK             = __BT_FUNC_STATUS_OK,
+} bt_trace_set_name_status;
+
+extern bt_trace_set_name_status bt_trace_set_name(bt_trace *trace,
                const char *name);
 
+extern void bt_trace_set_uuid(bt_trace *trace, bt_uuid uuid);
+
+typedef enum bt_trace_set_environment_entry_status {
+       BT_TRACE_SET_ENVIRONMENT_ENTRY_STATUS_MEMORY_ERROR      = __BT_FUNC_STATUS_MEMORY_ERROR,
+       BT_TRACE_SET_ENVIRONMENT_ENTRY_STATUS_OK                = __BT_FUNC_STATUS_OK,
+} bt_trace_set_environment_entry_status;
+
+extern bt_trace_set_environment_entry_status
+bt_trace_set_environment_entry_integer(bt_trace *trace, const char *name,
+               int64_t value);
+
+extern bt_trace_set_environment_entry_status
+bt_trace_set_environment_entry_string(bt_trace *trace, const char *name,
+               const char *value);
+
 extern bt_stream *bt_trace_borrow_stream_by_index(bt_trace *trace,
                uint64_t index);
 
@@ -56,4 +77,4 @@ extern bt_stream *bt_trace_borrow_stream_by_id(bt_trace *trace,
 }
 #endif
 
-#endif /* BABELTRACE_TRACE_IR_TRACE_H */
+#endif /* BABELTRACE2_TRACE_IR_TRACE_H */
This page took 0.024252 seconds and 4 git commands to generate.