From: Francesco Montorsi Date: Fri, 16 Jan 2009 13:34:44 +0000 (+0000) Subject: make wxSocketBase::SetTimeout virtual and make it protected in wxFTP X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6214e8d5716142f199ab71730c07a6b025518cfe make wxSocketBase::SetTimeout virtual and make it protected in wxFTP git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/protocol/ftp.h b/include/wx/protocol/ftp.h index 21312e87fd..c2c2cc2a38 100644 --- a/include/wx/protocol/ftp.h +++ b/include/wx/protocol/ftp.h @@ -2,7 +2,7 @@ // Name: ftp.h // Purpose: FTP protocol // Author: Vadim Zeitlin -// Modified by: Mark Johnson, wxWindows@mj10777.de +// Modified by: Mark Johnson, wxWindows@mj10777.de // 20000917 : RmDir, GetLastResult, GetList // Created: 07/07/1997 // RCS-ID: $Id$ @@ -42,7 +42,7 @@ public: bool Connect(const wxString& host); // disconnect - virtual bool Close(); + virtual bool Close(); // does NOT set m_lastError // Parameters set up @@ -81,7 +81,7 @@ public: // Get the size of a file in the current dir. // this function tries its best to deliver the size in bytes using BINARY - // (the SIZE command reports different sizes depending on whether + // (the SIZE command reports different sizes depending on whether // type is set to ASCII or BINARY) // returns -1 if file is non-existant or size could not be found int GetFileSize(const wxString& fileName); @@ -119,6 +119,11 @@ public: bool details = false); protected: + // just change access from public to protected for this wxSocketBase function: + // use SetDefaultTimeout instead which also sets our m_uiDefaultTimeout var + virtual void SetTimeout(long seconds) + { wxSocketBase::SetTimeout(seconds); } + // this executes a simple ftp command with the given argument and returns // true if it its return code starts with '2' bool DoSimpleCommand(const wxChar *command, diff --git a/include/wx/socket.h b/include/wx/socket.h index c3d655173d..628605f606 100644 --- a/include/wx/socket.h +++ b/include/wx/socket.h @@ -165,7 +165,7 @@ public: wxSocketFlags GetFlags() const { return m_flags; } void SetFlags(wxSocketFlags flags); - void SetTimeout(long seconds); + virtual void SetTimeout(long seconds); long GetTimeout() const { return m_timeout; } bool GetOption(int level, int optname, void *optval, int *optlen);