2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2018-02-05 17:13:00 +01:00
|
|
|
|
|
|
|
#ifndef MPD_SINGLE_MODE_HXX
|
|
|
|
#define MPD_SINGLE_MODE_HXX
|
|
|
|
|
2020-03-13 01:08:53 +01:00
|
|
|
#include <cstdint>
|
2018-02-05 17:13:00 +01:00
|
|
|
|
|
|
|
enum class SingleMode : uint8_t {
|
|
|
|
OFF,
|
|
|
|
ON,
|
|
|
|
ONE_SHOT,
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the string representation of a #SingleMode.
|
|
|
|
*/
|
2021-12-03 16:09:16 +01:00
|
|
|
[[gnu::const]]
|
2018-02-05 17:13:00 +01:00
|
|
|
const char *
|
|
|
|
SingleToString(SingleMode mode) noexcept;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Parse a string to a #SingleMode. Throws std::invalid_argument on error.
|
|
|
|
*/
|
|
|
|
SingleMode
|
|
|
|
SingleFromString(const char *s);
|
|
|
|
|
|
|
|
#endif
|