fs-sink: fix handling static notifications
[babeltrace.git] / plugins / ctf / fs-sink / writer.h
index 8025d22f5169b1ead38940c211523406a2d30009..566b42ece319c54ed76ea7955d521d14e629e02d 100644 (file)
@@ -37,13 +37,25 @@ struct writer_component {
        GString *trace_name_base;
        /* For the directory name suffix. */
        int trace_id;
-       /* Map between struct bt_ctf_trace and struct bt_ctf_writer. */
+       /* Map between struct bt_ctf_trace and struct fs_writer. */
        GHashTable *trace_map;
        FILE *err;
        struct bt_notification_iterator *input_iterator;
        bool error;
 };
 
+enum fs_writer_stream_state {
+       /*
+        * We know the stream exists but we have never received a
+        * stream_begin notification for it.
+        */
+       FS_WRITER_UNKNOWN_STREAM,
+       /* We know this stream is active (between stream_begin and _end). */
+       FS_WRITER_ACTIVE_STREAM,
+       /* We have received a stream_end for this stream. */
+       FS_WRITER_COMPLETED_STREAM,
+};
+
 struct fs_writer {
        struct bt_ctf_writer *writer;
        struct bt_ctf_trace *trace;
@@ -55,6 +67,7 @@ struct fs_writer {
        GHashTable *stream_map;
        /* Map between reader and writer stream class. */
        GHashTable *stream_class_map;
+       GHashTable *stream_states;
 };
 
 BT_HIDDEN
This page took 0.023383 seconds and 4 git commands to generate.