Option.hxx 2.46 KB
Newer Older
1
/*
Max Kellermann's avatar
Max Kellermann committed
2
 * Copyright 2003-2021 The Music Player Daemon Project
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 * http://www.musicpd.org
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef MPD_CONFIG_OPTION_HXX
#define MPD_CONFIG_OPTION_HXX

23
#include "util/Compiler.h"
24

25
#if defined(_WIN32) && CLANG_OR_GCC_VERSION(4,7)
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
/* "INPUT" is declared by winuser.h */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif

enum class ConfigOption {
	MUSIC_DIR,
	PLAYLIST_DIR,
	FOLLOW_INSIDE_SYMLINKS,
	FOLLOW_OUTSIDE_SYMLINKS,
	DB_FILE,
	STICKER_FILE,
	LOG_FILE,
	PID_FILE,
	STATE_FILE,
	STATE_FILE_INTERVAL,
	RESTORE_PAUSED,
	USER,
	GROUP,
	BIND_TO_ADDRESS,
	PORT,
	LOG_LEVEL,
	ZEROCONF_NAME,
	ZEROCONF_ENABLED,
	PASSWORD,
51
	HOST_PERMISSIONS,
52
	LOCAL_PERMISSIONS,
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
	DEFAULT_PERMS,
	AUDIO_OUTPUT_FORMAT,
	MIXER_TYPE,
	REPLAYGAIN,
	REPLAYGAIN_PREAMP,
	REPLAYGAIN_MISSING_PREAMP,
	REPLAYGAIN_LIMIT,
	VOLUME_NORMALIZATION,
	SAMPLERATE_CONVERTER,
	AUDIO_BUFFER_SIZE,
	BUFFER_BEFORE_PLAY,
	HTTP_PROXY_HOST,
	HTTP_PROXY_PORT,
	HTTP_PROXY_USER,
	HTTP_PROXY_PASSWORD,
	CONN_TIMEOUT,
	MAX_CONN,
	MAX_PLAYLIST_LENGTH,
	MAX_COMMAND_LIST_SIZE,
	MAX_OUTPUT_BUFFER_SIZE,
	FS_CHARSET,
	ID3V1_ENCODING,
	METADATA_TO_USE,
	SAVE_ABSOLUTE_PATHS,
	GAPLESS_MP3_PLAYBACK,
	AUTO_UPDATE,
	AUTO_UPDATE_DEPTH,
	DESPOTIFY_USER,
	DESPOTIFY_PASSWORD,
	DESPOTIFY_HIGH_BITRATE,
83 84 85 86 87 88 89
	MAX
};

enum class ConfigBlockOption {
	AUDIO_OUTPUT,
	DECODER,
	INPUT,
90
	INPUT_CACHE,
91
	PLAYLIST_PLUGIN,
92
	RESAMPLER,
93 94 95 96
	AUDIO_FILTER,
	DATABASE,
	NEIGHBORS,
	MAX
97 98
};

99
#if defined(_WIN32) && CLANG_OR_GCC_VERSION(4,7)
100 101 102
#pragma GCC diagnostic pop
#endif

103
/**
104
 * @return #ConfigOption::MAX if not found
105
 */
106
[[gnu::pure]]
107
enum ConfigOption
108
ParseConfigOptionName(const char *name) noexcept;
109

110 111 112
/**
 * @return #ConfigOption::MAX if not found
 */
113
[[gnu::pure]]
114
enum ConfigBlockOption
115
ParseConfigBlockOptionName(const char *name) noexcept;
116

117
#endif