diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:56:34 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:56:34 +0200 |
commit | 9084fa27f0f43cfa31dbc3a7ef87e2600c2dc3ca (patch) | |
tree | 61e2edc315a164d6fa3940b7de4b14dda0a9838c /library/statusHandler.h | |
parent | 1.15 (diff) | |
download | FreeFileSync-9084fa27f0f43cfa31dbc3a7ef87e2600c2dc3ca.tar.gz FreeFileSync-9084fa27f0f43cfa31dbc3a7ef87e2600c2dc3ca.tar.bz2 FreeFileSync-9084fa27f0f43cfa31dbc3a7ef87e2600c2dc3ca.zip |
1.16
Diffstat (limited to 'library/statusHandler.h')
-rw-r--r-- | library/statusHandler.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/library/statusHandler.h b/library/statusHandler.h index bae1de8e..208a2df8 100644 --- a/library/statusHandler.h +++ b/library/statusHandler.h @@ -10,7 +10,7 @@ bool updateUiIsAllowed(); //test if a specific amount of time is over void updateUiNow(); //do the updating -//interfaces for status updates (can be implemented by UI or commandline) +//interfaces for status updates (can be implemented by GUI or Batch mode) //overwrite virtual methods for respective functionality class ErrorHandler @@ -24,15 +24,14 @@ public: IGNORE_ERROR = 10, RETRY }; - virtual Response reportError(const Zstring& text) = 0; + virtual Response reportError(const Zstring& errorMessage) = 0; }; class StatusHandler { public: - StatusHandler() : - abortRequested(false) {} + StatusHandler() : abortRequested(false) {} virtual ~StatusHandler() {} //identifiers of different processes @@ -48,7 +47,6 @@ public: virtual void updateStatusText(const Zstring& text) = 0; virtual void initNewProcess(int objectsTotal, double dataTotal, Process processID) = 0; //informs about the total amount of data that will be processed from now on virtual void updateProcessedData(int objectsProcessed, double dataProcessed) = 0; //called periodically after data was processed - virtual ErrorHandler::Response reportError(const Zstring& text) = 0; //this method is triggered repeatedly by requestUiRefresh() and can be used to refresh the ui by dispatching pending events virtual void forceUiRefresh() = 0; @@ -66,6 +64,11 @@ public: abortRequested = true; } + //error handling: + virtual ErrorHandler::Response reportError(const Zstring& errorMessage) = 0; //recoverable error situation + virtual void reportFatalError(const Zstring& errorMessage) = 0; //non-recoverable error situation, implement abort! + virtual void reportWarning(const Zstring& warningMessage, bool& dontShowAgain) = 0; + protected: virtual void abortThisProcess() = 0; |