]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxUSE_PROTOCOL[_XXX] and wxUSE_URL settings
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 30 Dec 2001 22:27:24 +0000 (22:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 30 Dec 2001 22:27:24 +0000 (22:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

14 files changed:
configure.in
include/wx/chkconf.h
include/wx/msw/setup0.h
include/wx/protocol/file.h
include/wx/protocol/ftp.h
include/wx/protocol/http.h
include/wx/protocol/protocol.h
include/wx/univ/setup.h
include/wx/url.h
setup.h.in
src/common/ftp.cpp
src/common/http.cpp
src/common/protocol.cpp
src/common/url.cpp

index 24b327aadd3af783bc3f5ff385572c9347c32c64..61f6fe9e51ee94964f663faa62da98e6a5abe689 100644 (file)
@@ -1074,6 +1074,10 @@ dnl ---------------------------------------------------------------------------
 WX_ARG_ENABLE(intl,          [  --enable-intl           use internationalization system], wxUSE_INTL)
 WX_ARG_ENABLE(config,        [  --enable-config         use wxConfig (and derived) classes], wxUSE_CONFIG)
 
+WX_ARG_ENABLE(protocols,     [  --enable-protocols      use wxProtocol and derived classes], wxUSE_PROTOCOL)
+WX_ARG_ENABLE(ftp,           [  --enable-ftp            use wxFTP (requires wxProtocol], wxUSE_PROTOCOL_FTP)
+WX_ARG_ENABLE(http,          [  --enable-http           use wxHTTP (requires wxProtocol], wxUSE_PROTOCOL_HTTP)
+WX_ARG_ENABLE(fileproto,     [  --enable-fileproto      use wxFileProto class (requires wxProtocol], wxUSE_PROTOCOL_FILE)
 WX_ARG_ENABLE(sockets,       [  --enable-sockets        use socket/network classes], wxUSE_SOCKETS)
 
 WX_ARG_ENABLE(ipc,           [  --enable-ipc            use interprocess communication (wxSocket etc.)], wxUSE_IPC)
index fc214570ba5f2741b6d7e4c9b2d55f4f753cd227..d1cbd51389a30af21b32b241333d40d19d770cb9 100644 (file)
@@ -20,7 +20,6 @@
 #define wxABORT_ON_CONFIG_ERROR
 
 
-
 /*
    tests for non GUI features
  */
 #   endif
 #endif /* !defined(wxUSE_DYNAMIC_LOADER) */
 
+#ifndef wxUSE_LOG
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_LOG must be defined."
+#   else
+#       define wxUSE_LOG 0
+#   endif
+#endif /* !defined(wxUSE_LOG) */
+
+#ifndef wxUSE_LONGLONG
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_LONGLONG must be defined."
+#   else
+#       define wxUSE_LONGLONG 0
+#   endif
+#endif /* !defined(wxUSE_LONGLONG) */
+
+#ifndef wxUSE_MIMETYPE
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_MIMETYPE must be defined."
+#   else
+#       define wxUSE_MIMETYPE 0
+#   endif
+#endif /* !defined(wxUSE_MIMETYPE) */
+
+#ifndef wxUSE_PROTOCOL
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_PROTOCOL must be defined."
+#   else
+#       define wxUSE_PROTOCOL 0
+#   endif
+#endif /* !defined(wxUSE_PROTOCOL) */
+
+/* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
+#if !wxUSE_PROTOCOL
+#   undef wxUSE_PROTOCOL_HTTP
+#   undef wxUSE_PROTOCOL_FTP
+#   undef wxUSE_PROTOCOL_FILE
+#   define wxUSE_PROTOCOL_HTTP 0
+#   define wxUSE_PROTOCOL_FTP 0
+#   define wxUSE_PROTOCOL_FILE 0
+#endif /* wxUSE_PROTOCOL */
+
+#ifndef wxUSE_PROTOCOL_HTTP
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_PROTOCOL_HTTP must be defined."
+#   else
+#       define wxUSE_PROTOCOL_HTTP 0
+#   endif
+#endif /* !defined(wxUSE_PROTOCOL_HTTP) */
+
+#ifndef wxUSE_PROTOCOL_FTP
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_PROTOCOL_FTP must be defined."
+#   else
+#       define wxUSE_PROTOCOL_FTP 0
+#   endif
+#endif /* !defined(wxUSE_PROTOCOL_FTP) */
+
+#ifndef wxUSE_PROTOCOL_FILE
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_PROTOCOL_FILE must be defined."
+#   else
+#       define wxUSE_PROTOCOL_FILE 0
+#   endif
+#endif /* !defined(wxUSE_PROTOCOL_FILE) */
+
+#ifndef wxUSE_REGEX
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_REGEX must be defined."
+#   else
+#       define wxUSE_REGEX 0
+#   endif
+#endif /* !defined(wxUSE_REGEX) */
+
+#ifndef wxUSE_SOCKETS
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_SOCKETS must be defined."
+#   else
+#       define wxUSE_SOCKETS 0
+#   endif
+#endif /* !defined(wxUSE_SOCKETS) */
+
+#ifndef wxUSE_STREAMS
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_STREAMS must be defined."
+#   else
+#       define wxUSE_STREAMS 0
+#   endif
+#endif /* !defined(wxUSE_STREAMS) */
+
+#ifndef wxUSE_STOPWATCH
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_STOPWATCH must be defined."
+#   else
+#       define wxUSE_STOPWATCH 0
+#   endif
+#endif /* !defined(wxUSE_STOPWATCH) */
+
+#ifndef wxUSE_TEXTBUFFER
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_TEXTBUFFER must be defined."
+#   else
+#       define wxUSE_TEXTBUFFER 0
+#   endif
+#endif /* !defined(wxUSE_TEXTBUFFER) */
+
+#ifndef wxUSE_TEXTFILE
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_TEXTFILE must be defined."
+#   else
+#       define wxUSE_TEXTFILE 0
+#   endif
+#endif /* !defined(wxUSE_TEXTFILE) */
+
+#ifndef wxUSE_UNICODE
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_UNICODE must be defined."
+#   else
+#       define wxUSE_UNICODE 0
+#   endif
+#endif /* !defined(wxUSE_UNICODE) */
+
+#ifndef wxUSE_URL
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_URL must be defined."
+#   else
+#       define wxUSE_URL 0
+#   endif
+#endif /* !defined(wxUSE_URL) */
+
 /*
    all these tests are for GUI only
  */
 #   endif
 #endif /* !defined(wxUSE_LISTCTRL) */
 
-#ifndef wxUSE_LOG
-#   ifdef wxABORT_ON_CONFIG_ERROR
-#       error "wxUSE_LOG must be defined."
-#   else
-#       define wxUSE_LOG 0
-#   endif
-#endif /* !defined(wxUSE_LOG) */
-
 #ifndef wxUSE_LOGGUI
 #   ifdef wxABORT_ON_CONFIG_ERROR
 #       error "wxUSE_LOGGUI must be defined."
 #   endif
 #endif /* !defined(wxUSE_MENUS) */
 
-#ifndef wxUSE_MIMETYPE
-#   ifdef wxABORT_ON_CONFIG_ERROR
-#       error "wxUSE_MIMETYPE must be defined."
-#   else
-#       define wxUSE_MIMETYPE 0
-#   endif
-#endif /* !defined(wxUSE_MIMETYPE) */
-
 #ifndef wxUSE_MSGDLG
 #   ifdef wxABORT_ON_CONFIG_ERROR
 #       error "wxUSE_MSGDLG must be defined."
 #   endif
 #endif /* !defined(wxUSE_RADIOBTN) */
 
-#ifndef wxUSE_REGEX
-#   ifdef wxABORT_ON_CONFIG_ERROR
-#       error "wxUSE_REGEX must be defined."
-#   else
-#       define wxUSE_REGEX 0
-#   endif
-#endif /* !defined(wxUSE_REGEX) */
-
 #ifndef wxUSE_SASH
 #   ifdef wxABORT_ON_CONFIG_ERROR
 #       error "wxUSE_SASH must be defined."
 #   endif
 #endif /* !defined(wxUSE_STATUSBAR) */
 
-#ifndef wxUSE_STOPWATCH
-#   ifdef wxABORT_ON_CONFIG_ERROR
-#       error "wxUSE_STOPWATCH must be defined."
-#   else
-#       define wxUSE_STOPWATCH 0
-#   endif
-#endif /* !defined(wxUSE_STOPWATCH) */
-
 #ifndef wxUSE_TAB_DIALOG
 #   ifdef wxABORT_ON_CONFIG_ERROR
 #       error "wxUSE_TAB_DIALOG must be defined."
 #   endif
 #endif /* !defined(wxUSE_TAB_DIALOG) */
 
-#ifndef wxUSE_TEXTBUFFER
-#   ifdef wxABORT_ON_CONFIG_ERROR
-#       error "wxUSE_TEXTBUFFER must be defined."
-#   else
-#       define wxUSE_TEXTBUFFER 0
-#   endif
-#endif /* !defined(wxUSE_TEXTBUFFER) */
-
 #ifndef wxUSE_TEXTCTRL
 #   ifdef wxABORT_ON_CONFIG_ERROR
 #       error "wxUSE_TEXTCTRL must be defined."
 #   endif
 #endif /* !defined(wxUSE_TEXTCTRL) */
 
-#ifndef wxUSE_TEXTFILE
-#   ifdef wxABORT_ON_CONFIG_ERROR
-#       error "wxUSE_TEXTFILE must be defined."
-#   else
-#       define wxUSE_TEXTFILE 0
-#   endif
-#endif /* !defined(wxUSE_TEXTFILE) */
-
 #ifndef wxUSE_TIPWINDOW
 #   ifdef wxABORT_ON_CONFIG_ERROR
 #       error "wxUSE_TIPWINDOW must be defined."
 #   endif
 #endif /* !defined(wxUSE_WXHTML_HELP) */
 
-#ifndef wxUSE_UNICODE
-#   ifdef wxABORT_ON_CONFIG_ERROR
-#       error "wxUSE_UNICODE must be defined."
-#   else
-#       define wxUSE_UNICODE 0
-#   endif
-#endif /* !defined(wxUSE_UNICODE) */
+#endif /* wxUSE_GUI */
 
 /*
    check consistency of the settings
  */
+
+#if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
+#   if !wxUSE_PROTOCOL
+#        ifdef wxABORT_ON_CONFIG_ERROR
+#            error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
+#        else
+#            undef wxUSE_PROTOCOL
+#            define wxUSE_PROTOCOL 1
+#        endif
+#   endif
+#endif /* wxUSE_PROTOCOL_XXX */
+
+#if wxUSE_URL
+#   if !wxUSE_PROTOCOL
+#        ifdef wxABORT_ON_CONFIG_ERROR
+#            error "wxUSE_URL requires wxUSE_PROTOCOL"
+#        else
+#            undef wxUSE_PROTOCOL
+#            define wxUSE_PROTOCOL 1
+#        endif
+#   endif
+#endif /* wxUSE_URL */
+
+#if wxUSE_PROTOCOL
+#   if !wxUSE_SOCKETS
+#       if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
+#           ifdef wxABORT_ON_CONFIG_ERROR
+#               error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
+#           else
+#               undef wxUSE_SOCKETS
+#               define wxUSE_SOCKETS 1
+#           endif
+#       endif
+#   endif
+
+#   if !wxUSE_STREAMS
+#       ifdef wxABORT_ON_CONFIG_ERROR
+#           error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
+#       else
+#           undef wxUSE_STREAMS
+#           define wxUSE_STREAMS 1
+#       endif
+#   endif
+#endif /* wxUSE_PROTOCOL */
+
+/* non GUI settings */
+#if wxUSE_STOPWATCH
+#    if !wxUSE_LONGLONG
+#        ifdef wxABORT_ON_CONFIG_ERROR
+#            error "wxUSE_STOPWATCH requires wxUSE_LONGLONG"
+#        else
+#            undef wxUSE_LONGLONG
+#            define wxUSE_LONGLONG 1
+#        endif
+#    endif
+#endif /* wxUSE_STOPWATCH */
+
+#if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
+#   else
+#       undef wxUSE_TEXTFILE
+#       define wxUSE_TEXTFILE 1
+#   endif
+#endif /* wxUSE_MIMETYPE */
+
+#if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
+#   else
+#       undef wxUSE_TEXTBUFFER
+#       define wxUSE_TEXTBUFFER 1
+#   endif
+#endif /* wxUSE_TEXTFILE */
+
+#if wxUSE_TEXTFILE && !wxUSE_FILE
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_TEXTFILE requires wxUSE_FILE"
+#   else
+#       undef wxUSE_FILE
+#       define wxUSE_FILE 1
+#   endif
+#endif /* wxUSE_TEXTFILE */
+
+#if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
+#   else
+#       undef wxUSE_UNICODE
+#       define wxUSE_UNICODE 1
+#   endif
+#endif /* wxUSE_UNICODE_MSLU */
+
+/* the rest of the tests is for the GUI settings only */
+#if wxUSE_GUI
+
 #if wxUSE_BUTTON || \
     wxUSE_CALENDARCTRL || \
     wxUSE_CARET || \
 #   endif
 #endif /* wxUSE_RADIOBOX */
 
-#if wxUSE_STOPWATCH
-#    if !wxUSE_LONGLONG
-#        ifdef wxABORT_ON_CONFIG_ERROR
-#            error "wxUSE_STOPWATCH requires wxUSE_LONGLONG"
-#        else
-#            undef wxUSE_LONGLONG
-#            define wxUSE_LONGLONG 1
-#        endif
-#    endif
-#endif /* wxUSE_STOPWATCH */
-
 #if wxUSE_LOGWINDOW
 #    if !wxUSE_TEXTCTRL
 #        ifdef wxABORT_ON_CONFIG_ERROR
 #   endif
 #endif /* wxUSE_DYNAMIC_CLASSES */
 
-#if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
-#   ifdef wxABORT_ON_CONFIG_ERROR
-#       error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
-#   else
-#       undef wxUSE_TEXTFILE
-#       define wxUSE_TEXTFILE 1
-#   endif
-#endif /* wxUSE_MIMETYPE */
-
-#if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
-#   ifdef wxABORT_ON_CONFIG_ERROR
-#       error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
-#   else
-#       undef wxUSE_TEXTBUFFER
-#       define wxUSE_TEXTBUFFER 1
-#   endif
-#endif /* wxUSE_TEXTFILE */
-
-#if wxUSE_TEXTFILE && !wxUSE_FILE
-#   ifdef wxABORT_ON_CONFIG_ERROR
-#       error "wxUSE_TEXTFILE requires wxUSE_FILE"
-#   else
-#       undef wxUSE_FILE
-#       define wxUSE_FILE 1
-#   endif
-#endif /* wxUSE_TEXTFILE */
-
 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
 #   ifdef wxABORT_ON_CONFIG_ERROR
 #       error "wxClipboard requires wxDataObject"
 #   endif
 #endif /* wxUSE_CLIPBOARD */
 
-#if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
-#   ifdef wxABORT_ON_CONFIG_ERROR
-#       error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
-#   else
-#       undef wxUSE_UNICODE
-#       define wxUSE_UNICODE 1
-#   endif
-#endif /* wxUSE_UNICODE_MSLU */
-
 #endif /* wxUSE_GUI */
 
index 2aece57a1b541c624170101b5203da1be4d34f12..b27ec055debc413229b798116510e590de6222fe 100644 (file)
 // wxMimeTypesManager class
 #define wxUSE_MIMETYPE 1
 
-// wxSystemOptions class
-#define wxUSE_SYSTEM_OPTIONS 1
+// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP
+// or wxURL you need to set this to 1.
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_PROTOCOL 1
+
+// The settings for the individual URL schemes
+#define wxUSE_PROTOCOL_FILE 1
+#define wxUSE_PROTOCOL_FTP 1
+#define wxUSE_PROTOCOL_HTTP 1
+
+// Define this to use wxURL class.
+#define wxUSE_URL 1
 
 // Support for regular expression matching via wxRegEx class: enable this to
 // use POSIX regular expressions in your code. You need to compile regex
 // contribute us a makefile for src/regex for it
 #define wxUSE_REGEX       1
 
+// wxSystemOptions class
+#define wxUSE_SYSTEM_OPTIONS 1
+
 // wxWave class
 #define wxUSE_WAVE      1
 
index 773cdcc5b2151b52054f1f373b376110bbc98800..49f5182b1dc9b47c4280f27a0b52d59fab0b3453 100644 (file)
@@ -8,6 +8,7 @@
 // Copyright:   (c) 1997, 1998 Guilhem Lavaux
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
+
 #ifndef __WX_PROTO_FILE_H__
 #define __WX_PROTO_FILE_H__
 
 #pragma interface "sckfile.h"
 #endif
 
+#include "wx/defs.h"
+
+#if wxUSE_PROTOCOL_FILE
+
 #include "wx/protocol/protocol.h"
 #include "wx/url.h"
 
@@ -32,4 +37,6 @@ public:
   wxInputStream *GetInputStream(const wxString& path);
 };
 
-#endif
+#endif // wxUSE_PROTOCOL_FILE
+
+#endif // __WX_PROTO_FILE_H__
index 0ef5e77cf84c25ea0bd706b22c6dac86de323533..ae7391d45ef11f8a586b756def060de5b4e04e53 100644 (file)
     #pragma interface "ftp.h"
 #endif
 
-#include "wx/object.h"
+#include "wx/defs.h"
+
+#if wxUSE_PROTOCOL_FTP
+
 #include "wx/sckaddr.h"
 #include "wx/protocol/protocol.h"
 #include "wx/url.h"
@@ -161,4 +164,6 @@ protected:
 // wxLog::AddTraceMask(FTP_TRACE_MASK) to see them in output
 #define FTP_TRACE_MASK _T("ftp")
 
+#endif // wxUSE_PROTOCOL_FTP
+
 #endif // __WX_FTP_H__
index 5aeea291bea7dd176eadb3cc3cac1418257483ec..7b4f5db705e1d9584c133ed4c5653ed3c89b160c 100644 (file)
 #ifndef _WX_HTTP_H
 #define _WX_HTTP_H
 
+#include "wx/defs.h"
+
+#if wxUSE_PROTOCOL_HTTP
+
 #include "wx/list.h"
 #include "wx/protocol/protocol.h"
 
@@ -48,4 +52,7 @@ protected:
   bool ParseHeaders();
 };
 
-#endif
+#endif // wxUSE_PROTOCOL_HTTP
+
+#endif // _WX_HTTP_H
+
index 894ca9615d8fb235a7f439aa5973e8363e69e339..a98c0527db5ca7229f107db4544df2e290495c47 100644 (file)
@@ -18,6 +18,8 @@
 
 #include "wx/defs.h"
 
+#if wxUSE_PROTOCOL
+
 #include "wx/object.h"
 #include "wx/string.h"
 #include "wx/stream.h"
@@ -127,4 +129,6 @@ protected:
     DECLARE_DYNAMIC_CLASS(wxProtoInfo)
 };
 
+#endif // wxUSE_PROTOCOL
+
 #endif // _WX_PROTOCOL_PROTOCOL_H
index bc36b30ed52737cfc63ff7e667e86193f880513a..d76f21470fa499b55ddf1c72c4779deeb15d57d8 100644 (file)
 // not all ports implement everything...
 // ----------------------------------------------------------------------------
 
+// FIXME: why do we have different sections for Mac/OS2/the rest? Most settings
+//        should have the same value, like this it's a real pain to update this
+//        file...
+
+#define wxUSE_DYNAMIC_LOADER 0
+
+#define wxUSE_PROTOCOL 0
+#define wxUSE_URL 0
+
+#define wxUSE_UNICODE_MSLU 0
+
 #if defined(__WXMAC__)
 
 #define wxUSE_GUI            1
 
 #define wxUSE_CONTROLS     1
 #define wxUSE_POPUPWIN     1
+#define wxUSE_TIPWINDOW    1
 #define wxUSE_BUTTON       1
 #define wxUSE_BMPBUTTON    1
 #define wxUSE_CALENDARCTRL 0
index 80efd19ff6841bb7f1e66c024bb35440892e132d..f9cfdbdb75b8646ce1f833bbe53c7bb70184a3b3 100644 (file)
 #pragma interface
 #endif
 
-// wxWindows header
-#include "wx/object.h"
+#include "wx/defs.h"
+
+#if wxUSE_URL
 
-// wxSocket headers
+#include "wx/object.h"
 #include "wx/protocol/protocol.h"
 
-#if wxUSE_SOCKETS
+#if wxUSE_PROTOCOL_HTTP
   #include "wx/protocol/http.h"
 #endif
 
@@ -35,7 +36,7 @@ typedef enum {
   wxURL_CONNERR,
   wxURL_PROTOERR
 } wxURLError;
-  
+
 class WXDLLEXPORT wxURL : public wxObject
 {
 public:
@@ -97,4 +98,7 @@ private:
     DECLARE_DYNAMIC_CLASS(wxURL)
 };
 
-#endif
+#endif // wxUSE_URL
+
+#endif // _WX_URL_H
+
index f705138663bd564d97d6fb053338374e12e23d0a..57922f4d85a982717673ed6e8649cacf16ba3c27 100644 (file)
  * Use intl system
  */
 #define wxUSE_INTL 0
+/*
+ * Use wxProtocol and related classes
+ */
+#define wxUSE_PROTOCOL 0
+#define wxUSE_PROTOCOL_FILE 0
+#define wxUSE_PROTOCOL_FTP 0
+#define wxUSE_PROTOCOL_HTTP 0
 /*
  * Use streams
  */
  */
 #define wxUSE_UNICODE_MSLU 0
 
+/*
+ * Use wxURL class
+ */
+#define wxUSE_URL 0
+
 /*
  * Work around a bug in GNU libc 5.x wcstombs() implementation.
  *
index 6665963f88438e42efad1e6b33a0af5fe3a8f603..5b11e509a0ad045ae31c711e1125b06f26cfedd7 100644 (file)
@@ -32,7 +32,7 @@
   #pragma hdrstop
 #endif
 
-#if wxUSE_SOCKETS && wxUSE_STREAMS
+#if wxUSE_PROTOCOL_FTP
 
 #ifndef WX_PRECOMP
     #include <stdlib.h>
@@ -925,5 +925,5 @@ wxList *wxFTP::GetList(const wxString& wildcard, bool details)
 }
 #endif // WXWIN_COMPATIBILITY_2
 
-#endif
-  // wxUSE_SOCKETS
+#endif // wxUSE_PROTOCOL_FTP
+
index c4d821cf859acae53b38bc6ff626ca4acc129a3e..bda7c28d0032749d5c33ba8d0ea31f15d5c32f24 100644 (file)
@@ -20,7 +20,7 @@
   #pragma hdrstop
 #endif
 
-#if wxUSE_SOCKETS && wxUSE_STREAMS
+#if wxUSE_PROTOCOL_HTTP
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -343,5 +343,5 @@ wxInputStream *wxHTTP::GetInputStream(const wxString& path)
   return inp_stream;
 }
 
-#endif
-   // wxUSE_SOCKETS
+#endif // wxUSE_PROTOCOL_HTTP
+
index 2203ac231f4ee76b6f1c05f5ab67fb767c1f6c24..9deef928f6cd7e15693a9efe7cd4b3cc15861d02 100644 (file)
@@ -20,6 +20,8 @@
   #pragma hdrstop
 #endif
 
+#if wxUSE_PROTOCOL
+
 #include "wx/protocol/protocol.h"
 #include "wx/url.h"
 #include "wx/module.h"
@@ -64,7 +66,6 @@ wxProtocol::wxProtocol()
 {
 }
 
-#if wxUSE_SOCKETS
 bool wxProtocol::Reconnect()
 {
   wxIPV4address addr;
@@ -166,4 +167,6 @@ wxProtocolError GetLine(wxSocketBase *sock, wxString& result) {
   return wxPROTO_NOERR;
 #undef PROTO_BSIZE
 }
-#endif
+
+#endif // wxUSE_PROTOCOL
+
index c2e863f0b432495bef337d2f7cd6ba3455db6eb7..f10cd6c903bedc35705e6726e349cdd6241035d9 100644 (file)
@@ -20,8 +20,7 @@
 #pragma hdrstop
 #endif
 
-#include <string.h>
-#include <ctype.h>
+#if wxUSE_URL
 
 #include "wx/string.h"
 #include "wx/list.h"
@@ -29,6 +28,9 @@
 #include "wx/module.h"
 #include "wx/url.h"
 
+#include <string.h>
+#include <ctype.h>
+
 IMPLEMENT_CLASS(wxProtoInfo, wxObject)
 IMPLEMENT_CLASS(wxURL, wxObject)
 
@@ -521,3 +523,6 @@ void wxURLModule::OnExit()
 }
 
 #endif // wxUSE_SOCKETS
+
+#endif // wxUSE_URL
+