mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibConfig+LibCore+ConfigServer: Support u32 configuration entries
This commit is contained in:
committed by
Andreas Kling
parent
49f697ed56
commit
69beda23c3
@@ -50,6 +50,11 @@ i32 Client::read_i32(StringView domain, StringView group, StringView key, i32 fa
|
||||
return read_i32_value(domain, group, key).value_or(fallback);
|
||||
}
|
||||
|
||||
u32 Client::read_u32(StringView domain, StringView group, StringView key, u32 fallback)
|
||||
{
|
||||
return read_u32_value(domain, group, key).value_or(fallback);
|
||||
}
|
||||
|
||||
bool Client::read_bool(StringView domain, StringView group, StringView key, bool fallback)
|
||||
{
|
||||
return read_bool_value(domain, group, key).value_or(fallback);
|
||||
@@ -65,6 +70,11 @@ void Client::write_i32(StringView domain, StringView group, StringView key, i32
|
||||
write_i32_value(domain, group, key, value);
|
||||
}
|
||||
|
||||
void Client::write_u32(StringView domain, StringView group, StringView key, u32 value)
|
||||
{
|
||||
write_u32_value(domain, group, key, value);
|
||||
}
|
||||
|
||||
void Client::write_bool(StringView domain, StringView group, StringView key, bool value)
|
||||
{
|
||||
write_bool_value(domain, group, key, value);
|
||||
@@ -99,6 +109,13 @@ void Client::notify_changed_i32_value(DeprecatedString const& domain, Deprecated
|
||||
});
|
||||
}
|
||||
|
||||
void Client::notify_changed_u32_value(DeprecatedString const& domain, DeprecatedString const& group, DeprecatedString const& key, u32 value)
|
||||
{
|
||||
Listener::for_each([&](auto& listener) {
|
||||
listener.config_u32_did_change(domain, group, key, value);
|
||||
});
|
||||
}
|
||||
|
||||
void Client::notify_changed_bool_value(DeprecatedString const& domain, DeprecatedString const& group, DeprecatedString const& key, bool value)
|
||||
{
|
||||
Listener::for_each([&](auto& listener) {
|
||||
|
||||
Reference in New Issue
Block a user