Fix: allow structure types to have a minimum align
[babeltrace.git] / include / babeltrace / ctf-writer / writer.h
index 60b660fb760077024ecb4791ed930983d2120192..f189ab5cb2656d5b586ea31b717a51ea2af346cb 100644 (file)
@@ -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,
@@ -124,13 +135,16 @@ extern void bt_ctf_writer_flush_metadata(struct bt_ctf_writer *writer);
 /*
  * bt_ctf_writer_set_byte_order: set a field type's byte order.
  *
- * Set the trace's byte order. Defaults to BT_CTF_BYTE_ORDER_NATIVE,
- * the host machine's endianness.
+ * Set the trace's byte order. Defaults to the host machine's endianness.
  *
  * @param writer Writer instance.
  * @param byte_order Trace's byte order.
  *
  * Returns 0 on success, a negative value on error.
+ *
+ * Note: byte_order must not be BT_CTF_BYTE_ORDER_NATIVE since, according
+ * to the CTF specification, is defined as "the byte order described in the
+ * trace description".
  */
 extern int bt_ctf_writer_set_byte_order(struct bt_ctf_writer *writer,
                enum bt_ctf_byte_order byte_order);
This page took 0.025913 seconds and 4 git commands to generate.