objects: Doxygen: bt_object_type: minor fix
[babeltrace.git] / include / babeltrace / ctf-ir / trace.h
index cf14dcffdd9ec54fb20eae26c7f79f1338c8dcda..bcef8973bc659c8c75c9ba50492a0501bdd873ea 100644 (file)
@@ -31,6 +31,7 @@
  */
 
 #include <babeltrace/ctf-ir/event-types.h>
+#include <stdint.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -199,7 +200,7 @@ extern int bt_ctf_trace_add_clock(struct bt_ctf_trace *trace,
 
 /*
  * bt_ctf_trace_get_clock_count: get the number of clocks
- *     associated to the trace.
+ *     associated with the trace.
  *
  * @param trace Trace instance.
  *
@@ -218,6 +219,51 @@ extern int bt_ctf_trace_get_clock_count(struct bt_ctf_trace *trace);
 extern struct bt_ctf_clock *bt_ctf_trace_get_clock(
                struct bt_ctf_trace *trace, int index);
 
+/*
+ * bt_ctf_trace_add_stream_class: add a stream_class to the trace.
+ *
+ * Add a stream class to the trace.
+ *
+ * @param trace Trace instance.
+ * @param stream_class Stream class to add to the trace.
+ *
+ * Returns 0 on success, a negative value on error.
+ */
+extern int bt_ctf_trace_add_stream_class(struct bt_ctf_trace *trace,
+               struct bt_ctf_stream_class *stream_class);
+
+/*
+ * bt_ctf_trace_get_stream_class_count: get the number of stream classes
+ *     associated with the trace.
+ *
+ * @param trace Trace instance.
+ *
+ * Returns the stream class count on success, a negative value on error.
+ */
+extern int bt_ctf_trace_get_stream_class_count(struct bt_ctf_trace *trace);
+
+/*
+ * bt_ctf_trace_get_stream_class: get a trace's stream class at index.
+ *
+ * @param trace Trace instance.
+ * @param index Index of the stream class in the given trace.
+ *
+ * Return a stream class on success, NULL on error.
+ */
+extern struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class(
+               struct bt_ctf_trace *trace, int index);
+
+/*
+ * bt_ctf_trace_get_clock_by_name: get a trace's clock by name
+ *
+ * @param trace Trace instance.
+ * @param name Name of the clock in the given trace.
+ *
+ * Return a clock instance on success, NULL on error.
+ */
+extern struct bt_ctf_clock *bt_ctf_trace_get_clock_by_name(
+               struct bt_ctf_trace *trace, const char *name);
+
 /*
  * bt_ctf_trace_get_metadata_string: get metadata string.
  *
@@ -231,7 +277,19 @@ extern struct bt_ctf_clock *bt_ctf_trace_get_clock(
 extern char *bt_ctf_trace_get_metadata_string(struct bt_ctf_trace *trace);
 
 /*
- * bt_ctf_trace_set_byte_order: set a field type's byte order.
+ * bt_ctf_trace_get_byte_order: get a trace's byte order.
+ *
+ * Get the trace's byte order.
+ *
+ * @param trace Trace instance.
+ *
+ * Returns the trace's endianness, BT_CTF_BYTE_ORDER_UNKNOWN on error.
+ */
+extern enum bt_ctf_byte_order bt_ctf_trace_get_byte_order(
+               struct bt_ctf_trace *trace);
+
+/*
+ * bt_ctf_trace_set_byte_order: set a trace's byte order.
  *
  * Set the trace's byte order. Defaults to the current host's endianness.
  *
This page took 0.034188 seconds and 4 git commands to generate.