struct lttng_live_trace
{
+ using UP = std::unique_ptr<lttng_live_trace>;
+
explicit lttng_live_trace(const bt2c::Logger& parentLogger) :
logger {parentLogger, "PLUGIN/SRC.CTF.LTTNG-LIVE/TRACE"}
{
struct lttng_live_session
{
+ using UP = std::unique_ptr<lttng_live_session>;
+
explicit lttng_live_session(const bt2c::Logger& parentLogger) :
logger {parentLogger, "PLUGIN/SRC.CTF.LTTNG-LIVE/SESSION"}
{
}
+ ~lttng_live_session();
+
bt2c::Logger logger;
bt_self_component *self_comp = nullptr;
/* Weak reference. */
struct lttng_live_msg_iter *lttng_live_msg_iter = nullptr;
- /* Owned by this. */
- GString *hostname = nullptr;
+ std::string hostname;
- /* Owned by this. */
- GString *session_name = nullptr;
+ std::string session_name;
uint64_t id = 0;
- /* Array of pointers to struct lttng_live_trace. */
- GPtrArray *traces = nullptr;
+ std::vector<lttng_live_trace::UP> traces;
bool attached = false;
bool new_streams_needed = false;
/* Weak reference. */
bt_self_message_iterator *self_msg_iter = nullptr;
- /* Owned by this. */
- struct live_viewer_connection *viewer_connection = nullptr;
+ live_viewer_connection::UP viewer_connection;
- /* Array of pointers to struct lttng_live_session. */
- GPtrArray *sessions = nullptr;
+ std::vector<lttng_live_session::UP> sessions;
/* Number of live stream iterator this message iterator has.*/
uint64_t active_stream_iter = 0;