2023-08-14 16:15:29 +00:00
|
|
|
#pragma once
|
2024-02-03 18:16:39 +00:00
|
|
|
#include "IPC.h"
|
2023-08-14 16:15:29 +00:00
|
|
|
#include "Window.h"
|
2024-02-03 18:16:39 +00:00
|
|
|
#include <os/IPC.h>
|
2023-08-14 16:15:29 +00:00
|
|
|
|
|
|
|
struct Client
|
|
|
|
{
|
2024-02-03 18:16:39 +00:00
|
|
|
OwnedPtr<os::IPC::ClientConnection> conn;
|
2023-08-14 16:15:29 +00:00
|
|
|
Vector<Window*> windows;
|
2024-02-01 20:57:40 +00:00
|
|
|
const bool privileged { false };
|
2024-02-04 12:35:50 +00:00
|
|
|
bool should_be_disconnected { false };
|
2023-08-16 18:02:54 +00:00
|
|
|
|
2024-02-03 18:16:39 +00:00
|
|
|
Client(OwnedPtr<os::IPC::ClientConnection>&& client, bool priv)
|
2023-08-16 18:02:54 +00:00
|
|
|
#ifdef CLIENT_IMPLEMENTATION
|
2024-02-03 18:16:39 +00:00
|
|
|
: conn(move(client)), windows(), privileged(priv)
|
|
|
|
{
|
|
|
|
conn->set_message_handler(wind::handle_ipc_message, this);
|
|
|
|
}
|
2023-08-16 18:02:54 +00:00
|
|
|
#else
|
|
|
|
;
|
|
|
|
#endif
|
2023-08-14 16:15:29 +00:00
|
|
|
};
|