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

#include <dropboxstorage.h>

Inheritance diagram for Cloud::Dropbox::DropboxStorage:
Collaboration diagram for Cloud::Dropbox::DropboxStorage:

List of all members.

Public Member Functions

 DropboxStorage (Common::String code, Networking::ErrorCallback cb)
 This constructor uses OAuth code flow to get tokens.
virtual ~DropboxStorage ()
virtual void saveConfig (Common::String keyPrefix)
 Storage methods, which are used by CloudManager to save storage in configuration file.
virtual Common::String name () const
 Return unique storage name.
virtual Networking::RequestlistDirectory (Common::String path, ListDirectoryCallback callback, Networking::ErrorCallback errorCallback, bool recursive=false)
 Public Cloud API comes down there.
virtual Networking::Requestupload (Common::String path, Common::SeekableReadStream *contents, UploadCallback callback, Networking::ErrorCallback errorCallback)
 Returns UploadStatus struct with info about uploaded file.
virtual Networking::RequeststreamFileById (Common::String path, Networking::NetworkReadStreamCallback callback, Networking::ErrorCallback errorCallback)
 Returns pointer to Networking::NetworkReadStream.
virtual Networking::RequestcreateDirectory (Common::String path, BoolCallback callback, Networking::ErrorCallback errorCallback)
 Calls the callback when finished.
virtual Networking::Requestinfo (StorageInfoCallback callback, Networking::ErrorCallback errorCallback)
 Returns the StorageInfo struct.
virtual Common::String savesDirectoryPath ()
 Returns storage's saves directory path with the trailing slash.

Static Public Member Functions

static DropboxStorageloadFromConfig (Common::String keyPrefix)
 Load token and user id from configs and return DropboxStorage for those.
static void removeFromConfig (Common::String keyPrefix)
 Remove all DropboxStorage-related data from config.

Protected Member Functions

virtual Common::String cloudProvider ()
virtual uint32 storageIndex ()
virtual bool needsRefreshToken ()
 Return whether storage needs refresh_token to work.
virtual bool canReuseRefreshToken ()
 Return whether to expect new refresh_token on refresh.

Private Member Functions

 DropboxStorage (Common::String token, bool enabled)
 This private constructor is called from loadFromConfig().

Detailed Description

Definition at line 33 of file dropboxstorage.h.


Constructor & Destructor Documentation

Cloud::Dropbox::DropboxStorage::DropboxStorage ( Common::String  token,
bool  enabled 
) [private]

This private constructor is called from loadFromConfig().

Definition at line 43 of file dropboxstorage.cpp.

Cloud::Dropbox::DropboxStorage::DropboxStorage ( Common::String  code,
Networking::ErrorCallback  cb 
)

This constructor uses OAuth code flow to get tokens.

Definition at line 45 of file dropboxstorage.cpp.

Cloud::Dropbox::DropboxStorage::~DropboxStorage (  )  [virtual]

Definition at line 49 of file dropboxstorage.cpp.


Member Function Documentation

bool Cloud::Dropbox::DropboxStorage::canReuseRefreshToken (  )  [protected, virtual]

Return whether to expect new refresh_token on refresh.

Implements Cloud::BaseStorage.

Definition at line 57 of file dropboxstorage.cpp.

Common::String Cloud::Dropbox::DropboxStorage::cloudProvider (  )  [protected, virtual]
Returns:
"dropbox"

Implements Cloud::BaseStorage.

Definition at line 51 of file dropboxstorage.cpp.

Networking::Request * Cloud::Dropbox::DropboxStorage::createDirectory ( Common::String  path,
BoolCallback  callback,
Networking::ErrorCallback  errorCallback 
) [virtual]

Calls the callback when finished.

Implements Cloud::Storage.

Definition at line 92 of file dropboxstorage.cpp.

Networking::Request * Cloud::Dropbox::DropboxStorage::info ( StorageInfoCallback  callback,
Networking::ErrorCallback  errorCallback 
) [virtual]

Returns the StorageInfo struct.

Implements Cloud::Storage.

Definition at line 98 of file dropboxstorage.cpp.

Networking::Request * Cloud::Dropbox::DropboxStorage::listDirectory ( Common::String  path,
ListDirectoryCallback  callback,
Networking::ErrorCallback  errorCallback,
bool  recursive = false 
) [virtual]

Public Cloud API comes down there.

Returns ListDirectoryStatus struct with list of files.

Implements Cloud::Storage.

Definition at line 68 of file dropboxstorage.cpp.

DropboxStorage * Cloud::Dropbox::DropboxStorage::loadFromConfig ( Common::String  keyPrefix  )  [static]

Load token and user id from configs and return DropboxStorage for those.

Returns:
pointer to the newly created DropboxStorage or 0 if some problem occured.

Definition at line 106 of file dropboxstorage.cpp.

Common::String Cloud::Dropbox::DropboxStorage::name (  )  const [virtual]

Return unique storage name.

Returns:
some unique storage name (for example, "Dropbox (user@example.com)")

Implements Cloud::Storage.

Definition at line 64 of file dropboxstorage.cpp.

bool Cloud::Dropbox::DropboxStorage::needsRefreshToken (  )  [protected, virtual]

Return whether storage needs refresh_token to work.

Implements Cloud::BaseStorage.

Definition at line 55 of file dropboxstorage.cpp.

void Cloud::Dropbox::DropboxStorage::removeFromConfig ( Common::String  keyPrefix  )  [static]

Remove all DropboxStorage-related data from config.

Definition at line 116 of file dropboxstorage.cpp.

void Cloud::Dropbox::DropboxStorage::saveConfig ( Common::String  keyPrefix  )  [virtual]

Storage methods, which are used by CloudManager to save storage in configuration file.

Save storage data using ConfMan.

Parameters:
keyPrefix all saved keys must start with this prefix.
Note:
every Storage must write keyPrefix + "type" key with common value (e.g. "Dropbox").

Implements Cloud::Storage.

Definition at line 59 of file dropboxstorage.cpp.

Common::String Cloud::Dropbox::DropboxStorage::savesDirectoryPath (  )  [virtual]

Returns storage's saves directory path with the trailing slash.

Implements Cloud::Storage.

Definition at line 104 of file dropboxstorage.cpp.

uint32 Cloud::Dropbox::DropboxStorage::storageIndex (  )  [protected, virtual]
Returns:
kStorageDropboxId

Implements Cloud::BaseStorage.

Definition at line 53 of file dropboxstorage.cpp.

Networking::Request * Cloud::Dropbox::DropboxStorage::streamFileById ( Common::String  path,
Networking::NetworkReadStreamCallback  callback,
Networking::ErrorCallback  errorCallback 
) [virtual]

Returns pointer to Networking::NetworkReadStream.

Implements Cloud::Storage.

Definition at line 76 of file dropboxstorage.cpp.

Networking::Request * Cloud::Dropbox::DropboxStorage::upload ( Common::String  path,
Common::SeekableReadStream contents,
UploadCallback  callback,
Networking::ErrorCallback  errorCallback 
) [virtual]

Returns UploadStatus struct with info about uploaded file.

Implements Cloud::Storage.

Definition at line 72 of file dropboxstorage.cpp.


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


Generated on Sat May 30 2020 05:02:50 for ResidualVM by doxygen 1.7.1
curved edge   curved edge