lib: force user to include `<babeltrace2/babeltrace.h>`
[babeltrace.git] / include / babeltrace2 / trace-ir / stream-class.h
index f6a950f87033c1d3dcc2b32654020ba3b84ed366..48d506376c6ef8c24b028061dda5504a39b6b43f 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef BABELTRACE_TRACE_IR_STREAM_CLASS_H
-#define BABELTRACE_TRACE_IR_STREAM_CLASS_H
+#ifndef BABELTRACE2_TRACE_IR_STREAM_CLASS_H
+#define BABELTRACE2_TRACE_IR_STREAM_CLASS_H
 
 /*
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /*
@@ -35,9 +39,6 @@
  */
 #include <babeltrace2/types.h>
 
-/* For bt_stream_class_status */
-#include <babeltrace2/trace-ir/stream-class-const.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -51,7 +52,12 @@ extern bt_stream_class *bt_stream_class_create_with_id(
 extern bt_trace_class *bt_stream_class_borrow_trace_class(
                bt_stream_class *stream_class);
 
-extern bt_stream_class_status bt_stream_class_set_name(
+typedef enum bt_stream_class_set_name_status {
+       BT_STREAM_CLASS_SET_NAME_STATUS_MEMORY_ERROR    = __BT_FUNC_STATUS_MEMORY_ERROR,
+       BT_STREAM_CLASS_SET_NAME_STATUS_OK              = __BT_FUNC_STATUS_OK,
+} bt_stream_class_set_name_status;
+
+extern bt_stream_class_set_name_status bt_stream_class_set_name(
                bt_stream_class *stream_class, const char *name);
 
 extern void bt_stream_class_set_assigns_automatic_event_class_id(
@@ -60,12 +66,6 @@ extern void bt_stream_class_set_assigns_automatic_event_class_id(
 extern void bt_stream_class_set_assigns_automatic_stream_id(
                bt_stream_class *stream_class, bt_bool value);
 
-extern void bt_stream_class_set_packets_have_beginning_default_clock_snapshot(
-               bt_stream_class *stream_class, bt_bool value);
-
-extern void bt_stream_class_set_packets_have_end_default_clock_snapshot(
-               bt_stream_class *stream_class, bt_bool value);
-
 extern void bt_stream_class_set_supports_discarded_events(
                bt_stream_class *stream_class,
                bt_bool supports_discarded_events,
@@ -76,7 +76,17 @@ extern void bt_stream_class_set_supports_discarded_packets(
                bt_bool supports_discarded_packets,
                bt_bool with_default_clock_snapshots);
 
-extern bt_stream_class_status
+typedef enum bt_stream_class_set_field_class_status {
+       BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR     = __BT_FUNC_STATUS_MEMORY_ERROR,
+       BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK               = __BT_FUNC_STATUS_OK,
+} bt_stream_class_set_field_class_status;
+
+extern void bt_stream_class_set_supports_packets(
+               bt_stream_class *stream_class, bt_bool supports_packets,
+               bt_bool with_beginning_default_clock_snapshot,
+               bt_bool with_end_default_clock_snapshot);
+
+extern bt_stream_class_set_field_class_status
 bt_stream_class_set_packet_context_field_class(
                bt_stream_class *stream_class,
                bt_field_class *field_class);
@@ -85,7 +95,7 @@ extern bt_field_class *
 bt_stream_class_borrow_packet_context_field_class(
                bt_stream_class *stream_class);
 
-extern bt_stream_class_status
+extern bt_stream_class_set_field_class_status
 bt_stream_class_set_event_common_context_field_class(
                bt_stream_class *stream_class,
                bt_field_class *field_class);
@@ -105,7 +115,12 @@ bt_stream_class_borrow_event_class_by_id(
 extern bt_clock_class *bt_stream_class_borrow_default_clock_class(
                bt_stream_class *stream_class);
 
-extern bt_stream_class_status bt_stream_class_set_default_clock_class(
+typedef enum bt_stream_class_set_default_clock_class_status {
+       BT_STREAM_CLASS_SET_DEFAULT_CLOCK_CLASS_STATUS_OK       = __BT_FUNC_STATUS_OK,
+} bt_stream_class_set_default_clock_class_status;
+
+extern bt_stream_class_set_default_clock_class_status
+bt_stream_class_set_default_clock_class(
                bt_stream_class *stream_class,
                bt_clock_class *clock_class);
 
@@ -113,4 +128,4 @@ extern bt_stream_class_status bt_stream_class_set_default_clock_class(
 }
 #endif
 
-#endif /* BABELTRACE_TRACE_IR_STREAM_CLASS_H */
+#endif /* BABELTRACE2_TRACE_IR_STREAM_CLASS_H */
This page took 0.024802 seconds and 4 git commands to generate.