+ enum TransferMode
+ {
+ NONE, // not set by user explicitly
+ ASCII,
+ BINARY
+ };
+
+ wxFTP();
+ virtual ~wxFTP();
+
+ // Connecting and disconnecting
+ void SetUser(const wxString& user) { m_user = user; }
+ void SetPassword(const wxString& passwd) { m_passwd = passwd; }
+
+ bool Connect(wxSockAddress& addr, bool wait = TRUE);
+ bool Connect(const wxString& host);
+
+ // disconnect
+ virtual bool Close();
+
+ // Parameters set up
+
+ // set transfer mode now
+ bool SetBinary() { return SetTransferMode(BINARY); }
+ bool SetAscii() { return SetTransferMode(ASCII); }
+ bool SetTransferMode(TransferMode mode);
+
+ // Generic FTP interface
+
+ // the error code
+ virtual wxProtocolError GetError() { return m_lastError; }
+
+ // the last FTP server reply
+ const wxString& GetLastResult() { return m_lastResult; }
+
+ // send any FTP command (should be full FTP command line but without
+ // trailing "\r\n") and return its return code
+ char SendCommand(const wxString& command);