libbnetapi.so: remove deprecated network services classes

This was communicated to devs and end users to happen after R1 beta 3

Change-Id: I65177c0061a58519b04d944ad6a73677ad77206a
This commit is contained in:
Niels Sascha Reedijk
2021-09-11 13:08:10 +01:00
parent 60fee365f5
commit a00a1da384
6 changed files with 44 additions and 160 deletions
-1
View File
@@ -1,5 +1,4 @@
SubDir HAIKU_TOP src kits network ;
SubInclude HAIKU_TOP src kits network libnetapi ;
SubInclude HAIKU_TOP src kits network libnetapi_deprecated ;
SubInclude HAIKU_TOP src kits network libnetservices ;
-1
View File
@@ -58,7 +58,6 @@ for architectureObject in [ MultiArchSubDirSetup ] {
notifications.cpp
:
<libnetapi!$(architecture)>netservices.o
be shared $(TARGET_NETWORK_LIBS) [ TargetLibstdc++ ]
[ TargetLibsupc++ ] [ BuildFeatureAttribute openssl : libraries ]
[ BuildFeatureAttribute icu : libraries ]
@@ -1,3 +0,0 @@
SubDir HAIKU_TOP src kits network libnetapi_deprecated ;
include [ FDirName $(HAIKU_TOP) src kits network libnetservices JamCommon ] ;
@@ -1,85 +0,0 @@
/*
* Copyright 2013-2017 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Adrien Destugues, [email protected]
*/
#include <UrlResult.h>
BUrlResult::BUrlResult()
:
BArchivable(),
fContentType(),
fLength(0)
{
}
BUrlResult::BUrlResult(BMessage* archive)
:
BArchivable(archive)
{
fContentType = archive->FindString("ContentType");
fLength = archive->FindInt32("Length");
}
BUrlResult::~BUrlResult()
{
}
status_t
BUrlResult::Archive(BMessage* archive, bool deep) const
{
status_t result = BArchivable::Archive(archive, deep);
if (result != B_OK)
return result;
archive->AddString("ContentType", fContentType);
archive->AddInt32("Length", fLength);
return B_OK;
}
void
BUrlResult::SetContentType(BString contentType)
{
fContentType = contentType;
}
void
BUrlResult::SetLength(size_t length)
{
fLength = length;
}
BString
BUrlResult::ContentType() const
{
return fContentType;
}
size_t
BUrlResult::Length() const
{
return fLength;
}
/*static*/ BArchivable*
BUrlResult::Instantiate(BMessage* archive)
{
if (!validate_instantiation(archive, "BUrlResult"))
return NULL;
return new BUrlResult(archive);
}
-69
View File
@@ -1,69 +0,0 @@
# This module is built as an independent static library, and as a (deprecated)
# part of libnetapi.so. In the latter case LIBNETAPI_DEPRECATED will be defined
# to ensure binary compatibility.
UsePrivateHeaders net netservices shared support ;
local sources =
# FUTURE: The HTTP stuff should all go into an add-on. It needs
# linking against libcrypto.so and only the add-on should link
# against it.
DataRequest.cpp
HttpAuthentication.cpp
HttpHeaders.cpp
HttpForm.cpp
HttpRequest.cpp
HttpResult.cpp
# FUTURE: another add-on for file:// (a much simpler one)
FileRequest.cpp
# FUTURE: another add-on for gopher://
GopherRequest.cpp
HttpTime.cpp
NetworkCookie.cpp
NetworkCookieJar.cpp
NetworkRequest.cpp
UrlContext.cpp
UrlProtocolAsynchronousListener.cpp
UrlProtocolDispatchingListener.cpp
UrlProtocolListener.cpp
UrlProtocolRoster.cpp
UrlRequest.cpp
UrlSynchronousRequest.cpp
;
if [ Glob $(SUBDIR) : DefaultGeolocationServiceKey.h ] {
SubDirC++Flags [ FDefines HAVE_DEFAULT_GEOLOCATION_SERVICE_KEY ] ;
}
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
if $(SUBDIR:B) = libnetapi_deprecated {
SubDirC++Flags [ FDefines LIBNETAPI_DEPRECATED ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src kits network libnetservices ] : false ;
MergeObject <libnetapi!$(architecture)>netservices.o :
$(sources)
UrlResult_Deprecated.cpp
: <$(architecture)>libshared.a
;
} else {
StaticLibrary [ MultiArchDefaultGristFiles libnetservices.a ] :
$(sources)
Geolocation.cpp
UrlResult.cpp
;
LinkAgainst [ MultiArchDefaultGristFiles libnetservices.a ] :
<$(architecture)>libshared.a ;
}
SEARCH on [ FGristFiles $(sources) ]
= [ FDirName $(HAIKU_TOP) src kits network libnetservices ] ;
}
}
+44 -1
View File
@@ -1,3 +1,46 @@
SubDir HAIKU_TOP src kits network libnetservices ;
include [ FDirName $(HAIKU_TOP) src kits network libnetservices JamCommon ] ;
UsePrivateHeaders net netservices shared support ;
if [ Glob $(SUBDIR) : DefaultGeolocationServiceKey.h ] {
SubDirC++Flags [ FDefines HAVE_DEFAULT_GEOLOCATION_SERVICE_KEY ] ;
}
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
StaticLibrary [ MultiArchDefaultGristFiles libnetservices.a ] :
DataRequest.cpp
HttpAuthentication.cpp
HttpHeaders.cpp
HttpForm.cpp
HttpRequest.cpp
HttpResult.cpp
FileRequest.cpp
GopherRequest.cpp
Geolocation.cpp
HttpTime.cpp
NetworkCookie.cpp
NetworkCookieJar.cpp
NetworkRequest.cpp
UrlContext.cpp
UrlProtocolAsynchronousListener.cpp
UrlProtocolDispatchingListener.cpp
UrlProtocolListener.cpp
UrlProtocolRoster.cpp
UrlRequest.cpp
UrlResult.cpp
UrlSynchronousRequest.cpp
;
LinkAgainst [ MultiArchDefaultGristFiles libnetservices.a ] :
<$(architecture)>libshared.a ;
}
}