ir: move writer-specific declarations to writer header
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 19 Feb 2016 23:07:25 +0000 (18:07 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 19 Feb 2016 23:10:04 +0000 (18:10 -0500)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
13 files changed:
include/babeltrace/ctf-ir/clock.h
include/babeltrace/ctf-ir/event-class.h
include/babeltrace/ctf-ir/event.h
include/babeltrace/ctf-ir/field-types.h
include/babeltrace/ctf-ir/fields.h
include/babeltrace/ctf-ir/stream-class.h
include/babeltrace/ctf-ir/stream.h
include/babeltrace/ctf-writer/clock.h
include/babeltrace/ctf-writer/event-fields.h
include/babeltrace/ctf-writer/event-types.h
include/babeltrace/ctf-writer/event.h
include/babeltrace/ctf-writer/stream-class.h
include/babeltrace/ctf-writer/stream.h

index a9ba7134be0c45937d88c669bb5347546303031d..1b7a004d0fc544b4628d4de96c575772794673a6 100644 (file)
@@ -267,25 +267,6 @@ extern uint64_t bt_ctf_clock_get_value(struct bt_ctf_clock *clock);
 extern int bt_ctf_clock_set_value(struct bt_ctf_clock *clock,
                uint64_t value);
 
-/*
- * bt_ctf_clock_get and bt_ctf_clock_put: increment and decrement the
- * refcount of the clock
- *
- * You may also use bt_ctf_get() and bt_ctf_put() with clock objects.
- *
- * These functions ensure that the clock won't be destroyed when it
- * is in use. The same number of get and put (plus one extra put to
- * release the initial reference done at creation) has to be done to
- * destroy a clock.
- *
- * When the clock refcount is decremented to 0 by a bt_ctf_clock_put,
- * the clock is freed.
- *
- * @param clock Clock instance.
- */
-extern void bt_ctf_clock_get(struct bt_ctf_clock *clock);
-extern void bt_ctf_clock_put(struct bt_ctf_clock *clock);
-
 #ifdef __cplusplus
 }
 #endif
index 5144b77c403181199d60b52b42338b5db023feb5..314260a5b2f3c0443ba0d793177f42a1da11b86d 100644 (file)
@@ -302,25 +302,6 @@ extern int bt_ctf_event_class_set_context_type(
                struct bt_ctf_event_class *event_class,
                struct bt_ctf_field_type *context);
 
-/*
- * bt_ctf_event_class_get and bt_ctf_event_class_put: increment and decrement
- * the event class' reference count.
- *
- * You may also use bt_ctf_get() and bt_ctf_put() with event class objects.
- *
- * These functions ensure that the event class 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
- * destroy an event class.
- *
- * When the event class' reference count is decremented to 0 by a
- * bt_ctf_event_class_put, the event class is freed.
- *
- * @param event_class Event class.
- */
-extern void bt_ctf_event_class_get(struct bt_ctf_event_class *event_class);
-extern void bt_ctf_event_class_put(struct bt_ctf_event_class *event_class);
-
 #ifdef __cplusplus
 }
 #endif
index 4770f5eadca1f8b6474890fab0ab2c1387de9a53..f2e809e98fbc9ad5f49cd8f778d817b90339542c 100644 (file)
@@ -258,25 +258,6 @@ extern struct bt_ctf_event *bt_ctf_event_copy(struct bt_ctf_event *event);
 extern int bt_ctf_event_set_packet(struct bt_ctf_event *event,
                struct bt_ctf_packet *packet);
 
-/*
- * bt_ctf_event_get and bt_ctf_event_put: increment and decrement
- * the event's reference count.
- *
- * You may also use bt_ctf_get() and bt_ctf_put() with event objects.
- *
- * These functions ensure that the event 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
- * destroy an event.
- *
- * When the event's reference count is decremented to 0 by a
- * bt_ctf_event_put, the event is freed.
- *
- * @param event Event instance.
- */
-extern void bt_ctf_event_get(struct bt_ctf_event *event);
-extern void bt_ctf_event_put(struct bt_ctf_event *event);
-
 #ifdef __cplusplus
 }
 #endif
