summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-03-09 20:23:19 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-03-09 20:23:19 +0000
commit3bdbd608284853f05acdf137013de71efd915499 (patch)
tree6d82b978ff4e52027f7ffe8db29cbce24adcf908 /plugins/Dropbox/src/dropbox.h
parentd808595a83280e6232923143efeb1851c8e33423 (diff)
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
Diffstat (limited to 'plugins/Dropbox/src/dropbox.h')
-rw-r--r--plugins/Dropbox/src/dropbox.h19
1 files changed, 12 insertions, 7 deletions
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);