X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/d0899514fa9495013cb73c8ead8c5a5baaf49111..ad2bab318ec1271ae520606259c962382a519f0d:/lib/service/servicefs.cpp diff --git a/lib/service/servicefs.cpp b/lib/service/servicefs.cpp index 5b5957eb..a22b88d3 100644 --- a/lib/service/servicefs.cpp +++ b/lib/service/servicefs.cpp @@ -25,6 +25,7 @@ DEFINE_REF(eStaticServiceFSInformation); RESULT eStaticServiceFSInformation::getName(const eServiceReference &ref, std::string &name) { name = ref.path; + return 0; } // eServiceFactoryFS @@ -33,7 +34,7 @@ eServiceFactoryFS::eServiceFactoryFS() { ePtr sc; - eServiceCenter::getInstance(sc); + eServiceCenter::getPrivInstance(sc); if (sc) sc->addServiceFactory(eServiceFactoryFS::id, this); @@ -44,7 +45,7 @@ eServiceFactoryFS::~eServiceFactoryFS() { ePtr sc; - eServiceCenter::getInstance(sc); + eServiceCenter::getPrivInstance(sc); if (sc) sc->removeServiceFactory(eServiceFactoryFS::id); } @@ -139,6 +140,7 @@ RESULT eServiceFS::getContent(std::list &list) } } } + closedir(d); return 0; } @@ -163,4 +165,22 @@ RESULT eServiceFS::getNext(eServiceReference &ptr) return 0; } +int eServiceFS::compareLessEqual(const eServiceReference &a, const eServiceReference &b) +{ + /* directories first */ + if ((a.flags & ~b.flags) & eServiceReference::isDirectory) + return 1; + else if ((~a.flags & b.flags) & eServiceReference::isDirectory) + return 0; + /* sort by filename */ + else + return a.path < b.path; +} + +RESULT eServiceFS::startEdit(ePtr &res) +{ + res = 0; + return -1; +} + eAutoInitPtr init_eServiceFactoryFS(eAutoInitNumbers::service+1, "eServiceFactoryFS");