diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-03-11 14:19:01 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-03-11 14:19:01 +0000 |
commit | a0a667fd07e912b1dc425748e58a72fa9a50512f (patch) | |
tree | 027b0ed27a5c3d697dd1aa51a13ca0d3e1375582 /plugins/Dropbox/src/dropbox_utils.cpp | |
parent | f8f38839dba925d30c09d9b1527258973c24e591 (diff) |
Dropbox:
- fixed TabSrmm button behavior
- added ME_DROPBOX_SEND_SUCCEEDED and ME_DROPBOX_SEND_FAILED events
- remained only unicode version of MS_DROPBOX_SEND_FILE
- minor fixes
- version bumped
git-svn-id: http://svn.miranda-ng.org/main/trunk@8557 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox_utils.cpp')
-rw-r--r-- | plugins/Dropbox/src/dropbox_utils.cpp | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/plugins/Dropbox/src/dropbox_utils.cpp b/plugins/Dropbox/src/dropbox_utils.cpp index 34ac156dc5..925d157dfd 100644 --- a/plugins/Dropbox/src/dropbox_utils.cpp +++ b/plugins/Dropbox/src/dropbox_utils.cpp @@ -1,13 +1,5 @@ #include "common.h"
-HANDLE CDropbox::CreateProtoServiceFunctionObj(const char *szService, MIRANDASERVICEOBJ serviceProc, void *obj)
-{
- char str[MAXMODULELABELLENGTH];
- mir_snprintf(str, sizeof(str), "%s%s", MODULE, szService);
- str[MAXMODULELABELLENGTH - 1] = 0;
- return CreateServiceFunctionObj(str, serviceProc, obj);
-}
-
wchar_t *CDropbox::HttpStatusToText(HTTP_STATUS status)
{
switch (status)
@@ -35,27 +27,19 @@ wchar_t *CDropbox::HttpStatusToText(HTTP_STATUS status) return L"Unknown";
}
-void CDropbox::ShowNotification(const wchar_t *caption, const wchar_t *message, int flags, MCONTACT hContact)
+int CDropbox::HandleHttpResponseError(HANDLE hNetlibUser, NETLIBHTTPREQUEST *response)
{
- if (Miranda_Terminated()) return;
-
- if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1))
+ if (!response)
{
- POPUPDATAW ppd = {0};
- ppd.lchContact = hContact;
- wcsncpy(ppd.lpwzContactName, caption, MAX_CONTACTNAME);
- wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE);
- ppd.lchIcon = Skin_GetIcon("Skype_main");
-
- if (!PUAddPopupW(&ppd))
- return;
-
+ Netlib_Logf(hNetlibUser, "%s: %s", MODULE, "Server does not respond");
+ return ACKRESULT_FAILED;
}
- MessageBox(NULL, message, caption, MB_OK | flags);
-}
+ if (response->resultCode != HTTP_STATUS_OK)
+ {
+ Netlib_Logf(hNetlibUser, "%s: %s", MODULE, HttpStatusToText((HTTP_STATUS)response->resultCode));
+ return response->resultCode;
+ }
-void CDropbox::ShowNotification(const wchar_t *message, int flags, MCONTACT hContact)
-{
- ShowNotification(TranslateT(MODULE), message, flags, hContact);
+ return 0;
}
\ No newline at end of file |