HueBridgeConnection::HueBridgeConnection(): m_nam(new QNetworkAccessManager(this)), m_discoveryError(false), m_bridgeStatus(BridgeStatusSearching), m_requestCounter(0) { m_discovery = new Discovery(this); connect(m_discovery, SIGNAL(error()), this, SLOT(onDiscoveryError())); connect(m_discovery, SIGNAL(foundBridge(QHostAddress, QString)), this, SLOT(onFoundBridge(QHostAddress, QString))); connect(m_discovery, SIGNAL(noBridgesFound()), this, SLOT(onNoBridgesFound())); m_discovery->findBridges(); }
void HueBridgeConnection::onNoBridgesFound() { //FIXME: handle error case qDebug() << Q_FUNC_INFO << "No hue bridges found!"; emit noBridgesFound(); }
void Discovery::onTimeout() { if (m_reportedBridges.isEmpty()) emit noBridgesFound(); }