1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:27:35 +00:00

Userland: Update IPC calls to use proxies

This updates all existing code to use the auto-generated client
methods instead of post_message/send_sync.
This commit is contained in:
Gunnar Beutner 2021-05-03 13:33:59 +02:00 committed by Andreas Kling
parent 78803ce384
commit 5bb79ea0a7
63 changed files with 303 additions and 316 deletions

View file

@ -17,13 +17,16 @@ NonnullRefPtr<T> new_client_connection(Args&&... args)
}
template<typename ClientEndpoint, typename ServerEndpoint>
class ClientConnection : public Connection<ServerEndpoint, ClientEndpoint>, public ServerEndpoint::Stub {
class ClientConnection : public Connection<ServerEndpoint, ClientEndpoint>
, public ServerEndpoint::Stub
, public ClientEndpoint::template Proxy<ServerEndpoint> {
public:
using ClientProxy = typename ClientEndpoint::Proxy;
using ServerStub = typename ServerEndpoint::Stub;
using IPCProxy = ClientEndpoint::template Proxy<ServerEndpoint>;
ClientConnection(ServerStub& stub, NonnullRefPtr<Core::LocalSocket> socket, int client_id)
: IPC::Connection<ServerEndpoint, ClientEndpoint>(stub, move(socket))
, ClientEndpoint::template Proxy<ServerEndpoint>(*this, {})
, m_client_id(client_id)
{
VERIFY(this->socket().is_connected());