/*
* 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>
*
* http://www.efficios.com/ctf
*/
+#include <babeltrace/ctf-ir/field-types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
struct bt_ctf_stream_class;
struct bt_ctf_clock;
-enum bt_ctf_byte_order {
- BT_CTF_BYTE_ORDER_NATIVE = 0,
- BT_CTF_BYTE_ORDER_LITTLE_ENDIAN,
- BT_CTF_BYTE_ORDER_BIG_ENDIAN,
- BT_CTF_BYTE_ORDER_NETWORK,
-};
-
/*
* bt_ctf_writer_create: create a writer instance.
*
/*
* 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);
* bt_ctf_writer_get and bt_ctf_writer_put: increment and decrement the
* writer's reference count.
*
+ * You may also use bt_ctf_get() and bt_ctf_put() with writer objects.
+ *
* These functions ensure that the writer won't be destroyed while it
* is in use. The same number of get and put (plus one extra put to
* release the initial reference done at creation) have to be done to