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 <pulkomandy@gmail.com>
This commit is contained in:
Niels Sascha Reedijk 2021-01-23 09:18:30 +00:00
parent 2a7090df71
commit 8579c7faf2
3 changed files with 11 additions and 6 deletions

View File

@ -21,6 +21,7 @@
# include <HttpRequest.h>
# include <UrlRequest.h>
# include <UrlProtocolRoster.h>
using namespace BPrivate::Network;
#endif
#include "FetchUtils.h"

View File

@ -18,6 +18,11 @@
#include <package/Job.h>
#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:

View File

@ -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)
;