summaryrefslogtreecommitdiff
path: root/lib/Task.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Task.cc')
-rw-r--r--lib/Task.cc26
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/Task.cc b/lib/Task.cc
index 063a983..4978bde 100644
--- a/lib/Task.cc
+++ b/lib/Task.cc
@@ -4,7 +4,7 @@
#include "Task.h"
#include "String.h"
-Task::Task() : state(TASK_ON_HOLD), suspended(false), current(0) {
+Task::Task() : state(TASK_ON_HOLD), suspended(false), cleanup(false), current(0) {
TaskMan::AddTask(this);
}
Task::~Task() {
@@ -64,3 +64,27 @@ void Task::WaitFor(pid_t p) {
void Task::WaitFor(timeval t) {
w4to.push_back(t);
}
+
+void Task::SetBurst() {
+ state = TASK_BURST;
+}
+
+void Task::SetCleanUp() {
+ cleanup = true;
+}
+
+bool Task::HasToClean() {
+ return cleanup;
+}
+
+void Task::Stop() {
+ stopped = true;
+}
+
+void Task::Restart() {
+ stopped = false;
+}
+
+bool Task::IsStopped() {
+ return stopped;
+}