tap-driver.sh: flush stdout after each test result
[babeltrace.git] / plugins / ctf / lttng-live / viewer-connection.h
index 822c17ed3b874820aa6dc29a06fa3736e3e9c3e0..752d1a917b4cfa34ea5cdac707e4fabfd80a3671 100644 (file)
 #include <stdio.h>
 #include <glib.h>
 
-#include <babeltrace/babeltrace-internal.h>
+#include <babeltrace2/babeltrace-internal.h>
+#include <babeltrace2/compat/socket-internal.h>
 
 //TODO: this should not be used by plugins. Should copy code into plugin
 //instead.
-#include <babeltrace/object-internal.h>
+#include <babeltrace2/object-internal.h>
 
 #define LTTNG_DEFAULT_NETWORK_VIEWER_PORT      5344
 
 #define LTTNG_LIVE_MAJOR                       2
 #define LTTNG_LIVE_MINOR                       4
 
-struct bt_live_viewer_connection {
-       struct bt_object obj;
+struct lttng_live_component;
 
-       FILE *error_fp;
+struct live_viewer_connection {
+       bt_object obj;
 
        GString *url;
 
@@ -48,16 +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;
+
+       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 {
@@ -74,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, FILE *error_fp);
+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.023813 seconds and 4 git commands to generate.