00001
00025 #ifndef INC_MI32_MIJOBSTATUS_H
00026 #define INC_MI32_MIJOBSTATUS_H
00027
00028 #ifndef INC_MI32_MISTATUS_H
00029 #include <mi32/mistatus.h>
00030 #endif
00031
00032 #ifndef INC_MI32_SOCKET_H
00033 #include <mi32/socket.h>
00034 #endif
00035
00036 #ifndef INC_MI32_FILEPATH_H
00037 #include <mi32/filepath.h>
00038 #endif
00039
00040 #ifndef INC_MI32_ERRHANDLER_H
00041 #include <mi32/errhandler.h>
00042 #endif
00043
00044
00045 class MIJOBSTATUS : public MISTATUSLOGGER {
00046 public:
00048 MIJOBSTATUS (
00049 );
00050
00052 virtual ~MIJOBSTATUS (
00053 );
00054
00056 ERRVALUE Connect(const FILEPATH& path);
00057
00058 MIJOBSTATUS (const MIJOBSTATUS& rhs);
00059 MIJOBSTATUS& operator= (const MIJOBSTATUS& rhs);
00060
00061 private:
00062 #ifndef GENERATING_DOXYGEN_OUTPUT
00063 class CLIENT : public MISOCKET::CLIENT {
00064 public:
00065 CLIENT () {}
00066 ~CLIENT() {}
00067
00068 void SetDelegate (
00069 FastDelegate<void()> delegate
00070 ) { m_Delegate = delegate; }
00071
00072 private:
00073 virtual void v_OnReadReady () {m_Delegate();}
00074 FastDelegate<void()> m_Delegate;
00075 };
00076
00077 void ReadReady();
00078 bool m_pause;
00079 bool m_cancel;
00080 double m_LastSentTime;
00081 CLIENT m_client;
00082
00083
00084 virtual bool v_IsCancelled ();
00085 virtual void v_ReportMessage (MISTATUSCONTEXT& context, const MISTRING& msgstr);
00086 virtual void v_ReportProgress (MISTATUSCONTEXT& context, double pctdone);
00087 #endif // GENERATING_DOXYGEN_OUTPUT
00088 };
00089
00090 #endif // INC_MI32_MIJOBSTATUS_H