diff options
Diffstat (limited to 'ui/batchStatusHandler.h')
-rw-r--r-- | ui/batchStatusHandler.h | 53 |
1 files changed, 9 insertions, 44 deletions
diff --git a/ui/batchStatusHandler.h b/ui/batchStatusHandler.h index a075d7d7..e4d0cae2 100644 --- a/ui/batchStatusHandler.h +++ b/ui/batchStatusHandler.h @@ -2,78 +2,43 @@ #define BATCHSTATUSHANDLER_H_INCLUDED #include "../library/statusHandler.h" -#include <memory> #include "../library/processXml.h" #include "../library/errorLogging.h" class LogFile; -class FfsTrayIcon; class SyncStatus; class BatchStatusHandler : public StatusHandler { public: - virtual void addFinalInfo(const wxString& infoMessage) = 0; -}; - - -class BatchStatusHandlerSilent : public BatchStatusHandler -{ -public: - BatchStatusHandlerSilent(const xmlAccess::OnError handleError, const wxString& logfileDirectory, int& returnVal); - ~BatchStatusHandlerSilent(); - + BatchStatusHandler(bool runSilent, //defines: -start minimized and -quit immediately when finished + const wxString* logfileDirectory, //optional: enable logging if available + const xmlAccess::OnError handleError, + int& returnVal); + ~BatchStatusHandler(); virtual void updateStatusText(const Zstring& text); virtual void initNewProcess(int objectsTotal, wxLongLong dataTotal, Process processID); virtual void updateProcessedData(int objectsProcessed, wxLongLong dataProcessed); virtual void forceUiRefresh(); - virtual ErrorHandler::Response reportError(const wxString& errorMessage); - virtual void reportFatalError(const wxString& errorMessage); + void reportInfo(const wxString& infoMessage); virtual void reportWarning(const wxString& warningMessage, bool& warningActive); - virtual void addFinalInfo(const wxString& infoMessage); - -private: - virtual void abortThisProcess(); - - xmlAccess::OnError m_handleError; - - Process currentProcess; - int& returnValue; - std::auto_ptr<FfsTrayIcon> trayIcon; - - std::auto_ptr<LogFile> m_log; -}; - - -class BatchStatusHandlerGui : public BatchStatusHandler -{ -public: - BatchStatusHandlerGui(const xmlAccess::OnError handleError, int& returnVal); - ~BatchStatusHandlerGui(); - - virtual void updateStatusText(const Zstring& text); - virtual void initNewProcess(int objectsTotal, wxLongLong dataTotal, Process processID); - virtual void updateProcessedData(int objectsProcessed, wxLongLong dataProcessed); - virtual void forceUiRefresh(); - virtual ErrorHandler::Response reportError(const wxString& errorMessage); virtual void reportFatalError(const wxString& errorMessage); - virtual void reportWarning(const wxString& warningMessage, bool& warningActive); - virtual void addFinalInfo(const wxString& infoMessage); private: virtual void abortThisProcess(); - bool showPopups; + bool exitWhenFinished; + xmlAccess::OnError handleError_; FreeFileSync::ErrorLogging errorLog; //list of non-resolved errors and warnings Process currentProcess; int& returnValue; SyncStatus* syncStatusFrame; - wxString finalInfo; //workaround to display "Nothing to synchronize..." + boost::shared_ptr<LogFile> logFile; //optional! }; |