add offline operations to services
[enigma2.git] / lib / service / servicefs.cpp
index b0d5392283fd44e24c6fc309e62c66641cc6ae30..5b5957eba1fd6066af3835623797e46a21aeefcd 100644 (file)
 #include <sys/stat.h>
 #include <unistd.h>
 
-
 class eStaticServiceFSInformation: public iStaticServiceInformation
 {
        DECLARE_REF(eStaticServiceFSInformation);
 public:
        RESULT getName(const eServiceReference &ref, std::string &name);
+       int getLength(const eServiceReference &ref) { return -1; }
 };
 
 DEFINE_REF(eStaticServiceFSInformation);
@@ -76,6 +76,12 @@ RESULT eServiceFactoryFS::info(const eServiceReference &ref, ePtr<iStaticService
        return 0;
 }
 
+RESULT eServiceFactoryFS::offlineOperations(const eServiceReference &, ePtr<iServiceOfflineOperations> &ptr)
+{
+       ptr = 0;
+       return -1;
+}
+
 // eServiceFS
 
 DEFINE_REF(eServiceFS);
@@ -147,7 +153,10 @@ RESULT eServiceFS::getNext(eServiceReference &ptr)
        }
        
        if (!m_list.size())
+       {
+               ptr = eServiceReference();
                return -ERANGE;
+       }
        
        ptr = m_list.front();
        m_list.pop_front();