diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Action.h | 6 | ||||
-rw-r--r-- | include/Confirm.h | 6 | ||||
-rw-r--r-- | include/Form.h | 6 | ||||
-rw-r--r-- | include/Handle.h | 4 | ||||
-rw-r--r-- | include/HttpServ.h | 10 | ||||
-rw-r--r-- | include/IRC.h | 4 | ||||
-rw-r--r-- | include/Input.h | 4 | ||||
-rw-r--r-- | include/Menu.h | 6 | ||||
-rw-r--r-- | include/Message.h | 6 | ||||
-rw-r--r-- | include/Output.h | 4 | ||||
-rw-r--r-- | include/ReadJob.h | 2 | ||||
-rw-r--r-- | include/Socket.h | 10 | ||||
-rw-r--r-- | include/String.h | 2 | ||||
-rw-r--r-- | include/Table.h | 6 | ||||
-rw-r--r-- | include/Task.h | 15 | ||||
-rw-r--r-- | include/TaskMan.h | 6 | ||||
-rw-r--r-- | include/Variables.h | 6 |
17 files changed, 56 insertions, 47 deletions
diff --git a/include/Action.h b/include/Action.h index 5fcf660..185cd1a 100644 --- a/include/Action.h +++ b/include/Action.h @@ -2,9 +2,9 @@ #define __ACTION_H__ #ifdef __cplusplus -#include "Handle.h" -#include "Variables.h" -#include "Exceptions.h" +#include <Handle.h> +#include <Variables.h> +#include <Exceptions.h> /* * La classe Action defini les actions HTTP possibles. diff --git a/include/Confirm.h b/include/Confirm.h index 704bb88..efd0606 100644 --- a/include/Confirm.h +++ b/include/Confirm.h @@ -2,9 +2,9 @@ #define __CONFIRM_H__ #ifdef __cplusplus -#include "Action.h" -#include "String.h" -#include "Exceptions.h" +#include <Action.h> +#include <String.h> +#include <Exceptions.h> /* * Cette classe sert à afficher une boîte de dialogue de confirmation. diff --git a/include/Form.h b/include/Form.h index e0bf75d..50b7e3c 100644 --- a/include/Form.h +++ b/include/Form.h @@ -2,9 +2,9 @@ #define __FORM_H__ #ifdef __cplusplus -#include "Action.h" -#include "String.h" -#include "Exceptions.h" +#include <Action.h> +#include <String.h> +#include <Exceptions.h> /* * Cette classe sert à afficher un formulaire de saisie. diff --git a/include/Handle.h b/include/Handle.h index 6d44a48..19de77a 100644 --- a/include/Handle.h +++ b/include/Handle.h @@ -4,8 +4,8 @@ #include <unistd.h> #include <iostream.h> -#include "String.h" -#include "Exceptions.h" +#include <String.h> +#include <Exceptions.h> /* * Pour les classes qui vont deriver: le constructeur Handle(int) specifie diff --git a/include/HttpServ.h b/include/HttpServ.h index 6bd2769..5074639 100644 --- a/include/HttpServ.h +++ b/include/HttpServ.h @@ -2,11 +2,11 @@ #define __HTTPSERV_H__ #ifdef __cplusplus -#include "Socket.h" -#include "String.h" -#include "Variables.h" -#include "Action.h" -#include "Exceptions.h" +#include <Socket.h> +#include <String.h> +#include <Variables.h> +#include <Action.h> +#include <Exceptions.h> /* * La classe HttpServ. Le constructueur (int, const String &) indique le port diff --git a/include/IRC.h b/include/IRC.h index 7c7e32c..f8db55b 100644 --- a/include/IRC.h +++ b/include/IRC.h @@ -2,8 +2,8 @@ #define __IRC_H__ #ifdef __cplusplus -#include "Socket.h" -#include "Exceptions.h" +#include <Socket.h> +#include <Exceptions.h> #define RPL_WELCOME 1 #define RPL_YOURHOST 2 diff --git a/include/Input.h b/include/Input.h index 1beb1b5..f9a3df5 100644 --- a/include/Input.h +++ b/include/Input.h @@ -2,8 +2,8 @@ #define __INPUT_H__ #ifdef __cplusplus -#include "String.h" -#include "Handle.h" +#include <String.h> +#include <Handle.h> /* * Cette classe sert à créer un fichier ouvert en lecture. diff --git a/include/Menu.h b/include/Menu.h index 7ea7662..4167656 100644 --- a/include/Menu.h +++ b/include/Menu.h @@ -2,9 +2,9 @@ #define __MENU_H__ #ifdef __cplusplus -#include "Action.h" -#include "String.h" -#include "Exceptions.h" +#include <Action.h> +#include <String.h> +#include <Exceptions.h> /* * Cette classe permet d'afficher un menu. diff --git a/include/Message.h b/include/Message.h index 888d0be..96b9aa4 100644 --- a/include/Message.h +++ b/include/Message.h @@ -2,9 +2,9 @@ #define __MESSAGE_H__ #ifdef __cplusplus -#include "Action.h" -#include "String.h" -#include "Exceptions.h" +#include <Action.h> +#include <String.h> +#include <Exceptions.h> /* * Cette classe sert a afficher un message. diff --git a/include/Output.h b/include/Output.h index 98af0ac..ef76012 100644 --- a/include/Output.h +++ b/include/Output.h @@ -2,8 +2,8 @@ #define __OUTPUT_H__ #ifdef __cplusplus -#include "String.h" -#include "Handle.h" +#include <String.h> +#include <Handle.h> /* * Ouvre un fichier en ecriture. diff --git a/include/ReadJob.h b/include/ReadJob.h index be846fb..4822390 100644 --- a/include/ReadJob.h +++ b/include/ReadJob.h @@ -4,7 +4,7 @@ #include <Task.h> #include <Handle.h> -#include <regex.h> +#include <Regex.h> class ReadJob : public Task { public: diff --git a/include/Socket.h b/include/Socket.h index 80c7180..9d70205 100644 --- a/include/Socket.h +++ b/include/Socket.h @@ -2,11 +2,11 @@ #define __SOCKET_H__ #ifdef __cplusplus -#include "Handle.h" -#include "String.h" -#include "Output.h" -#include "Input.h" -#include "Exceptions.h" +#include <Handle.h> +#include <String.h> +#include <Output.h> +#include <Input.h> +#include <Exceptions.h> /* * Cree un socket. diff --git a/include/String.h b/include/String.h index 463abfc..c6afdb2 100644 --- a/include/String.h +++ b/include/String.h @@ -4,7 +4,7 @@ #include <iostream.h> #include <string.h> -#include "Exceptions.h" +#include <Exceptions.h> /* * Cette classe permet de stocker des chaînes de caractères simplement. diff --git a/include/Table.h b/include/Table.h index c80fc8a..64cf249 100644 --- a/include/Table.h +++ b/include/Table.h @@ -2,9 +2,9 @@ #define __TABLE_H__ #ifdef __cplusplus -#include "Action.h" -#include "String.h" -#include "Exceptions.h" +#include <Action.h> +#include <String.h> +#include <Exceptions.h> /* * Affiche une table. diff --git a/include/Task.h b/include/Task.h index 456f8f3..f728e62 100644 --- a/include/Task.h +++ b/include/Task.h @@ -2,7 +2,9 @@ #define __TASK_H__ #ifdef __cplusplus -#include "Exceptions.h" +#include <unistd.h> +#include <vector.h> +#include <Exceptions.h> #define TASK_ON_HOLD 0 #define TASK_DONE 1 @@ -14,14 +16,21 @@ class Task : public Base { virtual String GetName(); int Run(); int GetState(); - int Suspend() throw (GeneralException); - void Resume(int) throw (GeneralException); + void Suspend() throw (GeneralException); + bool WaitFor(Handle *); + bool WaitFor(Task *); + bool WaitFor(pid_t); + bool WaitFor(struct timeval); protected: virtual int Do(); private: int state; bool suspended; + vector<Handle *> w4ha; + vector<Task *> w4ta; + vector<pid_t> w4pr; + vector<struct timeval> w4to; }; #else diff --git a/include/TaskMan.h b/include/TaskMan.h index 1efff93..03797af 100644 --- a/include/TaskMan.h +++ b/include/TaskMan.h @@ -8,12 +8,12 @@ class TaskMan : public Base { public: TaskMan() throw (GeneralException); - ~TaskMan(); int AddTask(Task *); - void MainLoop(); + void MainLoop() throw (GeneralException); private: vector<Task *> TaskList; - static bool Inited; + int number; + static bool inited; }; #else diff --git a/include/Variables.h b/include/Variables.h index bbd2916..c4d6ba3 100644 --- a/include/Variables.h +++ b/include/Variables.h @@ -3,9 +3,9 @@ #ifdef __cplusplus #include <vector> -#include "String.h" -#include "Handle.h" -#include "Exceptions.h" +#include <String.h> +#include <Handle.h> +#include <Exceptions.h> /* * Cette classe nous sert a gérer les variables transportées par les formulaires. |