Move SetDefaultTimeout to wxProtocol and set it to 60 seconds for both wxHTTP and wxFTP
Move SetPassword and SetUser implementations to wxProtocol to avoid code redundancy Make const-correct various getters Reorganize wxFTP docs Move wxStringToStringHashMap to hashmap.h and document its existance git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -25,13 +25,17 @@
|
||||
#include "wx/wfstream.h"
|
||||
#include "wx/protocol/file.h"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFileProto
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxFileProto, wxProtocol)
|
||||
IMPLEMENT_PROTOCOL(wxFileProto, wxT("file"), NULL, false)
|
||||
|
||||
wxFileProto::wxFileProto()
|
||||
: wxProtocol()
|
||||
{
|
||||
m_error = wxPROTO_NOERR;
|
||||
}
|
||||
|
||||
wxFileProto::~wxFileProto()
|
||||
@@ -43,12 +47,11 @@ wxInputStream *wxFileProto::GetInputStream(const wxString& path)
|
||||
wxFileInputStream *retval = new wxFileInputStream(wxURI::Unescape(path));
|
||||
if ( retval->Ok() )
|
||||
{
|
||||
m_error = wxPROTO_NOERR;
|
||||
|
||||
m_lastError = wxPROTO_NOERR;
|
||||
return retval;
|
||||
}
|
||||
|
||||
m_error = wxPROTO_NOFILE;
|
||||
m_lastError = wxPROTO_NOFILE;
|
||||
delete retval;
|
||||
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user