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

github.com/neutrinolabs/ulalaca-xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ProjectorClient.hpp')
-rw-r--r--ProjectorClient.hpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/ProjectorClient.hpp b/ProjectorClient.hpp
new file mode 100644
index 0000000..97c9497
--- /dev/null
+++ b/ProjectorClient.hpp
@@ -0,0 +1,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