summaryrefslogtreecommitdiff
path: root/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-03-04 17:00:22 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-03-04 17:00:22 +0000
commit05379824ac11098191faeb71a99ec38fdee1ef9e (patch)
tree9ae4e2ad646a8b44966aac26dc3f706ddc214334 /plugins/SendScreenshotPlus/src/CSendDropbox.cpp
parent6d02559b3c3cb05cfc6a0ade5c4815dda4427834 (diff)
SendSS: moved to new dropbox service
git-svn-id: http://svn.miranda-ng.org/main/trunk@16421 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SendScreenshotPlus/src/CSendDropbox.cpp')
-rw-r--r--plugins/SendScreenshotPlus/src/CSendDropbox.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
index 93abeaf072..6f6808ec28 100644
--- a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
@@ -56,14 +56,16 @@ void CSendDropbox::SendThread()
{
/// @todo : SS_DLG_DESCRIPTION and SS_DLG_DELETEAFTERSSEND are of no use as of now since we don't track upload progress
- m_hDropHook = HookEventObj(ME_DROPBOX_SENT, OnDropSend, this);
+ DropboxUploadInfo ui = { m_pszFile, _T("SendSS") };
- if ((m_hDropSend = (HANDLE)CallService(MS_DROPBOX_SEND_FILE, (WPARAM)m_hContact, (LPARAM)m_pszFile)) == NULL)
+ if (CallService(MS_DROPBOX_UPLOAD, 0, (LPARAM)&ui))
{
Error(LPGENT("%s (%i):\nCould not add a share to the Dropbox plugin."), TranslateTS(m_pszSendTyp), (INT_PTR)m_hDropSend);
Exit(ACKRESULT_FAILED); return;
}
+ m_hDropHook = HookEventObj(ME_DROPBOX_UPLOADED, OnDropSend, this);
+
m_hEvent.Wait();
UnhookEvent(m_hDropHook);
@@ -76,12 +78,12 @@ void CSendDropbox::SendThread()
int CSendDropbox::OnDropSend(void *obj, WPARAM, LPARAM lParam)
{
CSendDropbox *self = (CSendDropbox*)obj;
- TRANSFERINFO *info = (TRANSFERINFO*)lParam;
- if (info->hProcess == self->m_hDropSend)
+ DropboxUploadResult *ur = (DropboxUploadResult*)lParam;
+ if (ur->hProcess == self->m_hDropSend)
{
- if (!info->status)
+ if (!ur->status)
{
- self->m_URL = mir_strdup(info->data[0]);
+ self->m_URL = mir_strdup(ur->data);
}
self->m_hEvent.Set();
}