aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/storage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/cloud/storage.cpp')
-rw-r--r--backends/cloud/storage.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/backends/cloud/storage.cpp b/backends/cloud/storage.cpp
index 110c97ad9c..c9843d6188 100644
--- a/backends/cloud/storage.cpp
+++ b/backends/cloud/storage.cpp
@@ -241,6 +241,24 @@ double Storage::getDownloadingProgress() {
return result;
}
+uint64 Storage::getDownloadBytesNumber() {
+ uint64 result = 0;
+ _runningRequestsMutex.lock();
+ if (_downloadFolderRequest)
+ result = _downloadFolderRequest->getDownloadedBytes();
+ _runningRequestsMutex.unlock();
+ return result;
+}
+
+uint64 Storage::getDownloadTotalBytesNumber() {
+ uint64 result = 0;
+ _runningRequestsMutex.lock();
+ if (_downloadFolderRequest)
+ result = _downloadFolderRequest->getTotalBytesToDownload();
+ _runningRequestsMutex.unlock();
+ return result;
+}
+
Common::String Storage::getDownloadRemoteDirectory() {
Common::String result = "";
_runningRequestsMutex.lock();