- new GUI lib
[enigma2.git] / lib / network / http_dyn.h
1 #ifndef __http_dyn_h_
2 #define __http_dyn_h_
3 #include <string>
4 #include <lib/network/httpd.h>
5
6 class eHTTPDyn: public eHTTPDataSource
7 {
8         eString result;
9         int wptr, size;
10 public:
11         eHTTPDyn(eHTTPConnection *c, eString result);
12         ~eHTTPDyn();
13         int doWrite(int);
14 };
15
16 class eHTTPDynPathResolver: public eHTTPPathResolver
17 {
18         struct eHTTPDynEntry
19         {
20                 eString request, path;
21                 eString (*function)(eString request, eString path, eString opt, eHTTPConnection *content);
22                 
23                 eHTTPDynEntry(eString request, eString path, eString (*function)(eString, eString, eString, eHTTPConnection *)): request(request), path(path), function(function)
24                 {
25                 }
26         };
27         ePtrList<eHTTPDynEntry> dyn;
28 public:
29         void addDyn(eString request, eString path, eString (*function)(eString, eString, eString, eHTTPConnection *conn));
30         eHTTPDynPathResolver();
31         eHTTPDataSource *getDataSource(eString request, eString path, eHTTPConnection *conn);
32 };
33
34 #endif