diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-03-03 13:50:49 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-03-03 13:50:49 +0000 |
commit | 5357bfc0d1ca654ae51f71ca67a8faad0d5b5264 (patch) | |
tree | 343ced32fc7290e72e4b2c952b1f159eb8e3d1cc /plugins/ExternalAPI | |
parent | 0e3a293ce9f7b361b0d5d9528738d596dfe4d565 (diff) |
Dropbox: new service pt. 1
git-svn-id: http://svn.miranda-ng.org/main/trunk@16403 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ExternalAPI')
-rw-r--r-- | plugins/ExternalAPI/m_dropbox.h | 35 |
1 files changed, 35 insertions, 0 deletions
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 |