diff options
Diffstat (limited to 'include/HttpServ.h')
-rw-r--r-- | include/HttpServ.h | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/include/HttpServ.h b/include/HttpServ.h index db454e0..aec3aad 100644 --- a/include/HttpServ.h +++ b/include/HttpServ.h @@ -9,23 +9,6 @@ #include <Handle.h> #include <Exceptions.h> -class Action; -class HttpServ : public Task { - public: - HttpServ(Action *, int = 1500, const String & = String("GruiK Server v0.2")) throw (GeneralException); - virtual ~HttpServ(); - virtual String GetName(); - - protected: - virtual int Do() throw (GeneralException); - - private: - Socket Listener; - Action * p; - String name; - int localport; -}; - class HttpResponse : public Base { public: typedef enum { @@ -51,10 +34,36 @@ class HttpResponse : public Base { Buffer contents; bool cache; - public: + private: String code_to_string(); }; +class HttpRequest : public Base { + public: + Variables * vars, * headers; + String url; +}; + +class Action; +class HttpServ : public Task { + public: + HttpServ(Action *, int = 1500, const String & = String("GruiK Server v0.2")) throw (GeneralException); + virtual ~HttpServ(); + virtual String GetName(); + void SetRoot(const String &); + + protected: + virtual int Do() throw (GeneralException); + + private: + Socket Listener; + Action * p; + String name; + int localport; + String root; + HttpResponse response; +}; + extern String endhl, endnl; #include <Action.h> |