X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/4bc08995411e21f3564f09e136809be68ddf96a8..52eb0cac0affc9c39a7a15a5e90bb87ad3a60481:/lib/dvb/scan.cpp diff --git a/lib/dvb/scan.cpp b/lib/dvb/scan.cpp index 322f35c3..0fc3e0a8 100644 --- a/lib/dvb/scan.cpp +++ b/lib/dvb/scan.cpp @@ -13,8 +13,8 @@ #include #include -#define SCAN_eDebug(x...) -#define SCAN_eDebugNoNewLine(x...) +#define SCAN_eDebug(x...) eDebug(x) +#define SCAN_eDebugNoNewLine(x...) eDebugNoNewLine(x) DEFINE_REF(eDVBScan); @@ -96,11 +96,17 @@ RESULT eDVBScan::nextChannel() m_ch_toScan.pop_front(); if (m_channel->getFrontend(fe)) + { + m_event(evtFail); return -ENOTSUP; + } m_channel_state = iDVBChannel::state_idle; if (fe->tune(*m_ch_current)) + { + m_event(evtFail); return -EINVAL; + } m_event(evtUpdate); return 0; @@ -298,7 +304,7 @@ void eDVBScan::start(const std::list > &known_trans nextChannel(); } -void eDVBScan::insertInto(eDVBDB *db) +void eDVBScan::insertInto(iDVBChannelList *db) { for (std::map >::const_iterator ch(m_new_channels.begin()); ch != m_new_channels.end(); ++ch) @@ -377,3 +383,10 @@ RESULT eDVBScan::connectEvent(const Slot1 &event, ePtr &c connection = new eConnection(this, m_event.connect(event)); return 0; } + +void eDVBScan::getStats(int &transponders_done, int &transponders_total, int &services) +{ + transponders_done = m_ch_scanned.size() + m_ch_unavailable.size(); + transponders_total = m_ch_toScan.size() + transponders_done; + services = m_new_services.size(); +}