diff options
author | Pixel <Pixel> | 2001-11-13 11:50:37 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-11-13 11:50:37 +0000 |
commit | 9235fbc2a736da2c68eb2dc0a3c1007b4a202d5e (patch) | |
tree | 4045976599c1738646e6debccefa90d00107a42e /include | |
parent | 701e4e617e00e7f0ed4f07c1c4bcc20f6fb6ce4d (diff) |
Still working on task system.
Diffstat (limited to 'include')
-rw-r--r-- | include/CopyJob.h | 2 | ||||
-rw-r--r-- | include/ReadJob.h | 2 | ||||
-rw-r--r-- | include/Task.h | 11 | ||||
-rw-r--r-- | include/TaskMan.h | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/include/CopyJob.h b/include/CopyJob.h index 3c88100..a4f4bca 100644 --- a/include/CopyJob.h +++ b/include/CopyJob.h @@ -11,7 +11,7 @@ class CopyJob : public Task { public: CopyJob(Handle *, Handle *, ssize_t = -1); virtual ~CopyJob(); - virtual int Do(); + virtual int Do() throw (GeneralException); virtual String GetName(); private: Handle * s, * d; diff --git a/include/ReadJob.h b/include/ReadJob.h index 4822390..90ba2c8 100644 --- a/include/ReadJob.h +++ b/include/ReadJob.h @@ -10,7 +10,7 @@ class ReadJob : public Task { public: ReadJob(Handle *, Handle *); virtual ~ReadJob(); - virtual int Do(); + virtual int Do() throw (GeneralException); virtual String GetName(); private: Handle * s, * d; diff --git a/include/Task.h b/include/Task.h index f728e62..675b2ed 100644 --- a/include/Task.h +++ b/include/Task.h @@ -5,6 +5,7 @@ #include <unistd.h> #include <vector.h> #include <Exceptions.h> +#include <Handle.h> #define TASK_ON_HOLD 0 #define TASK_DONE 1 @@ -17,12 +18,12 @@ class Task : public Base { int Run(); int GetState(); void Suspend() throw (GeneralException); - bool WaitFor(Handle *); - bool WaitFor(Task *); - bool WaitFor(pid_t); - bool WaitFor(struct timeval); + void WaitFor(Handle *); + void WaitFor(Task *); + void WaitFor(pid_t); + void WaitFor(struct timeval); protected: - virtual int Do(); + virtual int Do() throw (GeneralException); private: int state; diff --git a/include/TaskMan.h b/include/TaskMan.h index 03797af..dc8c913 100644 --- a/include/TaskMan.h +++ b/include/TaskMan.h @@ -9,6 +9,8 @@ class TaskMan : public Base { public: TaskMan() throw (GeneralException); int AddTask(Task *); + int TaskMan::RemoveTask(Task *); + void Init() throw (GeneralException); void MainLoop() throw (GeneralException); private: vector<Task *> TaskList; |