logic: listening status for communication controller
Added isListening method to ide communication controller
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -28,6 +28,8 @@ public:
|
||||
quint16 getClientPort() const;
|
||||
void setClientPort(const quint16 clientPort);
|
||||
|
||||
bool isListening() const;
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
Reference in New Issue
Block a user