summaryrefslogtreecommitdiff
path: root/src/tasks/Task.h
diff options
context:
space:
mode:
authorBryan Hoyle <starfoxprime@gmail.com>2012-06-20 18:41:17 (GMT)
committer Bryan Hoyle <starfoxprime@gmail.com>2012-06-20 18:41:17 (GMT)
commit9953f4518ec2d98dbe950e13a94a5e845f725f6c (patch)
tree67d9b56b7a4772c817f753bef8cdc81ba7833b7b /src/tasks/Task.h
parentb35255b722a5259f34cfc9b7569f58d11658c3b9 (diff)
parentad76b293d8fc257a7efe0cbcf6f7fb9380616030 (diff)
downloadpowder-9953f4518ec2d98dbe950e13a94a5e845f725f6c.zip
powder-9953f4518ec2d98dbe950e13a94a5e845f725f6c.tar.gz
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/tasks/Task.h')
-rw-r--r--src/tasks/Task.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tasks/Task.h b/src/tasks/Task.h
index 90463cb..d5ccd4b 100644
--- a/src/tasks/Task.h
+++ b/src/tasks/Task.h
@@ -20,16 +20,26 @@ public:
int GetProgress();
bool GetDone();
std::string GetStatus();
+ void Poll();
Task() {}
virtual ~Task();
protected:
int progress;
bool done;
std::string status;
+
+ int thProgress;
+ bool thDone;
+ std::string thStatus;
+
TaskListener * listener;
pthread_t doWorkThread;
+ pthread_mutex_t taskMutex;
+ pthread_cond_t taskCond;
+
virtual void doWork();
static void * doWork_helper(void * ref);
+
void notifyProgress(int progress);
void notifyStatus(std::string status);
void notifyDone();