- fixed dvb scan
[enigma2.git] / lib / service / servicefs.cpp
index 4bdc11a970533d39bc9d3c58287bff1ad86863b3..de75cc672fe6b35053a151995b3c1a76bbe1c035 100644 (file)
 #include <sys/stat.h>
 #include <unistd.h>
 
+
+class eServiceFSInformation: public iServiceInformation
+{
+       DECLARE_REF;
+public:
+       RESULT getName(const eServiceReference &ref, std::string &name);
+};
+
+DEFINE_REF(eServiceFSInformation);
+
+RESULT eServiceFSInformation::getName(const eServiceReference &ref, std::string &name)
+{
+       name = ref.path;
+}
+
 // eServiceFactoryFS
 
 eServiceFactoryFS::eServiceFactoryFS()
@@ -20,6 +35,8 @@ eServiceFactoryFS::eServiceFactoryFS()
        eServiceCenter::getInstance(sc);
        if (sc)
                sc->addServiceFactory(eServiceFactoryFS::id, this);
+       
+       m_service_information = new eServiceFSInformation();
 }
 
 eServiceFactoryFS::~eServiceFactoryFS()
@@ -52,6 +69,12 @@ RESULT eServiceFactoryFS::list(const eServiceReference &ref, ePtr<iListableServi
        return 0;
 }
 
+RESULT eServiceFactoryFS::info(const eServiceReference &ref, ePtr<iServiceInformation> &ptr)
+{
+       ptr = m_service_information;
+       return 0;
+}
+
 // eServiceFS
 
 DEFINE_REF(eServiceFS);
@@ -74,7 +97,7 @@ RESULT eServiceFS::getContent(std::list<eServiceReference> &list)
                if (!(strcmp(e->d_name, ".") && strcmp(e->d_name, "..")))
                        continue;
                
-               eString filename;
+               std::string filename;
                
                filename = path;
                filename += e->d_name;