- add python, missing gui
[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         std::string result;
9         int wptr, size;
10 public:
11         eHTTPDyn(eHTTPConnection *c, std::string result);
12         ~eHTTPDyn();
13         int doWrite(int);
14 };
15
16 class eHTTPDynPathResolver: public eHTTPPathResolver
17 {
18         struct eHTTPDynEntry
19         {
20                 std::string request, path;
21                 std::string (*function)(std::string request, std::string path, std::string opt, eHTTPConnection *content);
22                 
23                 eHTTPDynEntry(std::string request, std::string path, std::string (*function)(std::string, std::string, std::string, eHTTPConnection *)): request(request), path(path), function(function)
24                 {
25                 }
26         };
27         ePtrList<eHTTPDynEntry> dyn;
28 public:
29         void addDyn(std::string request, std::string path, std::string (*function)(std::string, std::string, std::string, eHTTPConnection *conn));
30         eHTTPDynPathResolver();
31         eHTTPDataSource *getDataSource(std::string request, std::string path, eHTTPConnection *conn);
32 };
33
34 #endif