#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.
struct lttng_live_component;
-struct bt_live_viewer_connection {
- struct bt_object obj;
+struct live_viewer_connection {
+ bt_object obj;
GString *url;
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 {
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 */