From a74debb40c3df12738c722548c556a97e5976036 Mon Sep 17 00:00:00 2001 From: aunsane Date: Sat, 21 Apr 2018 20:45:34 +0300 Subject: CloudFile: - fix #1278 - decrease volume of response data with fields filtering - fix uploading for gdrive and onedrive in some cases - simplifying upload code - version bump --- plugins/ExternalAPI/m_cloudfile.h | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'plugins/ExternalAPI') diff --git a/plugins/ExternalAPI/m_cloudfile.h b/plugins/ExternalAPI/m_cloudfile.h index 505f9e3462..b7dee2f51b 100644 --- a/plugins/ExternalAPI/m_cloudfile.h +++ b/plugins/ExternalAPI/m_cloudfile.h @@ -9,7 +9,7 @@ struct CFSERVICEINFO // get cloud file service info by account name // wParam = (WPARAM)(const char*)accountName (can be NULL) -// lParam = (LPARAM)(CFSERVICEINFO*)serviceInfo (can be NULL) +// lParam = (LPARAM)(CFSERVICEINFO*)serviceInfo // returns 0 on success, nonzero on failure #define MS_CLOUDFILE_GETSERVICE "CloudFile/GetService" @@ -24,30 +24,14 @@ typedef int(*enumCFServiceFunc)(const CFSERVICEINFO *serviceInfo, void *param); struct CFUPLOADDATA { - const char *accountName; // cloud service to upload (can be NULL) - const wchar_t *localPath; // local path - const wchar_t *serverFolder; // server folder in witch file will be placed (can be NULL) + const char *accountName; // cloud service to upload (can be NULL) + const wchar_t *localPath; // local path to file + const wchar_t *serverFolder; // server folder in witch file will be placed (can be NULL) }; -struct CFUPLOADRESULT -{ - char **links; // need to be freed manually or by calling cfur_free - size_t linkCount; - wchar_t *description; // need to be freed manually or by calling cfur_free -}; - -// frees allocated fields of CFUPLOADRESULT -__inline void cfur_free(CFUPLOADRESULT *ur) -{ - for (size_t i = 0; i < ur->linkCount; i++) - mir_free(ur->links[0]); - mir_free(ur->links); - mir_free(ur->description); -} - // upload file on cloud service // wParam = (WPARAM)(const CFUPLOADDATA*)uploadData -// lParam = (LPARAM)(char CFUPLOADRESULT*)uploadResult (can be NULL) +// lParam = (LPARAM)(char*)link to file in cloud service (needs to be freed) (can be NULL) // returns 0 on success, nonzero on failure #define MS_CLOUDFILE_UPLOAD "CloudFile/Upload" -- cgit v1.2.3