index ce9ca72f44ec4b54d89cb2917a27238929334ab8..3be4a5a0182d48bcc525e1276680b879fdd864dc 100644 (file)
@@ -941,25 +941,6 @@ extern int bt_ctf_field_type_is_sequence(struct bt_ctf_field_type *type);
  */
 extern int bt_ctf_field_type_is_variant(struct bt_ctf_field_type *type);
 
-/*
- * bt_ctf_field_type_get and bt_ctf_field_type_put: increment and decrement
- * the field type's reference count.
- *
- * You may also use bt_ctf_get() and bt_ctf_put() with field type objects.
- *
- * These functions ensure that the field type 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
- * destroy a field type.
- *
- * When the field type's reference count is decremented to 0 by a
- * bt_ctf_field_type_put, the field type is freed.
- *
- * @param type Field type.
- */
-extern void bt_ctf_field_type_get(struct bt_ctf_field_type *type);
-extern void bt_ctf_field_type_put(struct bt_ctf_field_type *type);
-
 #ifdef __cplusplus
 }
 #endif
index 1b1ac8c2c8bcb53f86131ba5e62a370a57df472a..cbed745a17d180b26868149ca6d08c5c07af8284 100644 (file)
@@ -460,25 +460,6 @@ extern int bt_ctf_field_is_variant(struct bt_ctf_field *field);
  */
 extern struct bt_ctf_field *bt_ctf_field_copy(struct bt_ctf_field *field);
 
-/*
- * bt_ctf_field_get and bt_ctf_field_put: increment and decrement the
- * field's reference count.
- *
- * You may also use bt_ctf_get() and bt_ctf_put() with field objects.
- *
- * These functions ensure that the field won't be destroyed when 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
- * destroy a field.
- *
- * When the field's reference count is decremented to 0 by a bt_ctf_field_put,
- * the field is freed.
- *
- * @param field Field instance.
- */
-extern void bt_ctf_field_get(struct bt_ctf_field *field);
-extern void bt_ctf_field_put(struct bt_ctf_field *field);
-
 #ifdef __cplusplus
 }
 #endif
index 75be6b678f7f37b07aa19d5f14491abf45b5c5ad..ca929afbb9831efd85f6aa956a14eb843927fd50 100644 (file)
@@ -286,25 +286,6 @@ extern int bt_ctf_stream_class_set_event_context_type(
                struct bt_ctf_stream_class *stream_class,
                struct bt_ctf_field_type *event_context_type);
 
-/*
- * bt_ctf_stream_class_get and bt_ctf_stream_class_put: increment and
- * decrement the stream class' reference count.
- *
- * You may also use bt_ctf_get() and bt_ctf_put() with stream class objects.
- *
- * These functions ensure that the stream class 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
- * destroy a stream class.
- *
- * When the stream class' reference count is decremented to 0 by a
- * bt_ctf_stream_class_put, the stream class is freed.
- *
- * @param stream_class Stream class.
- */
-extern void bt_ctf_stream_class_get(struct bt_ctf_stream_class *stream_class);
-extern void bt_ctf_stream_class_put(struct bt_ctf_stream_class *stream_class);
-
 #ifdef __cplusplus
 }
 #endif
index ddb890b7a2467453d39079fc1ebf6ba0073a9414..410aba7c1377742e77b5ed6d321967ead0256910 100644 (file)
@@ -50,140 +50,6 @@ struct bt_ctf_stream;
 extern struct bt_ctf_stream_class *bt_ctf_stream_get_class(
                struct bt_ctf_stream *stream);
 
