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
|
|
|
|
2024-12-13 22:47:53 +00:00
|
|
|
constexpr i16 HAS_NOT_YET_PLEDGED = -1;
|
|
|
|
constexpr i16 EMPTY_PLEDGE = 0;
|
|
|
|
|
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 };
|
2024-12-13 22:47:53 +00:00
|
|
|
i16 pledges = 0;
|
|
|
|
|
|
|
|
bool update_pledges(i16 pledges);
|
|
|
|
bool check_pledge(i16 pledge);
|
2023-08-16 18:02:54 +00:00
|
|
|
|
2024-12-13 22:47:53 +00:00
|
|
|
Client(OwnedPtr<os::IPC::ClientConnection>&& client, i16 pledges);
|
2023-08-14 16:15:29 +00:00
|
|
|
};
|