Implement CTF-IR event getters
[babeltrace.git] / include / babeltrace / ctf-ir / stream-class.h
index 33737335e33a39952a2e8b9c4c2bbaa21f70cf0f..d26bc2ca861441745750309e2a2fd6ae052d9a30 100644 (file)
@@ -50,6 +50,16 @@ struct bt_ctf_clock;
  */
 extern struct bt_ctf_stream_class *bt_ctf_stream_class_create(const char *name);
 
+/*
+ * bt_ctf_stream_class_get_clock: get the clock associated with a stream class.
+ *
+ * @param stream_class Stream class.
+ *
+ * Returns a clock instance, NULL on error.
+ */
+extern struct bt_ctf_clock *bt_ctf_stream_class_get_clock(
+               struct bt_ctf_stream_class *stream_class);
+
 /*
  * bt_ctf_stream_class_set_clock: assign a clock to a stream class.
  *
@@ -65,6 +75,31 @@ extern int bt_ctf_stream_class_set_clock(
                struct bt_ctf_stream_class *stream_class,
                struct bt_ctf_clock *clock);
 
+/*
+ * bt_ctf_stream_class_get_id: Get a stream class' id.
+ *
+ * @param stream_class Stream class.
+ *
+ * Returns the stream class' id, a negative value on error.
+ */
+extern int64_t bt_ctf_stream_class_get_id(
+               struct bt_ctf_stream_class *stream_class);
+
+/*
+ * bt_ctf_stream_class_set_id: Set a stream class' id.
+ *
+ * Set a stream class' id. Must be unique trace-wise.
+ * Note that stream classes are assigned a unique id when a stream instance
+ * is created for the first time from a trace or writer.
+ *
+ * @param stream_class Stream class.
+ * @param id Stream class id.
+ *
+ * Returns 0 on success, a negative value on error.
+ */
+extern int bt_ctf_stream_class_set_id(
+               struct bt_ctf_stream_class *stream_class, uint32_t id);
+
 /*
  * bt_ctf_stream_class_set_clock: assign a clock to a stream class.
  *
This page took 0.023752 seconds and 4 git commands to generate.