-/*
- * bt_ctf_stream_get_discarded_events_count: get the number of discarded
- * events associated with this stream.
- *
- * Note that discarded events are not stored if the stream's packet
- * context has no "events_discarded" field. An error will be returned
- * in that case.
- *
- * @param stream Stream instance.
- *
- * Returns the number of discarded events, a negative value on error.
- */
-extern int bt_ctf_stream_get_discarded_events_count(
-               struct bt_ctf_stream *stream, uint64_t *count);
-
-/*
- * bt_ctf_stream_append_discarded_events: increment discarded events count.
- *
- * Increase the current packet's discarded event count. Has no effect if the
- * stream class' packet context has no "events_discarded" field.
- *
- * @param stream Stream instance.
- * @param event_count Number of discarded events to add to the stream's current
- *     packet.
- */
-extern void bt_ctf_stream_append_discarded_events(struct bt_ctf_stream *stream,
-               uint64_t event_count);
-
-/*
- * bt_ctf_stream_append_event: append an event to the stream.
- *
- * Append "event" to the stream's current packet. The stream's associated clock
- * will be sampled during this call. The event shall not be modified after
- * being appended to a stream. The stream will share the event's ownership by
- * incrementing its reference count. The current packet is not flushed to disk
- * until the next call to bt_ctf_stream_flush.
- *
- * The stream event context will be sampled for every appended event if
- * a stream event context was defined.
- *
- * @param stream Stream instance.
- * @param event Event instance to append to the stream's current packet.
- *
- * Returns 0 on success, a negative value on error.
- */
-extern int bt_ctf_stream_append_event(struct bt_ctf_stream *stream,
-               struct bt_ctf_event *event);
-
-/*
- * bt_ctf_stream_get_packet_header: get a stream's packet header.
- *
- * @param stream Stream instance.
- *
- * Returns a field instance on success, NULL on error.
- */
-extern struct bt_ctf_field *bt_ctf_stream_get_packet_header(
-               struct bt_ctf_stream *stream);
-
-/*
- * bt_ctf_stream_set_packet_header: set a stream's packet header.
- *
- * The packet header's type must match the trace's packet header
- * type.
- *
- * @param stream Stream instance.
- * @param packet_header Packet header instance.
- *
- * Returns a field instance on success, NULL on error.
- */
-extern int bt_ctf_stream_set_packet_header(
-               struct bt_ctf_stream *stream,
-               struct bt_ctf_field *packet_header);
-
-/*
- * bt_ctf_stream_get_packet_context: get a stream's packet context.
- *
- * @param stream Stream instance.
- *
- * Returns a field instance on success, NULL on error.
- */
-extern struct bt_ctf_field *bt_ctf_stream_get_packet_context(
-               struct bt_ctf_stream *stream);
-
-/*
- * bt_ctf_stream_set_packet_context: set a stream's packet context.
- *
- * The packet context's type must match the stream class' packet
- * context type.
- *
- * @param stream Stream instance.
- * @param packet_context Packet context field instance.
- *
- * Returns a field instance on success, NULL on error.
- */
-extern int bt_ctf_stream_set_packet_context(
-               struct bt_ctf_stream *stream,
-               struct bt_ctf_field *packet_context);
-
-/*
- * bt_ctf_stream_flush: flush a stream.
- *
- * The stream's current packet's events will be flushed, thus closing the
- * current packet. Events subsequently appended to the stream will be
- * added to a new packet.
- *
- * Flushing will also set the packet context's default attributes if
- * they remained unset while populating the current packet. These default
- * attributes, along with their expected types, are detailed in stream-class.h.
- *
- * @param stream Stream instance.
- *
- * Returns 0 on success, a negative value on error.
- */
-extern int bt_ctf_stream_flush(struct bt_ctf_stream *stream);
-
-/*
- * bt_ctf_stream_get and bt_ctf_stream_put: increment and decrement the
- * stream's reference count.
- *
- * You may also use bt_ctf_get() and bt_ctf_put() with stream objects.
- *
- * These functions ensure that the stream 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
- * destroy a stream.
- *
- * When the stream's reference count is decremented to 0 by a
- * bt_ctf_stream_put, the stream is freed.
- *
- * @param stream Stream instance.
- */
-extern void bt_ctf_stream_get(struct bt_ctf_stream *stream);
-extern void bt_ctf_stream_put(struct bt_ctf_stream *stream);
-
 #ifdef __cplusplus
 }
 #endif
