summaryrefslogtreecommitdiff
path: root/src/tasks/Task.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-21 14:49:32 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-21 14:49:32 (GMT)
commit550f6e28e012ceba8df9274fc71c7fbddfd90530 (patch)
treef4047461c04db78e0d8c8b0a81125c6030074908 /src/tasks/Task.h
parent8fc3325b1c55a84d29c3b4fafe242af279c09fe5 (diff)
downloadpowder-550f6e28e012ceba8df9274fc71c7fbddfd90530.zip
powder-550f6e28e012ceba8df9274fc71c7fbddfd90530.tar.gz
Stage 1 of update process completed
Diffstat (limited to 'src/tasks/Task.h')
-rw-r--r--src/tasks/Task.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tasks/Task.h b/src/tasks/Task.h
index 10a8b90..ae83e1d 100644
--- a/src/tasks/Task.h
+++ b/src/tasks/Task.h
@@ -15,10 +15,11 @@
class TaskListener;
class Task {
public:
- void SetTaskListener(TaskListener * listener);
+ void AddTaskListener(TaskListener * listener);
void Start();
int GetProgress();
bool GetDone();
+ std::string GetError();
std::string GetStatus();
void Poll();
Task() {}
@@ -27,10 +28,12 @@ protected:
int progress;
bool done;
std::string status;
+ std::string error;
int thProgress;
bool thDone;
std::string thStatus;
+ std::string thError;
TaskListener * listener;
pthread_t doWorkThread;
@@ -43,9 +46,10 @@ protected:
virtual void doWork();
static void * doWork_helper(void * ref);
- void notifyProgress(int progress);
- void notifyStatus(std::string status);
- void notifyDone();
+ virtual void notifyProgress(int progress);
+ virtual void notifyError(std::string error);
+ virtual void notifyStatus(std::string status);
+ virtual void notifyDone();
};
#endif /* TASK_H_ */