Luna/gui/wind/Client.h

22 lines
485 B
C
Raw Normal View History

2023-08-14 16:15:29 +00:00
#pragma once
#include "IPC.h"
2023-08-14 16:15:29 +00:00
#include "Window.h"
#include <os/IPC.h>
2023-08-14 16:15:29 +00:00
constexpr i16 HAS_NOT_YET_PLEDGED = -1;
constexpr i16 EMPTY_PLEDGE = 0;
2023-08-14 16:15:29 +00:00
struct Client
{
OwnedPtr<os::IPC::ClientConnection> conn;
2023-08-14 16:15:29 +00:00
Vector<Window*> windows;
const bool privileged { false };
bool should_be_disconnected { false };
i16 pledges = 0;
bool update_pledges(i16 pledges);
bool check_pledge(i16 pledge);
Client(OwnedPtr<os::IPC::ClientConnection>&& client, i16 pledges);
2023-08-14 16:15:29 +00:00
};