index 507739b01c24c5e1ec9887a99767e1cc33bad74f..cb17ca2b0f2e0c529717aa4b4b8f5efa27e56c6d 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef BABELTRACE_CTF_WRITER_CLOCK_H
+#define BABELTRACE_CTF_WRITER_CLOCK_H
+
 /*
  * BabelTrace - CTF Writer: Clock
  *
  */
 
 #include <babeltrace/ctf-ir/clock.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * bt_ctf_clock_get and bt_ctf_clock_put: increment and decrement the
+ * refcount of the clock
+ *
+ * You may also use bt_ctf_get() and bt_ctf_put() with clock objects.
+ *
+ * These functions ensure that the clock won't be destroyed when it
+ * is in use. The same number of get and put (plus one extra put to
+ * release the initial reference done at creation) has to be done to
+ * destroy a clock.
+ *
+ * When the clock refcount is decremented to 0 by a bt_ctf_clock_put,
+ * the clock is freed.
+ *
+ * @param clock Clock instance.
+ */
+extern void bt_ctf_clock_get(struct bt_ctf_clock *clock);
+extern void bt_ctf_clock_put(struct bt_ctf_clock *clock);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_CTF_WRITER_CLOCK_H */
index 3ab3e39fffa9f6a9bee82a76df8b1c98bb4530d1..ce13907a13b827c341ed162b41560db02350fe9f 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef BABELTRACE_CTF_WRITER_EVENT_FIELDS_H
+#define BABELTRACE_CTF_WRITER_EVENT_FIELDS_H
+
 /*
  * BabelTrace - CTF Writer: Event Fields
  *
  */
 
 #include <babeltrace/ctf-ir/fields.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * bt_ctf_field_get and bt_ctf_field_put: increment and decrement the
+ * field's reference count.
+ *
+ * You may also use bt_ctf_get() and bt_ctf_put() with field objects.
+ *
+ * These functions ensure that the field won't be destroyed when 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
+ * destroy a field.
+ *
+ * When the field's reference count is decremented to 0 by a bt_ctf_field_put,
+ * the field is freed.
+ *
+ * @param field Field instance.
+ */
+extern void bt_ctf_field_get(struct bt_ctf_field *field);
+extern void bt_ctf_field_put(struct bt_ctf_field *field);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_CTF_WRITER_EVENT_FIELDS_H */
index ac00f7e3561e8d5bf9b6ffcd2e9961c043750a7c..e19c9cde90105a20af62d272de91bbeb306fe09c 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef BABELTRACE_CTF_WRITER_EVENT_TYPES_H
+#define BABELTRACE_CTF_WRITER_EVENT_TYPES_H
+
 /*
  * BabelTrace - CTF Writer: Event Types
  *
  */
 
 #include <babeltrace/ctf-ir/field-types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * bt_ctf_field_type_get and bt_ctf_field_type_put: increment and decrement
