#ifndef __TASK_H__ #define __TASK_H__ #ifdef __cplusplus #include #include #include #include #include #define TASK_ON_HOLD 0 #define TASK_DONE 1 class Task : public Base { public: Task(); virtual ~Task(); virtual String GetName(); int Run(); int GetState(); void Suspend() throw (GeneralException); void WaitFor(Handle *); void WaitFor(Task *); void WaitFor(pid_t); void WaitFor(struct timeval); protected: virtual int Do() throw (GeneralException); int current; private: int state; bool suspended; vector w4ha; vector w4ta; vector w4pr; vector w4to; }; #else #error This only works with a C++ compiler #endif #endif