compat: rename socket.h to socket.hpp
[babeltrace.git] / src / plugins / ctf / lttng-live / viewer-connection.hpp
index 1ad239e447f6a8f7ee605c42b1a514a33eada4b0..9770092f0c6993e81f50a94603d867e1ac2b7279 100644 (file)
@@ -8,14 +8,11 @@
 #define LTTNG_LIVE_VIEWER_CONNECTION_H
 
 #include <glib.h>
-#include <stdbool.h>
 #include <stdint.h>
-#include <stdio.h>
 
 #include <babeltrace2/babeltrace.h>
 
-#include "common/macros.h"
-#include "compat/socket.h"
+#include "compat/socket.hpp"
 
 #define LTTNG_DEFAULT_NETWORK_VIEWER_PORT 5344
 
@@ -47,29 +44,27 @@ enum lttng_live_get_one_metadata_status
     LTTNG_LIVE_GET_ONE_METADATA_STATUS_CLOSED = -3,
 };
 
-struct lttng_live_component;
-
 struct live_viewer_connection
 {
-    bt_logging_level log_level;
-    bt_self_component *self_comp;
-    bt_self_component_class *self_comp_class;
+    bt_logging_level log_level = (bt_logging_level) 0;
+    bt_self_component *self_comp = nullptr;
+    bt_self_component_class *self_comp_class = nullptr;
 
-    GString *url;
+    GString *url = nullptr;
 
-    GString *relay_hostname;
-    GString *target_hostname;
-    GString *session_name;
-    GString *proto;
+    GString *relay_hostname = nullptr;
+    GString *target_hostname = nullptr;
+    GString *session_name = nullptr;
+    GString *proto = nullptr;
 
-    BT_SOCKET control_sock;
-    int port;
+    BT_SOCKET control_sock {};
+    int port = 0;
 
-    int32_t major;
-    int32_t minor;
+    int32_t major = 0;
+    int32_t minor = 0;
 
-    bool in_query;
-    struct lttng_live_msg_iter *lttng_live_msg_iter;
+    bool in_query = false;
+    struct lttng_live_msg_iter *lttng_live_msg_iter = nullptr;
 };
 
 struct packet_index_time
This page took 0.025031 seconds and 4 git commands to generate.