lib: make trace IR API const-correct
[babeltrace.git] / plugins / ctf / fs-sink / writer.h
index f1a4605bdb0efdd31dbb4f62505e5931777ad62e..2d40b7e4eb5415923ccf3d64eca6fc298455046a 100644 (file)
 
 #include <stdbool.h>
 #include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/graph/component.h>
-#include <babeltrace/ctf-writer/writer.h>
+#include <babeltrace/babeltrace.h>
 
 struct writer_component {
        GString *base_path;
        GString *trace_name_base;
        /* For the directory name suffix. */
        int trace_id;
-       /* Map between struct bt_ctf_trace and struct fs_writer. */
+       /* Map between struct bt_trace and struct fs_writer. */
        GHashTable *trace_map;
        FILE *err;
        struct bt_notification_iterator *input_iterator;
        bool error;
+       bool single_trace;
+       unsigned int nr_traces;
 };
 
 enum fs_writer_stream_state {
@@ -58,11 +59,10 @@ enum fs_writer_stream_state {
 
 struct fs_writer {
        struct bt_ctf_writer *writer;
-       struct bt_ctf_trace *trace;
-       struct bt_ctf_trace *writer_trace;
+       const struct bt_trace *trace;
+       const struct bt_trace *writer_trace;
        struct writer_component *writer_component;
        int static_listener_id;
-       unsigned int active_streams;
        int trace_static;
        /* Map between reader and writer stream. */
        GHashTable *stream_map;
@@ -76,35 +76,35 @@ void writer_close(struct writer_component *writer_component,
                struct fs_writer *fs_writer);
 BT_HIDDEN
 enum bt_component_status writer_output_event(struct writer_component *writer,
-               struct bt_ctf_event *event);
+               const struct bt_event *event);
 BT_HIDDEN
 enum bt_component_status writer_new_packet(struct writer_component *writer,
-               struct bt_ctf_packet *packet);
+               const struct bt_packet *packet);
 BT_HIDDEN
 enum bt_component_status writer_close_packet(struct writer_component *writer,
-               struct bt_ctf_packet *packet);
+               const struct bt_packet *packet);
 BT_HIDDEN
 enum bt_component_status writer_stream_begin(struct writer_component *writer,
-               struct bt_ctf_stream *stream);
+               const struct bt_stream *stream);
 BT_HIDDEN
 enum bt_component_status writer_stream_end(struct writer_component *writer,
-               struct bt_ctf_stream *stream);
+               const struct bt_stream *stream);
 
 BT_HIDDEN
 enum bt_component_status writer_component_init(
-       struct bt_private_component *component, struct bt_value *params,
+       struct bt_self_component *component, struct bt_value *params,
        void *init_method_data);
 
 BT_HIDDEN
-enum bt_component_status writer_run(struct bt_private_component *component);
+enum bt_component_status writer_run(struct bt_self_component *component);
 
 BT_HIDDEN
 void writer_component_port_connected(
-               struct bt_private_component *component,
+               struct bt_self_component *component,
                struct bt_private_port *self_port,
                struct bt_port *other_port);
 
 BT_HIDDEN
-void writer_component_finalize(struct bt_private_component *component);
+void writer_component_finalize(struct bt_self_component *component);
 
 #endif /* BABELTRACE_PLUGIN_WRITER_H */
This page took 0.025404 seconds and 4 git commands to generate.