From 4d831c926523f6972e09b74517edcc1d981fe24c Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Sat, 16 Aug 2003 12:10:15 +0000 Subject: [PATCH] Compilation fixed sor wxUSE_PROTOCOL_FTP/HTTP=0. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@22929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/url.h | 2 +- src/common/url.cpp | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/include/wx/url.h b/include/wx/url.h index 4caf681652..3b7dd469f5 100644 --- a/include/wx/url.h +++ b/include/wx/url.h @@ -66,7 +66,7 @@ public: protected: static wxProtoInfo *ms_protocols; -#if wxUSE_SOCKETS +#if wxUSE_SOCKETS && wxUSE_PROTOCOL_HTTP static wxHTTP *ms_proxyDefault; static bool ms_useDefaultProxy; wxHTTP *m_proxy; diff --git a/src/common/url.cpp b/src/common/url.cpp index 16e2689e9a..39015e511e 100644 --- a/src/common/url.cpp +++ b/src/common/url.cpp @@ -41,12 +41,17 @@ wxProtoInfo *wxURL::ms_protocols = NULL; USE_PROTOCOL(wxFileProto) #if wxUSE_SOCKETS +#if wxUSE_PROTOCOL_HTTP USE_PROTOCOL(wxHTTP) +#endif +#if wxUSE_PROTOCOL_FTP USE_PROTOCOL(wxFTP) - +#endif +#if wxUSE_PROTOCOL_HTTP wxHTTP *wxURL::ms_proxyDefault = NULL; bool wxURL::ms_useDefaultProxy = FALSE; #endif +#endif // -------------------------------------------------------------- // wxURL @@ -62,7 +67,7 @@ wxURL::wxURL(const wxString& url) m_error = wxURL_NOERR; m_url = url; -#if wxUSE_SOCKETS +#if wxUSE_SOCKETS && wxUSE_PROTOCOL_HTTP if ( ms_useDefaultProxy && !ms_proxyDefault ) { SetDefaultProxy( wxGetenv(wxT("HTTP_PROXY")) ); @@ -125,7 +130,7 @@ bool wxURL::ParseURL() } // URL parse finished. -#if wxUSE_SOCKETS +#if wxUSE_SOCKETS && wxUSE_PROTOCOL_HTTP if (m_useProxy) { // We destroy the newly created protocol. @@ -149,7 +154,7 @@ bool wxURL::ParseURL() void wxURL::CleanData() { -#if wxUSE_SOCKETS +#if wxUSE_SOCKETS && wxUSE_PROTOCOL_HTTP if (!m_useProxy) #endif delete m_protocol; @@ -158,7 +163,7 @@ void wxURL::CleanData() wxURL::~wxURL() { CleanData(); -#if wxUSE_SOCKETS +#if wxUSE_SOCKETS && wxUSE_PROTOCOL_HTTP if (m_proxy && m_proxy != ms_proxyDefault) delete m_proxy; #endif @@ -287,7 +292,7 @@ wxInputStream *wxURL::GetInputStream() m_protocol->SetPassword(m_password); } -#if wxUSE_SOCKETS +#if wxUSE_SOCKETS && wxUSE_PROTOCOL_HTTP wxIPV4address addr; // m_protoinfo is NULL when we use a proxy @@ -324,7 +329,7 @@ wxInputStream *wxURL::GetInputStream() return the_i_stream; } -#if wxUSE_SOCKETS +#if wxUSE_SOCKETS && wxUSE_PROTOCOL_HTTP void wxURL::SetDefaultProxy(const wxString& url_proxy) { if ( !url_proxy ) @@ -487,7 +492,7 @@ wxString wxURL::ConvertFromURI(const wxString& uri) // A module which deletes the default proxy if we created it // ---------------------------------------------------------------------- -#if wxUSE_SOCKETS +#if wxUSE_SOCKETS && wxUSE_PROTOCOL_HTTP class wxURLModule : public wxModule {