+ * the field type's reference count.
+ *
+ * You may also use bt_ctf_get() and bt_ctf_put() with field type objects.
+ *
+ * These functions ensure that the field type 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
+ * destroy a field type.
+ *
+ * When the field type's reference count is decremented to 0 by a
+ * bt_ctf_field_type_put, the field type is freed.
+ *
+ * @param type Field type.
+ */
+extern void bt_ctf_field_type_get(struct bt_ctf_field_type *type);
+extern void bt_ctf_field_type_put(struct bt_ctf_field_type *type);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_CTF_WRITER_EVENT_TYPES_H */
index fc7ec5d574cf98f2ebb84398998e886ea21fd548..0928e083362c61bf9e597265f044db4a87907001 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef BABELTRACE_CTF_WRITER_EVENT_H
+#define BABELTRACE_CTF_WRITER_EVENT_H
+
 /*
  * BabelTrace - CTF Writer: Event
  *
 
 #include <babeltrace/ctf-ir/event-class.h>
 #include <babeltrace/ctf-ir/event.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * bt_ctf_event_get and bt_ctf_event_put: increment and decrement
+ * the event's reference count.
+ *
+ * You may also use bt_ctf_get() and bt_ctf_put() with event objects.
+ *
+ * These functions ensure that the event 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
+ * destroy an event.
+ *
+ * When the event's reference count is decremented to 0 by a
+ * bt_ctf_event_put, the event is freed.
+ *
+ * @param event Event instance.
+ */
+extern void bt_ctf_event_get(struct bt_ctf_event *event);
+extern void bt_ctf_event_put(struct bt_ctf_event *event);
+
+/*
+ * bt_ctf_event_class_get and bt_ctf_event_class_put: increment and decrement
+ * the event class' reference count.
+ *
+ * You may also use bt_ctf_get() and bt_ctf_put() with event class objects.
+ *
+ * These functions ensure that the event class 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
+ * destroy an event class.
+ *
+ * When the event class' reference count is decremented to 0 by a
+ * bt_ctf_event_class_put, the event class is freed.
+ *
+ * @param event_class Event class.
+ */
+extern void bt_ctf_event_class_get(struct bt_ctf_event_class *event_class);
+extern void bt_ctf_event_class_put(struct bt_ctf_event_class *event_class);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_CTF_WRITER_EVENT_H */
index 2f6c8bdbba55a560012b90d7a72c5a12fdc2731c..32096086cb3ea38816cee2c4f09a46dece9e9cd8 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef BABELTRACE_CTF_WRITER_STREAM_CLASS_H
+#define BABELTRACE_CTF_WRITER_STREAM_CLASS_H
+
 /*
  * BabelTrace - CTF Writer: Stream Class
  *
  */
 
 #include <babeltrace/ctf-ir/stream-class.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * bt_ctf_stream_class_get and bt_ctf_stream_class_put: increment and
+ * decrement the stream class' reference count.
+ *
+ * You may also use bt_ctf_get() and bt_ctf_put() with stream class objects.
+ *
+ * These functions ensure that the stream class 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
+ * destroy a stream class.
+ *
+ * When the stream class' reference count is decremented to 0 by a
+ * bt_ctf_stream_class_put, the stream class is freed.
+ *
+ * @param stream_class Stream class.
+ */
+extern void bt_ctf_stream_class_get(struct bt_ctf_stream_class *stream_class);
+extern void bt_ctf_stream_class_put(struct bt_ctf_stream_class *stream_class);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_CTF_WRITER_STREAM_CLASS_H */
index a878cae63e53834f21d83ea408f4b45597923855..f8ad7b835b600e18755bee789af89066663cb9b9 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef BABELTRACE_CTF_WRITER_STREAM_H
+#define BABELTRACE_CTF_WRITER_STREAM_H
+
 /*
  * BabelTrace - CTF Writer: Stream
  *
  */
 
 #include <babeltrace/ctf-ir/stream.h>
