Esempio n. 1
0
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();
}
Esempio n. 2
0
void HueBridgeConnection::onNoBridgesFound()
{
    //FIXME: handle error case
    qDebug() << Q_FUNC_INFO << "No hue bridges found!";
    emit noBridgesFound();
}
Esempio n. 3
0
void Discovery::onTimeout()
{
    if (m_reportedBridges.isEmpty())
        emit noBridgesFound();
}