summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-30 17:32:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-30 17:32:39 +0000
commit109877a3c75cb290c55755dcfc88794d2453669d (patch)
tree3ede8b9170b2fc3f6f35dc2cea6742d44b19d631 /protocols/JabberG/src/jabber_proto.cpp
parentfee8d991bdf4a59b563d1b92165ea0ed2f7bacb8 (diff)
MS_DB_EVENT_* services remained, but their calls removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@4255 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_proto.cpp')
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 684d784dbe..19a4745d34 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -414,18 +414,14 @@ HANDLE CJabberProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
HANDLE __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, HANDLE hDbEvent)
{
- DBEVENTINFO dbei;
- HANDLE hContact;
- char* nick, *firstName, *lastName, *jid;
-
Log("AddToListByEvent");
- ZeroMemory(&dbei, sizeof(dbei));
- dbei.cbSize = sizeof(dbei);
- if ((dbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0)) == (DWORD)(-1))
+
+ DBEVENTINFO dbei = { sizeof(dbei) };
+ if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1))
return NULL;
if ((dbei.pBlob=(PBYTE)alloca(dbei.cbBlob)) == NULL)
return NULL;
- if (CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei))
+ if (db_event_get(hDbEvent, &dbei))
return NULL;
if (strcmp(dbei.szModule, m_szModuleName))
return NULL;
@@ -440,13 +436,13 @@ HANDLE __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, HANDL
if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return NULL;
- nick = (char*)(dbei.pBlob + sizeof(DWORD)*2);
- firstName = nick + strlen(nick) + 1;
- lastName = firstName + strlen(firstName) + 1;
- jid = lastName + strlen(lastName) + 1;
+ char *nick = (char*)(dbei.pBlob + sizeof(DWORD)*2);
+ char *firstName = nick + strlen(nick) + 1;
+ char *lastName = firstName + strlen(firstName) + 1;
+ char *jid = lastName + strlen(lastName) + 1;
TCHAR *newJid = (dbei.flags & DBEF_UTF) ? mir_utf8decodeT(jid) : mir_a2t(jid);
- hContact = (HANDLE)AddToListByJID(newJid, flags);
+ HANDLE hContact = (HANDLE)AddToListByJID(newJid, flags);
mir_free(newJid);
return hContact;
}
@@ -460,11 +456,11 @@ int CJabberProto::Authorize(HANDLE hDbEvent)
return 1;
DBEVENTINFO dbei = { sizeof(dbei) };
- if ((dbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0)) == (DWORD)(-1))
+ if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1))
return 1;
if ((dbei.pBlob = (PBYTE)alloca(dbei.cbBlob)) == NULL)
return 1;
- if (CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei))
+ if (db_event_get(hDbEvent, &dbei))
return 1;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return 1;
@@ -510,11 +506,11 @@ int CJabberProto::AuthDeny(HANDLE hDbEvent, const TCHAR*)
Log("Entering AuthDeny");
DBEVENTINFO dbei = { sizeof(dbei) };
- if ((dbei.cbBlob=CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0)) == (DWORD)(-1))
+ if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1))
return 1;
if ((dbei.pBlob=(PBYTE) mir_alloc(dbei.cbBlob)) == NULL)
return 1;
- if (CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei)) {
+ if (db_event_get(hDbEvent, &dbei)) {
mir_free(dbei.pBlob);
return 1;
}