diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-06-20 16:51:51 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-06-20 16:51:51 (GMT) |
| commit | 0594aa5d07d7bf63885eee966d102e3e7354c925 (patch) | |
| tree | 5700cb10ab0e63b6684eaeba225d578bf2f1dfa6 /src/tasks/Task.h | |
| parent | 088b2f678d5baedcf3555a5afce76710e6900a9e (diff) | |
| download | powder-0594aa5d07d7bf63885eee966d102e3e7354c925.zip powder-0594aa5d07d7bf63885eee966d102e3e7354c925.tar.gz | |
More in the way of an autoupdater
Diffstat (limited to 'src/tasks/Task.h')
| -rw-r--r-- | src/tasks/Task.h | 10 |
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(); |
