summaryrefslogtreecommitdiff
path: root/include/Task.h
diff options
context:
space:
mode:
authorPixel <Pixel>2001-11-12 22:20:50 +0000
committerPixel <Pixel>2001-11-12 22:20:50 +0000
commitae4d1cfcbbe4c6130bd6370a03f546993a37f567 (patch)
treea423eced8aab74e0ed121ad1b3e828247ac5bb34 /include/Task.h
parente57c35f00e5eba0ee5199997238cf3179a89c4d2 (diff)
Cleaning includes, progressing taskman...
Diffstat (limited to 'include/Task.h')
-rw-r--r--include/Task.h15
1 files changed, 12 insertions, 3 deletions
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