mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
![kleines Filmröllchen](/assets/img/avatar_default.png)
The immutability of the string is not relevant here, since the string we're given was allocated in the IPC serialization layer and will be destroyed shortly afterwards. Additionally, noone relies on DeprecatedString-specific functionality. This will make it easier to convert the IPC layer itself to String later on.
61 lines
1.1 KiB
C++
61 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <AK/DeprecatedString.h>
|
|
#include <AK/Function.h>
|
|
#include <AK/HashTable.h>
|
|
#include <LibConfig/Listener.h>
|
|
|
|
namespace Config {
|
|
|
|
static HashTable<Listener*> s_listeners;
|
|
|
|
Listener::Listener()
|
|
{
|
|
s_listeners.set(this);
|
|
}
|
|
|
|
Listener::~Listener()
|
|
{
|
|
s_listeners.remove(this);
|
|
}
|
|
|
|
void Listener::for_each(Function<void(Listener&)> callback)
|
|
{
|
|
for (auto* listener : s_listeners)
|
|
callback(*listener);
|
|
}
|
|
|
|
void Listener::config_string_did_change(StringView, StringView, StringView, StringView)
|
|
{
|
|
}
|
|
|
|
void Listener::config_i32_did_change(StringView, StringView, StringView, i32)
|
|
{
|
|
}
|
|
|
|
void Listener::config_u32_did_change(StringView, StringView, StringView, u32)
|
|
{
|
|
}
|
|
|
|
void Listener::config_bool_did_change(StringView, StringView, StringView, bool)
|
|
{
|
|
}
|
|
|
|
void Listener::config_key_was_removed(StringView, StringView, StringView)
|
|
{
|
|
}
|
|
|
|
void Listener::config_group_was_removed(StringView, StringView)
|
|
{
|
|
}
|
|
|
|
void Listener::config_group_was_added(StringView, StringView)
|
|
{
|
|
}
|
|
|
|
}
|