00001
00002
00003
00004
00005
00006
00007 #ifndef CMDPROT_H
00008 #define CMDPROT_H
00009
00010 #include <wx/wx.h>
00011
00012 #include "email.h"
00013
00014
00015 class wxCmdlineProtocolSocketEventHandler;
00016
00020 class wxCmdlineProtocol : public wxSocketClient
00021 {
00022 public:
00023 wxCmdlineProtocol();
00024
00025 ~wxCmdlineProtocol();
00026
00034 void SetHost(const wxString& host, const wxString& user = "", const wxString& password = "");
00035
00036 void Connect();
00037
00038
00039
00044 virtual void EvaluateLine(const wxString& line) = 0;
00045
00050 virtual void OnConnect(wxSocketEvent& event) = 0;
00051
00057 void OnInput(wxSocketEvent& event);
00058
00062 void OnSocketEvent(wxSocketEvent& event);
00063
00068 void Write(const wxString& msg);
00069
00070 private:
00071 wxCmdlineProtocolSocketEventHandler* m_pCmdlineProtocolSocketEventHandler;
00072 bool m_bConnected;
00073 wxString m_inputLine;
00074 wxString m_host;
00075 wxString m_user;
00076 wxString m_password;
00077 };
00078
00079 #endif