+#include <babeltrace/ctf-writer/stream-class.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * bt_ctf_stream_get_discarded_events_count: get the number of discarded
+ * events associated with this stream.
+ *
+ * Note that discarded events are not stored if the stream's packet
+ * context has no "events_discarded" field. An error will be returned
+ * in that case.
+ *
+ * @param stream Stream instance.
+ *
+ * Returns the number of discarded events, a negative value on error.
+ */
+extern int bt_ctf_stream_get_discarded_events_count(
+               struct bt_ctf_stream *stream, uint64_t *count);
+
+/*
+ * bt_ctf_stream_append_discarded_events: increment discarded events count.
+ *
+ * Increase the current packet's discarded event count. Has no effect if the
+ * stream class' packet context has no "events_discarded" field.
+ *
+ * @param stream Stream instance.
+ * @param event_count Number of discarded events to add to the stream's current
+ *     packet.
+ */
+extern void bt_ctf_stream_append_discarded_events(struct bt_ctf_stream *stream,
+               uint64_t event_count);
+
+/*
+ * bt_ctf_stream_append_event: append an event to the stream.
+ *
+ * Append "event" to the stream's current packet. The stream's associated clock
+ * will be sampled during this call. The event shall not be modified after
+ * being appended to a stream. The stream will share the event's ownership by
+ * incrementing its reference count. The current packet is not flushed to disk
+ * until the next call to bt_ctf_stream_flush.
+ *
+ * The stream event context will be sampled for every appended event if
+ * a stream event context was defined.
+ *
+ * @param stream Stream instance.
+ * @param event Event instance to append to the stream's current packet.
+ *
+ * Returns 0 on success, a negative value on error.
+ */
+extern int bt_ctf_stream_append_event(struct bt_ctf_stream *stream,
+               struct bt_ctf_event *event);
+
+/*
+ * bt_ctf_stream_get_packet_header: get a stream's packet header.
+ *
+ * @param stream Stream instance.
+ *
+ * Returns a field instance on success, NULL on error.
+ */
+extern struct bt_ctf_field *bt_ctf_stream_get_packet_header(
+               struct bt_ctf_stream *stream);
+
+/*
+ * bt_ctf_stream_set_packet_header: set a stream's packet header.
+ *
+ * The packet header's type must match the trace's packet header
+ * type.
+ *
+ * @param stream Stream instance.
+ * @param packet_header Packet header instance.
+ *
+ * Returns a field instance on success, NULL on error.
+ */
+extern int bt_ctf_stream_set_packet_header(
+               struct bt_ctf_stream *stream,
+               struct bt_ctf_field *packet_header);
+
+/*
+ * bt_ctf_stream_get_packet_context: get a stream's packet context.
+ *
+ * @param stream Stream instance.
+ *
+ * Returns a field instance on success, NULL on error.
+ */
+extern struct bt_ctf_field *bt_ctf_stream_get_packet_context(
+               struct bt_ctf_stream *stream);
+
+/*
+ * bt_ctf_stream_set_packet_context: set a stream's packet context.
+ *
+ * The packet context's type must match the stream class' packet
+ * context type.
+ *
+ * @param stream Stream instance.
+ * @param packet_context Packet context field instance.
+ *
+ * Returns a field instance on success, NULL on error.
+ */
+extern int bt_ctf_stream_set_packet_context(
+               struct bt_ctf_stream *stream,
+               struct bt_ctf_field *packet_context);
+
+/*
+ * bt_ctf_stream_flush: flush a stream.
+ *
+ * The stream's current packet's events will be flushed, thus closing the
+ * current packet. Events subsequently appended to the stream will be
+ * added to a new packet.
+ *
+ * Flushing will also set the packet context's default attributes if
+ * they remained unset while populating the current packet. These default
+ * attributes, along with their expected types, are detailed in stream-class.h.
+ *
+ * @param stream Stream instance.
+ *
+ * Returns 0 on success, a negative value on error.
+ */
+extern int bt_ctf_stream_flush(struct bt_ctf_stream *stream);
+
+/*
+ * bt_ctf_stream_get and bt_ctf_stream_put: increment and decrement the
+ * stream's reference count.
+ *
+ * You may also use bt_ctf_get() and bt_ctf_put() with stream objects.
+ *
+ * These functions ensure that the stream 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
+ * destroy a stream.
+ *
+ * When the stream's reference count is decremented to 0 by a
+ * bt_ctf_stream_put, the stream is freed.
+ *
+ * @param stream Stream instance.
+ */
+extern void bt_ctf_stream_get(struct bt_ctf_stream *stream);
+extern void bt_ctf_stream_put(struct bt_ctf_stream *stream);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_CTF_WRITER_STREAM_H */
This page took 0.033452 seconds and 4 git commands to generate.