From 5161fd3fe53b85f579cfece81e25b562f1fa56ae Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 16 Sep 2012 11:50:15 +0000 Subject: - event code standardization for protocols - fix for EVENTTYPE_AUTHREQUEST processing - protocols' custom CallService core removed git-svn-id: http://svn.miranda-ng.org/main/trunk@1576 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/protocols/protocols.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/modules/protocols') diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp index 7c15f1de39..fb3c33e644 100644 --- a/src/modules/protocols/protocols.cpp +++ b/src/modules/protocols/protocols.cpp @@ -177,6 +177,22 @@ static INT_PTR Proto_RecvMessage(WPARAM, LPARAM lParam) return CallService(MS_DB_EVENT_ADD, (WPARAM) ccs->hContact, (LPARAM)&dbei); } +static INT_PTR Proto_AuthRecv(WPARAM wParam, LPARAM lParam) +{ + PROTORECVEVENT* pre = (PROTORECVEVENT*)lParam; + + DBEVENTINFO dbei = { 0 }; + dbei.cbSize = sizeof(dbei); + dbei.szModule = (char*)wParam; + dbei.timestamp = pre->timestamp; + dbei.flags = pre->flags & (PREF_CREATEREAD?DBEF_READ:0); + dbei.flags |= (pre->flags & PREF_UTF) ? DBEF_UTF : 0; + dbei.eventType = EVENTTYPE_AUTHREQUEST; + dbei.cbBlob = pre->lParam; + dbei.pBlob = (PBYTE)pre->szMessage; + return CallService(MS_DB_EVENT_ADD,(WPARAM)NULL,(LPARAM)&dbei); +} + ///////////////////////////////////////////////////////////////////////////////////////// // User Typing Notification services @@ -700,6 +716,7 @@ int LoadProtocolsModule(void) CreateServiceFunction(MS_PROTO_CONTACTISTYPING, Proto_ContactIsTyping); CreateServiceFunction(MS_PROTO_RECVMSG, Proto_RecvMessage); + CreateServiceFunction(MS_PROTO_AUTHRECV, Proto_AuthRecv); CreateServiceFunction("Proto/EnumProtocols", Proto_EnumAccounts); CreateServiceFunction(MS_PROTO_ENUMACCOUNTS, Proto_EnumAccounts); -- cgit v1.2.3