mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +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:
parent
116d89eec6
commit
f10036b7c5
Notes:
sideshowbarker
2024-07-18 01:01:28 +09:00
Author: https://github.com/faxe1008
Commit: f10036b7c5
Pull-request: https://github.com/SerenityOS/serenity/pull/10937
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/cqundefine ✅
2 changed files with 23 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue