mpd/src/CommandLine.hxx

33 lines
563 B
C++
Raw Normal View History

// 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
#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;
#ifdef ENABLE_DAEMON
2018-01-17 10:57:06 +01:00
bool daemon = true;
#else
static constexpr bool daemon = false;
#endif
#ifdef __linux__
bool systemd = false;
#endif
2018-01-17 10:57:06 +01:00
bool log_stderr = false;
bool verbose = false;
};
2008-12-27 19:03:33 +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