Change CTF IR header descriptions from CTF Writer to CTF IR
[babeltrace.git] / formats / ctf / ir / clock.c
index 2860e01039aba31b44c0b801cb92994e6e9ac018..5ebaf046bbedc81f5e3f55a3a31cc2889be3598c 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * clock.c
  *
- * Babeltrace CTF Writer
+ * Babeltrace CTF IR - Clock
  *
- * Copyright 2013 EfficiOS Inc.
+ * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
@@ -245,6 +245,34 @@ end:
        return ret;
 }
 
+const unsigned char *bt_ctf_clock_get_uuid(struct bt_ctf_clock *clock)
+{
+       const unsigned char *ret;
+
+       if (!clock) {
+               ret = NULL;
+               goto end;
+       }
+
+       ret = clock->uuid;
+end:
+       return ret;
+}
+
+int bt_ctf_clock_set_uuid(struct bt_ctf_clock *clock, const unsigned char *uuid)
+{
+       int ret = 0;
+
+       if (!clock || !uuid) {
+               ret = -1;
+               goto end;
+       }
+
+       memcpy(clock->uuid, uuid, sizeof(uuid_t));
+end:
+       return ret;
+}
+
 uint64_t bt_ctf_clock_get_time(struct bt_ctf_clock *clock)
 {
        uint64_t ret = -1ULL;
This page took 0.023849 seconds and 4 git commands to generate.