2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2008-12-27 19:03:33 +01:00
|
|
|
|
2013-01-03 17:31:38 +01:00
|
|
|
#ifndef MPD_COMMAND_LINE_HXX
|
|
|
|
#define MPD_COMMAND_LINE_HXX
|
2008-12-27 19:03:33 +01:00
|
|
|
|
2023-03-06 12:57:42 +01:00
|
|
|
#include "config.h" // for ENABLE_DAEMON
|
|
|
|
|
2018-08-19 22:47:05 +02:00
|
|
|
struct ConfigData;
|
|
|
|
|
2021-11-05 08:56:28 +01:00
|
|
|
struct CommandLineOptions {
|
2018-01-17 10:57:06 +01:00
|
|
|
bool kill = false;
|
2023-03-06 12:57:42 +01:00
|
|
|
|
|
|
|
#ifdef ENABLE_DAEMON
|
2018-01-17 10:57:06 +01:00
|
|
|
bool daemon = true;
|
2023-03-06 12:57:42 +01:00
|
|
|
#else
|
|
|
|
static constexpr bool daemon = false;
|
|
|
|
#endif
|
2021-11-05 08:48:19 +01:00
|
|
|
|
|
|
|
#ifdef __linux__
|
|
|
|
bool systemd = false;
|
|
|
|
#endif
|
|
|
|
|
2018-01-17 10:57:06 +01:00
|
|
|
bool log_stderr = false;
|
|
|
|
bool verbose = false;
|
2009-07-15 18:22:49 +02:00
|
|
|
};
|
2008-12-27 19:03:33 +01:00
|
|
|
|
2016-11-02 10:30:46 +01:00
|
|
|
void
|
2021-11-05 08:56:28 +01:00
|
|
|
ParseCommandLine(int argc, char **argv, CommandLineOptions &options,
|
2018-08-19 22:47:05 +02:00
|
|
|
ConfigData &config);
|
2008-12-27 19:03:33 +01:00
|
|
|
|
|
|
|
#endif
|