diff options
author | Pixel <Pixel> | 2001-11-14 22:25:39 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-11-14 22:25:39 +0000 |
commit | 8694409f2a5531e9f3263e8a42248a3ca91ac14f (patch) | |
tree | b1bba533d7ee9f66b8f470851ff534beac97a7d6 /include | |
parent | aa92df3c58daefb994da555fb45f2e3ee55f38d5 (diff) |
More advances....
Diffstat (limited to 'include')
-rw-r--r-- | include/CopyJob.h | 1 | ||||
-rw-r--r-- | include/HttpServ.h | 18 | ||||
-rw-r--r-- | include/ReadJob.h | 1 | ||||
-rw-r--r-- | include/Socket.h | 2 | ||||
-rw-r--r-- | include/Task.h | 2 |
5 files changed, 9 insertions, 15 deletions
diff --git a/include/CopyJob.h b/include/CopyJob.h index a4f4bca..67cbf36 100644 --- a/include/CopyJob.h +++ b/include/CopyJob.h @@ -17,7 +17,6 @@ class CopyJob : public Task { Handle * s, * d; ssize_t siz, cursiz; char buffer[COPY_BUFSIZ]; - int current; }; #else diff --git a/include/HttpServ.h b/include/HttpServ.h index 7ac40e2..18295bc 100644 --- a/include/HttpServ.h +++ b/include/HttpServ.h @@ -6,6 +6,7 @@ #include <String.h> #include <Variables.h> #include <Action.h> +#include <Task.h> #include <Exceptions.h> /* @@ -16,24 +17,17 @@ * qui est obligatoirement statique et doit posseder l'url /bin/start. */ -class HttpServ : public Base { +class HttpServ : public Task { public: HttpServ(int = 1500, const String & = String("GruiK Server v0.1")) throw (GeneralException); ~HttpServ() {} - void MainLoop(Action *); + void SetMenu(Action *); + virtual String GetName(); + protected: + virtual int Do(); private: - String GetMime(const String &); - void ProcessRequest(Action *, Socket); - bool ParseUri(String &, String &, Handle *); - void ParseVars(Handle *, int); - void ShowError(Handle *); - void SendHeads(Handle *, const String &); - void SendRedirect(Handle *); - String name; Socket Listener; - Variables * Vars; int localport; - bool bad; }; extern String endhl, endnl; diff --git a/include/ReadJob.h b/include/ReadJob.h index 90ba2c8..5cc4846 100644 --- a/include/ReadJob.h +++ b/include/ReadJob.h @@ -14,7 +14,6 @@ class ReadJob : public Task { virtual String GetName(); private: Handle * s, * d; - int current; }; #else diff --git a/include/Socket.h b/include/Socket.h index 9d70205..6bd612c 100644 --- a/include/Socket.h +++ b/include/Socket.h @@ -36,7 +36,7 @@ class Socket : public Handle { bool SetLocal(String, int = 0); bool Connect(String, int); bool Listen(); - Socket Accept(); + Socket Accept() throw (GeneralException); bool IsConnected(); bool IsListening(); size_t WriteFile(Output &); diff --git a/include/Task.h b/include/Task.h index f2d4b0b..1842314 100644 --- a/include/Task.h +++ b/include/Task.h @@ -26,6 +26,8 @@ class Task : public Base { protected: virtual int Do() throw (GeneralException); + int current; + private: int state; bool suspended; |