logic: listening status for communication controller

Added isListening method to ide communication controller
This commit is contained in:
Manuel Dobusch
2016-03-07 17:29:20 +01:00
parent d431161fbb
commit cabdb69956
6 changed files with 16 additions and 181 deletions
@@ -25,6 +25,8 @@ public:
bool getEnabled() const;
void setEnabled(const bool enabled);
virtual bool isListening() const = 0;
private:
void handleSetActiveTokenMessage(const NetworkProtocolHelper::SetActiveTokenMessage& message);
void handleCreateProjectMessage(const NetworkProtocolHelper::CreateProjectMessage& message);
@@ -17,6 +17,11 @@ QtIDECommunicationController::QtIDECommunicationController(QObject* parent, Stor
QtIDECommunicationController::~QtIDECommunicationController()
{}
bool QtIDECommunicationController::isListening() const
{
return m_tcpWrapper.isListening();
}
void QtIDECommunicationController::sendMessage(const std::string& message) const
{
m_tcpWrapper.sendMessage(message);
@@ -17,6 +17,8 @@ public:
QtIDECommunicationController(QObject* parent, StorageAccess* storageAccess);
~QtIDECommunicationController();
virtual bool isListening() const;
private:
virtual void sendMessage(const std::string& message) const;
+5
View File
@@ -79,6 +79,11 @@ void QtTcpWrapper::setClientPort(const quint16 clientPort)
m_clientPort = clientPort;
}
bool QtTcpWrapper::isListening() const
{
return m_tcpServer->isListening();
}
void QtTcpWrapper::acceptConnection()
{
m_tcpClient = m_tcpServer->nextPendingConnection();
+2
View File
@@ -28,6 +28,8 @@ public:
quint16 getClientPort() const;
void setClientPort(const quint16 clientPort);
bool isListening() const;
signals:
public slots: