diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-16 11:50:15 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-16 11:50:15 +0000 |
commit | 5161fd3fe53b85f579cfece81e25b562f1fa56ae (patch) | |
tree | 3ac6979cd3774351cb68431da64ca014f1170e98 /src/modules/protocols/protocols.cpp | |
parent | ce6e5ab03d58151c4eda36d05a8436d337b2d3c0 (diff) |
- 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
Diffstat (limited to 'src/modules/protocols/protocols.cpp')
-rw-r--r-- | src/modules/protocols/protocols.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
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);
|