From 3bdbd608284853f05acdf137013de71efd915499 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 9 Mar 2014 20:23:19 +0000 Subject: Dropbox: - added MS_DROPBOX_SEND_FILE service - added new behaviors for download links - attempt to fix tabsrmm button behavior git-svn-id: http://svn.miranda-ng.org/main/trunk@8527 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dropbox/src/dropbox.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'plugins/Dropbox/src/dropbox.h') diff --git a/plugins/Dropbox/src/dropbox.h b/plugins/Dropbox/src/dropbox.h index 783297ad44..2e63719160 100644 --- a/plugins/Dropbox/src/dropbox.h +++ b/plugins/Dropbox/src/dropbox.h @@ -15,7 +15,7 @@ #define DROPBOX_API_KEY "fa8du7gkf2q8xzg" #include "..\..\..\Dropbox\secret_key.h" -#define DROPBOX_FILE_CHUNK_SIZE 1024 * 1024 //1 MB +#define DROPBOX_FILE_CHUNK_SIZE 4 * 1024 * 1024 //4 MB #define BBB_ID_FILE_SEND 10001 @@ -57,7 +57,7 @@ private: static int OnPreShutdown(void *obj, WPARAM wParam, LPARAM lParam); static int OnContactDeleted(void *obj, WPARAM wParam, LPARAM lParam); static int OnOptionsInitialized(void *obj, WPARAM wParam, LPARAM lParam); - static int OnPrebuildContactMenu(void *obj, WPARAM wParam, LPARAM lParam); + static int OnPrebuildContactMenu(void *obj, WPARAM wParam, LPARAM lParam); static int OnSrmmWindowOpened(void *obj, WPARAM wParam, LPARAM lParam); static int OnTabSrmmButtonPressed(void *obj, WPARAM wParam, LPARAM lParam); static int OnFileDoalogCancelled(void *obj, WPARAM wParam, LPARAM lParam); @@ -69,6 +69,8 @@ private: static INT_PTR ProtoSendMessage(void *obj, WPARAM wParam, LPARAM lParam); static INT_PTR ProtoReceiveMessage(void *obj, WPARAM wParam, LPARAM lParam); + static INT_PTR SendFileToDropbox(void *obj, WPARAM wParam, LPARAM lParam); + static INT_PTR SendFilesToDropbox(void *obj, WPARAM wParam, LPARAM lParam); // commands @@ -89,13 +91,16 @@ private: void RequestAccountInfo(); // transrers - static int HandleFileTransferError(NETLIBHTTPREQUEST *response, MCONTACT hContact); + static int HandleFileTransferError(HANDLE hNetlibUser, NETLIBHTTPREQUEST *response); + + int SendFile(const char *fileName, const char *data, int length); + int SendFileChunkedFirst(const char *data, int length, char *uploadId, int &offset); + int SendFileChunkedNext(const char *data, int length, const char *uploadId, int &offset); + int SendFileChunkedLast(const char *fileName, const char *uploadId); - int SendFileChunkedFirst(const char *data, int length, char *uploadId, int &offset, MCONTACT hContact); - int SendFileChunkedNext(const char *data, int length, const char *uploadId, int &offset, MCONTACT hContact); - int SendFileChunkedLast(const char *fileName, const char *uploadId, MCONTACT hContact); + int CreateFolder(const char *folderName); - int CreateFolder(const char *folderName, MCONTACT hContact); + int CreateDownloadUrl(const char *path, char *url); static void _cdecl SendFileAsync(void *arg); -- cgit v1.2.3