X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-ir%2Fstream-internal.h;h=19cd8c2f8658e92ae80d50577ec2bb6f57c8a99d;hb=cb6f1f7dfb7938a4738a7f3ca3886334fbceb1a3;hp=ca22eb1165081ea64decbac78eebccd32cd6daef;hpb=83509119a945fc77faff869daaf48627e1c4b3fa;p=babeltrace.git diff --git a/include/babeltrace/ctf-ir/stream-internal.h b/include/babeltrace/ctf-ir/stream-internal.h index ca22eb11..19cd8c2f 100644 --- a/include/babeltrace/ctf-ir/stream-internal.h +++ b/include/babeltrace/ctf-ir/stream-internal.h @@ -1,5 +1,5 @@ -#ifndef BABELTRACE_CTF_WRITER_STREAM_INTERNAL_H -#define BABELTRACE_CTF_WRITER_STREAM_INTERNAL_H +#ifndef BABELTRACE_CTF_IR_STREAM_INTERNAL_H +#define BABELTRACE_CTF_IR_STREAM_INTERNAL_H /* * BabelTrace - CTF Writer: Stream internal @@ -27,41 +27,26 @@ * SOFTWARE. */ +#include +#include #include +#include #include -#include -#include -#include +#include #include -#include #include -struct bt_ctf_stream { - struct bt_object base; - /* Trace owning this stream. A stream does not own a trace. */ - struct bt_ctf_trace *trace; - uint32_t id; - struct bt_ctf_stream_class *stream_class; - /* Array of pointers to bt_ctf_event for the current packet */ - GPtrArray *events; - /* Array of pointers to bt_ctf_field associated with each event */ - GPtrArray *event_headers; - GPtrArray *event_contexts; - struct ctf_stream_pos pos; - unsigned int flushed_packet_count; - struct bt_ctf_field *packet_header; - struct bt_ctf_field *packet_context; - struct bt_ctf_field *event_header; - struct bt_ctf_field *event_context; -}; +struct bt_stream_class; +struct bt_stream; -/* Stream class should be frozen by the caller after creating a stream */ -BT_HIDDEN -struct bt_ctf_stream *bt_ctf_stream_create( - struct bt_ctf_stream_class *stream_class, - struct bt_ctf_trace *trace); +struct bt_stream { + struct bt_object base; + int64_t id; + struct bt_stream_class *stream_class; + GString *name; -BT_HIDDEN -int bt_ctf_stream_set_fd(struct bt_ctf_stream *stream, int fd); + /* Pool of `struct bt_packet *` */ + struct bt_object_pool packet_pool; +}; -#endif /* BABELTRACE_CTF_WRITER_STREAM_INTERNAL_H */ +#endif /* BABELTRACE_CTF_IR_STREAM_INTERNAL_H */