Adapt `src.ctf.lttng-live` to current API
[babeltrace.git] / plugins / ctf / lttng-live / viewer-connection.h
index db9554d749d612f991a2215227ea6ebdf8694185..85fd745d9ddad21cf84d70e0006bd3f7dd768b34 100644 (file)
@@ -27,6 +27,7 @@
 #include <glib.h>
 
 #include <babeltrace/babeltrace-internal.h>
+#include <babeltrace/compat/socket-internal.h>
 
 //TODO: this should not be used by plugins. Should copy code into plugin
 //instead.
@@ -39,8 +40,8 @@
 
 struct lttng_live_component;
 
-struct bt_live_viewer_connection {
-       struct bt_object obj;
+struct live_viewer_connection {
+       bt_object obj;
 
        GString *url;
 
@@ -48,18 +49,19 @@ struct bt_live_viewer_connection {
        GString *target_hostname;
        GString *session_name;
 
-       int control_sock;
+       BT_SOCKET control_sock;
        int port;
 
        int32_t major;
        int32_t minor;
 
-       struct lttng_live_component *lttng_live;
+       bool in_query;
+       struct lttng_live_msg_iter *lttng_live_msg_iter;
 };
 
 struct packet_index_time {
-       int64_t timestamp_begin;
-       int64_t timestamp_end;
+       uint64_t timestamp_begin;
+       uint64_t timestamp_end;
 };
 
 struct packet_index {
@@ -76,11 +78,15 @@ struct packet_index {
        uint64_t packet_seq_num;        /* packet sequence number */
 };
 
-struct bt_live_viewer_connection *
-       bt_live_viewer_connection_create(const char *url, struct lttng_live_component *lttng_live);
+struct live_viewer_connection * live_viewer_connection_create(
+               const char *url, bool in_query,
+               struct lttng_live_msg_iter *lttng_live_msg_iter);
 
-void bt_live_viewer_connection_destroy(struct bt_live_viewer_connection *conn);
+void live_viewer_connection_destroy(
+               struct live_viewer_connection *conn);
 
-struct bt_value *bt_live_viewer_connection_list_sessions(struct bt_live_viewer_connection *viewer_connection);
+bt_query_status live_viewer_connection_list_sessions(
+               struct live_viewer_connection *viewer_connection,
+               const bt_value **user_result);
 
 #endif /* LTTNG_LIVE_VIEWER_CONNECTION_H */
This page took 0.025005 seconds and 4 git commands to generate.