diff --git a/headers/private/netservices/UrlProtocolDispatchingListener.h b/headers/private/netservices/UrlProtocolDispatchingListener.h index a81a73b23f..768e6a6473 100644 --- a/headers/private/netservices/UrlProtocolDispatchingListener.h +++ b/headers/private/netservices/UrlProtocolDispatchingListener.h @@ -54,10 +54,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 + virtual void RequestCompleted(BUrlRequest* caller, bool success); virtual void DebugMessage(BUrlRequest* caller, diff --git a/headers/private/netservices/UrlProtocolListener.h b/headers/private/netservices/UrlProtocolListener.h index b6c28655ba..1870490ea7 100644 --- a/headers/private/netservices/UrlProtocolListener.h +++ b/headers/private/netservices/UrlProtocolListener.h @@ -44,10 +44,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 + virtual void RequestCompleted(BUrlRequest* caller, bool success); virtual void DebugMessage(BUrlRequest* caller, diff --git a/src/apps/haikudepot/server/WebAppInterface.cpp b/src/apps/haikudepot/server/WebAppInterface.cpp index f85b7d9ae7..5e94317760 100644 --- a/src/apps/haikudepot/server/WebAppInterface.cpp +++ b/src/apps/haikudepot/server/WebAppInterface.cpp @@ -69,12 +69,12 @@ public: fDownloadIO->Write(data, size); } - virtual void DownloadProgress(BUrlRequest* caller, ssize_t bytesReceived, + virtual void DownloadProgress(BUrlRequest* caller, off_t bytesReceived, ssize_t bytesTotal) { } - virtual void UploadProgress(BUrlRequest* caller, ssize_t bytesSent, + virtual void UploadProgress(BUrlRequest* caller, off_t bytesSent, ssize_t bytesTotal) { } diff --git a/src/apps/haikudepot/util/ToFileUrlProtocolListener.h b/src/apps/haikudepot/util/ToFileUrlProtocolListener.h index 50c4d02533..20e13d3548 100644 --- a/src/apps/haikudepot/util/ToFileUrlProtocolListener.h +++ b/src/apps/haikudepot/util/ToFileUrlProtocolListener.h @@ -31,9 +31,9 @@ public: const char* data, off_t position, ssize_t size); void DownloadProgress(BUrlRequest* caller, - ssize_t bytesReceived, ssize_t bytesTotal); + off_t bytesReceived, ssize_t bytesTotal); void UploadProgress(BUrlRequest* caller, - ssize_t bytesSent, ssize_t bytesTotal); + off_t bytesSent, ssize_t bytesTotal); void RequestCompleted(BUrlRequest* caller, bool success); void DebugMessage(BUrlRequest* caller,