add ability to select in scan what is todo with existing services (Clear before scan)
[enigma2.git] / lib / components / scan.cpp
index 2f3c4d6..c21e8f4 100644 (file)
@@ -33,6 +33,12 @@ void eComponentScan::scanEvent(int evt)
                }
        }
        
+       if (evt == eDVBScan::evtNewService)
+       {
+               newService();
+               return;
+       }
+       
        if (evt == eDVBScan::evtFail)
        {
                eDebug("scan failed.");
@@ -78,7 +84,7 @@ void eComponentScan::addInitial(const eDVBFrontendParametersTerrestrial &p)
 }
 
 
-int eComponentScan::start(int flags)
+int eComponentScan::start(int feid, int flags)
 {
        if (m_initial.empty())
                return -2;
@@ -93,9 +99,9 @@ int eComponentScan::start(int flags)
 
        eUsePtr<iDVBChannel> channel;
 
-       if (mgr->allocateRawChannel(channel))
+       if (mgr->allocateRawChannel(channel, feid))
        {
-               eDebug("scan: allocating raw channel failed!");
+               eDebug("scan: allocating raw channel (on frontend %d) failed!", feid);
                return -1;
        }
 
@@ -137,3 +143,10 @@ int eComponentScan::getError()
 {
        return m_failed;
 }
+
+void eComponentScan::getLastServiceName(std::string &string)
+{
+       if (!m_scan)
+               return;
+       m_scan->getLastServiceName(string);
+}