projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove bt_ctf_writer_add_environment_field_int64
[babeltrace.git]
/
include
/
babeltrace
/
ctf-writer
/
writer.h
diff --git
a/include/babeltrace/ctf-writer/writer.h
b/include/babeltrace/ctf-writer/writer.h
index 68031ac3fce2b52facc099925975e9728f5b94f3..940736fe7eb552d22203a3b91cb20c68c85dfd4c 100644
(file)
--- a/
include/babeltrace/ctf-writer/writer.h
+++ b/
include/babeltrace/ctf-writer/writer.h
@@
-4,7
+4,7
@@
/*
* BabelTrace - CTF Writer: Writer
*
/*
* 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>
*
*
* Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
*
@@
-30,6
+30,9
@@
* http://www.efficios.com/ctf
*/
* http://www.efficios.com/ctf
*/
+#include <babeltrace/ctf-ir/field-types.h>
+#include <babeltrace/ctf-ir/trace.h>
+
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
extern "C" {
#endif
@@
-39,13
+42,6
@@
struct bt_ctf_stream;
struct bt_ctf_stream_class;
struct bt_ctf_clock;
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_create: create a writer instance.
*
@@
-58,6
+54,16
@@
enum bt_ctf_byte_order {
*/
extern struct bt_ctf_writer *bt_ctf_writer_create(const char *path);
*/
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.
*
/*
* bt_ctf_writer_create_stream: create a stream instance.
*
@@
-67,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.
*
* @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,
*/
extern struct bt_ctf_stream *bt_ctf_writer_create_stream(
struct bt_ctf_writer *writer,
@@
-129,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.
*
/*
* 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.
*
* @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);
*/
extern int bt_ctf_writer_set_byte_order(struct bt_ctf_writer *writer,
enum bt_ctf_byte_order byte_order);
@@
-144,6
+153,8
@@
extern int bt_ctf_writer_set_byte_order(struct bt_ctf_writer *writer,
* bt_ctf_writer_get and bt_ctf_writer_put: increment and decrement the
* writer's reference count.
*
* 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
* 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
This page took
0.025967 seconds
and
4
git commands to generate.