1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:17:36 +00:00

LibConfig: Add list methods for groups and keys

Use the methods exposed by ConfigServer to list groups and keys.
This commit is contained in:
faxe1008 2021-11-16 20:08:29 +01:00 committed by Andreas Kling
parent 116d89eec6
commit f10036b7c5
2 changed files with 23 additions and 0 deletions

View file

@ -30,6 +30,16 @@ void Client::monitor_domain(String const& domain)
async_monitor_domain(domain);
}
Vector<String> Client::list_keys(StringView domain, StringView group)
{
return list_config_keys(domain, group);
}
Vector<String> Client::list_groups(StringView domain)
{
return list_config_groups(domain);
}
String Client::read_string(StringView domain, StringView group, StringView key, StringView fallback)
{
return read_string_value(domain, group, key).value_or(fallback);