Prepare additional wxWebRequest backends

This commit is contained in:
Tobias Taschner
2018-10-25 13:08:51 +02:00
parent 6db3f5f115
commit 5f3dc058aa
32 changed files with 710 additions and 18 deletions

View File

@@ -546,6 +546,7 @@ ALL_BASE_HEADERS = \
wx/socket.h \ wx/socket.h \
wx/url.h \ wx/url.h \
wx/webrequest.h \ wx/webrequest.h \
wx/webrequest_curl.h \
wx/xml/xml.h \ wx/xml/xml.h \
wx/xtixml.h wx/xtixml.h
ALL_HEADERS = \ ALL_HEADERS = \
@@ -766,6 +767,7 @@ ALL_PORTS_BASE_HEADERS = \
wx/socket.h \ wx/socket.h \
wx/url.h \ wx/url.h \
wx/webrequest.h \ wx/webrequest.h \
wx/webrequest_curl.h \
wx/xml/xml.h \ wx/xml/xml.h \
wx/xtixml.h wx/xtixml.h
ALL_BASE_SOURCES = \ ALL_BASE_SOURCES = \
@@ -916,9 +918,11 @@ ALL_BASE_SOURCES = \
src/common/socket.cpp \ src/common/socket.cpp \
src/common/url.cpp \ src/common/url.cpp \
src/common/webrequest.cpp \ src/common/webrequest.cpp \
src/common/webrequest_curl.cpp \
src/common/socketiohandler.cpp \ src/common/socketiohandler.cpp \
src/unix/sockunix.cpp \ src/unix/sockunix.cpp \
src/osx/core/sockosx.cpp \ src/osx/core/sockosx.cpp \
src/osx/webrequest_urlsession.mm \
src/msw/sockmsw.cpp \ src/msw/sockmsw.cpp \
src/msw/urlmsw.cpp \ src/msw/urlmsw.cpp \
src/msw/webrequest_winhttp.cpp \ src/msw/webrequest_winhttp.cpp \
@@ -1060,6 +1064,7 @@ MONODLL_OBJECTS = \
monodll_socket.o \ monodll_socket.o \
monodll_url.o \ monodll_url.o \
monodll_webrequest.o \ monodll_webrequest.o \
monodll_webrequest_curl.o \
$(__NET_PLATFORM_SRC_OBJECTS) \ $(__NET_PLATFORM_SRC_OBJECTS) \
$(__MONOLIB_GUI_SRC_OBJECTS) \ $(__MONOLIB_GUI_SRC_OBJECTS) \
monodll_xml.o \ monodll_xml.o \
@@ -1203,6 +1208,7 @@ MONOLIB_OBJECTS = \
monolib_socket.o \ monolib_socket.o \
monolib_url.o \ monolib_url.o \
monolib_webrequest.o \ monolib_webrequest.o \
monolib_webrequest_curl.o \
$(__NET_PLATFORM_SRC_OBJECTS_1) \ $(__NET_PLATFORM_SRC_OBJECTS_1) \
$(__MONOLIB_GUI_SRC_OBJECTS_1) \ $(__MONOLIB_GUI_SRC_OBJECTS_1) \
monolib_xml.o \ monolib_xml.o \
@@ -1445,6 +1451,12 @@ NETDLL_CXXFLAGS = $(__netdll_PCH_INC) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__INC_JPEG_p) $(__INC_PNG_p) $(__INC_ZLIB_p) $(__INC_REGEX_p) \ $(__INC_JPEG_p) $(__INC_PNG_p) $(__INC_ZLIB_p) $(__INC_REGEX_p) \
$(__INC_EXPAT_p) -DwxUSE_GUI=0 -DWXUSINGDLL -DWXMAKINGDLL_NET $(PIC_FLAG) \ $(__INC_EXPAT_p) -DwxUSE_GUI=0 -DWXUSINGDLL -DWXMAKINGDLL_NET $(PIC_FLAG) \
$(CXXWARNINGS) $(CPPFLAGS) $(CXXFLAGS) $(CXXWARNINGS) $(CPPFLAGS) $(CXXFLAGS)
NETDLL_OBJCXXFLAGS = $(__netdll_PCH_INC) -D__WX$(TOOLKIT)__ \
$(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
$(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) -DWXBUILDING $(__INC_TIFF_BUILD_p) \
$(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) $(__INC_ZLIB_p) \
$(__INC_REGEX_p) $(__INC_EXPAT_p) -DwxUSE_GUI=0 -DWXUSINGDLL \
-DWXMAKINGDLL_NET $(PIC_FLAG) $(CPPFLAGS) $(OBJCXXFLAGS)
NETDLL_OBJECTS = \ NETDLL_OBJECTS = \
$(__netdll___win32rc) \ $(__netdll___win32rc) \
netdll_fs_inet.o \ netdll_fs_inet.o \
@@ -1458,6 +1470,7 @@ NETDLL_OBJECTS = \
netdll_socket.o \ netdll_socket.o \
netdll_url.o \ netdll_url.o \
netdll_webrequest.o \ netdll_webrequest.o \
netdll_webrequest_curl.o \
$(__NET_PLATFORM_SRC_OBJECTS_2) $(__NET_PLATFORM_SRC_OBJECTS_2)
NETDLL_ODEP = $(_____pch_wxprec_netdll_wx_wxprec_h_gch___depname) NETDLL_ODEP = $(_____pch_wxprec_netdll_wx_wxprec_h_gch___depname)
NETLIB_CXXFLAGS = $(__netlib_PCH_INC) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ NETLIB_CXXFLAGS = $(__netlib_PCH_INC) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
@@ -1465,6 +1478,11 @@ NETLIB_CXXFLAGS = $(__netlib_PCH_INC) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__THREAD_DEFINE_p) -DWXBUILDING $(__INC_TIFF_BUILD_p) $(__INC_TIFF_p) \ $(__THREAD_DEFINE_p) -DWXBUILDING $(__INC_TIFF_BUILD_p) $(__INC_TIFF_p) \
$(__INC_JPEG_p) $(__INC_PNG_p) $(__INC_ZLIB_p) $(__INC_REGEX_p) \ $(__INC_JPEG_p) $(__INC_PNG_p) $(__INC_ZLIB_p) $(__INC_REGEX_p) \
$(__INC_EXPAT_p) -DwxUSE_GUI=0 $(CXXWARNINGS) $(CPPFLAGS) $(CXXFLAGS) $(__INC_EXPAT_p) -DwxUSE_GUI=0 $(CXXWARNINGS) $(CPPFLAGS) $(CXXFLAGS)
NETLIB_OBJCXXFLAGS = $(__netlib_PCH_INC) -D__WX$(TOOLKIT)__ \
$(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
$(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) -DWXBUILDING $(__INC_TIFF_BUILD_p) \
$(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) $(__INC_ZLIB_p) \
$(__INC_REGEX_p) $(__INC_EXPAT_p) -DwxUSE_GUI=0 $(CPPFLAGS) $(OBJCXXFLAGS)
NETLIB_OBJECTS = \ NETLIB_OBJECTS = \
netlib_fs_inet.o \ netlib_fs_inet.o \
netlib_ftp.o \ netlib_ftp.o \
@@ -1477,6 +1495,7 @@ NETLIB_OBJECTS = \
netlib_socket.o \ netlib_socket.o \
netlib_url.o \ netlib_url.o \
netlib_webrequest.o \ netlib_webrequest.o \
netlib_webrequest_curl.o \
$(__NET_PLATFORM_SRC_OBJECTS_3) $(__NET_PLATFORM_SRC_OBJECTS_3)
NETLIB_ODEP = $(_____pch_wxprec_netlib_wx_wxprec_h_gch___depname) NETLIB_ODEP = $(_____pch_wxprec_netlib_wx_wxprec_h_gch___depname)
COREDLL_CFLAGS = $(__coredll_PCH_INC) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ COREDLL_CFLAGS = $(__coredll_PCH_INC) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
@@ -4233,9 +4252,12 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS = \
@COND_PLATFORM_WIN32_1@ = monodll_msw_main.o monodll_volume.o @COND_PLATFORM_WIN32_1@ = monodll_msw_main.o monodll_volume.o
@COND_TOOLKIT_OSX_COCOA@__BASE_AND_GUI_TOOLKIT_SRC_OBJECTS \ @COND_TOOLKIT_OSX_COCOA@__BASE_AND_GUI_TOOLKIT_SRC_OBJECTS \
@COND_TOOLKIT_OSX_COCOA@ = monodll_cocoa_power.o monodll_cocoa_utils.o @COND_TOOLKIT_OSX_COCOA@ = monodll_cocoa_power.o monodll_cocoa_utils.o
@COND_PLATFORM_MACOSX_1@__NET_PLATFORM_SRC_OBJECTS \ COND_PLATFORM_MACOSX_1___NET_PLATFORM_SRC_OBJECTS = \
@COND_PLATFORM_MACOSX_1@ = monodll_socketiohandler.o monodll_sockunix.o \ monodll_socketiohandler.o \
@COND_PLATFORM_MACOSX_1@ monodll_sockosx.o monodll_sockunix.o \
monodll_sockosx.o \
monodll_webrequest_urlsession.o
@COND_PLATFORM_MACOSX_1@__NET_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_MACOSX_1___NET_PLATFORM_SRC_OBJECTS)
@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS = \ @COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS = \
@COND_PLATFORM_UNIX_1@ monodll_socketiohandler.o monodll_sockunix.o @COND_PLATFORM_UNIX_1@ monodll_socketiohandler.o monodll_sockunix.o
@COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS = \ @COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS = \
@@ -6212,9 +6234,12 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1 = \
@COND_PLATFORM_WIN32_1@ = monolib_msw_main.o monolib_volume.o @COND_PLATFORM_WIN32_1@ = monolib_msw_main.o monolib_volume.o
@COND_TOOLKIT_OSX_COCOA@__BASE_AND_GUI_TOOLKIT_SRC_OBJECTS_1 \ @COND_TOOLKIT_OSX_COCOA@__BASE_AND_GUI_TOOLKIT_SRC_OBJECTS_1 \
@COND_TOOLKIT_OSX_COCOA@ = monolib_cocoa_power.o monolib_cocoa_utils.o @COND_TOOLKIT_OSX_COCOA@ = monolib_cocoa_power.o monolib_cocoa_utils.o
@COND_PLATFORM_MACOSX_1@__NET_PLATFORM_SRC_OBJECTS_1 \ COND_PLATFORM_MACOSX_1___NET_PLATFORM_SRC_OBJECTS_1 = \
@COND_PLATFORM_MACOSX_1@ = monolib_socketiohandler.o monolib_sockunix.o \ monolib_socketiohandler.o \
@COND_PLATFORM_MACOSX_1@ monolib_sockosx.o monolib_sockunix.o \
monolib_sockosx.o \
monolib_webrequest_urlsession.o
@COND_PLATFORM_MACOSX_1@__NET_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_MACOSX_1___NET_PLATFORM_SRC_OBJECTS_1)
@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_1 = \ @COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_1 = \
@COND_PLATFORM_UNIX_1@ monolib_socketiohandler.o monolib_sockunix.o @COND_PLATFORM_UNIX_1@ monolib_socketiohandler.o monolib_sockunix.o
@COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS_1 \ @COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS_1 \
@@ -8393,9 +8418,12 @@ COND_USE_SOVERSOLARIS_1___netdll___so_symlinks_uninst_cmd = rm -f \
$(LIBPREFIX)wx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(LIBPREFIX)wx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX)
@COND_USE_SOVERSOLARIS_1@__netdll___so_symlinks_uninst_cmd = $(COND_USE_SOVERSOLARIS_1___netdll___so_symlinks_uninst_cmd) @COND_USE_SOVERSOLARIS_1@__netdll___so_symlinks_uninst_cmd = $(COND_USE_SOVERSOLARIS_1___netdll___so_symlinks_uninst_cmd)
@COND_PLATFORM_WIN32_1@__netdll___win32rc = netdll_version_rc.o @COND_PLATFORM_WIN32_1@__netdll___win32rc = netdll_version_rc.o
@COND_PLATFORM_MACOSX_1@__NET_PLATFORM_SRC_OBJECTS_2 \ COND_PLATFORM_MACOSX_1___NET_PLATFORM_SRC_OBJECTS_2 = \
@COND_PLATFORM_MACOSX_1@ = netdll_socketiohandler.o netdll_sockunix.o \ netdll_socketiohandler.o \
@COND_PLATFORM_MACOSX_1@ netdll_sockosx.o netdll_sockunix.o \
netdll_sockosx.o \
netdll_webrequest_urlsession.o
@COND_PLATFORM_MACOSX_1@__NET_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_MACOSX_1___NET_PLATFORM_SRC_OBJECTS_2)
@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_2 = \ @COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_2 = \
@COND_PLATFORM_UNIX_1@ netdll_socketiohandler.o netdll_sockunix.o @COND_PLATFORM_UNIX_1@ netdll_socketiohandler.o netdll_sockunix.o
@COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS_2 \ @COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS_2 \
@@ -8411,9 +8439,12 @@ COND_MONOLITHIC_0_SHARED_0___netlib___depname = \
@COND_ICC_PCH_1@ ./.pch/wxprec_netlib/wx/wxprec.h.gch @COND_ICC_PCH_1@ ./.pch/wxprec_netlib/wx/wxprec.h.gch
@COND_USE_PCH_1@_____pch_wxprec_netlib_wx_wxprec_h_gch___depname \ @COND_USE_PCH_1@_____pch_wxprec_netlib_wx_wxprec_h_gch___depname \
@COND_USE_PCH_1@ = ./.pch/wxprec_netlib/wx/wxprec.h.gch @COND_USE_PCH_1@ = ./.pch/wxprec_netlib/wx/wxprec.h.gch
@COND_PLATFORM_MACOSX_1@__NET_PLATFORM_SRC_OBJECTS_3 \ COND_PLATFORM_MACOSX_1___NET_PLATFORM_SRC_OBJECTS_3 = \
@COND_PLATFORM_MACOSX_1@ = netlib_socketiohandler.o netlib_sockunix.o \ netlib_socketiohandler.o \
@COND_PLATFORM_MACOSX_1@ netlib_sockosx.o netlib_sockunix.o \
netlib_sockosx.o \
netlib_webrequest_urlsession.o
@COND_PLATFORM_MACOSX_1@__NET_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_MACOSX_1___NET_PLATFORM_SRC_OBJECTS_3)
@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_3 = \ @COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_3 = \
@COND_PLATFORM_UNIX_1@ netlib_socketiohandler.o netlib_sockunix.o @COND_PLATFORM_UNIX_1@ netlib_socketiohandler.o netlib_sockunix.o
@COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS_3 \ @COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS_3 \
@@ -15923,6 +15954,9 @@ monodll_url.o: $(srcdir)/src/common/url.cpp $(MONODLL_ODEP)
monodll_webrequest.o: $(srcdir)/src/common/webrequest.cpp $(MONODLL_ODEP) monodll_webrequest.o: $(srcdir)/src/common/webrequest.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/webrequest.cpp $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/webrequest.cpp
monodll_webrequest_curl.o: $(srcdir)/src/common/webrequest_curl.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/webrequest_curl.cpp
monodll_sockmsw.o: $(srcdir)/src/msw/sockmsw.cpp $(MONODLL_ODEP) monodll_sockmsw.o: $(srcdir)/src/msw/sockmsw.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/sockmsw.cpp $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/sockmsw.cpp
@@ -15935,6 +15969,9 @@ monodll_webrequest_winhttp.o: $(srcdir)/src/msw/webrequest_winhttp.cpp $(MONODLL
monodll_sockosx.o: $(srcdir)/src/osx/core/sockosx.cpp $(MONODLL_ODEP) monodll_sockosx.o: $(srcdir)/src/osx/core/sockosx.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/core/sockosx.cpp $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/core/sockosx.cpp
monodll_webrequest_urlsession.o: $(srcdir)/src/osx/webrequest_urlsession.mm $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/webrequest_urlsession.mm
monodll_gtk_eggtrayicon.o: $(srcdir)/src/gtk/eggtrayicon.c $(MONODLL_ODEP) monodll_gtk_eggtrayicon.o: $(srcdir)/src/gtk/eggtrayicon.c $(MONODLL_ODEP)
$(CCC) -c -o $@ $(MONODLL_CFLAGS) $(srcdir)/src/gtk/eggtrayicon.c $(CCC) -c -o $@ $(MONODLL_CFLAGS) $(srcdir)/src/gtk/eggtrayicon.c
@@ -21185,6 +21222,9 @@ monolib_url.o: $(srcdir)/src/common/url.cpp $(MONOLIB_ODEP)
monolib_webrequest.o: $(srcdir)/src/common/webrequest.cpp $(MONOLIB_ODEP) monolib_webrequest.o: $(srcdir)/src/common/webrequest.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/webrequest.cpp $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/webrequest.cpp
monolib_webrequest_curl.o: $(srcdir)/src/common/webrequest_curl.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/webrequest_curl.cpp
monolib_sockmsw.o: $(srcdir)/src/msw/sockmsw.cpp $(MONOLIB_ODEP) monolib_sockmsw.o: $(srcdir)/src/msw/sockmsw.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/sockmsw.cpp $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/sockmsw.cpp
@@ -21197,6 +21237,9 @@ monolib_webrequest_winhttp.o: $(srcdir)/src/msw/webrequest_winhttp.cpp $(MONOLIB
monolib_sockosx.o: $(srcdir)/src/osx/core/sockosx.cpp $(MONOLIB_ODEP) monolib_sockosx.o: $(srcdir)/src/osx/core/sockosx.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/core/sockosx.cpp $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/core/sockosx.cpp
monolib_webrequest_urlsession.o: $(srcdir)/src/osx/webrequest_urlsession.mm $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/webrequest_urlsession.mm
monolib_gtk_eggtrayicon.o: $(srcdir)/src/gtk/eggtrayicon.c $(MONOLIB_ODEP) monolib_gtk_eggtrayicon.o: $(srcdir)/src/gtk/eggtrayicon.c $(MONOLIB_ODEP)
$(CCC) -c -o $@ $(MONOLIB_CFLAGS) $(srcdir)/src/gtk/eggtrayicon.c $(CCC) -c -o $@ $(MONOLIB_CFLAGS) $(srcdir)/src/gtk/eggtrayicon.c
@@ -27017,6 +27060,9 @@ netdll_url.o: $(srcdir)/src/common/url.cpp $(NETDLL_ODEP)
netdll_webrequest.o: $(srcdir)/src/common/webrequest.cpp $(NETDLL_ODEP) netdll_webrequest.o: $(srcdir)/src/common/webrequest.cpp $(NETDLL_ODEP)
$(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/common/webrequest.cpp $(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/common/webrequest.cpp
netdll_webrequest_curl.o: $(srcdir)/src/common/webrequest_curl.cpp $(NETDLL_ODEP)
$(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/common/webrequest_curl.cpp
netdll_sockmsw.o: $(srcdir)/src/msw/sockmsw.cpp $(NETDLL_ODEP) netdll_sockmsw.o: $(srcdir)/src/msw/sockmsw.cpp $(NETDLL_ODEP)
$(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/msw/sockmsw.cpp $(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/msw/sockmsw.cpp
@@ -27029,6 +27075,9 @@ netdll_webrequest_winhttp.o: $(srcdir)/src/msw/webrequest_winhttp.cpp $(NETDLL_O
netdll_sockosx.o: $(srcdir)/src/osx/core/sockosx.cpp $(NETDLL_ODEP) netdll_sockosx.o: $(srcdir)/src/osx/core/sockosx.cpp $(NETDLL_ODEP)
$(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/osx/core/sockosx.cpp $(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/osx/core/sockosx.cpp
netdll_webrequest_urlsession.o: $(srcdir)/src/osx/webrequest_urlsession.mm $(NETDLL_ODEP)
$(CXXC) -c -o $@ $(NETDLL_OBJCXXFLAGS) $(srcdir)/src/osx/webrequest_urlsession.mm
@COND_PLATFORM_UNIX_1@netdll_socketiohandler.o: $(srcdir)/src/common/socketiohandler.cpp $(NETDLL_ODEP) @COND_PLATFORM_UNIX_1@netdll_socketiohandler.o: $(srcdir)/src/common/socketiohandler.cpp $(NETDLL_ODEP)
@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/common/socketiohandler.cpp @COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/common/socketiohandler.cpp
@@ -27074,6 +27123,9 @@ netlib_url.o: $(srcdir)/src/common/url.cpp $(NETLIB_ODEP)
netlib_webrequest.o: $(srcdir)/src/common/webrequest.cpp $(NETLIB_ODEP) netlib_webrequest.o: $(srcdir)/src/common/webrequest.cpp $(NETLIB_ODEP)
$(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/common/webrequest.cpp $(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/common/webrequest.cpp
netlib_webrequest_curl.o: $(srcdir)/src/common/webrequest_curl.cpp $(NETLIB_ODEP)
$(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/common/webrequest_curl.cpp
netlib_sockmsw.o: $(srcdir)/src/msw/sockmsw.cpp $(NETLIB_ODEP) netlib_sockmsw.o: $(srcdir)/src/msw/sockmsw.cpp $(NETLIB_ODEP)
$(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/msw/sockmsw.cpp $(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/msw/sockmsw.cpp
@@ -27086,6 +27138,9 @@ netlib_webrequest_winhttp.o: $(srcdir)/src/msw/webrequest_winhttp.cpp $(NETLIB_O
netlib_sockosx.o: $(srcdir)/src/osx/core/sockosx.cpp $(NETLIB_ODEP) netlib_sockosx.o: $(srcdir)/src/osx/core/sockosx.cpp $(NETLIB_ODEP)
$(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/osx/core/sockosx.cpp $(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/osx/core/sockosx.cpp
netlib_webrequest_urlsession.o: $(srcdir)/src/osx/webrequest_urlsession.mm $(NETLIB_ODEP)
$(CXXC) -c -o $@ $(NETLIB_OBJCXXFLAGS) $(srcdir)/src/osx/webrequest_urlsession.mm
@COND_PLATFORM_UNIX_1@netlib_socketiohandler.o: $(srcdir)/src/common/socketiohandler.cpp $(NETLIB_ODEP) @COND_PLATFORM_UNIX_1@netlib_socketiohandler.o: $(srcdir)/src/common/socketiohandler.cpp $(NETLIB_ODEP)
@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/common/socketiohandler.cpp @COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/common/socketiohandler.cpp

View File

@@ -751,6 +751,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<set var="NET_OSX_SRC" hints="files"> <set var="NET_OSX_SRC" hints="files">
src/osx/core/sockosx.cpp src/osx/core/sockosx.cpp
src/osx/webrequest_urlsession.mm
</set> </set>
<set var="NET_WIN32_SRC" hints="files"> <set var="NET_WIN32_SRC" hints="files">
@@ -775,6 +776,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/common/socket.cpp src/common/socket.cpp
src/common/url.cpp src/common/url.cpp
src/common/webrequest.cpp src/common/webrequest.cpp
src/common/webrequest_curl.cpp
</set> </set>
<set var="NET_CMN_HDR" hints="files"> <set var="NET_CMN_HDR" hints="files">
wx/fs_inet.h wx/fs_inet.h
@@ -789,6 +791,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/socket.h wx/socket.h
wx/url.h wx/url.h
wx/webrequest.h wx/webrequest.h
wx/webrequest_curl.h
</set> </set>
<!-- ====================================================================== --> <!-- ====================================================================== -->

View File

@@ -661,6 +661,11 @@ set(NET_UNIX_SRC
set(NET_OSX_SRC set(NET_OSX_SRC
src/osx/core/sockosx.cpp src/osx/core/sockosx.cpp
src/osx/webrequest_urlsession.mm
)
set(NET_OSX_HDR
wx/osx/webrequest_urlsession.h
) )
set(NET_WIN32_SRC set(NET_WIN32_SRC
@@ -685,6 +690,7 @@ set(NET_CMN_SRC
src/common/socket.cpp src/common/socket.cpp
src/common/url.cpp src/common/url.cpp
src/common/webrequest.cpp src/common/webrequest.cpp
src/common/webrequest_curl.cpp
) )
set(NET_CMN_HDR set(NET_CMN_HDR
@@ -700,6 +706,7 @@ set(NET_CMN_HDR
wx/socket.h wx/socket.h
wx/url.h wx/url.h
wx/webrequest.h wx/webrequest.h
wx/webrequest_curl.h
) )
set(QA_SRC set(QA_SRC

View File

@@ -26,7 +26,7 @@ wx_add_library(net IS_BASE ${NET_FILES})
if(WIN32) if(WIN32)
wx_lib_link_libraries(net PRIVATE ws2_32) wx_lib_link_libraries(net PRIVATE ws2_32)
if(wxUSE_WEBREQUEST) if(wxUSE_WEBREQUEST_WINHTTP)
wx_lib_link_libraries(net PRIVATE Winhttp) wx_lib_link_libraries(net PRIVATE Winhttp)
endif() endif()
endif() endif()

View File

@@ -146,7 +146,19 @@ wx_option(wxUSE_TEXTBUFFER "use wxTextBuffer class")
wx_option(wxUSE_TEXTFILE "use wxTextFile class") wx_option(wxUSE_TEXTFILE "use wxTextFile class")
wx_option(wxUSE_TIMER "use wxTimer class") wx_option(wxUSE_TIMER "use wxTimer class")
wx_option(wxUSE_VARIANT "use wxVariant class") wx_option(wxUSE_VARIANT "use wxVariant class")
# WebRequest options
wx_option(wxUSE_WEBREQUEST "use wxWebRequest class") wx_option(wxUSE_WEBREQUEST "use wxWebRequest class")
if(WIN32)
wx_option(wxUSE_WEBREQUEST_WINHTTP "use wxWebRequest WinHTTP backend")
endif()
if(APPLE)
wx_option(wxUSE_WEBREQUEST_URLSESSION "use wxWebRequest URLSession backend")
endif()
set(wxUSE_WEBREQUEST_CURL_DEFAULT OFF)
#TODO: determine wxUSE_WEBREQUEST_CURL_DEFAULT (based)
wx_option(wxUSE_WEBREQUEST_CURL "use wxWebRequest libcurl backend" ${wxUSE_WEBREQUEST_CURL_DEFAULT})
wx_option(wxUSE_ZIPSTREAM "use wxZip streams") wx_option(wxUSE_ZIPSTREAM "use wxZip streams")
# URL-related classes # URL-related classes

View File

@@ -299,7 +299,31 @@
#cmakedefine01 wxUSE_MIMETYPE #cmakedefine01 wxUSE_MIMETYPE
#if defined(_MSC_VER) || \
(defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
#cmakedefine01 wxUSE_WEBREQUEST_WINHTTP
#else
#cmakedefine01 wxUSE_WEBREQUEST_WINHTTP
#endif
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
#cmakedefine01 wxUSE_WEBREQUEST_URLSESSION
#else
#cmakedefine01 wxUSE_WEBREQUEST_URLSESSION
#endif
#if defined(__WINDOWS__) || defined(__APPLE__)
#cmakedefine01 wxUSE_WEBREQUEST_CURL
#else
#cmakedefine01 wxUSE_WEBREQUEST_CURL
#endif
#if wxUSE_WEBREQUEST_WINHTTP || wxUSE_WEBREQUEST_URLSESSION || wxUSE_WEBREQUEST_CURL
#cmakedefine01 wxUSE_WEBREQUEST #cmakedefine01 wxUSE_WEBREQUEST
#else
#cmakedefine01 wxUSE_WEBREQUEST
#endif
#cmakedefine01 wxUSE_PROTOCOL #cmakedefine01 wxUSE_PROTOCOL

View File

@@ -678,6 +678,9 @@ NET_UNIX_SRC =
NET_OSX_SRC = NET_OSX_SRC =
src/osx/core/sockosx.cpp src/osx/core/sockosx.cpp
src/osx/webrequest_urlsession.mm
NET_OSX_HDR =
wx/osx/webrequest_urlsession.h
NET_WIN32_SRC = NET_WIN32_SRC =
src/msw/sockmsw.cpp src/msw/sockmsw.cpp
@@ -698,6 +701,7 @@ NET_CMN_SRC =
src/common/socket.cpp src/common/socket.cpp
src/common/url.cpp src/common/url.cpp
src/common/webrequest.cpp src/common/webrequest.cpp
src/common/webrequest_curl.cpp
NET_CMN_HDR = NET_CMN_HDR =
wx/fs_inet.h wx/fs_inet.h
wx/protocol/file.h wx/protocol/file.h
@@ -711,6 +715,7 @@ NET_CMN_HDR =
wx/socket.h wx/socket.h
wx/url.h wx/url.h
wx/webrequest.h wx/webrequest.h
wx/webrequest_curl.h
# wxQA (non GUI library) # wxQA (non GUI library)

View File

@@ -494,6 +494,7 @@ MONODLL_OBJECTS = \
$(OBJS)\monodll_socket.obj \ $(OBJS)\monodll_socket.obj \
$(OBJS)\monodll_url.obj \ $(OBJS)\monodll_url.obj \
$(OBJS)\monodll_webrequest.obj \ $(OBJS)\monodll_webrequest.obj \
$(OBJS)\monodll_webrequest_curl.obj \
$(OBJS)\monodll_sockmsw.obj \ $(OBJS)\monodll_sockmsw.obj \
$(OBJS)\monodll_urlmsw.obj \ $(OBJS)\monodll_urlmsw.obj \
$(OBJS)\monodll_webrequest_winhttp.obj \ $(OBJS)\monodll_webrequest_winhttp.obj \
@@ -648,6 +649,7 @@ MONOLIB_OBJECTS = \
$(OBJS)\monolib_socket.obj \ $(OBJS)\monolib_socket.obj \
$(OBJS)\monolib_url.obj \ $(OBJS)\monolib_url.obj \
$(OBJS)\monolib_webrequest.obj \ $(OBJS)\monolib_webrequest.obj \
$(OBJS)\monolib_webrequest_curl.obj \
$(OBJS)\monolib_sockmsw.obj \ $(OBJS)\monolib_sockmsw.obj \
$(OBJS)\monolib_urlmsw.obj \ $(OBJS)\monolib_urlmsw.obj \
$(OBJS)\monolib_webrequest_winhttp.obj \ $(OBJS)\monolib_webrequest_winhttp.obj \
@@ -942,6 +944,7 @@ NETDLL_OBJECTS = \
$(OBJS)\netdll_socket.obj \ $(OBJS)\netdll_socket.obj \
$(OBJS)\netdll_url.obj \ $(OBJS)\netdll_url.obj \
$(OBJS)\netdll_webrequest.obj \ $(OBJS)\netdll_webrequest.obj \
$(OBJS)\netdll_webrequest_curl.obj \
$(OBJS)\netdll_sockmsw.obj \ $(OBJS)\netdll_sockmsw.obj \
$(OBJS)\netdll_urlmsw.obj \ $(OBJS)\netdll_urlmsw.obj \
$(OBJS)\netdll_webrequest_winhttp.obj $(OBJS)\netdll_webrequest_winhttp.obj
@@ -966,6 +969,7 @@ NETLIB_OBJECTS = \
$(OBJS)\netlib_socket.obj \ $(OBJS)\netlib_socket.obj \
$(OBJS)\netlib_url.obj \ $(OBJS)\netlib_url.obj \
$(OBJS)\netlib_webrequest.obj \ $(OBJS)\netlib_webrequest.obj \
$(OBJS)\netlib_webrequest_curl.obj \
$(OBJS)\netlib_sockmsw.obj \ $(OBJS)\netlib_sockmsw.obj \
$(OBJS)\netlib_urlmsw.obj \ $(OBJS)\netlib_urlmsw.obj \
$(OBJS)\netlib_webrequest_winhttp.obj $(OBJS)\netlib_webrequest_winhttp.obj
@@ -6793,6 +6797,9 @@ $(OBJS)\monodll_url.obj: ..\..\src\common\url.cpp
$(OBJS)\monodll_webrequest.obj: ..\..\src\common\webrequest.cpp $(OBJS)\monodll_webrequest.obj: ..\..\src\common\webrequest.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webrequest.cpp $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webrequest.cpp
$(OBJS)\monodll_webrequest_curl.obj: ..\..\src\common\webrequest_curl.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webrequest_curl.cpp
$(OBJS)\monodll_sockmsw.obj: ..\..\src\msw\sockmsw.cpp $(OBJS)\monodll_sockmsw.obj: ..\..\src\msw\sockmsw.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\sockmsw.cpp $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\sockmsw.cpp
@@ -9345,6 +9352,9 @@ $(OBJS)\monolib_url.obj: ..\..\src\common\url.cpp
$(OBJS)\monolib_webrequest.obj: ..\..\src\common\webrequest.cpp $(OBJS)\monolib_webrequest.obj: ..\..\src\common\webrequest.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webrequest.cpp $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webrequest.cpp
$(OBJS)\monolib_webrequest_curl.obj: ..\..\src\common\webrequest_curl.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webrequest_curl.cpp
$(OBJS)\monolib_sockmsw.obj: ..\..\src\msw\sockmsw.cpp $(OBJS)\monolib_sockmsw.obj: ..\..\src\msw\sockmsw.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\sockmsw.cpp $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\sockmsw.cpp
@@ -12248,6 +12258,9 @@ $(OBJS)\netdll_url.obj: ..\..\src\common\url.cpp
$(OBJS)\netdll_webrequest.obj: ..\..\src\common\webrequest.cpp $(OBJS)\netdll_webrequest.obj: ..\..\src\common\webrequest.cpp
$(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\webrequest.cpp $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\webrequest.cpp
$(OBJS)\netdll_webrequest_curl.obj: ..\..\src\common\webrequest_curl.cpp
$(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\webrequest_curl.cpp
$(OBJS)\netdll_sockmsw.obj: ..\..\src\msw\sockmsw.cpp $(OBJS)\netdll_sockmsw.obj: ..\..\src\msw\sockmsw.cpp
$(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\msw\sockmsw.cpp $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\msw\sockmsw.cpp
@@ -12293,6 +12306,9 @@ $(OBJS)\netlib_url.obj: ..\..\src\common\url.cpp
$(OBJS)\netlib_webrequest.obj: ..\..\src\common\webrequest.cpp $(OBJS)\netlib_webrequest.obj: ..\..\src\common\webrequest.cpp
$(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\webrequest.cpp $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\webrequest.cpp
$(OBJS)\netlib_webrequest_curl.obj: ..\..\src\common\webrequest_curl.cpp
$(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\webrequest_curl.cpp
$(OBJS)\netlib_sockmsw.obj: ..\..\src\msw\sockmsw.cpp $(OBJS)\netlib_sockmsw.obj: ..\..\src\msw\sockmsw.cpp
$(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\msw\sockmsw.cpp $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\msw\sockmsw.cpp

View File

@@ -482,6 +482,7 @@ MONODLL_OBJECTS = \
$(OBJS)\monodll_socket.o \ $(OBJS)\monodll_socket.o \
$(OBJS)\monodll_url.o \ $(OBJS)\monodll_url.o \
$(OBJS)\monodll_webrequest.o \ $(OBJS)\monodll_webrequest.o \
$(OBJS)\monodll_webrequest_curl.o \
$(OBJS)\monodll_sockmsw.o \ $(OBJS)\monodll_sockmsw.o \
$(OBJS)\monodll_urlmsw.o \ $(OBJS)\monodll_urlmsw.o \
$(OBJS)\monodll_webrequest_winhttp.o \ $(OBJS)\monodll_webrequest_winhttp.o \
@@ -637,6 +638,7 @@ MONOLIB_OBJECTS = \
$(OBJS)\monolib_socket.o \ $(OBJS)\monolib_socket.o \
$(OBJS)\monolib_url.o \ $(OBJS)\monolib_url.o \
$(OBJS)\monolib_webrequest.o \ $(OBJS)\monolib_webrequest.o \
$(OBJS)\monolib_webrequest_curl.o \
$(OBJS)\monolib_sockmsw.o \ $(OBJS)\monolib_sockmsw.o \
$(OBJS)\monolib_urlmsw.o \ $(OBJS)\monolib_urlmsw.o \
$(OBJS)\monolib_webrequest_winhttp.o \ $(OBJS)\monolib_webrequest_winhttp.o \
@@ -933,6 +935,7 @@ NETDLL_OBJECTS = \
$(OBJS)\netdll_socket.o \ $(OBJS)\netdll_socket.o \
$(OBJS)\netdll_url.o \ $(OBJS)\netdll_url.o \
$(OBJS)\netdll_webrequest.o \ $(OBJS)\netdll_webrequest.o \
$(OBJS)\netdll_webrequest_curl.o \
$(OBJS)\netdll_sockmsw.o \ $(OBJS)\netdll_sockmsw.o \
$(OBJS)\netdll_urlmsw.o \ $(OBJS)\netdll_urlmsw.o \
$(OBJS)\netdll_webrequest_winhttp.o $(OBJS)\netdll_webrequest_winhttp.o
@@ -957,6 +960,7 @@ NETLIB_OBJECTS = \
$(OBJS)\netlib_socket.o \ $(OBJS)\netlib_socket.o \
$(OBJS)\netlib_url.o \ $(OBJS)\netlib_url.o \
$(OBJS)\netlib_webrequest.o \ $(OBJS)\netlib_webrequest.o \
$(OBJS)\netlib_webrequest_curl.o \
$(OBJS)\netlib_sockmsw.o \ $(OBJS)\netlib_sockmsw.o \
$(OBJS)\netlib_urlmsw.o \ $(OBJS)\netlib_urlmsw.o \
$(OBJS)\netlib_webrequest_winhttp.o $(OBJS)\netlib_webrequest_winhttp.o
@@ -6975,6 +6979,9 @@ $(OBJS)\monodll_url.o: ../../src/common/url.cpp
$(OBJS)\monodll_webrequest.o: ../../src/common/webrequest.cpp $(OBJS)\monodll_webrequest.o: ../../src/common/webrequest.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monodll_webrequest_curl.o: ../../src/common/webrequest_curl.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monodll_sockmsw.o: ../../src/msw/sockmsw.cpp $(OBJS)\monodll_sockmsw.o: ../../src/msw/sockmsw.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
@@ -9527,6 +9534,9 @@ $(OBJS)\monolib_url.o: ../../src/common/url.cpp
$(OBJS)\monolib_webrequest.o: ../../src/common/webrequest.cpp $(OBJS)\monolib_webrequest.o: ../../src/common/webrequest.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monolib_webrequest_curl.o: ../../src/common/webrequest_curl.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monolib_sockmsw.o: ../../src/msw/sockmsw.cpp $(OBJS)\monolib_sockmsw.o: ../../src/msw/sockmsw.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
@@ -12430,6 +12440,9 @@ $(OBJS)\netdll_url.o: ../../src/common/url.cpp
$(OBJS)\netdll_webrequest.o: ../../src/common/webrequest.cpp $(OBJS)\netdll_webrequest.o: ../../src/common/webrequest.cpp
$(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\netdll_webrequest_curl.o: ../../src/common/webrequest_curl.cpp
$(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\netdll_sockmsw.o: ../../src/msw/sockmsw.cpp $(OBJS)\netdll_sockmsw.o: ../../src/msw/sockmsw.cpp
$(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $<
@@ -12475,6 +12488,9 @@ $(OBJS)\netlib_url.o: ../../src/common/url.cpp
$(OBJS)\netlib_webrequest.o: ../../src/common/webrequest.cpp $(OBJS)\netlib_webrequest.o: ../../src/common/webrequest.cpp
$(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\netlib_webrequest_curl.o: ../../src/common/webrequest_curl.cpp
$(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\netlib_sockmsw.o: ../../src/msw/sockmsw.cpp $(OBJS)\netlib_sockmsw.o: ../../src/msw/sockmsw.cpp
$(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $<

View File

@@ -514,6 +514,7 @@ MONODLL_OBJECTS = \
$(OBJS)\monodll_socket.obj \ $(OBJS)\monodll_socket.obj \
$(OBJS)\monodll_url.obj \ $(OBJS)\monodll_url.obj \
$(OBJS)\monodll_webrequest.obj \ $(OBJS)\monodll_webrequest.obj \
$(OBJS)\monodll_webrequest_curl.obj \
$(OBJS)\monodll_sockmsw.obj \ $(OBJS)\monodll_sockmsw.obj \
$(OBJS)\monodll_urlmsw.obj \ $(OBJS)\monodll_urlmsw.obj \
$(OBJS)\monodll_webrequest_winhttp.obj \ $(OBJS)\monodll_webrequest_winhttp.obj \
@@ -678,6 +679,7 @@ MONOLIB_OBJECTS = \
$(OBJS)\monolib_socket.obj \ $(OBJS)\monolib_socket.obj \
$(OBJS)\monolib_url.obj \ $(OBJS)\monolib_url.obj \
$(OBJS)\monolib_webrequest.obj \ $(OBJS)\monolib_webrequest.obj \
$(OBJS)\monolib_webrequest_curl.obj \
$(OBJS)\monolib_sockmsw.obj \ $(OBJS)\monolib_sockmsw.obj \
$(OBJS)\monolib_urlmsw.obj \ $(OBJS)\monolib_urlmsw.obj \
$(OBJS)\monolib_webrequest_winhttp.obj \ $(OBJS)\monolib_webrequest_winhttp.obj \
@@ -994,6 +996,7 @@ NETDLL_OBJECTS = \
$(OBJS)\netdll_socket.obj \ $(OBJS)\netdll_socket.obj \
$(OBJS)\netdll_url.obj \ $(OBJS)\netdll_url.obj \
$(OBJS)\netdll_webrequest.obj \ $(OBJS)\netdll_webrequest.obj \
$(OBJS)\netdll_webrequest_curl.obj \
$(OBJS)\netdll_sockmsw.obj \ $(OBJS)\netdll_sockmsw.obj \
$(OBJS)\netdll_urlmsw.obj \ $(OBJS)\netdll_urlmsw.obj \
$(OBJS)\netdll_webrequest_winhttp.obj $(OBJS)\netdll_webrequest_winhttp.obj
@@ -1024,6 +1027,7 @@ NETLIB_OBJECTS = \
$(OBJS)\netlib_socket.obj \ $(OBJS)\netlib_socket.obj \
$(OBJS)\netlib_url.obj \ $(OBJS)\netlib_url.obj \
$(OBJS)\netlib_webrequest.obj \ $(OBJS)\netlib_webrequest.obj \
$(OBJS)\netlib_webrequest_curl.obj \
$(OBJS)\netlib_sockmsw.obj \ $(OBJS)\netlib_sockmsw.obj \
$(OBJS)\netlib_urlmsw.obj \ $(OBJS)\netlib_urlmsw.obj \
$(OBJS)\netlib_webrequest_winhttp.obj $(OBJS)\netlib_webrequest_winhttp.obj
@@ -7502,6 +7506,9 @@ $(OBJS)\monodll_url.obj: ..\..\src\common\url.cpp
$(OBJS)\monodll_webrequest.obj: ..\..\src\common\webrequest.cpp $(OBJS)\monodll_webrequest.obj: ..\..\src\common\webrequest.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webrequest.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webrequest.cpp
$(OBJS)\monodll_webrequest_curl.obj: ..\..\src\common\webrequest_curl.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webrequest_curl.cpp
$(OBJS)\monodll_sockmsw.obj: ..\..\src\msw\sockmsw.cpp $(OBJS)\monodll_sockmsw.obj: ..\..\src\msw\sockmsw.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\sockmsw.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\sockmsw.cpp
@@ -10054,6 +10061,9 @@ $(OBJS)\monolib_url.obj: ..\..\src\common\url.cpp
$(OBJS)\monolib_webrequest.obj: ..\..\src\common\webrequest.cpp $(OBJS)\monolib_webrequest.obj: ..\..\src\common\webrequest.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webrequest.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webrequest.cpp
$(OBJS)\monolib_webrequest_curl.obj: ..\..\src\common\webrequest_curl.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webrequest_curl.cpp
$(OBJS)\monolib_sockmsw.obj: ..\..\src\msw\sockmsw.cpp $(OBJS)\monolib_sockmsw.obj: ..\..\src\msw\sockmsw.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\sockmsw.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\sockmsw.cpp
@@ -12957,6 +12967,9 @@ $(OBJS)\netdll_url.obj: ..\..\src\common\url.cpp
$(OBJS)\netdll_webrequest.obj: ..\..\src\common\webrequest.cpp $(OBJS)\netdll_webrequest.obj: ..\..\src\common\webrequest.cpp
$(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\webrequest.cpp $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\webrequest.cpp
$(OBJS)\netdll_webrequest_curl.obj: ..\..\src\common\webrequest_curl.cpp
$(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\webrequest_curl.cpp
$(OBJS)\netdll_sockmsw.obj: ..\..\src\msw\sockmsw.cpp $(OBJS)\netdll_sockmsw.obj: ..\..\src\msw\sockmsw.cpp
$(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\msw\sockmsw.cpp $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\msw\sockmsw.cpp
@@ -13002,6 +13015,9 @@ $(OBJS)\netlib_url.obj: ..\..\src\common\url.cpp
$(OBJS)\netlib_webrequest.obj: ..\..\src\common\webrequest.cpp $(OBJS)\netlib_webrequest.obj: ..\..\src\common\webrequest.cpp
$(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\webrequest.cpp $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\webrequest.cpp
$(OBJS)\netlib_webrequest_curl.obj: ..\..\src\common\webrequest_curl.cpp
$(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\webrequest_curl.cpp
$(OBJS)\netlib_sockmsw.obj: ..\..\src\msw\sockmsw.cpp $(OBJS)\netlib_sockmsw.obj: ..\..\src\msw\sockmsw.cpp
$(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\msw\sockmsw.cpp $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\msw\sockmsw.cpp

View File

@@ -470,6 +470,7 @@
<ClCompile Include="..\..\src\msw\urlmsw.cpp" /> <ClCompile Include="..\..\src\msw\urlmsw.cpp" />
<ClCompile Include="..\..\src\common\webrequest.cpp" /> <ClCompile Include="..\..\src\common\webrequest.cpp" />
<ClCompile Include="..\..\src\msw\webrequest_winhttp.cpp" /> <ClCompile Include="..\..\src\msw\webrequest_winhttp.cpp" />
<ClCompile Include="..\..\src\common\webrequest_curl.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="..\..\src\msw\version.rc"> <ResourceCompile Include="..\..\src\msw\version.rc">
@@ -513,6 +514,7 @@
<ClInclude Include="..\..\include\wx\url.h" /> <ClInclude Include="..\..\include\wx\url.h" />
<ClInclude Include="..\..\include\wx\webrequest.h" /> <ClInclude Include="..\..\include\wx\webrequest.h" />
<ClInclude Include="..\..\include\wx\msw\webrequest_winhttp.h" /> <ClInclude Include="..\..\include\wx\msw\webrequest_winhttp.h" />
<ClInclude Include="..\..\include\wx\webrequest_curl.h" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">

View File

@@ -54,6 +54,9 @@
<ClCompile Include="..\..\src\common\webrequest.cpp"> <ClCompile Include="..\..\src\common\webrequest.cpp">
<Filter>Common Sources</Filter> <Filter>Common Sources</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\common\webrequest_curl.cpp">
<Filter>Common Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\msw\sockmsw.cpp"> <ClCompile Include="..\..\src\msw\sockmsw.cpp">
<Filter>MSW Sources</Filter> <Filter>MSW Sources</Filter>
</ClCompile> </ClCompile>
@@ -109,6 +112,9 @@
<ClInclude Include="..\..\include\wx\webrequest.h"> <ClInclude Include="..\..\include\wx\webrequest.h">
<Filter>Common Headers</Filter> <Filter>Common Headers</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\include\wx\webrequest_curl.h">
<Filter>Common Headers</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="..\..\include\wx\msw\setup.h"> <CustomBuild Include="..\..\include\wx\msw\setup.h">

View File

@@ -336,6 +336,9 @@
<File <File
RelativePath="..\..\src\common\webrequest.cpp"> RelativePath="..\..\src\common\webrequest.cpp">
</File> </File>
<File
RelativePath="..\..\src\common\webrequest_curl.cpp">
</File>
</Filter> </Filter>
<Filter <Filter
Name="MSW Sources" Name="MSW Sources"
@@ -494,6 +497,9 @@
<File <File
RelativePath="..\..\include\wx\webrequest.h"> RelativePath="..\..\include\wx\webrequest.h">
</File> </File>
<File
RelativePath="..\..\include\wx\webrequest_curl.h">
</File>
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>

View File

@@ -853,6 +853,10 @@
RelativePath="..\..\src\common\webrequest.cpp" RelativePath="..\..\src\common\webrequest.cpp"
> >
</File> </File>
<File
RelativePath="..\..\src\common\webrequest_curl.cpp"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="MSW Sources" Name="MSW Sources"
@@ -1161,6 +1165,10 @@
RelativePath="..\..\include\wx\webrequest.h" RelativePath="..\..\include\wx\webrequest.h"
> >
</File> </File>
<File
RelativePath="..\..\include\wx\webrequest_curl.h"
>
</File>
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>

View File

@@ -849,6 +849,10 @@
RelativePath="..\..\src\common\webrequest.cpp" RelativePath="..\..\src\common\webrequest.cpp"
> >
</File> </File>
<File
RelativePath="..\..\src\common\webrequest_curl.cpp"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="MSW Sources" Name="MSW Sources"
@@ -1157,6 +1161,10 @@
RelativePath="..\..\include\wx\webrequest.h" RelativePath="..\..\include\wx\webrequest.h"
> >
</File> </File>
<File
RelativePath="..\..\include\wx\webrequest_curl.h"
>
</File>
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>

5
configure vendored
View File

@@ -36621,6 +36621,11 @@ fi
if test "$wxUSE_WEBREQUEST" = "yes"; then if test "$wxUSE_WEBREQUEST" = "yes"; then
$as_echo "#define wxUSE_WEBREQUEST 1" >>confdefs.h $as_echo "#define wxUSE_WEBREQUEST 1" >>confdefs.h
if test "$wxUSE_MSW" = 1; then
$as_echo "#define wxUSE_WEBREQUEST_WINHTTP 1" >>confdefs.h
fi
fi fi

View File

@@ -6347,6 +6347,11 @@ fi
if test "$wxUSE_WEBREQUEST" = "yes"; then if test "$wxUSE_WEBREQUEST" = "yes"; then
AC_DEFINE(wxUSE_WEBREQUEST) AC_DEFINE(wxUSE_WEBREQUEST)
if test "$wxUSE_MSW" = 1; then
dnl TODO: Check for the required headers/libraries under Windows
AC_DEFINE(wxUSE_WEBREQUEST_WINHTTP)
fi
fi fi
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------

View File

@@ -647,11 +647,52 @@
// wxMimeTypesManager class // wxMimeTypesManager class
#define wxUSE_MIMETYPE 1 #define wxUSE_MIMETYPE 1
// wxWebRequest backend based on WinHTTP
//
// Default is 1
//
// Recommended setting: 1 on Windows
// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION()
// here as this file is included from wx/platform.h before they're defined.
#if defined(_MSC_VER) || \
(defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
#define wxUSE_WEBREQUEST_WINHTTP 1
#else
#define wxUSE_WEBREQUEST_WINHTTP 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 1 on macOS 10.9+
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
#define wxUSE_WEBREQUEST_URLSESSION 1
#else
#define wxUSE_WEBREQUEST_URLSESSION 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 0 on Windows and macOS otherwise 1
#if defined(__WINDOWS__) || defined(__APPLE__)
#define wxUSE_WEBREQUEST_CURL 0
#else
#define wxUSE_WEBREQUEST_CURL 1
#endif
// wxWebRequest and related classes: This will allow usage of system libraries // wxWebRequest and related classes: This will allow usage of system libraries
// for HTTP(S) requests // for HTTP(S) requests
// //
// Default is 1 // Default is 1
#if wxUSE_WEBREQUEST_WINHTTP || wxUSE_WEBREQUEST_URLSESSION || wxUSE_WEBREQUEST_CURL
#define wxUSE_WEBREQUEST 1 #define wxUSE_WEBREQUEST 1
#else
#define wxUSE_WEBREQUEST 0
#endif
// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP // wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP
// or wxURL you need to set this to 1. // or wxURL you need to set this to 1.

View File

@@ -2300,6 +2300,15 @@
# endif # endif
#endif /* wxUSE_WEBVIEW && !any web view backend */ #endif /* wxUSE_WEBVIEW && !any web view backend */
#if wxUSE_WEBREQUEST && !(wxUSE_WEBREQUEST_WINHTTP || wxUSE_WEBREQUEST_URLSESSION || wxUSE_WEBREQUEST_CURL)
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_WEBREQUEST requires at least one backend"
# else
# undef wxUSE_WEBREQUEST
# define wxUSE_WEBREQUEST 0
# endif
#endif /* wxUSE_WEBREQUEST && !any web request backend */
#if wxUSE_PREFERENCES_EDITOR #if wxUSE_PREFERENCES_EDITOR
/* /*
We can use either a generic implementation, using wxNotebook, or a We can use either a generic implementation, using wxNotebook, or a

View File

@@ -648,11 +648,52 @@
// wxMimeTypesManager class // wxMimeTypesManager class
#define wxUSE_MIMETYPE 1 #define wxUSE_MIMETYPE 1
// wxWebRequest backend based on WinHTTP
//
// Default is 1
//
// Recommended setting: 1 on Windows
// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION()
// here as this file is included from wx/platform.h before they're defined.
#if defined(_MSC_VER) || \
(defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
#define wxUSE_WEBREQUEST_WINHTTP 1
#else
#define wxUSE_WEBREQUEST_WINHTTP 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 1 on macOS 10.9+
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
#define wxUSE_WEBREQUEST_URLSESSION 1
#else
#define wxUSE_WEBREQUEST_URLSESSION 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 0 on Windows and macOS otherwise 1
#if defined(__WINDOWS__) || defined(__APPLE__)
#define wxUSE_WEBREQUEST_CURL 0
#else
#define wxUSE_WEBREQUEST_CURL 1
#endif
// wxWebRequest and related classes: This will allow usage of system libraries // wxWebRequest and related classes: This will allow usage of system libraries
// for HTTP(S) requests // for HTTP(S) requests
// //
// Default is 1 // Default is 1
#if wxUSE_WEBREQUEST_WINHTTP || wxUSE_WEBREQUEST_URLSESSION || wxUSE_WEBREQUEST_CURL
#define wxUSE_WEBREQUEST 1 #define wxUSE_WEBREQUEST 1
#else
#define wxUSE_WEBREQUEST 0
#endif
// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP // wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP
// or wxURL you need to set this to 1. // or wxURL you need to set this to 1.

View File

@@ -648,11 +648,52 @@
// wxMimeTypesManager class // wxMimeTypesManager class
#define wxUSE_MIMETYPE 1 #define wxUSE_MIMETYPE 1
// wxWebRequest backend based on WinHTTP
//
// Default is 1
//
// Recommended setting: 1 on Windows
// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION()
// here as this file is included from wx/platform.h before they're defined.
#if defined(_MSC_VER) || \
(defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
#define wxUSE_WEBREQUEST_WINHTTP 1
#else
#define wxUSE_WEBREQUEST_WINHTTP 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 1 on macOS 10.9+
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
#define wxUSE_WEBREQUEST_URLSESSION 1
#else
#define wxUSE_WEBREQUEST_URLSESSION 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 0 on Windows and macOS otherwise 1
#if defined(__WINDOWS__) || defined(__APPLE__)
#define wxUSE_WEBREQUEST_CURL 0
#else
#define wxUSE_WEBREQUEST_CURL 1
#endif
// wxWebRequest and related classes: This will allow usage of system libraries // wxWebRequest and related classes: This will allow usage of system libraries
// for HTTP(S) requests // for HTTP(S) requests
// //
// Default is 1 // Default is 1
#if wxUSE_WEBREQUEST_WINHTTP || wxUSE_WEBREQUEST_URLSESSION || wxUSE_WEBREQUEST_CURL
#define wxUSE_WEBREQUEST 1 #define wxUSE_WEBREQUEST 1
#else
#define wxUSE_WEBREQUEST 0
#endif
// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP // wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP
// or wxURL you need to set this to 1. // or wxURL you need to set this to 1.

View File

@@ -648,11 +648,52 @@
// wxMimeTypesManager class // wxMimeTypesManager class
#define wxUSE_MIMETYPE 1 #define wxUSE_MIMETYPE 1
// wxWebRequest backend based on WinHTTP
//
// Default is 1
//
// Recommended setting: 1 on Windows
// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION()
// here as this file is included from wx/platform.h before they're defined.
#if defined(_MSC_VER) || \
(defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
#define wxUSE_WEBREQUEST_WINHTTP 1
#else
#define wxUSE_WEBREQUEST_WINHTTP 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 1 on macOS 10.9+
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
#define wxUSE_WEBREQUEST_URLSESSION 1
#else
#define wxUSE_WEBREQUEST_URLSESSION 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 0 on Windows and macOS otherwise 1
#if defined(__WINDOWS__) || defined(__APPLE__)
#define wxUSE_WEBREQUEST_CURL 0
#else
#define wxUSE_WEBREQUEST_CURL 1
#endif
// wxWebRequest and related classes: This will allow usage of system libraries // wxWebRequest and related classes: This will allow usage of system libraries
// for HTTP(S) requests // for HTTP(S) requests
// //
// Default is 1 // Default is 1
#if wxUSE_WEBREQUEST_WINHTTP || wxUSE_WEBREQUEST_URLSESSION || wxUSE_WEBREQUEST_CURL
#define wxUSE_WEBREQUEST 1 #define wxUSE_WEBREQUEST 1
#else
#define wxUSE_WEBREQUEST 0
#endif
// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP // wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP
// or wxURL you need to set this to 1. // or wxURL you need to set this to 1.

View File

@@ -654,11 +654,52 @@
// wxMimeTypesManager class // wxMimeTypesManager class
#define wxUSE_MIMETYPE 1 #define wxUSE_MIMETYPE 1
// wxWebRequest backend based on WinHTTP
//
// Default is 1
//
// Recommended setting: 1 on Windows
// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION()
// here as this file is included from wx/platform.h before they're defined.
#if defined(_MSC_VER) || \
(defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
#define wxUSE_WEBREQUEST_WINHTTP 1
#else
#define wxUSE_WEBREQUEST_WINHTTP 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 1 on macOS 10.9+
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
#define wxUSE_WEBREQUEST_URLSESSION 1
#else
#define wxUSE_WEBREQUEST_URLSESSION 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 0 on Windows and macOS otherwise 1
#if defined(__WINDOWS__) || defined(__APPLE__)
#define wxUSE_WEBREQUEST_CURL 0
#else
#define wxUSE_WEBREQUEST_CURL 1
#endif
// wxWebRequest and related classes: This will allow usage of system libraries // wxWebRequest and related classes: This will allow usage of system libraries
// for HTTP(S) requests // for HTTP(S) requests
// //
// Default is 1 // Default is 1
#if wxUSE_WEBREQUEST_WINHTTP || wxUSE_WEBREQUEST_URLSESSION || wxUSE_WEBREQUEST_CURL
#define wxUSE_WEBREQUEST 1 #define wxUSE_WEBREQUEST 1
#else
#define wxUSE_WEBREQUEST 0
#endif
// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP // wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP
// or wxURL you need to set this to 1. // or wxURL you need to set this to 1.

View File

@@ -0,0 +1,42 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/osx/webrequest_urlsession.h
// Purpose: wxWebRequest implementation using URLSession
// Author: Tobias Taschner
// Created: 2018-10-25
// Copyright: (c) 2018 wxWidgets development team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OSX_WEBREQUEST_URLSESSION_H
#define _WX_OSX_WEBREQUEST_URLSESSION_H
#if wxUSE_WEBREQUEST_URLSESSION
DECLARE_WXCOCOA_OBJC_CLASS(NSURLSession);
DECLARE_WXCOCOA_OBJC_CLASS(NSURLTask);
class WXDLLIMPEXP_NET wxWebSessionURLSession: public wxWebSession
{
public:
wxWebSessionURLSession();
~wxWebSessionURLSession();
wxWebRequest* CreateRequest(const wxString& url, int id = wxID_ANY) wxOVERRIDE;
private:
WX_NSURLSession m_session;
wxDECLARE_NO_COPY_CLASS(wxWebSessionURLSession);
};
class WXDLLIMPEXP_NET wxWebSessionFactoryURLSession: public wxWebSessionFactory
{
public:
wxWebSession* Create() wxOVERRIDE
{ return new wxWebSessionURLSession(); }
};
#endif // wxUSE_WEBREQUEST_URLSESSION
#endif // _WX_OSX_WEBREQUEST_URLSESSION_H

View File

@@ -644,11 +644,52 @@
// wxMimeTypesManager class // wxMimeTypesManager class
#define wxUSE_MIMETYPE 1 #define wxUSE_MIMETYPE 1
// wxWebRequest backend based on WinHTTP
//
// Default is 1
//
// Recommended setting: 1 on Windows
// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION()
// here as this file is included from wx/platform.h before they're defined.
#if defined(_MSC_VER) || \
(defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
#define wxUSE_WEBREQUEST_WINHTTP 1
#else
#define wxUSE_WEBREQUEST_WINHTTP 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 1 on macOS 10.9+
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
#define wxUSE_WEBREQUEST_URLSESSION 1
#else
#define wxUSE_WEBREQUEST_URLSESSION 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 0 on Windows and macOS otherwise 1
#if defined(__WINDOWS__) || defined(__APPLE__)
#define wxUSE_WEBREQUEST_CURL 0
#else
#define wxUSE_WEBREQUEST_CURL 1
#endif
// wxWebRequest and related classes: This will allow usage of system libraries // wxWebRequest and related classes: This will allow usage of system libraries
// for HTTP(S) requests // for HTTP(S) requests
// //
// Default is 1 // Default is 1
#if wxUSE_WEBREQUEST_WINHTTP || wxUSE_WEBREQUEST_URLSESSION || wxUSE_WEBREQUEST_CURL
#define wxUSE_WEBREQUEST 1 #define wxUSE_WEBREQUEST 1
#else
#define wxUSE_WEBREQUEST 0
#endif
// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP // wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP
// or wxURL you need to set this to 1. // or wxURL you need to set this to 1.

View File

@@ -647,11 +647,52 @@
// wxMimeTypesManager class // wxMimeTypesManager class
#define wxUSE_MIMETYPE 1 #define wxUSE_MIMETYPE 1
// wxWebRequest backend based on WinHTTP
//
// Default is 1
//
// Recommended setting: 1 on Windows
// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION()
// here as this file is included from wx/platform.h before they're defined.
#if defined(_MSC_VER) || \
(defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
#define wxUSE_WEBREQUEST_WINHTTP 1
#else
#define wxUSE_WEBREQUEST_WINHTTP 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 1 on macOS 10.9+
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
#define wxUSE_WEBREQUEST_URLSESSION 1
#else
#define wxUSE_WEBREQUEST_URLSESSION 0
#endif
// wxWebRequest backend based on NSURLSession
//
// Default is 1
//
// Recommended setting: 0 on Windows and macOS otherwise 1
#if defined(__WINDOWS__) || defined(__APPLE__)
#define wxUSE_WEBREQUEST_CURL 0
#else
#define wxUSE_WEBREQUEST_CURL 1
#endif
// wxWebRequest and related classes: This will allow usage of system libraries // wxWebRequest and related classes: This will allow usage of system libraries
// for HTTP(S) requests // for HTTP(S) requests
// //
// Default is 1 // Default is 1
#if wxUSE_WEBREQUEST_WINHTTP || wxUSE_WEBREQUEST_URLSESSION || wxUSE_WEBREQUEST_CURL
#define wxUSE_WEBREQUEST 1 #define wxUSE_WEBREQUEST 1
#else
#define wxUSE_WEBREQUEST 0
#endif
// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP // wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP
// or wxURL you need to set this to 1. // or wxURL you need to set this to 1.

View File

@@ -0,0 +1,37 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/webrequest_curl.h
// Purpose: wxWebRequest implementation using libcurl
// Author: Tobias Taschner
// Created: 2018-10-25
// Copyright: (c) 2018 wxWidgets development team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WEBREQUEST_CURL_H
#define _WX_WEBREQUEST_CURL_H
#if wxUSE_WEBREQUEST_CURL
class WXDLLIMPEXP_NET wxWebSessionCURL: public wxWebSession
{
public:
wxWebSessionCURL();
~wxWebSessionCURL();
wxWebRequest* CreateRequest(const wxString& url, int id = wxID_ANY) wxOVERRIDE;
private:
wxDECLARE_NO_COPY_CLASS(wxWebSessionCURL);
};
class WXDLLIMPEXP_NET wxWebSessionFactoryCURL: public wxWebSessionFactory
{
public:
wxWebSession* Create() wxOVERRIDE
{ return new wxWebSessionCURL(); }
};
#endif // wxUSE_WEBREQUEST_CURL
#endif

View File

@@ -299,7 +299,31 @@
#define wxUSE_MIMETYPE 0 #define wxUSE_MIMETYPE 0
#if defined(_MSC_VER) || \
(defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
#define wxUSE_WEBREQUEST_WINHTTP 0
#else
#define wxUSE_WEBREQUEST_WINHTTP 0
#endif
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
#define wxUSE_WEBREQUEST_URLSESSION 0
#else
#define wxUSE_WEBREQUEST_URLSESSION 0
#endif
#if defined(__WINDOWS__) || defined(__APPLE__)
#define wxUSE_WEBREQUEST_CURL 0
#else
#define wxUSE_WEBREQUEST_CURL 0
#endif
#if wxUSE_WEBREQUEST_WINHTTP || wxUSE_WEBREQUEST_URLSESSION || wxUSE_WEBREQUEST_CURL
#define wxUSE_WEBREQUEST 0 #define wxUSE_WEBREQUEST 0
#else
#define wxUSE_WEBREQUEST 0
#endif
#define wxUSE_PROTOCOL 0 #define wxUSE_PROTOCOL 0

View File

@@ -24,16 +24,26 @@
#include "wx/translation.h" #include "wx/translation.h"
#endif #endif
#if defined(__WINDOWS__) #if wxUSE_WEBREQUEST_WINHTTP
#include "wx/msw/webrequest_winhttp.h" #include "wx/msw/webrequest_winhttp.h"
#endif #endif
#if wxUSE_WEBREQUEST_URLSESSION
#include "wx/osx/webrequest_urlsession.h"
#endif
#if wxUSE_WEBREQUEST_CURL
#include "wx/webrequest_curl.h"
#endif
extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendWinHTTP[] = "wxWebSessionBackendWinHTTP"; extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendWinHTTP[] = "wxWebSessionBackendWinHTTP";
extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendURLSession[] = "wxWebSessionBackendURLSession"; extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendURLSession[] = "wxWebSessionBackendURLSession";
extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendCURL[] = "wxWebSessionBackendCURL"; extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendCURL[] = "wxWebSessionBackendCURL";
#if defined(__WINDOWS__) #if wxUSE_WEBREQUEST_WINHTTP
extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendDefault[] = "wxWebSessionBackendWinHTTP"; extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendDefault[] = "wxWebSessionBackendWinHTTP";
#elif wxUSE_WEBREQUEST_URLSESSION
extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendDefault[] = "wxWebSessionBackendURLSession";
#elif wxUSE_WEBREQUEST_CURL
extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendDefault[] = "wxWebSessionBackendCURL";
#endif #endif
wxDEFINE_EVENT(wxEVT_WEBREQUEST_STATE, wxWebRequestEvent); wxDEFINE_EVENT(wxEVT_WEBREQUEST_STATE, wxWebRequestEvent);
@@ -156,10 +166,18 @@ void wxWebSession::RegisterFactory(const wxString& backend, wxSharedPtr<wxWebSes
// static // static
void wxWebSession::InitFactoryMap() void wxWebSession::InitFactoryMap()
{ {
#if defined(__WINDOWS__) #if wxUSE_WEBREQUEST_WINHTTP
RegisterFactory(wxWebSessionBackendWinHTTP, RegisterFactory(wxWebSessionBackendWinHTTP,
wxSharedPtr<wxWebSessionFactory>(new wxWebSessionFactoryWinHTTP())); wxSharedPtr<wxWebSessionFactory>(new wxWebSessionFactoryWinHTTP()));
#endif #endif
#if wxUSE_WEBREQUEST_URLSESSION
RegisterFactory(wxWebSessionBackendURLSession,
wxSharedPtr<wxWebSessionFactory>(new wxWebSessionFactoryURLSession()));
#endif
#if wxUSE_WEBREQUEST_CURL
RegisterFactory(wxWebSessionBackendCURL,
wxSharedPtr<wxWebSessionFactory>(new wxWebSessionFactoryCURL()));
#endif
} }
// static // static

View File

@@ -0,0 +1,39 @@
///////////////////////////////////////////////////////////////////////////////
// Name: src/common/webrequest_curl.h
// Purpose: wxWebRequest implementation using libcurl
// Author: Tobias Taschner
// Created: 2018-10-25
// Copyright: (c) 2018 wxWidgets development team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
#pragma hdrstop
#endif
#include "wx/webrequest.h"
#if wxUSE_WEBREQUEST_CURL
#include "wx/webrequest_curl.h"
wxWebSessionCURL::wxWebSessionCURL()
{
}
wxWebSessionCURL::~wxWebSessionCURL()
{
}
wxWebRequest* wxWebSessionCURL::CreateRequest(const wxString& url, int id)
{
wxFAIL_MSG("not implemented");
return NULL;
}
#endif // wxUSE_WEBREQUEST_CURL

View File

@@ -16,7 +16,7 @@
#include "wx/webrequest.h" #include "wx/webrequest.h"
#if wxUSE_WEBREQUEST #if wxUSE_WEBREQUEST_WINHTTP
#include "wx/mstream.h" #include "wx/mstream.h"
#include "wx/uri.h" #include "wx/uri.h"
@@ -472,4 +472,4 @@ wxWebRequest* wxWebSessionWinHTTP::CreateRequest(const wxString& url, int id)
return new wxWebRequestWinHTTP(id, *this, url); return new wxWebRequestWinHTTP(id, *this, url);
} }
#endif // wxUSE_WEBREQUEST #endif // wxUSE_WEBREQUEST_WINHTTP

View File

@@ -0,0 +1,42 @@
///////////////////////////////////////////////////////////////////////////////
// Name: src/osx/webrequest_urlsession.h
// Purpose: wxWebRequest implementation using URLSession
// Author: Tobias Taschner
// Created: 2018-10-25
// Copyright: (c) 2018 wxWidgets development team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
#pragma hdrstop
#endif
#include "wx/webrequest.h"
#if wxUSE_WEBREQUEST_URLSESSION
#import <Foundation/Foundation.h>
#include "wx/osx/webrequest_urlsession.h"
wxWebSessionURLSession::wxWebSessionURLSession()
{
m_session = [NSURLSession sessionWithConfiguration:
[NSURLSessionConfiguration defaultSessionConfiguration]];
}
wxWebSessionURLSession::~wxWebSessionURLSession()
{
[m_session release];
}
wxWebRequest* wxWebSessionURLSession::CreateRequest(const wxString& url, int id)
{
wxFAIL_MSG("not implemented");
return NULL;
}
#endif // wxUSE_WEBREQUEST_URLSESSION