ScummVM API documentation
Cloud::Id::IdStorage Class Referenceabstract
Inheritance diagram for Cloud::Id::IdStorage:
Cloud::BaseStorage Cloud::Storage Cloud::Box::BoxStorage Cloud::GoogleDrive::GoogleDriveStorage

Public Member Functions

 IdStorage (const Common::String &token, const Common::String &refreshToken, bool enabled)
 
virtual Networking::RequestresolveFileId (const Common::String &path, UploadCallback callback, Networking::ErrorCallback errorCallback)
 
Networking::RequestlistDirectory (const Common::String &path, ListDirectoryCallback callback, Networking::ErrorCallback errorCallback, bool recursive=false) override
 
virtual Networking::RequestlistDirectoryById (const Common::String &id, ListDirectoryCallback callback, Networking::ErrorCallback errorCallback)=0
 
Networking::RequestcreateDirectory (const Common::String &path, BoolCallback callback, Networking::ErrorCallback errorCallback) override
 
virtual Networking::RequestcreateDirectoryWithParentId (const Common::String &parentId, const Common::String &name, BoolCallback callback, Networking::ErrorCallback errorCallback)=0
 
Networking::RequeststreamFile (const Common::String &path, Networking::NetworkReadStreamCallback callback, Networking::ErrorCallback errorCallback) override
 
virtual Networking::RequeststreamFileById (const Common::String &id, Networking::NetworkReadStreamCallback callback, Networking::ErrorCallback errorCallback) override=0
 
Networking::Requestdownload (const Common::String &remotePath, const Common::Path &localPath, BoolCallback callback, Networking::ErrorCallback errorCallback) override
 
virtual Common::String getRootDirectoryId ()=0
 
- Public Member Functions inherited from Cloud::BaseStorage
 BaseStorage (const Common::String &token, const Common::String &refreshToken, bool enabled=false)
 
virtual void refreshAccessToken (BoolCallback callback, Networking::ErrorCallback errorCallback=nullptr)
 
- Public Member Functions inherited from Cloud::Storage
virtual void saveConfig (const Common::String &keyPrefix)=0
 
virtual Common::String name () const =0
 
bool isEnabled () const
 
void enable ()
 
virtual Networking::Requestupload (const Common::String &path, Common::SeekableReadStream *contents, UploadCallback callback, Networking::ErrorCallback errorCallback)=0
 
virtual Networking::Requestupload (const Common::String &remotePath, const Common::Path &localPath, UploadCallback callback, Networking::ErrorCallback errorCallback)
 
virtual bool uploadStreamSupported ()
 
virtual Networking::RequestdownloadById (const Common::String &remoteId, const Common::Path &localPath, BoolCallback callback, Networking::ErrorCallback errorCallback)
 
virtual Networking::RequestdownloadFolder (const Common::String &remotePath, const Common::Path &localPath, FileArrayCallback callback, Networking::ErrorCallback errorCallback, bool recursive=false)
 
virtual SavesSyncRequestsyncSaves (BoolCallback callback, Networking::ErrorCallback errorCallback)
 
virtual Networking::Requestinfo (StorageInfoCallback callback, Networking::ErrorCallback errorCallback)=0
 
virtual Common::String savesDirectoryPath ()=0
 
virtual bool isWorking ()
 
virtual bool isSyncing ()
 
virtual double getSyncDownloadingProgress ()
 
virtual void getSyncDownloadingInfo (SyncDownloadingInfo &info)
 
virtual double getSyncProgress ()
 
virtual Common::Array< Common::StringgetSyncingFiles ()
 
virtual void cancelSync ()
 
virtual bool startDownload (const Common::String &remotePath, const Common::Path &localPath)
 
virtual void cancelDownload ()
 
virtual void setDownloadTarget (GUI::CommandReceiver *target)
 
virtual bool isDownloading ()
 
virtual double getDownloadingProgress ()
 
virtual uint64 getDownloadBytesNumber ()
 
virtual uint64 getDownloadTotalBytesNumber ()
 
virtual uint64 getDownloadSpeed ()
 
virtual Common::String getDownloadRemoteDirectory ()
 
virtual Common::Path getDownloadLocalDirectory ()
 

Protected Member Functions

void printFiles (const FileArrayResponse &response)
 
void printBool (const BoolResponse &response)
 
void printFile (const UploadResponse &response)
 
ListDirectoryCallback getPrintFilesCallback ()
 
