libnetservices.a: final cleanup after progress size change to off_t

Final fallout of the hrev54936 change

Change-Id: Id4836359f49dffbef76916db7fb7b51dd1e490d8
This commit is contained in:
Niels Sascha Reedijk 2021-01-28 11:08:10 +00:00
parent 2319480945
commit e95af9e0ef
4 changed files with 49 additions and 2 deletions

View File

@ -35,10 +35,19 @@ public:
virtual void DataReceived(BUrlRequest* caller,
const char* data, off_t position,
ssize_t size);
#ifdef LIBNETAPI_DEPRECATED
virtual void DownloadProgress(BUrlRequest* caller,
ssize_t bytesReceived, ssize_t bytesTotal);
virtual void UploadProgress(BUrlRequest* caller,
ssize_t bytesSent, ssize_t bytesTotal);
#else
virtual void DownloadProgress(BUrlRequest* caller,
off_t bytesReceived, off_t bytesTotal);
virtual void UploadProgress(BUrlRequest* caller,
off_t bytesSent, off_t bytesTotal);
#endif //LIBNETAPI_DEPRECATED
virtual void RequestCompleted(BUrlRequest* caller,
bool success);

View File

@ -107,7 +107,7 @@ BUrlProtocolDispatchingListener::DataReceived(BUrlRequest* caller,
#ifdef LIBNETAPI_DEPRECATED
void
BUrlProtocolDispatchingListener::DownloadProgress(BUrlRequest* caller,
size_t bytesReceived, size_t bytesTotal)
ssize_t bytesReceived, ssize_t bytesTotal)
{
BMessage message(B_URL_PROTOCOL_NOTIFICATION);
message.AddInt32("url:bytesReceived", bytesReceived);
@ -119,7 +119,7 @@ BUrlProtocolDispatchingListener::DownloadProgress(BUrlRequest* caller,
void
BUrlProtocolDispatchingListener::UploadProgress(BUrlRequest* caller,
size_t bytesSent, size_t bytesTotal)
ssize_t bytesSent, ssize_t bytesTotal)
{
BMessage message(B_URL_PROTOCOL_NOTIFICATION);
message.AddInt32("url:bytesSent", bytesSent);

View File

@ -57,6 +57,7 @@ BUrlProtocolListener::DataReceived(BUrlRequest*, const char*, off_t, ssize_t)
}
#ifdef LIBNETAPI_DEPRECATED
void
BUrlProtocolListener::DownloadProgress(BUrlRequest*, ssize_t, ssize_t)
{
@ -68,6 +69,20 @@ BUrlProtocolListener::UploadProgress(BUrlRequest*, ssize_t, ssize_t)
{
}
#else
void
BUrlProtocolListener::DownloadProgress(BUrlRequest*, off_t, off_t)
{
}
void
BUrlProtocolListener::UploadProgress(BUrlRequest*, off_t, off_t)
{
}
#endif // LIBNETAPI_DEPRECATED
void
BUrlProtocolListener::RequestCompleted(BUrlRequest*, bool)

View File

@ -88,6 +88,7 @@ BUrlSynchronousRequest::DataReceived(BUrlRequest*, const char*,
}
#ifdef LIBNETAPI_DEPRECATED
void
BUrlSynchronousRequest::DownloadProgress(BUrlRequest*,
ssize_t bytesReceived, ssize_t bytesTotal)
@ -106,6 +107,28 @@ BUrlSynchronousRequest::UploadProgress(BUrlRequest*, ssize_t bytesSent,
}
#else
void
BUrlSynchronousRequest::DownloadProgress(BUrlRequest*,
off_t bytesReceived, off_t bytesTotal)
{
PRINT(("SynchronousRequest::DownloadProgress(%" B_PRIdOFF ", %" B_PRIdOFF
")\n", bytesReceived, bytesTotal));
}
void
BUrlSynchronousRequest::UploadProgress(BUrlRequest*, off_t bytesSent,
off_t bytesTotal)
{
PRINT(("SynchronousRequest::UploadProgress(%" B_PRIdOFF ", %" B_PRIdOFF
")\n", bytesSent, bytesTotal));
}
#endif // LIBNETAPI_DEPRECATED
void
BUrlSynchronousRequest::RequestCompleted(BUrlRequest* caller, bool success)
{