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: 97c94979e33d93296b54d883a940511c0d43b6e2 (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
//
// 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;
    
    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