ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Cloud::FolderDownloadRequest Class Reference

#include <folderdownloadrequest.h>

Inheritance diagram for Cloud::FolderDownloadRequest:
Collaboration diagram for Cloud::FolderDownloadRequest:

List of all members.

Public Member Functions

 FolderDownloadRequest (Storage *storage, Storage::FileArrayCallback callback, Networking::ErrorCallback ecb, Common::String remoteDirectoryPath, Common::String localDirectoryPath, bool recursive)
virtual ~FolderDownloadRequest ()
virtual void handle ()
virtual void restart ()
double getProgress () const
 Returns a number in range [0, 1], where 1 is "complete".
uint64 getDownloadedBytes () const
 Returns a number of downloaded bytes.
uint64 getTotalBytesToDownload () const
 Returns a total number of bytes to download.
uint64 getDownloadSpeed () const
 Returns average download speed for the last second.
Common::String getRemotePath () const
 Returns remote directory path.
Common::String getLocalPath () const
 Returns local directory path.

Private Member Functions

void start ()
void directoryListedCallback (Storage::ListDirectoryResponse response)
void directoryListedErrorCallback (Networking::ErrorResponse error)
void fileDownloadedCallback (Storage::BoolResponse response)
void fileDownloadedErrorCallback (Networking::ErrorResponse error)
void downloadNextFile ()
void finishDownload (Common::Array< StorageFile > &files)

Private Attributes

Storage::FileArrayCallback _fileArrayCallback
Common::String _remoteDirectoryPath
Common::String _localDirectoryPath
bool _recursive
Common::Array< StorageFile_pendingFiles
Common::Array< StorageFile_failedFiles
StorageFile _currentFile
Request * _workingRequest
bool _ignoreCallback
uint32 _totalFiles
uint64 _downloadedBytes
uint64 _totalBytes
uint64 _wasDownloadedBytes
uint64 _currentDownloadSpeed

Detailed Description

Definition at line 32 of file folderdownloadrequest.h.

Constructor & Destructor Documentation

Cloud::FolderDownloadRequest::FolderDownloadRequest ( Storage storage,
Storage::FileArrayCallback  callback,
Networking::ErrorCallback  ecb,
Common::String  remoteDirectoryPath,
Common::String  localDirectoryPath,
bool  recursive 

Definition at line 32 of file folderdownloadrequest.cpp.

Cloud::FolderDownloadRequest::~FolderDownloadRequest (  )  [virtual]

Definition at line 39 of file folderdownloadrequest.cpp.

Member Function Documentation

void Cloud::FolderDownloadRequest::directoryListedCallback ( Storage::ListDirectoryResponse  response  )  [private]

Definition at line 68 of file folderdownloadrequest.cpp.

void Cloud::FolderDownloadRequest::directoryListedErrorCallback ( Networking::ErrorResponse  error  )  [private]

Definition at line 88 of file folderdownloadrequest.cpp.

void Cloud::FolderDownloadRequest::downloadNextFile (  )  [private]

Definition at line 111 of file folderdownloadrequest.cpp.

void Cloud::FolderDownloadRequest::fileDownloadedCallback ( Storage::BoolResponse  response  )  [private]

Definition at line 95 of file folderdownloadrequest.cpp.

void Cloud::FolderDownloadRequest::fileDownloadedErrorCallback ( Networking::ErrorResponse  error  )  [private]

Definition at line 104 of file folderdownloadrequest.cpp.

void Cloud::FolderDownloadRequest::finishDownload ( Common::Array< StorageFile > &  files  )  [private]

Definition at line 160 of file folderdownloadrequest.cpp.

uint64 Cloud::FolderDownloadRequest::getDownloadedBytes (  )  const

Returns a number of downloaded bytes.

Definition at line 172 of file folderdownloadrequest.cpp.

uint64 Cloud::FolderDownloadRequest::getDownloadSpeed (  )  const

Returns average download speed for the last second.

Definition at line 193 of file folderdownloadrequest.cpp.

Common::String Cloud::FolderDownloadRequest::getLocalPath (  )  const [inline]

Returns local directory path.

Definition at line 74 of file folderdownloadrequest.h.

double Cloud::FolderDownloadRequest::getProgress (  )  const

Returns a number in range [0, 1], where 1 is "complete".

Definition at line 166 of file folderdownloadrequest.cpp.

Common::String Cloud::FolderDownloadRequest::getRemotePath (  )  const [inline]

Returns remote directory path.

Definition at line 71 of file folderdownloadrequest.h.

uint64 Cloud::FolderDownloadRequest::getTotalBytesToDownload (  )  const

Returns a total number of bytes to download.

Definition at line 189 of file folderdownloadrequest.cpp.

void Cloud::FolderDownloadRequest::handle (  )  [virtual]

Definition at line 150 of file folderdownloadrequest.cpp.

void Cloud::FolderDownloadRequest::restart (  )  [virtual]

Definition at line 158 of file folderdownloadrequest.cpp.

void Cloud::FolderDownloadRequest::start (  )  [private]

Definition at line 47 of file folderdownloadrequest.cpp.

Member Data Documentation

Definition at line 40 of file folderdownloadrequest.h.

Definition at line 36 of file folderdownloadrequest.h.

Definition at line 39 of file folderdownloadrequest.h.

The documentation for this class was generated from the following files:

Generated on Sat Nov 16 2019 05:02:40 for ResidualVM by doxygen 1.7.1
curved edge   curved edge