summaryrefslogtreecommitdiff
path: root/src/config/Templates.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-16 19:50:07 +0200
committerMax Kellermann <max@musicpd.org>2018-07-16 19:50:07 +0200
commit816603fd9a3cdc78ce27379a733160b7677ced69 (patch)
tree64ca5529be1090738819b93fe1cf4e7e7a044c6e /src/config/Templates.hxx
parentbf5f12a51f6ea275582f31835ebe894ee0454bc9 (diff)
config/Config*: rename files, drop "Config" prefix
Diffstat (limited to 'src/config/Templates.hxx')
-rw-r--r--src/config/Templates.hxx40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/config/Templates.hxx b/src/config/Templates.hxx
new file mode 100644
index 000000000..d87ba02be
--- /dev/null
+++ b/src/config/Templates.hxx
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2003-2017 The Music Player Daemon Project
+ * 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_TEMPLATES_HXX
+#define MPD_CONFIG_TEMPLATES_HXX
+
+struct ConfigTemplate {
+ const char *const name;
+ const bool repeatable;
+
+ // TODO: print warning when a deprecated option is used
+ const bool deprecated;
+
+ constexpr ConfigTemplate(const char *_name,
+ bool _repeatable=false,
+ bool _deprecated=false)
+ :name(_name), repeatable(_repeatable),
+ deprecated(_deprecated) {}
+};
+
+extern const ConfigTemplate config_param_templates[];
+extern const ConfigTemplate config_block_templates[];
+
+#endif