diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-09-26 06:03:01 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-09-26 06:03:01 +0000 |
commit | 54cdf9dca636ade5a476d9a056d04c5e37188ace (patch) | |
tree | 0ae7c30e550aea50e12bf11bad079fa6c606d368 /protocols/VKontakte/src/misc.cpp | |
parent | d1981d7b364f8c184143a81e8edcd7d8672386d6 (diff) |
VKontakte:
work with friends.getRequests part 2 – complete
add Authorize and AuthDeny support
git-svn-id: http://svn.miranda-ng.org/main/trunk@10595 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index da01c8dbcc..845706004f 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -388,4 +388,24 @@ void CVkProto::DBAddAuthRequest(const MCONTACT hContact) debugLogA("CVkProto::DBAddAuthRequest '%s'", szNick);
mir_free(szNick);
+}
+
+MCONTACT CVkProto::MContactFromDbEvent(HANDLE hDbEvent)
+{
+ if (!hDbEvent || !IsOnline()) + return (MCONTACT)-1; + + DWORD body[2]; + DBEVENTINFO dbei = { sizeof(dbei) }; + dbei.cbBlob = sizeof(DWORD) * 2; + dbei.pBlob = (PBYTE)&body; + + if (db_event_get(hDbEvent, &dbei)) + return (MCONTACT)-1; + if ((dbei.eventType != EVENTTYPE_AUTHREQUEST) || (strcmp(dbei.szModule, m_szModuleName))) + return (MCONTACT)-1; + + MCONTACT hContact = DbGetAuthEventContact(&dbei); + db_unset(hContact, m_szModuleName, "ReqAuth");
+ return hContact;
}
\ No newline at end of file |