ladybird/Libraries/LibIPC/IEndpoint.h
Andreas Kling 3519b6c201 IPCCompiler: More work towards AudioServer bringup
- Add IEndpoint::handle(IMessage), a big switch table on message type.
  handle() will return a response message for synchronous messages,
  and return nullptr otherwise.
- Use i32 instead of int for everything
- Make IMessage::encode() const
- Make IEndpoint::decode_message() static, this allows template code to
  decode messages without an endpoint instance on hand.
2019-08-03 19:24:08 +02:00

24 lines
327 B
C++

#pragma once
#include <AK/AKString.h>
#include <AK/OwnPtr.h>
namespace AK {
class BufferStream;
}
class IMessage;
class IEndpoint {
public:
virtual ~IEndpoint();
virtual String name() const = 0;
virtual OwnPtr<IMessage> handle(const IMessage&) = 0;
protected:
IEndpoint();
private:
String m_name;
};