From 8579c7faf2111c668a31ace64d268cac00f71d59 Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Sat, 23 Jan 2021 09:18:30 +0000 Subject: [PATCH] Package Kit: switch to libnetservices.a Switch to the experimental services API as the copy in libbnetapi.so is deprecated. Change-Id: Ia0742038937d078c6a59ae13180a00a4c4eeb177 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3671 Reviewed-by: Adrien Destugues --- src/kits/package/FetchFileJob.cpp | 1 + src/kits/package/FetchFileJob.h | 12 +++++++++--- src/kits/package/Jamfile | 4 +--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/kits/package/FetchFileJob.cpp b/src/kits/package/FetchFileJob.cpp index 92ab42828f..0256ef3338 100644 --- a/src/kits/package/FetchFileJob.cpp +++ b/src/kits/package/FetchFileJob.cpp @@ -21,6 +21,7 @@ # include # include # include +using namespace BPrivate::Network; #endif #include "FetchUtils.h" diff --git a/src/kits/package/FetchFileJob.h b/src/kits/package/FetchFileJob.h index b4ba4230e2..1105050c10 100644 --- a/src/kits/package/FetchFileJob.h +++ b/src/kits/package/FetchFileJob.h @@ -18,6 +18,11 @@ #include +#ifdef HAIKU_TARGET_PLATFORM_HAIKU +using BPrivate::Network::BUrlProtocolListener; +using BPrivate::Network::BUrlRequest; +#endif + namespace BPackageKit { @@ -48,9 +53,10 @@ public: #ifdef HAIKU_TARGET_PLATFORM_HAIKU virtual void DataReceived(BUrlRequest*, const char* data, off_t position, ssize_t size); - virtual void DownloadProgress(BUrlRequest*, ssize_t bytesReceived, - ssize_t bytesTotal); - virtual void RequestCompleted(BUrlRequest* request, bool success); + virtual void DownloadProgress(BUrlRequest*, + ssize_t bytesReceived, ssize_t bytesTotal); + virtual void RequestCompleted(BUrlRequest* request, + bool success); #endif protected: diff --git a/src/kits/package/Jamfile b/src/kits/package/Jamfile index 4307a1b699..c2381a4ae9 100644 --- a/src/kits/package/Jamfile +++ b/src/kits/package/Jamfile @@ -13,9 +13,6 @@ UsePrivateHeaders ; UsePrivateSystemHeaders ; -# Use the deprecated libnetapi.so classes -SubDirC++Flags [ FDefines LIBNETAPI_DEPRECATED ] ; - HPKG_SOURCES = AttributeDataReader.cpp BlockBufferPool.cpp @@ -134,6 +131,7 @@ for architectureObject in [ MultiArchSubDirSetup ] { shared bnetapi be localestub + [ MultiArchDefaultGristFiles libnetservices.a ] [ TargetLibstdc++ ] $(TARGET_NETWORK_LIBS) ;