diff options
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(); |
