src.ctf.lttng-live: add lttng_live_stream_iterator destructor
[babeltrace.git] / src / plugins / ctf / lttng-live / lttng-live.hpp
index 8fa926b70d974e4601a5c3a0fe65fdcdf267f58c..2ff02ee638556457ce1de524b0d746f495ea64fa 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"
@@ -72,6 +73,8 @@ struct lttng_live_stream_iterator
     {
     }
 
+    ~lttng_live_stream_iterator();
+
     bt2c::Logger logger;
 
     bt2::Stream::Shared stream;
@@ -118,21 +121,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.023923 seconds and 4 git commands to generate.