- Protected Member Functions inherited from Cloud::BaseStorage
virtual void getAccessToken (const Common::String &code, Networking::ErrorCallback callback)
 
virtual void codeFlowComplete (Networking::ErrorCallback callback, const Networking::JsonResponse &response)
 
virtual void codeFlowFailed (Networking::ErrorCallback callback, const Networking::ErrorResponse &error)
 
virtual Common::String cloudProvider ()=0
 
virtual uint32 storageIndex ()=0
 
virtual bool needsRefreshToken ()=0
 
virtual bool canReuseRefreshToken ()=0
 
void saveIsEnabledFlag (const Common::String &keyPrefix) const
 
- Protected Member Functions inherited from Cloud::Storage
virtual Networking::ErrorCallback getErrorPrintingCallback ()
 
virtual void printErrorResponse (const Networking::ErrorResponse &error)
 
virtual Networking::RequestaddRequest (Networking::Request *request)
 
virtual void requestFinishedCallback (Networking::Request *invalidRequestPointer)
 
virtual void savesSyncDefaultCallback (const BoolResponse &response)
 
virtual void savesSyncDefaultErrorCallback (const Networking::ErrorResponse &error)
 
virtual void directoryDownloadedCallback (const FileArrayResponse &response)
 
virtual void directoryDownloadedErrorCallback (const Networking::ErrorResponse &error)
 

Additional Inherited Members

- Public Types inherited from Cloud::Storage
typedef Networking::Response< const Common::Array< StorageFile > & > FileArrayResponse
 
typedef Networking::Response< const StorageInfo & > StorageInfoResponse
 
typedef Networking::Response< bool > BoolResponse
 
typedef Networking::Response< const StorageFile & > UploadResponse
 
typedef Networking::Response< const Common::Array< StorageFile > & > ListDirectoryResponse
 
typedef Common::BaseCallback< const FileArrayResponse & > * FileArrayCallback
 
typedef Common::BaseCallback< const StorageInfoResponse & > * StorageInfoCallback
 
typedef Common::BaseCallback< const BoolResponse & > * BoolCallback
 
typedef Common::BaseCallback< const UploadResponse & > * UploadCallback
 
typedef Common::BaseCallback< const ListDirectoryResponse & > * ListDirectoryCallback
 
- Static Protected Member Functions inherited from Cloud::BaseStorage
static bool loadIsEnabledFlag (const Common::String &keyPrefix)
 
static void removeIsEnabledFlag (const Common::String &keyPrefix)
 
- Protected Attributes inherited from Cloud::BaseStorage
Common::String _token
 
Common::String _refreshToken
 
- Protected Attributes inherited from Cloud::Storage
uint32 _runningRequestsCount
 
Common::Mutex _runningRequestsMutex
 
SavesSyncRequest_savesSyncRequest
 
bool _syncRestartRequestsed
 
FolderDownloadRequest_downloadFolderRequest
 
bool _isEnabled
 

Member Function Documentation

◆ resolveFileId()

virtual Networking::Request* Cloud::Id::IdStorage::resolveFileId ( const Common::String path,
UploadCallback  callback,
Networking::ErrorCallback  errorCallback 
)
virtual

Public Cloud API comes down there. Returns StorageFile with the resolved file's id.

◆ listDirectory()

Networking::Request* Cloud::Id::IdStorage::listDirectory ( const Common::String path,
ListDirectoryCallback  callback,
Networking::ErrorCallback  errorCallback,
bool  recursive = false 
)
overridevirtual

Returns ListDirectoryStatus struct with list of files.

Implements Cloud::Storage.

◆ createDirectory()

Networking::Request* Cloud::Id::IdStorage::createDirectory ( const Common::String path,
BoolCallback  callback,
Networking::ErrorCallback  errorCallback 
)
overridevirtual

Calls the callback when finished.

Implements Cloud::Storage.

◆ streamFile()

Networking::Request* Cloud::Id::IdStorage::streamFile ( const Common::String path,
Networking::NetworkReadStreamCallback  callback,
Networking::ErrorCallback  errorCallback 
)
overridevirtual

Returns pointer to Networking::NetworkReadStream.

Reimplemented from Cloud::Storage.

◆ download()

Networking::Request* Cloud::Id::IdStorage::download ( const Common::String remotePath,
const Common::Path localPath,
BoolCallback  callback,
Networking::ErrorCallback  errorCallback 
)
overridevirtual

Calls the callback when finished.

Reimplemented from Cloud::Storage.


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