Commit fcb7233b authored by Max Kellermann's avatar Max Kellermann

ConfigData: remove obsolete functions

parent fe53a376
......@@ -131,53 +131,3 @@ config_param::GetBlockValue(const char *name, bool default_value) const
return bp->GetBoolValue();
}
const char *
config_get_block_string(const struct config_param *param, const char *name,
const char *default_value)
{
if (param == nullptr)
return default_value;
return param->GetBlockValue(name, default_value);
}
char *
config_dup_block_string(const struct config_param *param, const char *name,
const char *default_value)
{
return g_strdup(config_get_block_string(param, name, default_value));
}
char *
config_dup_block_path(const struct config_param *param, const char *name,
GError **error_r)
{
assert(error_r != NULL);
assert(*error_r == NULL);
if (param == nullptr)
return nullptr;
return param->DupBlockPath(name, error_r);
}
unsigned
config_get_block_unsigned(const struct config_param *param, const char *name,
unsigned default_value)
{
if (param == nullptr)
return default_value;
return param->GetBlockValue(name, default_value);
}
bool
config_get_block_bool(const struct config_param *param, const char *name,
bool default_value)
{
if (param == nullptr)
return default_value;
return param->GetBlockValue(name, default_value);
}
......@@ -124,33 +124,4 @@ struct ConfigData {
std::array<config_param *, std::size_t(CONF_MAX)> params;
};
gcc_pure
const char *
config_get_block_string(const struct config_param *param, const char *name,
const char *default_value);
gcc_malloc
char *
config_dup_block_string(const struct config_param *param, const char *name,
const char *default_value);
/**
* Same as config_dup_path(), but looks up the setting in the
* specified block.
*/
gcc_malloc
char *
config_dup_block_path(const struct config_param *param, const char *name,
GError **error_r);
gcc_pure
unsigned
config_get_block_unsigned(const struct config_param *param, const char *name,
unsigned default_value);
gcc_pure
bool
config_get_block_bool(const struct config_param *param, const char *name,
bool default_value);
#endif
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