#pragma once #include #include class ABuffer; class ASBufferQueue; class ASMixer; class ASClientConnection final : public IPC::Server::ConnectionNG , public AudioServerEndpoint { C_OBJECT(ASClientConnection) public: explicit ASClientConnection(CLocalSocket&, int client_id, ASMixer& mixer); ~ASClientConnection() override; void did_finish_playing_buffer(Badge, int buffer_id); virtual void die() override; private: virtual OwnPtr handle(const AudioServer::Greet&) override; virtual OwnPtr handle(const AudioServer::GetMainMixVolume&) override; virtual OwnPtr handle(const AudioServer::SetMainMixVolume&) override; virtual OwnPtr handle(const AudioServer::EnqueueBuffer&) override; virtual OwnPtr handle(const AudioServer::GetRemainingSamples&) override; virtual OwnPtr handle(const AudioServer::GetPlayedSamples&) override; virtual OwnPtr handle(const AudioServer::SetPaused&) override; virtual OwnPtr handle(const AudioServer::ClearBuffer&) override; virtual OwnPtr handle(const AudioServer::GetPlayingBuffer&) override; virtual OwnPtr handle(const AudioServer::GetMuted&) override; virtual OwnPtr handle(const AudioServer::SetMuted&) override; ASMixer& m_mixer; RefPtr m_queue; };