projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.gitignore: add some more IDE / tools related file
[babeltrace.git]
/
src
/
plugins
/
ctf
/
lttng-live
/
viewer-connection.hpp
diff --git
a/src/plugins/ctf/lttng-live/viewer-connection.hpp
b/src/plugins/ctf/lttng-live/viewer-connection.hpp
index 59316371066eec9a5fc327d13419e598b42c710e..9610a15edcba85d1422bded2507e7f5dce673316 100644
(file)
--- a/
src/plugins/ctf/lttng-live/viewer-connection.hpp
+++ b/
src/plugins/ctf/lttng-live/viewer-connection.hpp
@@
-4,17
+4,20
@@
* Copyright 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*/
* Copyright 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*/
-#ifndef LTTNG_LIVE_VIEWER_CONNECTION_H
-#define LTTNG_LIVE_VIEWER_CONNECTION_H
+#ifndef BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_VIEWER_CONNECTION_HPP
+#define BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_VIEWER_CONNECTION_HPP
+
+#include <string>
#include <glib.h>
#include <stdint.h>
#include <glib.h>
#include <stdint.h>
-#include <stdio.h>
#include <babeltrace2/babeltrace.h>
#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
-#include "compat/socket.h"
+#include "compat/socket.hpp"
+#include "cpp-common/bt2/value.hpp"
+#include "cpp-common/bt2c/glib-up.hpp"
+#include "cpp-common/bt2c/logging.hpp"
#define LTTNG_DEFAULT_NETWORK_VIEWER_PORT 5344
#define LTTNG_DEFAULT_NETWORK_VIEWER_PORT 5344
@@
-46,29
+49,34
@@
enum lttng_live_get_one_metadata_status
LTTNG_LIVE_GET_ONE_METADATA_STATUS_CLOSED = -3,
};
LTTNG_LIVE_GET_ONE_METADATA_STATUS_CLOSED = -3,
};
-struct lttng_live_component;
-
struct live_viewer_connection
{
struct live_viewer_connection
{
- bt_logging_level log_level;
- bt_self_component *self_comp;
- bt_self_component_class *self_comp_class;
+ using UP = std::unique_ptr<live_viewer_connection>;
+
+ explicit live_viewer_connection(const bt2c::Logger& parentLogger) :
+ logger {parentLogger, "PLUGIN/SRC.CTF.LTTNG-LIVE/VIEWER"}
+ {
+ }
-
GString *url
;
+
~live_viewer_connection()
;
- GString *relay_hostname;
- GString *target_hostname;
- GString *session_name;
- GString *proto;
+ bt2c::Logger logger;
- BT_SOCKET control_sock;
- int port;
+ std::string url;
- int32_t major;
- int32_t minor;
+ bt2c::GStringUP relay_hostname;
+ bt2c::GStringUP target_hostname;
+ bt2c::GStringUP session_name;
+ bt2c::GStringUP proto;
- bool in_query;
- struct lttng_live_msg_iter *lttng_live_msg_iter;
+ BT_SOCKET control_sock {};
+ int port = 0;
+
+ int32_t major = 0;
+ int32_t minor = 0;
+
+ bool in_query = false;
+ struct lttng_live_msg_iter *lttng_live_msg_iter = nullptr;
};
struct packet_index_time
};
struct packet_index_time
@@
-93,19
+101,14
@@
struct packet_index
};
enum lttng_live_viewer_status
};
enum lttng_live_viewer_status
-live_viewer_connection_create(bt_self_component *self_comp,
- bt_self_component_class *self_comp_class, bt_logging_level log_level,
- const char *url, bool in_query,
+live_viewer_connection_create(const char *url, bool in_query,
struct lttng_live_msg_iter *lttng_live_msg_iter,
struct lttng_live_msg_iter *lttng_live_msg_iter,
- struct live_viewer_connection **viewer_connection);
-
-void live_viewer_connection_destroy(struct live_viewer_connection *conn);
+ const bt2c::Logger& parentLogger, live_viewer_connection::UP& viewer);
enum lttng_live_viewer_status
lttng_live_create_viewer_session(struct lttng_live_msg_iter *lttng_live_msg_iter);
enum lttng_live_viewer_status
lttng_live_create_viewer_session(struct lttng_live_msg_iter *lttng_live_msg_iter);
-bt_component_class_query_method_status
-live_viewer_connection_list_sessions(struct live_viewer_connection *viewer_connection,
- const bt_value **user_result);
+bt2::Value::Shared
+live_viewer_connection_list_sessions(struct live_viewer_connection *viewer_connection);
-#endif /*
LTTNG_LIVE_VIEWER_CONNECTION_H
*/
+#endif /*
BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_VIEWER_CONNECTION_HPP
*/
This page took
0.025064 seconds
and
4
git commands to generate.