From 9235fbc2a736da2c68eb2dc0a3c1007b4a202d5e Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 13 Nov 2001 11:50:37 +0000 Subject: Still working on task system. --- include/CopyJob.h | 2 +- include/ReadJob.h | 2 +- include/Task.h | 11 ++++++----- include/TaskMan.h | 2 ++ 4 files changed, 10 insertions(+), 7 deletions(-) (limited to 'include') 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 #include #include +#include #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 TaskList; -- cgit v1.2.3