Main Page   Class Hierarchy   Compound List   File List   Compound Members  

cmdprot.h

00001 /*
00002  * Purpose: base class for all command line oriented internet protocols
00003  * Author:  Frank Buß
00004  * Created: 2002
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     // handling for wxSOCKET_INPUT
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

Generated on Mon May 6 01:14:20 2002 for Wino by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001