diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-05-02 05:20:28 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-02 08:11:38 +0200 |
commit | 889359b6f99a8ff043680ec5594dc369a9a372d9 (patch) | |
tree | 17eadf108b44ea2501f789583ba82fb940bda1fa /Userland/Services/AudioServer | |
parent | 7cf2839a262a38e00f110bee1102020c658ac476 (diff) | |
download | serenity-889359b6f99a8ff043680ec5594dc369a9a372d9.zip |
Userland: Make IPC handlers return void if they don't have any outputs
Diffstat (limited to 'Userland/Services/AudioServer')
-rw-r--r-- | Userland/Services/AudioServer/ClientConnection.cpp | 15 | ||||
-rw-r--r-- | Userland/Services/AudioServer/ClientConnection.h | 10 |
2 files changed, 10 insertions, 15 deletions
diff --git a/Userland/Services/AudioServer/ClientConnection.cpp b/Userland/Services/AudioServer/ClientConnection.cpp index 773e2c57e0..dd820a6d4e 100644 --- a/Userland/Services/AudioServer/ClientConnection.cpp +++ b/Userland/Services/AudioServer/ClientConnection.cpp @@ -59,9 +59,8 @@ void ClientConnection::did_change_main_mix_volume(Badge<Mixer>, int volume) post_message(Messages::AudioClient::MainMixVolumeChanged(volume)); } -Messages::AudioServer::GreetResponse ClientConnection::handle(const Messages::AudioServer::Greet&) +void ClientConnection::handle(const Messages::AudioServer::Greet&) { - return {}; } Messages::AudioServer::GetMainMixVolumeResponse ClientConnection::handle(const Messages::AudioServer::GetMainMixVolume&) @@ -69,10 +68,9 @@ Messages::AudioServer::GetMainMixVolumeResponse ClientConnection::handle(const M return m_mixer.main_volume(); } -Messages::AudioServer::SetMainMixVolumeResponse ClientConnection::handle(const Messages::AudioServer::SetMainMixVolume& message) +void ClientConnection::handle(const Messages::AudioServer::SetMainMixVolume& message) { m_mixer.set_main_volume(message.volume()); - return {}; } Messages::AudioServer::EnqueueBufferResponse ClientConnection::handle(const Messages::AudioServer::EnqueueBuffer& message) @@ -105,18 +103,16 @@ Messages::AudioServer::GetPlayedSamplesResponse ClientConnection::handle(const M return played; } -Messages::AudioServer::SetPausedResponse ClientConnection::handle(const Messages::AudioServer::SetPaused& message) +void ClientConnection::handle(const Messages::AudioServer::SetPaused& message) { if (m_queue) m_queue->set_paused(message.paused()); - return {}; } -Messages::AudioServer::ClearBufferResponse ClientConnection::handle(const Messages::AudioServer::ClearBuffer& message) +void ClientConnection::handle(const Messages::AudioServer::ClearBuffer& message) { if (m_queue) m_queue->clear(message.paused()); - return {}; } Messages::AudioServer::GetPlayingBufferResponse ClientConnection::handle(const Messages::AudioServer::GetPlayingBuffer&) @@ -132,9 +128,8 @@ Messages::AudioServer::GetMutedResponse ClientConnection::handle(const Messages: return m_mixer.is_muted(); } -Messages::AudioServer::SetMutedResponse ClientConnection::handle(const Messages::AudioServer::SetMuted& message) +void ClientConnection::handle(const Messages::AudioServer::SetMuted& message) { m_mixer.set_muted(message.muted()); - return {}; } } diff --git a/Userland/Services/AudioServer/ClientConnection.h b/Userland/Services/AudioServer/ClientConnection.h index 0327fbd677..f75c514e0c 100644 --- a/Userland/Services/AudioServer/ClientConnection.h +++ b/Userland/Services/AudioServer/ClientConnection.h @@ -36,17 +36,17 @@ public: static void for_each(Function<void(ClientConnection&)>); private: - virtual Messages::AudioServer::GreetResponse handle(const Messages::AudioServer::Greet&) override; + virtual void handle(const Messages::AudioServer::Greet&) override; virtual Messages::AudioServer::GetMainMixVolumeResponse handle(const Messages::AudioServer::GetMainMixVolume&) override; - virtual Messages::AudioServer::SetMainMixVolumeResponse handle(const Messages::AudioServer::SetMainMixVolume&) override; + virtual void handle(const Messages::AudioServer::SetMainMixVolume&) override; virtual Messages::AudioServer::EnqueueBufferResponse handle(const Messages::AudioServer::EnqueueBuffer&) override; virtual Messages::AudioServer::GetRemainingSamplesResponse handle(const Messages::AudioServer::GetRemainingSamples&) override; virtual Messages::AudioServer::GetPlayedSamplesResponse handle(const Messages::AudioServer::GetPlayedSamples&) override; - virtual Messages::AudioServer::SetPausedResponse handle(const Messages::AudioServer::SetPaused&) override; - virtual Messages::AudioServer::ClearBufferResponse handle(const Messages::AudioServer::ClearBuffer&) override; + virtual void handle(const Messages::AudioServer::SetPaused&) override; + virtual void handle(const Messages::AudioServer::ClearBuffer&) override; virtual Messages::AudioServer::GetPlayingBufferResponse handle(const Messages::AudioServer::GetPlayingBuffer&) override; virtual Messages::AudioServer::GetMutedResponse handle(const Messages::AudioServer::GetMuted&) override; - virtual Messages::AudioServer::SetMutedResponse handle(const Messages::AudioServer::SetMuted&) override; + virtual void handle(const Messages::AudioServer::SetMuted&) override; Mixer& m_mixer; RefPtr<BufferQueue> m_queue; |