aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/storage.h
diff options
context:
space:
mode:
authorAlexander Tkachev2016-05-26 17:12:40 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commiteda575a660543884b1a4addd21b676a67d2c2a31 (patch)
tree0964f46167ff44daefba64cf429ea69da5512aeb /backends/cloud/storage.h
parent17fc40a94436f970af75d6717c7a63c70eafcb12 (diff)
downloadscummvm-rg350-eda575a660543884b1a4addd21b676a67d2c2a31.tar.gz
scummvm-rg350-eda575a660543884b1a4addd21b676a67d2c2a31.tar.bz2
scummvm-rg350-eda575a660543884b1a4addd21b676a67d2c2a31.zip
CLOUD: Add Requests id
(Upgrading ConnectionManager step by step.)
Diffstat (limited to 'backends/cloud/storage.h')
-rw-r--r--backends/cloud/storage.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/backends/cloud/storage.h b/backends/cloud/storage.h
index e38c6bedd9..394fc2c22d 100644
--- a/backends/cloud/storage.h
+++ b/backends/cloud/storage.h
@@ -57,34 +57,40 @@ public:
virtual void saveConfig(Common::String keyPrefix) = 0;
- /** Public Cloud API comes down there. */
+ /**
+ * Public Cloud API comes down there.
+ *
+ * All Cloud API methods return int32 request id, which might be used to access
+ * request through ConnectionManager. All methods also accept a callback, which
+ * would be called, when request is complete.
+ */
/** Returns Common::Array<StorageFile>. */
- virtual void listDirectory(Common::String path, FileArrayCallback callback, bool recursive = false) = 0;
+ virtual int32 listDirectory(Common::String path, FileArrayCallback callback, bool recursive = false) = 0;
/** Calls the callback when finished. */
- virtual void upload(Common::String path, Common::ReadStream *contents, BoolCallback callback) = 0;
+ virtual int32 upload(Common::String path, Common::ReadStream *contents, BoolCallback callback) = 0;
/** Returns pointer to Networking::NetworkReadStream. */
- virtual Networking::NetworkReadStream *streamFile(Common::String path) = 0;
+ virtual Networking::NetworkReadStream *streamFile(Common::String path) = 0; //TODO: return int32 somehow
/** Calls the callback when finished. */
- virtual void download(Common::String remotePath, Common::String localPath, BoolCallback callback) = 0;
+ virtual int32 download(Common::String remotePath, Common::String localPath, BoolCallback callback) = 0;
/** Calls the callback when finished. */
- virtual void remove(Common::String path, BoolCallback callback) = 0;
+ virtual int32 remove(Common::String path, BoolCallback callback) = 0;
/** Calls the callback when finished. */
- virtual void syncSaves(BoolCallback callback) = 0;
+ virtual int32 syncSaves(BoolCallback callback) = 0;
/** Calls the callback when finished. */
- virtual void createDirectory(Common::String path, BoolCallback callback) = 0;
+ virtual int32 createDirectory(Common::String path, BoolCallback callback) = 0;
/** Calls the callback when finished. */
- virtual void touch(Common::String path, BoolCallback callback) = 0;
+ virtual int32 touch(Common::String path, BoolCallback callback) = 0;
/** Returns the StorageInfo struct. */
- virtual void info(StorageInfoCallback callback) = 0;
+ virtual int32 info(StorageInfoCallback callback) = 0;
/** Returns whether saves sync process is running. */
virtual bool isSyncing() = 0;