haikudepot: switch to libnetservices.a
Switch to the experimental services API as the copy in libbnetapi.so is deprecated. Change-Id: Ic5e2c23a1be598be3057ea913c420c5346f9007f Reviewed-on: https://review.haiku-os.org/c/haiku/+/3669 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
@@ -229,9 +229,6 @@ local generatedReferenceParserSourceFiles =
|
|||||||
DumpExportReferenceJsonListener.cpp
|
DumpExportReferenceJsonListener.cpp
|
||||||
;
|
;
|
||||||
|
|
||||||
# Use the deprecated libnetapi.so network classes
|
|
||||||
SubDirC++Flags [ FDefines LIBNETAPI_DEPRECATED ] ;
|
|
||||||
|
|
||||||
Application HaikuDepot
|
Application HaikuDepot
|
||||||
:
|
:
|
||||||
$(applicationSources)
|
$(applicationSources)
|
||||||
@@ -243,7 +240,7 @@ Application HaikuDepot
|
|||||||
$(generatedRepositoryParserSourceFiles)
|
$(generatedRepositoryParserSourceFiles)
|
||||||
$(generatedReferenceParserSourceFiles)
|
$(generatedReferenceParserSourceFiles)
|
||||||
:
|
:
|
||||||
be package bnetapi translation libcolumnlistview.a shared
|
be package bnetapi translation libnetservices.a libcolumnlistview.a shared
|
||||||
[ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
|
[ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
|
||||||
:
|
:
|
||||||
HaikuDepot.rdef
|
HaikuDepot.rdef
|
||||||
|
|||||||
@@ -27,6 +27,9 @@
|
|||||||
#include "ToFileUrlProtocolListener.h"
|
#include "ToFileUrlProtocolListener.h"
|
||||||
|
|
||||||
|
|
||||||
|
using namespace BPrivate::Network;
|
||||||
|
|
||||||
|
|
||||||
#define MAX_REDIRECTS 3
|
#define MAX_REDIRECTS 3
|
||||||
#define MAX_FAILURES 2
|
#define MAX_FAILURES 2
|
||||||
|
|
||||||
@@ -133,9 +136,9 @@ AbstractServerProcess::SetIfModifiedSinceHeaderValueFromMetaData(
|
|||||||
// An example of this output would be; 'Fri, 24 Oct 2014 19:32:27 +0000'
|
// An example of this output would be; 'Fri, 24 Oct 2014 19:32:27 +0000'
|
||||||
BDateTime modifiedDateTime = metaData
|
BDateTime modifiedDateTime = metaData
|
||||||
.GetDataModifiedTimestampAsDateTime();
|
.GetDataModifiedTimestampAsDateTime();
|
||||||
BPrivate::BHttpTime modifiedHttpTime(modifiedDateTime);
|
BHttpTime modifiedHttpTime(modifiedDateTime);
|
||||||
headerValue.SetTo(modifiedHttpTime
|
headerValue.SetTo(modifiedHttpTime
|
||||||
.ToString(BPrivate::B_HTTP_TIME_FORMAT_COOKIE));
|
.ToString(B_HTTP_TIME_FORMAT_COOKIE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,9 @@
|
|||||||
#include "StandardMetaData.h"
|
#include "StandardMetaData.h"
|
||||||
|
|
||||||
|
|
||||||
|
using BPrivate::Network::BHttpRequest;
|
||||||
|
|
||||||
|
|
||||||
typedef enum server_process_options {
|
typedef enum server_process_options {
|
||||||
SERVER_PROCESS_NO_NETWORKING = 1 << 0,
|
SERVER_PROCESS_NO_NETWORKING = 1 << 0,
|
||||||
SERVER_PROCESS_PREFER_CACHE = 1 << 1,
|
SERVER_PROCESS_PREFER_CACHE = 1 << 1,
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
#include "ValidationFailure.h"
|
#include "ValidationFailure.h"
|
||||||
|
|
||||||
|
|
||||||
|
using BPrivate::Network::BHttpHeaders;
|
||||||
|
|
||||||
class BMessage;
|
class BMessage;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
#include <Url.h>
|
#include <Url.h>
|
||||||
|
|
||||||
|
|
||||||
|
using BPrivate::Network::BHttpHeaders;
|
||||||
|
|
||||||
class ServerSettings {
|
class ServerSettings {
|
||||||
public:
|
public:
|
||||||
static status_t SetBaseUrl(const BUrl& baseUrl);
|
static status_t SetBaseUrl(const BUrl& baseUrl);
|
||||||
|
|||||||
@@ -26,6 +26,9 @@
|
|||||||
#include "ServerHelper.h"
|
#include "ServerHelper.h"
|
||||||
|
|
||||||
|
|
||||||
|
using namespace BPrivate::Network;
|
||||||
|
|
||||||
|
|
||||||
#define BASEURL_DEFAULT "https://depot.haiku-os.org"
|
#define BASEURL_DEFAULT "https://depot.haiku-os.org"
|
||||||
#define USERAGENT_FALLBACK_VERSION "0.0.0"
|
#define USERAGENT_FALLBACK_VERSION "0.0.0"
|
||||||
#define LOG_PAYLOAD_LIMIT 8192
|
#define LOG_PAYLOAD_LIMIT 8192
|
||||||
|
|||||||
@@ -10,6 +10,10 @@
|
|||||||
|
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
|
||||||
|
|
||||||
|
using namespace BPrivate::Network;
|
||||||
|
|
||||||
|
|
||||||
ToFileUrlProtocolListener::ToFileUrlProtocolListener(BPath path,
|
ToFileUrlProtocolListener::ToFileUrlProtocolListener(BPath path,
|
||||||
BString traceLoggingIdentifier, bool traceLogging)
|
BString traceLoggingIdentifier, bool traceLogging)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,12 @@
|
|||||||
#include <UrlProtocolListener.h>
|
#include <UrlProtocolListener.h>
|
||||||
#include <UrlRequest.h>
|
#include <UrlRequest.h>
|
||||||
|
|
||||||
|
|
||||||
|
using BPrivate::Network::BUrlProtocolDebugMessage;
|
||||||
|
using BPrivate::Network::BUrlProtocolListener;
|
||||||
|
using BPrivate::Network::BUrlRequest;
|
||||||
|
using BPrivate::Network::BUrlResult;
|
||||||
|
|
||||||
class ToFileUrlProtocolListener : public BUrlProtocolListener {
|
class ToFileUrlProtocolListener : public BUrlProtocolListener {
|
||||||
public:
|
public:
|
||||||
ToFileUrlProtocolListener(BPath path,
|
ToFileUrlProtocolListener(BPath path,
|
||||||
|
|||||||
Reference in New Issue
Block a user