ConfigData: remove obsolete functions

This commit is contained in:
Max Kellermann 2013-08-04 14:01:01 +02:00
parent fe53a376a3
commit fcb7233b25
2 changed files with 0 additions and 79 deletions

View File

@ -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);
}

View File

@ -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