clang-tidy: apply suggested fixes
[lttng-tools.git] / src / bin / lttng-sessiond / ctl-utils.hpp
1 /*
2 * Copyright (C) 2024 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8 #ifndef LTTNG_SESSIOND_CTL_UTILS_H
9 #define LTTNG_SESSIOND_CTL_UTILS_H
10
11 #include <common/make-unique-wrapper.hpp>
12
13 #include <lttng/lttng.h>
14
15 namespace lttng {
16 namespace ctl {
17 /*
18 * The 'session_descriptor' alias, based on unique_ptr, manages lttng_session_descriptor resources
19 * with automatic cleanup.
20 */
21 using session_descriptor = std::unique_ptr<
22 lttng_session_descriptor,
23 lttng::memory::create_deleter_class<lttng_session_descriptor,
24 lttng_session_descriptor_destroy>::deleter>;
25
26 /*
27 * The 'trigger' alias, based on unique_ptr, manages lttng_trigger resources
28 * with automatic cleanup.
29 */
30 using trigger = std::unique_ptr<
31 lttng_trigger,
32 lttng::memory::create_deleter_class<lttng_trigger, lttng_trigger_destroy>::deleter>;
33
34 } /* namespace ctl */
35 } /* namespace lttng */
36
37 #endif /* LTTNG_SESSIOND_CTL_UTILS_H */
This page took 0.030313 seconds and 4 git commands to generate.