src.ctf.lttng-live: make lttng_live_stream_iterator::current_msg a bt2::Message:...
[babeltrace.git] / src / plugins / ctf / lttng-live / lttng-live.hpp
index 2ed6448102d01f172470f15c90b86d509f3c3722..56c86d39a679cadbe995e585800588c5ea1efa0e 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <babeltrace2/babeltrace.h>
 
+#include "cpp-common/bt2/message.hpp"
 #include "cpp-common/vendor/fmt/format.h" /* IWYU pragma: keep */
 
 #include "../common/src/metadata/tsdl/decoder.hpp"
@@ -83,7 +84,7 @@ struct lttng_live_stream_iterator
      * Since only a single iterator per viewer connection, we have
      * only a single message iterator per stream.
      */
-    struct ctf_msg_iter *msg_iter = nullptr;
+    ctf_msg_iter_up msg_iter;
 
     uint64_t viewer_stream_id = 0;
 
@@ -118,21 +119,15 @@ struct lttng_live_stream_iterator
 
     enum lttng_live_stream_state state = LTTNG_LIVE_STREAM_QUIESCENT;
 
-    /*
-     * The current message produced by this live stream iterator. Owned by
-     * this.
-     */
-    const bt_message *current_msg = nullptr;
+    /* The current message produced by this live stream iterator. */
+    bt2::ConstMessage::Shared current_msg;
 
     /* Timestamp in nanoseconds of the current message (current_msg). */
     int64_t current_msg_ts_ns = 0;
 
-    /* Owned by this. */
-    uint8_t *buf = nullptr;
-    size_t buflen = 0;
+    std::vector<uint8_t> buf;
 
-    /* Owned by this. */
-    GString *name = nullptr;
+    std::string name;
 
     bool has_stream_hung_up = false;
 };
This page took 0.028606 seconds and 4 git commands to generate.