1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #ifndef GATEWAY_COMMON_H
- #define GATEWAY_COMMON_H
- #include <kopano/zcdefs.h>
- #include <string>
- #include <kopano/ECChannel.h>
- #include <kopano/ECLogger.h>
- #include <kopano/ECConfig.h>
- #define LOGIN_RETRIES 5
- class ClientProto {
- public:
- ClientProto(const char *szServerPath, ECChannel *lpChannel, ECLogger *lpLogger, ECConfig *lpConfig) :
- m_strPath(szServerPath), lpChannel(lpChannel), lpLogger(lpLogger), lpConfig(lpConfig), m_ulFailedLogins(0)
- {};
- virtual ~ClientProto(void) _kc_impdtor;
- virtual int getTimeoutMinutes() = 0;
- virtual bool isContinue() const { return false; };
- virtual HRESULT HrSendGreeting(const std::string &strHostString) = 0;
- virtual HRESULT HrCloseConnection(const std::string &strQuitMsg) = 0;
- virtual HRESULT HrProcessCommand(const std::string &strInput) = 0;
- virtual HRESULT HrProcessContinue(const std::string &strInput) { return MAPI_E_NO_SUPPORT; };
- virtual HRESULT HrDone(bool bSendResponse) = 0;
- protected:
- std::string m_strPath;
- ECChannel *lpChannel;
- ECLogger *lpLogger;
- ECConfig *lpConfig;
- ULONG m_ulFailedLogins;
- };
- #endif
|