summaryrefslogtreecommitdiff
path: root/Application.h
diff options
context:
space:
mode:
Diffstat (limited to 'Application.h')
-rw-r--r--Application.h47
1 files changed, 28 insertions, 19 deletions
diff --git a/Application.h b/Application.h
index e1b12172..60b8fbe7 100644
--- a/Application.h
+++ b/Application.h
@@ -54,51 +54,60 @@ public:
class LogFile;
+class FfsTrayIcon;
+
class BatchStatusHandlerSilent : public BatchStatusHandler
{
public:
- BatchStatusHandlerSilent(bool ignoreAllErrors, LogFile* log, int& returnVal);
+ BatchStatusHandlerSilent(const xmlAccess::OnError handleError, int& returnVal);
~BatchStatusHandlerSilent();
- void updateStatusText(const Zstring& text); //virtual impl.
- void initNewProcess(int objectsTotal, double dataTotal, Process processID); //virtual impl.
- void updateProcessedData(int objectsProcessed, double dataProcessed) {} //virtual impl.
- ErrorHandler::Response reportError(const Zstring& text); //virtual impl.
- void forceUiRefresh() {} //virtual impl.
+ virtual void updateStatusText(const Zstring& text);
+ virtual void initNewProcess(int objectsTotal, double dataTotal, Process processID);
+ virtual void updateProcessedData(int objectsProcessed, double dataProcessed) {}
+ virtual void forceUiRefresh();
+
+ virtual ErrorHandler::Response reportError(const Zstring& errorMessage);
+ virtual void reportFatalError(const Zstring& errorMessage);
+ virtual void reportWarning(const Zstring& warningMessage, bool& dontShowAgain);
- void exitAndSetStatus(const wxString& message, ExitCode code); //abort externally //virtual impl.
+ virtual void exitAndSetStatus(const wxString& message, ExitCode code); //abort externally
private:
- void abortThisProcess(); //virtual impl.
+ virtual void abortThisProcess();
- bool ignoreErrors;
+ xmlAccess::OnError m_handleError;
wxArrayString unhandledErrors; //list of non-resolved errors
Process currentProcess;
int& returnValue;
+ std::auto_ptr<FfsTrayIcon> trayIcon;
- LogFile* m_log;
+ std::auto_ptr<LogFile> m_log;
};
class BatchStatusHandlerGui : public BatchStatusHandler
{
public:
- BatchStatusHandlerGui(bool ignoreAllErrors, int& returnVal);
+ BatchStatusHandlerGui(const xmlAccess::OnError handleError, int& returnVal);
~BatchStatusHandlerGui();
- void updateStatusText(const Zstring& text); //virtual impl.
- void initNewProcess(int objectsTotal, double dataTotal, Process processID); //virtual impl.
- void updateProcessedData(int objectsProcessed, double dataProcessed); //virtual impl.
- ErrorHandler::Response reportError(const Zstring& text); //virtual impl.
- void forceUiRefresh(); //virtual impl.
+ virtual void updateStatusText(const Zstring& text);
+ virtual void initNewProcess(int objectsTotal, double dataTotal, Process processID);
+ virtual void updateProcessedData(int objectsProcessed, double dataProcessed);
+ virtual void forceUiRefresh();
+
+ virtual ErrorHandler::Response reportError(const Zstring& errorMessage);
+ virtual void reportFatalError(const Zstring& errorMessage);
+ virtual void reportWarning(const Zstring& warningMessage, bool& dontShowAgain);
- void exitAndSetStatus(const wxString& message, ExitCode code); //abort externally //virtual impl.
+ virtual void exitAndSetStatus(const wxString& message, ExitCode code); //abort externally
private:
- void abortThisProcess(); //virtual impl.
+ virtual void abortThisProcess();
- bool ignoreErrors;
+ xmlAccess::OnError m_handleError;
wxArrayString unhandledErrors; //list of non-resolved errors
Process currentProcess;
int& returnValue;
bgstack15