| 1 | /* |
| 2 | * SPDX-FileCopyrightText: 2026 Jérémie Galarneau <[email protected]> |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0-only |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef LTTNG_SESSIOND_LTTNG_CHANNEL_FROM_CONFIG_HPP |
| 9 | #define LTTNG_SESSIOND_LTTNG_CHANNEL_FROM_CONFIG_HPPcxx . . $ `src/bin/lttng-sessiond/lttng-channel-from-config.hpp:9:9`! |
| 10 | |
| 11 | #include <common/ctl/memory.hpp>cxx . . $ `<file>/src/common/ctl/memory.hpp`/ |
| 12 | |
| 13 | namespace lttngcxx . . $ lttng/ { |
| 14 | namespace sessiondcxx . . $ lttng/sessiond/ { |
| 15 | namespace configcxx . . $ lttng/sessiond/config/ { |
| 16 | class recording_channel_configurationcxx . . $ lttng/sessiond/config/recording_channel_configuration#; |
| 17 | } /* namespace config */ |
| 18 | |
| 19 | /* |
| 20 | * Build a legacy lttng_channel from a recording_channel_configuration. |
| 21 | * |
| 22 | * This conversion is a transitional bridge: the legacy ltt_kernel_channel |
| 23 | * struct still carries a lttng_channel pointer that downstream code reads |
| 24 | * from (channel listing, consumer channel send, etc.). Once those readers |
| 25 | * are migrated to read from the configuration objects directly, this |
| 26 | * conversion will be eliminated. |
| 27 | * |
| 28 | * Populates all fields from the configuration, including extended |
| 29 | * attributes. Runtime statistics (discarded_events, lost_packets) |
| 30 | * are not set. |
| 31 | */ |
| 32 | lttngcxx . . $ lttng/::ctlcxx . . $ lttng/ctl/::lttng_channel_uptrcxx . . $ lttng/ctl/lttng_channel_uptr# |
| 33 | make_lttng_channelcxx . . $ lttng/sessiond/make_lttng_channel(1de1b1e34bf72ab6).(const configcxx . . $ lttng/sessiond/config/::recording_channel_configurationcxx . . $ lttng/sessiond/config/recording_channel_configuration#& channel_config); |
| 34 | |
| 35 | } /* namespace sessiond */ |
| 36 | } /* namespace lttng */ |
| 37 | |
| 38 | #endif /* LTTNG_SESSIOND_LTTNG_CHANNEL_FROM_CONFIG_HPP */ |