diff options
author | aunsane <aunsane@gmail.com> | 2017-04-16 01:32:19 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-04-16 01:32:58 +0300 |
commit | 0b9fa1d90f8d0aff7118837ceb1211b578a5a9c8 (patch) | |
tree | 3b8be7b839a98a3a52a38d713c2d708ada015510 /plugins/CloudFile/src/Services/yandex_service.h | |
parent | 008fb731e3e3b587f596afba1cfe7446de7f0cac (diff) |
CloudFile: initial commit
- Dropbox (worked)
- Yandex.Disk (worked)
- GDrive (not worked)
Diffstat (limited to 'plugins/CloudFile/src/Services/yandex_service.h')
-rw-r--r-- | plugins/CloudFile/src/Services/yandex_service.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/CloudFile/src/Services/yandex_service.h b/plugins/CloudFile/src/Services/yandex_service.h new file mode 100644 index 0000000000..a3a84735c4 --- /dev/null +++ b/plugins/CloudFile/src/Services/yandex_service.h @@ -0,0 +1,31 @@ +#ifndef _CLOUDFILE_YANDEX_H_ +#define _CLOUDFILE_YANDEX_H_ + +class CYandexService : public CCloudService +{ +private: + static unsigned RequestAccessTokenThread(void *owner, void *param); + static unsigned __stdcall RevokeAccessTokenThread(void *param); + + void HandleJsonError(JSONNode &node); + + void GetUploadUrl(char *path, char *url); + void UploadFile(const char *url, const char *data, size_t size); + void CreateFolder(const char *path); + void CreateSharedLink(const char *path, char *url); + +public: + CYandexService(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_YANDEX_H_
\ No newline at end of file |