LibIPC+AudioServer: Allow unsolicited server-to-client IPC messages

Client-side connection objects must now provide both client and server
endpoint types. When a message is received from the server side, we try
to decode it using both endpoint types and then send it to the right
place for handling.

This now makes it possible for AudioServer to send unsolicited messages
to its clients. This opens up a ton of possibilities :^)
This commit is contained in:
Andreas Kling 2019-11-23 16:43:21 +01:00
commit 630d5b3ffd
Notes: sideshowbarker 2024-07-19 11:06:36 +09:00
13 changed files with 95 additions and 42 deletions

View file

@ -3,7 +3,7 @@
#include <SharedBuffer.h>
AClientConnection::AClientConnection()
: ConnectionNG("/tmp/asportal")
: ConnectionNG(*this, "/tmp/asportal")
{
}
@ -76,3 +76,7 @@ int AClientConnection::get_playing_buffer()
{
return send_sync<AudioServer::GetPlayingBuffer>()->buffer_id();
}
void AClientConnection::handle(const AudioClient::FinishedPlayingBuffer&)
{
}