12#include <QtNetwork/qlocalserver.h>
26 void setModelUrl(
const std::string& _url) { m_modelUrl = _url; m_modelUrlSet =
false; };
27 void setFrontendUrl(
const std::string& _url) { m_frontendUrl = _url; m_frontendUrlSet =
false; };
37 void slotNewConnection(
void);
38 void slotMessageReceived(
void);
39 void slotClientDisconnected(
void);
40 void slotProcessMessage(std::string _message);
43 enum class ClientState {
51 void processNextEvent(
void);
53 bool sendServiceInfoToClient(
void);
54 bool sendModelConfigToClient(
void);
55 bool sendFrontendConfigToClient(
void);
56 bool sendDataBaseConfigToClient(
void);
58 bool waitForClient(
void);
59 bool sendToClient(
const QByteArray& _data,
bool _expectResponse, std::string& _response);
62 std::string m_serverName;
64 QLocalSocket* m_client;
65 ClientState m_clientState;
66 bool m_isInitializingClient;
68 bool m_serviceAndSessionInfoSet;
70 std::string m_frontendUrl;
71 bool m_frontendUrlSet;
73 std::string m_modelUrl;
77 bool m_databaseInfoSet;
79 std::string m_response;
This file contains defines that may be used simplyfy class creation.
#define OT_DECL_NODEFAULT(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:22
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
Definition CommunicationHandler.h:11
void setDataBaseInfo(const DataBaseInfo &_info)
Definition CommunicationHandler.h:28
void setModelUrl(const std::string &_url)
Definition CommunicationHandler.h:26
bool sendToClient(const ot::JsonDocument &_document, std::string &_response)
Definition CommunicationHandler.cpp:31
const std::string & getServerName(void) const
Definition CommunicationHandler.h:30
void cleanupAfterCrash(void)
Definition CommunicationHandler.cpp:63
CommunicationHandler()
Definition CommunicationHandler.cpp:16
void setFrontendUrl(const std::string &_url)
Definition CommunicationHandler.h:27
bool sendConfigToClient(void)
Definition CommunicationHandler.cpp:41
Definition DataBaseInfo.h:6
Definition SubprocessManager.h:19
JSON document.
Definition JSON.h:276