remove test cruft, add possibility for a seperator
[enigma2.git] / lib / network / http_dyn.h
index 6fb8b9b18cddcf978d2d25be9e73ffa1ad3418c1..24e4dba18b7ce0ba6fff2b5794704ca50f05d14f 100644 (file)
@@ -5,30 +5,36 @@
 
 class eHTTPDyn: public eHTTPDataSource
 {
-       eString result;
+       DECLARE_REF(eHTTPDyn);
+private:
+       std::string result;
        int wptr, size;
 public:
-       eHTTPDyn(eHTTPConnection *c, eString result);
+       eHTTPDyn(eHTTPConnection *c, std::string result);
        ~eHTTPDyn();
        int doWrite(int);
 };
 
-class eHTTPDynPathResolver: public eHTTPPathResolver
+class eHTTPDynPathResolver: public iHTTPPathResolver
 {
-       struct eHTTPDynEntry
+       DECLARE_REF(eHTTPDynPathResolver);
+private:
+       struct eHTTPDynEntry: public iObject
        {
-               eString request, path;
-               eString (*function)(eString request, eString path, eString opt, eHTTPConnection *content);
+               DECLARE_REF(eHTTPDynEntry);
+       public:
+               std::string request, path;
+               std::string (*function)(std::string request, std::string path, std::string opt, eHTTPConnection *content);
                
-               eHTTPDynEntry(eString request, eString path, eString (*function)(eString, eString, eString, eHTTPConnection *)): request(request), path(path), function(function)
+               eHTTPDynEntry(std::string request, std::string path, std::string (*function)(std::string, std::string, std::string, eHTTPConnection *)): request(request), path(path), function(function)
                {
                }
        };
-       ePtrList<eHTTPDynEntry> dyn;
+       eSmartPtrList<eHTTPDynEntry> dyn;
 public:
-       void addDyn(eString request, eString path, eString (*function)(eString, eString, eString, eHTTPConnection *conn));
+       void addDyn(std::string request, std::string path, std::string (*function)(std::string, std::string, std::string, eHTTPConnection *conn));
        eHTTPDynPathResolver();
-       eHTTPDataSource *getDataSource(eString request, eString path, eHTTPConnection *conn);
+       RESULT getDataSource(eHTTPDataSourcePtr &ptr, std::string request, std::string path, eHTTPConnection *conn);
 };
 
 #endif