src.ctf.fs: add and use medops to iterate on a ds_file_group using the index
[babeltrace.git] / src / plugins / ctf / common / msg-iter / msg-iter.h
index 5176a93b8910808c750ed4cb2a930f26d0285816..0ca95e9d9b7497f17b7c31c51253a2117dc593a8 100644 (file)
@@ -45,7 +45,8 @@
  */
 
 /**
- * Medium operations status codes.
+ * Medium operations status codes.  These use the same values as
+ * libbabeltrace2.
  */
 enum ctf_msg_iter_medium_status {
        /**
@@ -64,6 +65,9 @@ enum ctf_msg_iter_medium_status {
        /** General error. */
        CTF_MSG_ITER_MEDIUM_STATUS_ERROR = -1,
 
+       /** Memory error. */
+       CTF_MSG_ITER_MEDIUM_STATUS_MEMORY_ERROR = -12,
+
        /** Everything okay. */
        CTF_MSG_ITER_MEDIUM_STATUS_OK = 0,
 };
@@ -94,6 +98,9 @@ enum ctf_msg_iter_status {
        /** General error. */
        CTF_MSG_ITER_STATUS_ERROR = CTF_MSG_ITER_MEDIUM_STATUS_ERROR,
 
+       /** Memory error. */
+       CTF_MSG_ITER_STATUS_MEMORY_ERROR  = CTF_MSG_ITER_MEDIUM_STATUS_MEMORY_ERROR,
+
        /** Everything okay. */
        CTF_MSG_ITER_STATUS_OK = CTF_MSG_ITER_MEDIUM_STATUS_OK,
 };
@@ -186,6 +193,15 @@ struct ctf_msg_iter_medium_ops {
         */
        enum ctf_msg_iter_medium_status (* seek)(off_t offset, void *data);
 
+       /**
+        * Called when the message iterator wishes to inform the medium that it
+        * is about to start a new packet.
+        *
+        * After the iterator has called switch_packet, the following call to
+        * request_bytes must return the content at the start of the next
+        * packet.       */
+       enum ctf_msg_iter_medium_status (* switch_packet)(void *data);
+
        /**
         * Returns a stream instance (weak reference) for the given
         * stream class.
@@ -293,10 +309,6 @@ BT_HIDDEN
 enum ctf_msg_iter_status ctf_msg_iter_curr_packet_last_event_clock_snapshot(
                struct ctf_msg_iter *msg_it, uint64_t *last_event_cs);
 
-BT_HIDDEN
-void ctf_msg_iter_set_medops_data(struct ctf_msg_iter *msg_it,
-               void *medops_data);
-
 BT_HIDDEN
 enum ctf_msg_iter_status ctf_msg_iter_seek(
                struct ctf_msg_iter *msg_it, off_t offset);
This page took 0.024104 seconds and 4 git commands to generate.