1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:57:45 +00:00

ConfigServer+LibConfig: Add pledge_domains() API

This API lets applications specify which configuration domains they
will be accessing throughout their lifetime. It works similarly in
spirit to the kernel's pledge().

You cannot pledge_domains() more than once, and once you have used it,
it's no longer possible to access any other configuration domain.

This is obviously just a first cut of this mechanism, and we may need
to tweak it further as we go.
This commit is contained in:
Andreas Kling 2021-08-25 20:02:10 +02:00
parent 870ecd5190
commit eeddaa988a
5 changed files with 64 additions and 0 deletions

View file

@ -1,5 +1,7 @@
endpoint ConfigServer
{
pledge_domains(Vector<String> domains) =|
read_string_value(String domain, String group, String key) => (Optional<String> value)
read_i32_value(String domain, String group, String key) => (Optional<i32> value)
read_bool_value(String domain, String group, String key) => (Optional<bool> value)