From 2a7090df71ce5516f1ee30c8b78f0a84c6ec9c34 Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Fri, 22 Jan 2021 20:35:29 +0000 Subject: [PATCH] libnetservices.a: move BGeoLocation from libshared.a The BGeolocation class uses the network interface in libnetservices.a, so it is moved here for now. This will break any out of tree projects that depend on it, but it is a source incompatible change only. Change-Id: I6f5b1332eb87ad37dd33fbe09fdb11b16f7f26e4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3670 Reviewed-by: Adrien Destugues --- headers/private/{shared => netservices}/Geolocation.h | 2 ++ .../libnetservices}/Geolocation.cpp | 2 ++ src/kits/network/libnetservices/JamCommon | 5 +++++ src/kits/shared/Jamfile | 11 ----------- 4 files changed, 9 insertions(+), 11 deletions(-) rename headers/private/{shared => netservices}/Geolocation.h (95%) rename src/kits/{shared => network/libnetservices}/Geolocation.cpp (99%) diff --git a/headers/private/shared/Geolocation.h b/headers/private/netservices/Geolocation.h similarity index 95% rename from headers/private/shared/Geolocation.h rename to headers/private/netservices/Geolocation.h index 825f696228..df62d6c320 100644 --- a/headers/private/shared/Geolocation.h +++ b/headers/private/netservices/Geolocation.h @@ -12,6 +12,7 @@ namespace BPrivate { +namespace Network { class BGeolocation { public: @@ -36,6 +37,7 @@ private: static const char* kDefaultGeocodingService; }; +} // namespace Network } // namespace BPrivate diff --git a/src/kits/shared/Geolocation.cpp b/src/kits/network/libnetservices/Geolocation.cpp similarity index 99% rename from src/kits/shared/Geolocation.cpp rename to src/kits/network/libnetservices/Geolocation.cpp index 9698533882..644c6fb06e 100644 --- a/src/kits/shared/Geolocation.cpp +++ b/src/kits/network/libnetservices/Geolocation.cpp @@ -19,6 +19,7 @@ namespace BPrivate { +namespace Network { class GeolocationListener: public BUrlProtocolListener { @@ -248,5 +249,6 @@ const char* BGeolocation::kDefaultGeocodingService = ""; #endif +} // namespace Network } // namespace BPrivate diff --git a/src/kits/network/libnetservices/JamCommon b/src/kits/network/libnetservices/JamCommon index dd35f03958..1233f81026 100644 --- a/src/kits/network/libnetservices/JamCommon +++ b/src/kits/network/libnetservices/JamCommon @@ -36,6 +36,10 @@ local sources = UrlSynchronousRequest.cpp ; +if [ Glob $(SUBDIR) : DefaultGeolocationServiceKey.h ] { + SubDirC++Flags [ FDefines HAVE_DEFAULT_GEOLOCATION_SERVICE_KEY ] ; +} + local architectureObject ; for architectureObject in [ MultiArchSubDirSetup ] { on $(architectureObject) { @@ -52,6 +56,7 @@ for architectureObject in [ MultiArchSubDirSetup ] { } else { StaticLibrary [ MultiArchDefaultGristFiles libnetservices.a ] : $(sources) + Geolocation.cpp ; } diff --git a/src/kits/shared/Jamfile b/src/kits/shared/Jamfile index b89d43b367..7910176c73 100644 --- a/src/kits/shared/Jamfile +++ b/src/kits/shared/Jamfile @@ -5,13 +5,6 @@ AddSubDirSupportedPlatforms libbe_test ; UseLibraryHeaders agg ; UsePrivateHeaders shared locale ; -if [ Glob $(SUBDIR) : DefaultGeolocationServiceKey.h ] { - SubDirC++Flags [ FDefines HAVE_DEFAULT_GEOLOCATION_SERVICE_KEY ] ; -} - -# Use the deprecated libnetapi.so classes -SubDirC++Flags [ FDefines LIBNETAPI_DEPRECATED ] ; - local architectureObject ; for architectureObject in [ MultiArchSubDirSetup ] { on $(architectureObject) { @@ -31,9 +24,6 @@ for architectureObject in [ MultiArchSubDirSetup ] { # for BKeymap UsePrivateHeaders interface ; - # for BGeolocation - UsePrivateHeaders netservices ; - StaticLibrary <$(architecture)>libshared.a : AboutMenuItem.cpp ArgumentVector.cpp @@ -44,7 +34,6 @@ for architectureObject in [ MultiArchSubDirSetup ] { CommandPipe.cpp DragTrackingFilter.cpp DriverSettingsMessageAdapter.cpp - Geolocation.cpp HashString.cpp IconButton.cpp IconView.cpp