diff options
author | aunsane <aunsane@gmail.com> | 2017-05-07 02:25:29 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-05-07 02:25:29 +0300 |
commit | ff6a107e5f566da2644fbfe36455467beafaeb1e (patch) | |
tree | 3d5b96794ee835c8686a74da6c418c440c91c403 /plugins/CloudFile/src/Services/dropbox_api.h | |
parent | 453b3de91c372ee7b2661771aead6675e12fe98f (diff) |
CloudFile:
- reworked options to dupport default service
- added options to select conflict behavior
- multiple fix and refactoring
- version bump
Diffstat (limited to 'plugins/CloudFile/src/Services/dropbox_api.h')
-rw-r--r-- | plugins/CloudFile/src/Services/dropbox_api.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/CloudFile/src/Services/dropbox_api.h b/plugins/CloudFile/src/Services/dropbox_api.h index 3db69250e8..890ff420f6 100644 --- a/plugins/CloudFile/src/Services/dropbox_api.h +++ b/plugins/CloudFile/src/Services/dropbox_api.h @@ -58,23 +58,23 @@ namespace DropboxAPI } }; - class StartUploadSessionRequest : public HttpRequest + class CreateUploadSessionRequest : public HttpRequest { public: - StartUploadSessionRequest(const char *token, const char *data, size_t size) : + CreateUploadSessionRequest(const char *token, const char *chunk, size_t chunkSize) : HttpRequest(REQUEST_POST, DROPBOX_API_CU "/files/upload_session/start") { AddBearerAuthHeader(token); AddHeader("Content-Type", "application/octet-stream"); - SetData(data, size); + SetData(chunk, chunkSize); } }; - class AppendToUploadSessionRequest : public HttpRequest + class UploadFileChunkRequest : public HttpRequest { public: - AppendToUploadSessionRequest(const char *token, const char *sessionId, size_t offset, const char *data, size_t size) : + UploadFileChunkRequest(const char *token, const char *sessionId, size_t offset, const char *chunk, size_t chunkSize) : HttpRequest(REQUEST_POST, DROPBOX_API_CU "/files/upload_session/append_v2") { AddBearerAuthHeader(token); @@ -92,14 +92,14 @@ namespace DropboxAPI AddHeader("Dropbox-API-Arg", param.write().c_str()); - SetData(data, size); + SetData(chunk, chunkSize); } }; - class FinishUploadSessionRequest : public HttpRequest + class CommitUploadSessionRequest : public HttpRequest { public: - FinishUploadSessionRequest(const char *token, const char *sessionId, size_t offset, const char *path, const char *data, size_t size) : + CommitUploadSessionRequest(const char *token, const char *sessionId, size_t offset, const char *path, const char *chunk, size_t chunkSize) : HttpRequest(REQUEST_POST, DROPBOX_API_CU "/files/upload_session/finish") { AddBearerAuthHeader(token); @@ -124,7 +124,7 @@ namespace DropboxAPI AddHeader("Dropbox-API-Arg", params.write().c_str()); - SetData(data, size); + SetData(chunk, chunkSize); } }; |