Bring the validation-scope line (in-tree Jenkins CI copy, lcov coverage wiring, step-by-step release-scope README, TetraIF unit tests, the LogView runtime icon/resource fix, Dockerfile, rpmbuild and the new_docker_build.sh driver with the DEB output path) on top of the XmlPatterns branch pruned to the Release 2 scope. Conflict policy: - Out-of-scope targets/modules: keep the prune (deletion wins). - In-scope files that validation had deleted: restored from story/release-2-cleanup (the Release 2 closure, with the pruned-module guards). - In-scope sources carrying migration work: XmlPatterns versions (Qt XmlPatterns rework on QDomDocument, DDS member and logger fixes, first-build fixes). - Scope-aware CMakeLists (top level, PluginInterfaces, LtsWidgets) and .envrc: story/release-2-cleanup / ours versions.
68 lines
1.1 KiB
C++
Executable File
68 lines
1.1 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Handler for the WebSocket Interface
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Philipp Dassow, SLST, 2017-12-05
|
|
*/
|
|
#pragma once
|
|
|
|
#include <QtCore/QObject>
|
|
|
|
#include <LtsWebSocket/lts_web_socket_server.h>
|
|
|
|
#include "logger.h"
|
|
|
|
namespace TrainingAreaBase
|
|
{
|
|
class MainHandler;
|
|
namespace WebSocketInterface
|
|
{
|
|
namespace ClientMessages
|
|
{
|
|
class ClientMessageFactory;
|
|
}
|
|
namespace Messages
|
|
{
|
|
class ReplyMessage;
|
|
}
|
|
class DataManager;
|
|
|
|
|
|
|
|
class WebSocketInterfaceHandler final : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
|
|
|
|
explicit WebSocketInterfaceHandler(MainHandler *mainHandler, QObject *parent = nullptr);
|
|
|
|
|
|
|
|
~WebSocketInterfaceHandler();
|
|
|
|
|
|
|
|
bool init();
|
|
|
|
bool sendToAllClients(Messages::ReplyMessage *message);
|
|
|
|
|
|
unsigned short serverWebSocketPort() { return m_webSocketServer->webSocketPort(); }
|
|
|
|
private:
|
|
void cleanup();
|
|
|
|
private:
|
|
LtsWebSocket::LtsWebSocketServer *m_webSocketServer;
|
|
ClientMessages::ClientMessageFactory *m_messageFactory;
|
|
DataManager *m_dataManager;
|
|
MainHandler *m_mainHandler;
|
|
LOGGER_T m_logger;
|
|
};
|
|
|
|
}
|
|
}
|