lib: rename include dir to babeltrace2
[babeltrace.git] / plugins / ctf / fs-src / data-stream-file.h
index 3a4daad8c62b00f0e010a7e48b41388633b1d94e..feeef675257f1f23bc4762b7bbfc1237bd4ac6f8 100644 (file)
 #include <stdio.h>
 #include <stdbool.h>
 #include <glib.h>
-#include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/babeltrace.h>
+#include <babeltrace2/babeltrace-internal.h>
+#include <babeltrace2/babeltrace.h>
 
-#include "../common/notif-iter/notif-iter.h"
+#include "../common/msg-iter/msg-iter.h"
 #include "lttng-index.h"
 
 struct ctf_fs_component;
@@ -37,46 +37,7 @@ struct ctf_fs_file;
 struct ctf_fs_trace;
 struct ctf_fs_ds_file;
 
-struct ctf_fs_ds_index_entry {
-       /* Position, in bytes, of the packet from the beginning of the file. */
-       uint64_t offset;
-
-       /* Size of the packet, in bytes. */
-       uint64_t packet_size;
-
-       /*
-        * Extracted from the packet context, relative to the respective fields'
-        * mapped clock classes (in cycles).
-        */
-       uint64_t timestamp_begin, timestamp_end;
-
-       /*
-        * Converted from the packet context, relative to the trace's EPOCH
-        * (in ns since EPOCH).
-        */
-       int64_t timestamp_begin_ns, timestamp_end_ns;
-};
-
-struct ctf_fs_ds_index {
-       /* Array of struct ctf_fs_fd_index_entry. */
-       GArray *entries;
-};
-
 struct ctf_fs_ds_file_info {
-       /*
-        * Owned by this. May be NULL.
-        *
-        * A stream cannot be assumed to be indexed as the indexing might have
-        * been skipped. Moreover, the index's fields may not all be available
-        * depending on the producer (e.g. timestamp_begin/end are not
-        * mandatory).
-        *
-        * FIXME In such cases (missing fields), the indexing is aborted as
-        * no the index entries don't have a concept of fields being present
-        * or not.
-        */
-       struct ctf_fs_ds_index *index;
-
        /* Owned by this. */
        GString *path;
 
@@ -91,16 +52,16 @@ struct ctf_fs_ds_file {
        struct ctf_fs_metadata *metadata;
 
        /* Weak */
-       struct bt_self_notification_iterator *pc_notif_iter;
+       bt_self_message_iterator *pc_msg_iter;
 
        /* Owned by this */
        struct ctf_fs_file *file;
 
        /* Owned by this */
-       struct bt_private_stream *stream;
+       bt_stream *stream;
 
        /* Weak */
-       struct bt_notif_iter *notif_iter;
+       struct bt_msg_iter *msg_iter;
 
        void *mmap_addr;
 
@@ -128,31 +89,28 @@ struct ctf_fs_ds_file {
 BT_HIDDEN
 struct ctf_fs_ds_file *ctf_fs_ds_file_create(
                struct ctf_fs_trace *ctf_fs_trace,
-               struct bt_self_notification_iterator *pc_notif_iter,
-               struct bt_notif_iter *notif_iter,
-               struct bt_private_stream *stream, const char *path);
-
-BT_HIDDEN
-int ctf_fs_ds_file_borrow_packet_header_context_fields(
-               struct ctf_fs_ds_file *ds_file,
-               struct bt_private_field **packet_header_field,
-               struct bt_private_field **packet_context_field);
+               bt_self_message_iterator *pc_msg_iter,
+               struct bt_msg_iter *msg_iter,
+               bt_stream *stream, const char *path);
 
 BT_HIDDEN
 void ctf_fs_ds_file_destroy(struct ctf_fs_ds_file *stream);
 
 BT_HIDDEN
-enum bt_notification_iterator_status ctf_fs_ds_file_next(
+bt_self_message_iterator_status ctf_fs_ds_file_next(
                struct ctf_fs_ds_file *ds_file,
-               struct bt_private_notification **notif);
+               bt_message **msg);
 
 BT_HIDDEN
 struct ctf_fs_ds_index *ctf_fs_ds_file_build_index(
                struct ctf_fs_ds_file *ds_file);
 
+BT_HIDDEN
+struct ctf_fs_ds_index *ctf_fs_ds_index_create();
+
 BT_HIDDEN
 void ctf_fs_ds_index_destroy(struct ctf_fs_ds_index *index);
 
-extern struct bt_notif_iter_medium_ops ctf_fs_ds_file_medops;
+extern struct bt_msg_iter_medium_ops ctf_fs_ds_file_medops;
 
 #endif /* CTF_FS_DS_FILE_H */
This page took 0.024735 seconds and 4 git commands to generate.