summaryrefslogtreecommitdiff
path: root/src/tasks/Task.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-22 18:04:38 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-22 18:04:38 (GMT)
commiteb52f759de6f0805865fb7f31444f2b1421b4d25 (patch)
tree49b259400c8946a8bea84c7af3f758f86a59d976 /src/tasks/Task.h
parent55d90a44a8425f70b08d864570e255f4bad8ba4c (diff)
downloadpowder-eb52f759de6f0805865fb7f31444f2b1421b4d25.zip
powder-eb52f759de6f0805865fb7f31444f2b1421b4d25.tar.gz
Success/Failure return from Asyn Task, Prompt to visit website upon update failure
Diffstat (limited to 'src/tasks/Task.h')
-rw-r--r--src/tasks/Task.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/tasks/Task.h b/src/tasks/Task.h
index ae83e1d..76284ac 100644
--- a/src/tasks/Task.h
+++ b/src/tasks/Task.h
@@ -19,6 +19,7 @@ public:
void Start();
int GetProgress();
bool GetDone();
+ bool GetSuccess();
std::string GetError();
std::string GetStatus();
void Poll();
@@ -27,11 +28,13 @@ public:
protected:
int progress;
bool done;
+ bool success;
std::string status;
std::string error;
int thProgress;
bool thDone;
+ bool thSuccess;
std::string thStatus;
std::string thError;
@@ -43,13 +46,17 @@ protected:
virtual void before();
virtual void after();
- virtual void doWork();
+ virtual bool doWork();
static void * doWork_helper(void * ref);
virtual void notifyProgress(int progress);
virtual void notifyError(std::string error);
virtual void notifyStatus(std::string status);
- virtual void notifyDone();
+
+ virtual void notifyProgressMain();
+ virtual void notifyErrorMain();
+ virtual void notifyStatusMain();
+ virtual void notifyDoneMain();
};
#endif /* TASK_H_ */