Commit f415167e authored by Max Kellermann's avatar Max Kellermann

config/Templates: add attribute "deprecated"

parent 9477db23
...@@ -70,9 +70,9 @@ const ConfigTemplate config_param_templates[] = { ...@@ -70,9 +70,9 @@ const ConfigTemplate config_param_templates[] = {
{ "gapless_mp3_playback" }, { "gapless_mp3_playback" },
{ "auto_update" }, { "auto_update" },
{ "auto_update_depth" }, { "auto_update_depth" },
{ "despotify_user" }, { "despotify_user", false, true },
{ "despotify_password" }, { "despotify_password", false, true },
{ "despotify_high_bitrate" }, { "despotify_high_bitrate", false, true },
}; };
static constexpr unsigned n_config_param_templates = static constexpr unsigned n_config_param_templates =
......
...@@ -24,9 +24,14 @@ struct ConfigTemplate { ...@@ -24,9 +24,14 @@ struct ConfigTemplate {
const char *const name; const char *const name;
const bool repeatable; const bool repeatable;
// TODO: print warning when a deprecated option is used
const bool deprecated;
constexpr ConfigTemplate(const char *_name, constexpr ConfigTemplate(const char *_name,
bool _repeatable=false) bool _repeatable=false,
:name(_name), repeatable(_repeatable) {} bool _deprecated=false)
:name(_name), repeatable(_repeatable),
deprecated(_deprecated) {}
}; };
extern const ConfigTemplate config_param_templates[]; extern const ConfigTemplate config_param_templates[];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment