Luna/wind/Client.h
apio 909d0ed289
libos+wind+apps: Make IPC code object-oriented and add functionality for properly receiving messages
This functionality previously had to be repeated across all server programs using the IPC API.
2024-02-03 19:16:39 +01:00

22 lines
460 B
C

#pragma once
#include "IPC.h"
#include "Window.h"
#include <os/IPC.h>
struct Client
{
OwnedPtr<os::IPC::ClientConnection> conn;
Vector<Window*> windows;
const bool privileged { false };
Client(OwnedPtr<os::IPC::ClientConnection>&& client, bool priv)
#ifdef CLIENT_IMPLEMENTATION
: conn(move(client)), windows(), privileged(priv)
{
conn->set_message_handler(wind::handle_ipc_message, this);
}
#else
;
#endif
};