summaryrefslogtreecommitdiff
path: root/plugins/ExternalAPI/m_dropbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ExternalAPI/m_dropbox.h')
-rw-r--r--plugins/ExternalAPI/m_dropbox.h35
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