Event notification: pass CC priority map on creation
[babeltrace.git] / plugins / ctf / fs / fs.h
index 80e56c1b6f94013fdc330391285ec4ddc6ed51bd..720102987572484766a41a4c89be2f10df7c4954 100644 (file)
@@ -29,7 +29,8 @@
  */
 
 #include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/component/component.h>
+#include <babeltrace/graph/component.h>
+#include <babeltrace/graph/clock-class-priority-map.h>
 #include "data-stream.h"
 
 #define CTF_FS_COMPONENT_DESCRIPTION \
@@ -38,8 +39,6 @@
 BT_HIDDEN
 extern bool ctf_fs_debug;
 
-struct bt_notification_heap;
-
 struct ctf_fs_file {
        struct ctf_fs_component *ctf_fs;
        GString *path;
@@ -58,7 +57,6 @@ struct ctf_fs_metadata {
 struct ctf_fs_stream {
        struct ctf_fs_file *file;
        struct bt_ctf_stream *stream;
-       /* FIXME There should be many and ctf_fs_stream should not own them. */
        struct bt_ctf_notif_iter *notif_iter;
        /* A stream is assumed to be indexed. */
        struct index index;
@@ -79,52 +77,42 @@ struct ctf_fs_stream {
        bool end_reached;
 };
 
-struct ctf_fs_iterator {
-       struct bt_notification_heap *pending_notifications;
-       struct bt_notification *current_notification;
-       /*
-        * struct ctf_fs_data_stream* which have not yet been associated to a
-        * bt_ctf_stream. The association is performed on the first packet
-        * read by the stream (since, at that point, we have read a packet
-        * header).
-        */
-       GPtrArray *pending_streams;
-       /* bt_ctf_stream -> ctf_fs_stream */
-       GHashTable *stream_ht;
+struct ctf_fs_component_options {
 };
 
-struct ctf_fs_component_options {
-       bool opt_dummy : 1;
+struct ctf_fs_port_data {
+       GString *path;
 };
 
 struct ctf_fs_component {
+       struct bt_private_component *priv_comp;
        GString *trace_path;
        FILE *error_fp;
        size_t page_size;
        struct ctf_fs_component_options options;
        struct ctf_fs_metadata *metadata;
+       struct bt_clock_class_priority_map *cc_prio_map;
+
+       /* Array of struct ctf_fs_port_data *, owned by this */
+       GPtrArray *port_data;
 };
 
 BT_HIDDEN
-enum bt_component_status ctf_fs_init(struct bt_component *source,
+enum bt_component_status ctf_fs_init(struct bt_private_component *source,
                struct bt_value *params, void *init_method_data);
 
 BT_HIDDEN
-void ctf_fs_destroy(struct bt_component *component);
+void ctf_fs_finalize(struct bt_private_component *component);
 
 BT_HIDDEN
 enum bt_notification_iterator_status ctf_fs_iterator_init(
-               struct bt_component *source,
-               struct bt_notification_iterator *it,
-               void *init_method_data);
-
-void ctf_fs_iterator_destroy(struct bt_notification_iterator *it);
+               struct bt_private_notification_iterator *it,
+               struct bt_private_port *port);
 
-enum bt_notification_iterator_status ctf_fs_iterator_next(
-               struct bt_notification_iterator *iterator);
+void ctf_fs_iterator_finalize(struct bt_private_notification_iterator *it);
 
-struct bt_notification *ctf_fs_iterator_get(
-               struct bt_notification_iterator *iterator);
+struct bt_notification_iterator_next_return ctf_fs_iterator_next(
+               struct bt_private_notification_iterator *iterator);
 
 BT_HIDDEN
 struct bt_value *ctf_fs_query(struct bt_component_class *comp_class,
This page took 0.025443 seconds and 4 git commands to generate.