Add internal nameless clock creation API
[babeltrace.git] / include / babeltrace / ctf-ir / clock-internal.h
index dc4d02ee07022209466abba33ec1406ee912857b..9e800ac55b6358fa7e0655236837b400f263c077 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <babeltrace/ctf-writer/ref-internal.h>
 #include <babeltrace/ctf-writer/clock.h>
-#include <babeltrace/ctf-writer/writer-internal.h>
+#include <babeltrace/ctf-ir/trace-internal.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <glib.h>
 #include <uuid/uuid.h>
@@ -52,6 +52,24 @@ struct bt_ctf_clock {
        int frozen;
 };
 
+/*
+ * This is not part of the public API to prevent users from creating clocks
+ * in an invalid state (being nameless, in this case).
+ *
+ * The only legitimate use-case for this function is to allocate a clock
+ * while the TSDL metadata is being parsed.
+ */
+BT_HIDDEN
+struct bt_ctf_clock *_bt_ctf_clock_create(void);
+
+/*
+ * Not exposed as part of the public API since the only usecase
+ * for this is when we are creating clocks from the TSDL metadata.
+ */
+BT_HIDDEN
+int bt_ctf_clock_set_name(struct bt_ctf_clock *clock,
+               const char *name);
+
 BT_HIDDEN
 void bt_ctf_clock_freeze(struct bt_ctf_clock *clock);
 
This page took 0.02302 seconds and 4 git commands to generate.