MPD: config/ConfigTemplates.hxx Source File

MPD 0.20.15

ConfigTemplates.hxx
Go to the documentation of this file.
1 /*
2 * Copyright 2003-2017 The Music Player Daemon Project
3 * http://www.musicpd.org
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef MPD_CONFIG_TEMPLATES_HXX
21 #define MPD_CONFIG_TEMPLATES_HXX
22
23 struct ConfigTemplate {
24 const char *const name;
25 const bool repeatable;
26
27 // TODO: print warning when a deprecated option is used
28 const bool deprecated;
29
30 constexpr ConfigTemplate(const char *_name,
31 bool _repeatable=false,
32 bool _deprecated=false)
33 :name(_name), repeatable(_repeatable),
34 deprecated(_deprecated) {}
35 };
36
37 extern const ConfigTemplate config_param_templates[];
38 extern const ConfigTemplate config_block_templates[];
39
40 #endif
ConfigTemplate
Definition: ConfigTemplates.hxx:23
ConfigTemplate::ConfigTemplate
constexpr ConfigTemplate(const char *_name, bool _repeatable=false, bool _deprecated=false)
Definition: ConfigTemplates.hxx:30
ConfigTemplate::repeatable
const bool repeatable
Definition: ConfigTemplates.hxx:25
config_block_templates
const ConfigTemplate config_block_templates[]
config_param_templates
const ConfigTemplate config_param_templates[]
ConfigTemplate::name
const char *const name
Definition: ConfigTemplates.hxx:24
ConfigTemplate::deprecated
const bool deprecated
Definition: ConfigTemplates.hxx:28