2023-08-14 18:15:29 +02:00
|
|
|
#pragma once
|
2024-02-03 19:16:39 +01:00
|
|
|
#include "IPC.h"
|
2023-08-14 18:15:29 +02:00
|
|
|
#include "Window.h"
|
2024-02-03 19:16:39 +01:00
|
|
|
#include <os/IPC.h>
|
2023-08-14 18:15:29 +02:00
|
|
|
|
2024-12-13 23:47:53 +01:00
|
|
|
constexpr i16 HAS_NOT_YET_PLEDGED = -1;
|
|
|
|
constexpr i16 EMPTY_PLEDGE = 0;
|
|
|
|
|
2023-08-14 18:15:29 +02:00
|
|
|
struct Client
|
|
|
|
{
|
2024-02-03 19:16:39 +01:00
|
|
|
OwnedPtr<os::IPC::ClientConnection> conn;
|
2023-08-14 18:15:29 +02:00
|
|
|
Vector<Window*> windows;
|
2024-02-01 21:57:40 +01:00
|
|
|
const bool privileged { false };
|
2024-02-04 13:35:50 +01:00
|
|
|
bool should_be_disconnected { false };
|
2024-12-13 23:47:53 +01:00
|
|
|
i16 pledges = 0;
|
|
|
|
|
|
|
|
bool update_pledges(i16 pledges);
|
|
|
|
bool check_pledge(i16 pledge);
|
2023-08-16 20:02:54 +02:00
|
|
|
|
2024-12-13 23:47:53 +01:00
|
|
|
Client(OwnedPtr<os::IPC::ClientConnection>&& client, i16 pledges);
|
2023-08-14 18:15:29 +02:00
|
|
|
};
|