2 * Copyright (C) 2024 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: GPL-2.0-only
8 #ifndef LTTNG_SESSIOND_CTL_UTILS_H
9 #define LTTNG_SESSIOND_CTL_UTILS_H
11 #include <common/make-unique-wrapper.hpp>
13 #include <lttng/lttng.h>
18 * The 'session_descriptor' alias, based on unique_ptr, manages lttng_session_descriptor resources
19 * with automatic cleanup.
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>;
27 * The 'trigger' alias, based on unique_ptr, manages lttng_trigger resources
28 * with automatic cleanup.
30 using trigger = std::unique_ptr<
32 lttng::memory::create_deleter_class<lttng_trigger, lttng_trigger_destroy>::deleter>;
35 } /* namespace lttng */
37 #endif /* LTTNG_SESSIOND_CTL_UTILS_H */