Split CTF IR and CTF writer APIs and implementations
[babeltrace.git] / include / babeltrace / ctf-writer / clock-internal.h
index c60e5c08fa5f9ddfb686169edb10769beabf293a..5c59e29a5bda3ed1b4f4cde723fa9d3581cb2c62 100644 (file)
@@ -2,11 +2,9 @@
 #define BABELTRACE_CTF_WRITER_CLOCK_INTERNAL_H
 
 /*
- * BabelTrace - CTF Writer: Clock internal
+ * BabelTrace - CTF writer: Clock internal
  *
- * Copyright 2013 EfficiOS Inc.
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * SOFTWARE.
  */
 
-#include <babeltrace/ctf-writer/ref-internal.h>
 #include <babeltrace/ctf-writer/clock.h>
-#include <babeltrace/ctf-writer/writer-internal.h>
+#include <babeltrace/ctf-ir/clock-class.h>
+#include <babeltrace/ctf-ir/trace-internal.h>
+#include <babeltrace/object-internal.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <glib.h>
-#include <uuid/uuid.h>
+#include <babeltrace/compat/uuid-internal.h>
+
+struct bt_ctf_clock_class {
+       struct bt_clock_class common;
+};
 
 struct bt_ctf_clock {
-       struct bt_ctf_ref ref_count;
-       GString *name;
-       GString *description;
-       uint64_t frequency;
-       uint64_t precision;
-       uint64_t offset_s;      /* Offset in seconds */
-       uint64_t offset;        /* Offset in ticks */
-       uint64_t time;          /* Current clock value */
-       uuid_t uuid;
-       int absolute;
-       /*
-        * A clock's properties can't be modified once it is added to a stream
-        * class.
-        */
-       int frozen;
+       struct bt_object base;
+       struct bt_ctf_clock_class *clock_class;
+       uint64_t value;         /* Current clock value */
 };
 
-BT_HIDDEN
-void bt_ctf_clock_freeze(struct bt_ctf_clock *clock);
+struct metadata_context;
 
 BT_HIDDEN
-void bt_ctf_clock_serialize(struct bt_ctf_clock *clock,
-               struct metadata_context *context);
+int bt_ctf_clock_get_value(struct bt_ctf_clock *clock, uint64_t *value);
 
 BT_HIDDEN
-uint64_t bt_ctf_clock_get_time(struct bt_ctf_clock *clock);
+void bt_ctf_clock_class_serialize(struct bt_ctf_clock_class *clock_class,
+               struct metadata_context *context);
 
 #endif /* BABELTRACE_CTF_WRITER_CLOCK_INTERNAL_H */
This page took 0.039824 seconds and 4 git commands to generate.