Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ProjectorClient.hpp - github.com/neutrinolabs/ulalaca-xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f28f31f2010be169f2bbd10c0a4262990afa6431 (plain)
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
//
// 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 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