1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 12:35:07 +00:00
serenity/Servers/AudioServer/ASClientConnection.h
Andreas Kling 8e684f0959 AudioServer: Port to the new generated IPC mechanism
Fork the IPC Connection classes into Server:: and Client::ConnectionNG.
The new IPC messages are serialized very snugly instead of using the
same generic data structure for all messages.

Remove ASAPI.h since we now generate all of it from AudioServer.ipc :^)
2019-08-03 19:49:19 +02:00

26 lines
987 B
C++

#pragma once
#include <AudioServer/AudioServerEndpoint.h>
#include <LibCore/CoreIPCServer.h>
class ABuffer;
class ASBufferQueue;
class ASMixer;
class ASClientConnection final : public IPC::Server::ConnectionNG<AudioServerEndpoint>
, public AudioServerEndpoint {
C_OBJECT(ASClientConnection)
public:
explicit ASClientConnection(CLocalSocket&, int client_id, ASMixer& mixer);
~ASClientConnection() override;
void did_finish_playing_buffer(Badge<ASMixer>, int buffer_id);
private:
virtual OwnPtr<AudioServer::GreetResponse> handle(const AudioServer::Greet&) override;
virtual OwnPtr<AudioServer::GetMainMixVolumeResponse> handle(const AudioServer::GetMainMixVolume&) override;
virtual OwnPtr<AudioServer::SetMainMixVolumeResponse> handle(const AudioServer::SetMainMixVolume&) override;
virtual OwnPtr<AudioServer::EnqueueBufferResponse> handle(const AudioServer::EnqueueBuffer&) override;
ASMixer& m_mixer;
RefPtr<ASBufferQueue> m_queue;
};