summaryrefslogtreecommitdiff
path: root/Userland/Services/ConfigServer/ConfigClient.ipc
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-26 19:05:50 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-26 23:41:38 +0200
commitedf784340999b6e8f44241e04e6d6f8afc27be29 (patch)
treee2008782c0bbc1e7bbfff08202e717febbb2ac13 /Userland/Services/ConfigServer/ConfigClient.ipc
parent9509f2ff87e10f87f4710749562e35be016a8a21 (diff)
downloadserenity-edf784340999b6e8f44241e04e6d6f8afc27be29.zip
ConfigServer+LibConfig: Add way for clients to listen for config changes
This patch adds a Config::Listener abstract class that anyone can inherit from and receive notifications when configuration values change. We don't yet monitor file system changes, so these only work for changes made by ConfigServer itself. In order to receive these notifications, clients must monitor the domain by calling monitor_domain(). Only pledged domains can be monitored. Note that the client initiating the change does not get notified.
Diffstat (limited to 'Userland/Services/ConfigServer/ConfigClient.ipc')
-rw-r--r--Userland/Services/ConfigServer/ConfigClient.ipc3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Services/ConfigServer/ConfigClient.ipc b/Userland/Services/ConfigServer/ConfigClient.ipc
index bd0318b3ad..d8436b671d 100644
--- a/Userland/Services/ConfigServer/ConfigClient.ipc
+++ b/Userland/Services/ConfigServer/ConfigClient.ipc
@@ -1,3 +1,6 @@
endpoint ConfigClient
{
+ notify_changed_string_value(String domain, String group, String key, String value) =|
+ notify_changed_i32_value(String domain, String group, String key, i32 value) =|
+ notify_changed_bool_value(String domain, String group, String key, bool value) =|
}