Add trace accessor to CTF Writer
[babeltrace.git] / include / babeltrace / ctf-writer / writer.h
index 7a8dc60f2a3682a0768f379e7d5ab2c91f0ede1f..f6051b4ed821fcedbcc9f539547b79d11a3a1f2e 100644 (file)
@@ -4,7 +4,7 @@
 /*
  * BabelTrace - CTF Writer: Writer
  *
- * Copyright 2013 EfficiOS Inc.
+ * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
@@ -31,6 +31,7 @@
  */
 
 #include <babeltrace/ctf-ir/event-types.h>
+#include <babeltrace/ctf-ir/trace.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -53,6 +54,16 @@ struct bt_ctf_clock;
  */
 extern struct bt_ctf_writer *bt_ctf_writer_create(const char *path);
 
+/*
+ * bt_ctf_writer_get_trace: Get a writer's associated trace.
+ *
+ * @param writer Writer instance.
+ *
+ * Return the writer's associated instance, NULL on error.
+ */
+extern struct bt_ctf_trace *bt_ctf_writer_get_trace(
+               struct bt_ctf_writer *writer);
+
 /*
  * bt_ctf_writer_create_stream: create a stream instance.
  *
@@ -62,7 +73,7 @@ extern struct bt_ctf_writer *bt_ctf_writer_create(const char *path);
  * @param writer Writer instance.
  * @param stream_class Stream class to instantiate.
  *
- * Returns an allocated writer on success, NULL on error.
+ * Returns an allocated stream on success, NULL on error.
  */
 extern struct bt_ctf_stream *bt_ctf_writer_create_stream(
                struct bt_ctf_writer *writer,
This page took 0.032979 seconds and 4 git commands to generate.