-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathProjectorClient.hpp
50 lines (35 loc) · 1004 Bytes
/
ProjectorClient.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// Created by Gyuhwan Park on 2022/05/06.
//
#ifndef ULALACA_PROJECTIONTHREAD_HPP
#define ULALACA_PROJECTIONTHREAD_HPP
#include <memory>
#include <thread>
#include <queue>
#include <future>
#include "UnixSocket.hpp"
#include "IPCConnection.hpp"
#include "messages/projector.h"
#include "ProjectionTarget.hpp"
class ProjectorClient {
public:
explicit ProjectorClient(
ProjectionTarget &target,
const std::string &socketPath
);
ProjectorClient(ProjectorClient &) = delete;
FD descriptor();
void start();
void stop();
void sendHello(const std::string &xrdpUlalacaVersion, const xrdp_client_info &clientInfo);
void handleEvent(XrdpEvent &event);
void setViewport(ULIPCRect rect);
void setOutputSuppression(bool isOutputSuppressed);
private:
void mainLoop();
ProjectionTarget &_target;
IPCConnection _ipcConnection;
bool _isTerminated;
std::thread _projectorThread;
};
#endif //ULALACA_PROJECTIONTHREAD_HPP