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:
authorGyuhwan Park★ <unstabler@unstabler.pl>2023-01-28 18:46:14 +0300
committerGyuhwan Park★ <unstabler@unstabler.pl>2023-01-28 18:46:14 +0300
commit676c9b085f9422f874c3dd5be24b6b2013fbf3c5 (patch)
tree3baff6fe84a4923bd400073e371949b81b4f458d
parentdd4b1559c0e59a93927ef3925f0c9ea5cd21b43a (diff)
refactor(ProjectorClient): renamed from ProjectionThread
-rw-r--r--Makefile.am4
-rw-r--r--ProjectorClient.cpp (renamed from ProjectionThread.cpp)18
-rw-r--r--ProjectorClient.hpp (renamed from ProjectionThread.hpp)6
-rw-r--r--XrdpUlalacaPrivate.cpp4
-rw-r--r--XrdpUlalacaPrivate.hpp4
-rw-r--r--XrdpUlalacaPrivate.xrdpmodule.cpp2
-rw-r--r--ulalaca.cpp7
7 files changed, 20 insertions, 25 deletions
diff --git a/Makefile.am b/Makefile.am
index e81345b..54b2560 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,8 +29,8 @@ libulalaca_la_SOURCES = \
IPCConnection.cpp \
SessionBrokerClient.hpp \
SessionBrokerClient.cpp \
- ProjectionThread.hpp \
- ProjectionThread.cpp \
+ ProjectorClient.hpp \
+ ProjectorClient.cpp \
KeycodeMap.cpp \
XrdpUlalacaPrivate.cpp \
XrdpUlalacaPrivate.xrdpmodule.cpp \
diff --git a/ProjectionThread.cpp b/ProjectorClient.cpp
index 41d7d4d..b8f72c4 100644
--- a/ProjectionThread.cpp
+++ b/ProjectorClient.cpp
@@ -15,10 +15,10 @@ extern "C" {
#include "xrdp_client_info.h"
}
-#include "ProjectionThread.hpp"
+#include "ProjectorClient.hpp"
#include "KeycodeMap.hpp"
-ProjectionThread::ProjectionThread(
+ProjectorClient::ProjectorClient(
ProjectionTarget &target,
const std::string &socketPath
):
@@ -29,12 +29,12 @@ ProjectionThread::ProjectionThread(
}
-void ProjectionThread::start() {
+void ProjectorClient::start() {
_ipcConnection.connect();
- _projectorThread = std::thread(&ProjectionThread::mainLoop, this);
+ _projectorThread = std::thread(&ProjectorClient::mainLoop, this);
}
-void ProjectionThread::stop() {
+void ProjectorClient::stop() {
_isTerminated = true;
if (_projectorThread.joinable()) {
@@ -44,7 +44,7 @@ void ProjectionThread::stop() {
_ipcConnection.disconnect();
}
-void ProjectionThread::handleEvent(XrdpEvent &event) {
+void ProjectorClient::handleEvent(XrdpEvent &event) {
if (_isTerminated) {
return;
}
@@ -153,13 +153,13 @@ void ProjectionThread::handleEvent(XrdpEvent &event) {
}
}
-void ProjectionThread::setViewport(ULIPCRect rect) {
+void ProjectorClient::setViewport(ULIPCRect rect) {
_ipcConnection.writeMessage(TYPE_PROJECTION_SET_VIEWPORT, ULIPCProjectionSetViewport {
0, (uint16_t) rect.width, (uint16_t) rect.height, 0
});
}
-void ProjectionThread::setOutputSuppression(bool isOutputSuppressed) {
+void ProjectorClient::setOutputSuppression(bool isOutputSuppressed) {
if (isOutputSuppressed) {
_ipcConnection.writeMessage(TYPE_PROJECTION_STOP, ULIPCProjectionStop {
0
@@ -171,7 +171,7 @@ void ProjectionThread::setOutputSuppression(bool isOutputSuppressed) {
}
}
-void ProjectionThread::mainLoop() {
+void ProjectorClient::mainLoop() {
while (!_isTerminated) {
auto header = _ipcConnection.nextHeader();
diff --git a/ProjectionThread.hpp b/ProjectorClient.hpp
index aea6a36..97c9497 100644
--- a/ProjectionThread.hpp
+++ b/ProjectorClient.hpp
@@ -18,13 +18,13 @@
#include "ProjectionTarget.hpp"
-class ProjectionThread {
+class ProjectorClient {
public:
- explicit ProjectionThread(
+ explicit ProjectorClient(
ProjectionTarget &target,
const std::string &socketPath
);
- ProjectionThread(ProjectionThread &) = delete;
+ ProjectorClient(ProjectorClient &) = delete;
void start();
void stop();
diff --git a/XrdpUlalacaPrivate.cpp b/XrdpUlalacaPrivate.cpp
index f8086b1..80e29de 100644
--- a/XrdpUlalacaPrivate.cpp
+++ b/XrdpUlalacaPrivate.cpp
@@ -4,7 +4,7 @@
#include "XrdpUlalacaPrivate.hpp"
-#include "ProjectionThread.hpp"
+#include "ProjectorClient.hpp"
XrdpUlalacaPrivate::XrdpUlalacaPrivate(XrdpUlalaca *mod):
_mod(mod),
@@ -52,7 +52,7 @@ void XrdpUlalacaPrivate::attachToSession(std::string sessionPath) {
return;
}
- _projectionThread = std::make_unique<ProjectionThread>(
+ _projectionThread = std::make_unique<ProjectorClient>(
*this, sessionPath
);
diff --git a/XrdpUlalacaPrivate.hpp b/XrdpUlalacaPrivate.hpp
index 588d52d..22c61a7 100644
--- a/XrdpUlalacaPrivate.hpp
+++ b/XrdpUlalacaPrivate.hpp
@@ -25,7 +25,7 @@ extern "C" {
#include "ProjectionTarget.hpp"
struct XrdpUlalaca;
-class ProjectionThread;
+class ProjectorClient;
class XrdpUlalacaPrivate: public ProjectionTarget {
public:
@@ -106,7 +106,7 @@ private:
xrdp_client_info _clientInfo;
std::unique_ptr<UnixSocket> _socket;
- std::unique_ptr<ProjectionThread> _projectionThread;
+ std::unique_ptr<ProjectorClient> _projectionThread;
std::atomic_bool _fullInvalidate;
std::mutex _commitUpdateLock;
diff --git a/XrdpUlalacaPrivate.xrdpmodule.cpp b/XrdpUlalacaPrivate.xrdpmodule.cpp
index 1276dcd..aa9117c 100644
--- a/XrdpUlalacaPrivate.xrdpmodule.cpp
+++ b/XrdpUlalacaPrivate.xrdpmodule.cpp
@@ -2,7 +2,7 @@
#include "ulalaca.hpp"
#include "SessionBrokerClient.hpp"
-#include "ProjectionThread.hpp"
+#include "ProjectorClient.hpp"
int XrdpUlalacaPrivate::libModStart(int width, int height, int bpp) {
// #517eb9
diff --git a/ulalaca.cpp b/ulalaca.cpp
index cf4df44..461f095 100644
--- a/ulalaca.cpp
+++ b/ulalaca.cpp
@@ -6,20 +6,15 @@
#include <config_ac.h>
#endif
-#include <algorithm>
-#include <chrono>
#include <functional>
#include <iostream>
#include <sstream>
-#include <string>
-#include "messages/broker.h"
#include "ulalaca.hpp"
#include "XrdpUlalacaPrivate.hpp"
-#include "SocketStream.hpp"
-#include "ProjectionThread.hpp"
+#include "ProjectorClient.hpp"