mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibCore+LibConfig+ConfigServer: Add Config::{add,remove}_group()
Plumbs synchronous calls for adding and removing group entries to config files. This is useful for services like SystemServer which default to group names for executable paths, and for removing all keys at once.
This commit is contained in:
parent
6f394d9ee2
commit
c34f2e75e9
10 changed files with 97 additions and 0 deletions
|
@ -75,6 +75,16 @@ void Client::remove_key(StringView domain, StringView group, StringView key)
|
|||
remove_key_entry(domain, group, key);
|
||||
}
|
||||
|
||||
void Client::remove_group(StringView domain, StringView group)
|
||||
{
|
||||
remove_group_entry(domain, group);
|
||||
}
|
||||
|
||||
void Client::add_group(StringView domain, StringView group)
|
||||
{
|
||||
add_group_entry(domain, group);
|
||||
}
|
||||
|
||||
void Client::notify_changed_string_value(String const& domain, String const& group, String const& key, String const& value)
|
||||
{
|
||||
Listener::for_each([&](auto& listener) {
|
||||
|
@ -103,4 +113,18 @@ void Client::notify_removed_key(String const& domain, String const& group, Strin
|
|||
});
|
||||
}
|
||||
|
||||
void Client::notify_removed_group(String const& domain, String const& group)
|
||||
{
|
||||
Listener::for_each([&](auto& listener) {
|
||||
listener.config_group_was_removed(domain, group);
|
||||
});
|
||||
}
|
||||
|
||||
void Client::notify_added_group(String const& domain, String const& group)
|
||||
{
|
||||
Listener::for_each([&](auto& listener) {
|
||||
listener.config_group_was_added(domain, group);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue