summaryrefslogtreecommitdiff
path: root/include/Task.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/Task.h')
-rw-r--r--include/Task.h110
1 files changed, 55 insertions, 55 deletions
diff --git a/include/Task.h b/include/Task.h
index 384207a..9c966a3 100644
--- a/include/Task.h
+++ b/include/Task.h
@@ -1,55 +1,55 @@
-#ifndef __TASK_H__
-#define __TASK_H__
-
-#include <unistd.h>
-#include <sys/time.h>
-#include <vector>
-#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
-
-class Task : public Base {
- public:
- Task();
- virtual ~Task();
- virtual String GetName();
- int Run();
- int DryRun();
- int GetState();
- void Suspend(int = -1) throw (GeneralException);
- void WaitFor(Task *);
- void WaitFor(Handle *, int = 0);
- void WaitFor(pid_t);
- void WaitFor(timeval, int = 0);
- Task * WaitedBy();
- void SetBurst();
- void Stop();
- void Restart();
- bool IsStopped();
- void RemoveFromWatches();
-
- protected:
- virtual int Do() throw (GeneralException);
- int current;
-
- private:
- class wbta_t {
- public:
- wbta_t(Task * ata) : ta(ata) { }
- Task * ta;
- };
-
- int state;
- bool stopped;
- bool suspended;
- Task * wbta;
-};
-
-#endif
+#ifndef __TASK_H__
+#define __TASK_H__
+
+#include <unistd.h>
+#include <sys/time.h>
+#include <vector>
+#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
+
+class Task : public Base {
+ public:
+ Task();
+ virtual ~Task();
+ virtual String GetName();
+ int Run();
+ int DryRun();
+ int GetState();
+ void Suspend(int = -1) throw (GeneralException);
+ void WaitFor(Task *);
+ void WaitFor(Handle *, int = 0);
+ void WaitFor(pid_t);
+ void WaitFor(timeval, int = 0);
+ Task * WaitedBy();
+ void SetBurst();
+ void Stop();
+ void Restart();
+ bool IsStopped();
+ void RemoveFromWatches();
+
+ protected:
+ virtual int Do() throw (GeneralException);
+ int current;
+
+ private:
+ class wbta_t {
+ public:
+ wbta_t(Task * ata) : ta(ata) { }
+ Task * ta;
+ };
+
+ int state;
+ bool stopped;
+ bool suspended;
+ Task * wbta;
+};
+
+#endif