X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Flttng-live%2Flttng-live.hpp;h=9dbc432abf3f527abc3ef64017b474aab2ddbc3d;hb=HEAD;hp=cbdf27d80d05a7016a4c0db7804a53b317ec2f6c;hpb=7aed4059284fbb3a415604013afc0db6704bbfe0;p=babeltrace.git diff --git a/src/plugins/ctf/lttng-live/lttng-live.hpp b/src/plugins/ctf/lttng-live/lttng-live.hpp index cbdf27d8..be2689ce 100644 --- a/src/plugins/ctf/lttng-live/lttng-live.hpp +++ b/src/plugins/ctf/lttng-live/lttng-live.hpp @@ -8,8 +8,8 @@ * BabelTrace - LTTng-live client Component */ -#ifndef BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_H -#define BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_H +#ifndef BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_LTTNG_LIVE_HPP +#define BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_LTTNG_LIVE_HPP #include #include @@ -23,6 +23,31 @@ #include "../common/src/msg-iter/msg-iter.hpp" #include "viewer-connection.hpp" +/* + * bt_common_lttng_live_url_parts is defined in common code, and is also used + * by C code, so it can't be C++-ified yet. Use this separate deleter object + * in the mean time. + */ +struct bt_common_lttng_live_url_parts_deleter +{ + explicit bt_common_lttng_live_url_parts_deleter(bt_common_lttng_live_url_parts& obj) noexcept : + _mObj {&obj} + { + } + + bt_common_lttng_live_url_parts_deleter(const bt_common_lttng_live_url_parts_deleter&) = delete; + bt_common_lttng_live_url_parts& + operator=(const bt_common_lttng_live_url_parts_deleter&) = delete; + + ~bt_common_lttng_live_url_parts_deleter() + { + bt_common_destroy_lttng_live_url_parts(_mObj); + } + +private: + bt_common_lttng_live_url_parts *_mObj; +}; + enum lttng_live_stream_state { /* This stream won't have data until some known time in the future. */ @@ -426,4 +451,4 @@ bool lttng_live_graph_is_canceled(struct lttng_live_msg_iter *msg_iter); void lttng_live_stream_iterator_set_state(struct lttng_live_stream_iterator *stream_iter, enum lttng_live_stream_state new_state); -#endif /* BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_H */ +#endif /* BABELTRACE_PLUGINS_CTF_LTTNG_LIVE_LTTNG_LIVE_HPP */