diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2004-10-01 13:21:35 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2004-10-01 13:21:35 +0000 |
| commit | ddc3964ed95d01e72229dc9af968a327cd84e56c (patch) | |
| tree | 93e6694c639db3d188f5b2868f6b2b2951d21d60 /lib/network/http_dyn.cpp | |
| parent | 1aeefd997cc362c3b37c1587c5f08891b35c3a75 (diff) | |
| download | enigma2-ddc3964ed95d01e72229dc9af968a327cd84e56c.tar.gz enigma2-ddc3964ed95d01e72229dc9af968a327cd84e56c.zip | |
- add python, missing gui
- remove console (needs to be rewritten anyway)
- eString -> std::string
Diffstat (limited to 'lib/network/http_dyn.cpp')
| -rw-r--r-- | lib/network/http_dyn.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/network/http_dyn.cpp b/lib/network/http_dyn.cpp index d020133a..eb94d462 100644 --- a/lib/network/http_dyn.cpp +++ b/lib/network/http_dyn.cpp @@ -1,6 +1,6 @@ #include <lib/network/http_dyn.h> -eHTTPDyn::eHTTPDyn(eHTTPConnection *c, eString result): eHTTPDataSource(c), result(result) +eHTTPDyn::eHTTPDyn(eHTTPConnection *c, std::string result): eHTTPDataSource(c), result(result) { wptr=0; char buffer[10]; @@ -34,18 +34,18 @@ eHTTPDynPathResolver::eHTTPDynPathResolver() #warning autodelete removed } -void eHTTPDynPathResolver::addDyn(eString request, eString path, eString (*function)(eString, eString, eString, eHTTPConnection*)) +void eHTTPDynPathResolver::addDyn(std::string request, std::string path, std::string (*function)(std::string, std::string, std::string, eHTTPConnection*)) { dyn.push_back(new eHTTPDynEntry(request, path, function)); } -eHTTPDataSource *eHTTPDynPathResolver::getDataSource(eString request, eString path, eHTTPConnection *conn) +eHTTPDataSource *eHTTPDynPathResolver::getDataSource(std::string request, std::string path, eHTTPConnection *conn) { - eString p, opt; - if (path.find('?')!=eString::npos) + std::string p, opt; + if (path.find('?')!=std::string::npos) { - p=path.left(path.find('?')); - opt=path.mid(path.find('?')+1); + p=path.substr(0, path.find('?')); + opt=path.substr(path.find('?')+1); } else { p=path; @@ -55,9 +55,9 @@ eHTTPDataSource *eHTTPDynPathResolver::getDataSource(eString request, eString pa if ((i->path==p) && (i->request==request)) { conn->code=-1; - eString s=i->function(request, path, opt, conn); + std::string s=i->function(request, path, opt, conn); - if (s) + if (!s.empty()) return new eHTTPDyn(conn, s); return new eHTTPError(conn, 500); |
