From 5357bfc0d1ca654ae51f71ca67a8faad0d5b5264 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 3 Mar 2016 13:50:49 +0000 Subject: Dropbox: new service pt. 1 git-svn-id: http://svn.miranda-ng.org/main/trunk@16403 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ExternalAPI/m_dropbox.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'plugins/ExternalAPI') diff --git a/plugins/ExternalAPI/m_dropbox.h b/plugins/ExternalAPI/m_dropbox.h index 817bbff1e6..f67a781086 100644 --- a/plugins/ExternalAPI/m_dropbox.h +++ b/plugins/ExternalAPI/m_dropbox.h @@ -23,4 +23,39 @@ struct TRANSFERINFO // lParam = (LPARAM)(TRANSFERINFO*)info - transfer info #define ME_DROPBOX_SENT "Dropbox/Sent/Event" +struct DropboxUploadInfo +{ + const TCHAR *localPath; // local path + const TCHAR *serverPath; // relative path on server (can be NULL) +}; + +// upload file on Dropbox +// wParam = 0 +// lParam = (LPARAM)(const DropboxUploadInfo*) +// returns status of transfer. +// 0 on success otherwise fail +#define MS_DROPBOX_UPLOAD "Dropbox/Upload" + +// upload file on Dropbox +// wParam = 0 +// lParam = (LPARAM)(const DropboxUploadInfo*) +// returns file htansfer handle or NULL on failure +// returns immediately, without waiting for the send +// note, that you can track progress by using ME_PROTO_ACK +#define MS_DROPBOX_UPLOADASYNC "Dropbox/UploadAsync" + +// if you want to get download links after upload +// use ME_DROPBOX_UPLOADED hook. you'll get: +struct DropboxUploadResult +{ + HANDLE hProcess; // hProcess + int status; // status of transfer. 0 on success otherwise fail + const char* data; // data +}; + +// notifies a caller that upload has been finished +// wParam = 0 +// lParam = (LPARAM)(DropboxUploadResult*) +#define ME_DROPBOX_UPLOADED "Dropbox/Uploaded" + #endif //M_DROPBOX_H_ \ No newline at end of file -- cgit v1.2.3