// alarms_base.h: interface for the alarms_base class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_ALARMS_BASE_H__A2F59A13_2492_40C7_8899_2129FC683FC5__INCLUDED_) #define AFX_ALARMS_BASE_H__A2F59A13_2492_40C7_8899_2129FC683FC5__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class QDateTime; class QStringList; class QString; interface IDebug { public: virtual void Debug( QString ) = 0; virtual void Log( QString ) = 0; virtual void AppendLog( QString ) = 0; virtual void SetPrefix( QString ) = 0; }; class alarms_base { public: alarms_base() {}; virtual ~alarms_base() {}; /*! Return the Tx count to be displayed on the main application.*/ virtual long getTxCount(){ return 0;}; /*! Return the Rx count to be displayed on the main application.*/ virtual long getRxCount(){ return 0;}; /*! This is called to inquire if the module is OK \return Return true if module is OK, false if there are errors.*/ virtual bool getStatusOk()=0; /*! This is called before the destructor, giving the module a chance to notify anything else that it is about to close.*/ virtual void aboutToClose()=0; /*! \return Return the QDateTime of the configuration file that has been loaded.*/ virtual QDateTime getConfigFileDate()=0; /*! \return Return the class name.*/ virtual const char* getClassName()=0; /*! \param bDebugOn sets the debug mode \return Return the subsequent debug mode.*/ virtual bool setDebugMode(bool bDebugOn)=0; /*! \return Return the current debug mode.*/ virtual bool getDebugMode()=0; /*! \param bLogOn sets the debug mode \return Return the subsequent Log mode.*/ virtual int setLogMode(int iLogControl)=0; /*! \return Return the current Log mode.*/ virtual int getLogMode()=0; // /*! To allow the module to have messages displayed on the main application this function // must return any messages that need displaying. // This function is called in the main applications thread, please be aware that this may be an issue. // \return QStringList of messages.*/ // virtual QStringList getLastLogs()=0; /*! This is called to pass a debug and logging handler interface into the plug-in. */ // virtual void SetDebugHandler( IDebug * pIDebug ) = 0; }; #endif // !defined(AFX_ALARMS_BASE_H__A2F59A13_2492_40C7_8899_2129FC683FC5__INCLUDED_)