diff options
Diffstat (limited to 'plugins/CloudFile/src/Services/microsoft_service.h')
-rw-r--r-- | plugins/CloudFile/src/Services/microsoft_service.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/CloudFile/src/Services/microsoft_service.h b/plugins/CloudFile/src/Services/microsoft_service.h new file mode 100644 index 0000000000..bf689ee8c2 --- /dev/null +++ b/plugins/CloudFile/src/Services/microsoft_service.h @@ -0,0 +1,31 @@ +#ifndef _CLOUDFILE_ONEDRIVE_H_ +#define _CLOUDFILE_ONEDRIVE_H_ + +class COneDriveService : public CCloudService +{ +private: + static unsigned RequestAccessTokenThread(void *owner, void *param); + static unsigned __stdcall RevokeAccessTokenThread(void *param); + + void HandleJsonError(JSONNode &node); + + void CreateUploadSession(char *uploadUri, const char *name, const char *parentId = NULL); + void UploadFileChunk(const char *uploadUri, const char *chunk, size_t chunkSize, uint64_t offset, uint64_t fileSize, char *itemId); + void CreateFolder(const char *path, char *itemId); + void CreateSharedLink(const char *itemId, char *url); + +public: + COneDriveService(HNETLIBUSER hConnection); + + const char* GetModule() const; + const wchar_t* GetText() const; + HANDLE GetIcon() const; + + bool IsLoggedIn(); + void Login(); + void Logout(); + + UINT Upload(FileTransferParam *ftp); +}; + +#endif //_CLOUDFILE_ONEDRIVE_H_
\ No newline at end of file |