diff options
Diffstat (limited to 'protocols/CloudFile/src/Services/microsoft_service.h')
-rw-r--r-- | protocols/CloudFile/src/Services/microsoft_service.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/protocols/CloudFile/src/Services/microsoft_service.h b/protocols/CloudFile/src/Services/microsoft_service.h new file mode 100644 index 0000000000..d993410003 --- /dev/null +++ b/protocols/CloudFile/src/Services/microsoft_service.h @@ -0,0 +1,34 @@ +#ifndef _CLOUDFILE_ONEDRIVE_H_ +#define _CLOUDFILE_ONEDRIVE_H_ + +class COneDriveService : public CCloudService +{ +private: + void __cdecl RequestAccessTokenThread(void *param); + + void HandleJsonError(JSONNode &node) override; + + auto UploadFile(const std::string &parentId, const std::string &fileName, const char *data, size_t size); + auto CreateUploadSession(const std::string &parentId, const std::string &fileName); + auto UploadFileChunk(const std::string &uploadUri, const char *chunk, size_t chunkSize, uint64_t offset, uint64_t fileSize); + auto CreateFolder(const std::string &name); + auto CreateSharedLink(const std::string &itemId); + + void Upload(FileTransferParam *ftp) override; + +public: + COneDriveService(const char *protoName, const wchar_t *userName); + + static COneDriveService* Init(const char *szModuleName, const wchar_t *szUserName); + static int UnInit(COneDriveService*); + + const char* GetModuleName() const override; + + int GetIconId() const override; + + bool IsLoggedIn() override; + void Login(HWND owner = nullptr) override; + void Logout() override; +}; + +#endif //_CLOUDFILE_ONEDRIVE_H_
\ No newline at end of file |