summaryrefslogtreecommitdiff
path: root/lib/status_handler.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:16:21 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:16:21 +0200
commit88a2d0007db222c339f0b6a17794a2014a241892 (patch)
tree75105ef49b3a52b7ee176a1ad480e7652e49825f /lib/status_handler.h
parent4.2 (diff)
downloadFreeFileSync-88a2d0007db222c339f0b6a17794a2014a241892.tar.gz
FreeFileSync-88a2d0007db222c339f0b6a17794a2014a241892.tar.bz2
FreeFileSync-88a2d0007db222c339f0b6a17794a2014a241892.zip
4.3
Diffstat (limited to 'lib/status_handler.h')
-rw-r--r--lib/status_handler.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/status_handler.h b/lib/status_handler.h
index 390b4f0a..686c1f0e 100644
--- a/lib/status_handler.h
+++ b/lib/status_handler.h
@@ -7,7 +7,6 @@
#ifndef STATUSHANDLER_H_INCLUDED
#define STATUSHANDLER_H_INCLUDED
-#include <wx/string.h>
#include <string>
#include <zen/int64.h>
@@ -45,21 +44,18 @@ struct ProcessCallback
//note: this one must NOT throw in order to properly allow undoing setting of statistics!
//it is in general paired with a call to requestUiRefresh() to compensate!
- virtual void updateProcessedData(int objectsProcessed, zen::Int64 dataProcessed) = 0; //throw()
+ virtual void updateProcessedData(int objectsProcessed, zen::Int64 dataProcessed) = 0; //throw()!!
//opportunity to abort must be implemented in a frequently executed method like requestUiRefresh()
virtual void requestUiRefresh() = 0; //throw ?
- //this method is triggered repeatedly by requestUiRefresh() and can be used to refresh the ui by dispatching pending events
- virtual void forceUiRefresh() = 0;
-
//called periodically after data was processed: expected(!) to request GUI update
- virtual void reportStatus(const wxString& text) = 0; //status info only, should not be logged!
+ virtual void reportStatus(const std::wstring& text) = 0; //status info only, should not be logged!
//called periodically after data was processed: expected(!) to request GUI update
- virtual void reportInfo(const wxString& text) = 0;
+ virtual void reportInfo(const std::wstring& text) = 0;
- virtual void reportWarning(const wxString& warningMessage, bool& warningActive) = 0;
+ virtual void reportWarning(const std::wstring& warningMessage, bool& warningActive) = 0;
//error handling:
enum Response
@@ -67,8 +63,8 @@ struct ProcessCallback
IGNORE_ERROR = 10,
RETRY
};
- virtual Response reportError (const wxString& errorMessage) = 0; //recoverable error situation
- virtual void reportFatalError(const wxString& errorMessage) = 0; //non-recoverable error situation
+ virtual Response reportError (const std::wstring& errorMessage) = 0; //recoverable error situation
+ virtual void reportFatalError(const std::wstring& errorMessage) = 0; //non-recoverable error situation
};
@@ -86,6 +82,8 @@ class StatusHandler : public ProcessCallback, public AbortCallback
public:
StatusHandler() : abortRequested(false) {}
+ virtual void forceUiRefresh() = 0;
+
virtual void requestUiRefresh()
{
if (updateUiIsAllowed()) //test if specific time span between ui updates is over
bgstack15