#include <sys/stat.h>
#include <unistd.h>
+
+class eStaticServiceFSInformation: public iStaticServiceInformation
+{
+ DECLARE_REF(eStaticServiceFSInformation);
+public:
+ RESULT getName(const eServiceReference &ref, std::string &name);
+};
+
+DEFINE_REF(eStaticServiceFSInformation);
+
+RESULT eStaticServiceFSInformation::getName(const eServiceReference &ref, std::string &name)
+{
+ name = ref.path;
+}
+
// eServiceFactoryFS
-eServiceFactoryFS::eServiceFactoryFS(): ref(0)
+eServiceFactoryFS::eServiceFactoryFS()
{
ePtr<eServiceCenter> sc;
eServiceCenter::getInstance(sc);
if (sc)
sc->addServiceFactory(eServiceFactoryFS::id, this);
+
+ m_service_information = new eStaticServiceFSInformation();
}
eServiceFactoryFS::~eServiceFactoryFS()
return 0;
}
+RESULT eServiceFactoryFS::info(const eServiceReference &ref, ePtr<iStaticServiceInformation> &ptr)
+{
+ ptr = m_service_information;
+ return 0;
+}
+
// eServiceFS
DEFINE_REF(eServiceFS);
-eServiceFS::eServiceFS(const char *path): ref(0), path(path)
+eServiceFS::eServiceFS(const char *path): path(path)
{
}
if (!(strcmp(e->d_name, ".") && strcmp(e->d_name, "..")))
continue;
- eString filename;
+ std::string filename;
filename = path;
filename += e->d_name;