diff options
Diffstat (limited to 'include/Task.h')
-rw-r--r-- | include/Task.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/include/Task.h b/include/Task.h index 5ac4a26..8831830 100644 --- a/include/Task.h +++ b/include/Task.h @@ -9,16 +9,27 @@ #include <Exceptions.h> #include <Handle.h> -#define TASK_ON_HOLD 0 -#define TASK_DONE 1 -#define TASK_BURST 2 - -#define W4_STICKY 1 -#define W4_READING 2 -#define W4_WRITING 4 +#undef E_HANDLE class Task : public Base { public: + enum { + EVT_BURST = 0, + EVT_HANDLE, + EVT_PROCESS, + EVT_TIMEOUT, + EVT_TASK, + }; + enum { + TASK_ON_HOLD = 0, + TASK_DONE, + TASK_BURST, + }; + enum { + W4_STICKY = 1, + W4_READING = 2, + W4_WRITING = 4, + }; Task(); virtual ~Task(); virtual String GetName(); @@ -29,13 +40,14 @@ class Task : public Base { void WaitFor(Task *); void WaitFor(Handle *, int = 0); void WaitFor(pid_t); - void WaitFor(timeval, int = 0); + void WaitFor(const timeval &, int = 0); Task * WaitedBy(); void SetBurst(); void Stop(); void Restart(); bool IsStopped(); void RemoveFromWatches(); + Handle * BurstHandle; protected: virtual int Do() throw (GeneralException); |