Split CTF IR and CTF writer APIs and implementations
[babeltrace.git] / include / babeltrace / ctf-writer / stream-internal.h
index daaa430b36572d3680b437a73d046800c2eaea5e..1d6e8fcf06cd5ebf0168266bbbbb5081109b4d45 100644 (file)
@@ -2,7 +2,7 @@
 #define BABELTRACE_CTF_WRITER_STREAM_INTERNAL_H
 
 /*
- * BabelTrace - CTF Writer: Stream internal
+ * BabelTrace - CTF Writer: Stream
  *
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
+ *
+ * The Common Trace Format (CTF) Specification is available at
+ * http://www.efficios.com/ctf
  */
 
-#include <babeltrace/ctf-writer/ref-internal.h>
-#include <babeltrace/ctf-writer/clock.h>
-#include <babeltrace/ctf-writer/event-fields.h>
-#include <babeltrace/ctf-writer/event-types.h>
-#include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/ctf/types.h>
-#include <glib.h>
-
-typedef void(*flush_func)(struct bt_ctf_stream *, void *);
-
-struct flush_callback {
-       flush_func func;
-       void *data;
-};
+#include <babeltrace/assert-pre-internal.h>
+#include <babeltrace/ctf-ir/stream-internal.h>
+#include <babeltrace/ctf-writer/serialize-internal.h>
+#include <babeltrace/babeltrace.h>
+#include <stdint.h>
 
 struct bt_ctf_stream {
-       struct bt_ctf_ref ref_count;
-       uint32_t id;
-       struct bt_ctf_stream_class *stream_class;
-       struct flush_callback flush;
+       struct bt_stream_common common;
+       struct bt_ctf_field *packet_header;
+       struct bt_ctf_field *packet_context;
+
        /* Array of pointers to bt_ctf_event for the current packet */
        GPtrArray *events;
-       struct ctf_stream_pos pos;
+       struct bt_ctf_stream_pos pos;
        unsigned int flushed_packet_count;
-       uint64_t events_discarded;
+       uint64_t discarded_events;
+       uint64_t size;
+       uint64_t last_ts_end;
 };
 
 BT_HIDDEN
-struct bt_ctf_stream *bt_ctf_stream_create(
-               struct bt_ctf_stream_class *stream_class);
-
-BT_HIDDEN
-int bt_ctf_stream_set_flush_callback(struct bt_ctf_stream *stream,
-               flush_func callback, void *data);
+int bt_stream_set_fd(struct bt_stream *stream, int fd);
 
 BT_HIDDEN
-int bt_ctf_stream_set_fd(struct bt_ctf_stream *stream, int fd);
+struct bt_ctf_stream *bt_ctf_stream_create_with_id(
+               struct bt_ctf_stream_class *stream_class,
+               const char *name, uint64_t id);
 
 #endif /* BABELTRACE_CTF_WRITER_STREAM_INTERNAL_H */
This page took 0.02506 seconds and 4 git commands to generate.