diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-31 15:29:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-31 15:29:24 +0000 |
commit | 9ac20243efe27f58501c59060a4f22c37104c0e3 (patch) | |
tree | cf00f03c151d21e062a46f1a85eeb0be8a9342f2 /src/modules/protocols/protoint.cpp | |
parent | 2738cf4311501acfc1b0e2de74b51b0edc18cdd2 (diff) |
- PROTOCOLDESCRIPTOR_V3_SIZE to identify an ANSI plugin;
- absence of fnInitFunc to identify a protocol without instances;
- whole bunch of ansi crutches discarded
git-svn-id: http://svn.miranda-ng.org/main/trunk@13937 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/protocols/protoint.cpp')
-rw-r--r-- | src/modules/protocols/protoint.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/modules/protocols/protoint.cpp b/src/modules/protocols/protoint.cpp index d6b9a9f39f..2252877ce4 100644 --- a/src/modules/protocols/protoint.cpp +++ b/src/modules/protocols/protoint.cpp @@ -53,7 +53,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE MCONTACT __cdecl AddToListByEvent(int flags, int iContact, MEVENT hDbEvent)
{
- return (MCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLISTBYEVENT, MAKELONG(flags, iContact), (LPARAM)hDbEvent);
+ return (MCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLISTBYEVENT, MAKELONG(flags, iContact), hDbEvent);
}
int __cdecl Authorize(MEVENT hDbEvent)
@@ -61,18 +61,21 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return (int)ProtoCallService(m_szModuleName, PS_AUTHALLOW, (WPARAM)hDbEvent, 0);
}
- int __cdecl AuthDeny(MEVENT hDbEvent, const TCHAR* szReason)
+ int __cdecl AuthDeny(MEVENT hDbEvent, const TCHAR *szReason)
{
- return (int)ProtoCallService(m_szModuleName, PS_AUTHDENY, (WPARAM)hDbEvent, (LPARAM)StrConvA(szReason));
+ if (m_iVersion > 1)
+ return (int)ProtoCallService(m_szModuleName, PS_AUTHDENY, hDbEvent, (LPARAM)szReason);
+
+ return (int)ProtoCallService(m_szModuleName, PS_AUTHDENY, hDbEvent, (LPARAM)StrConvA(szReason));
}
- int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT* evt)
+ int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT *evt)
{
CCSDATA ccs = { hContact, PSR_AUTH, 0, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_AUTH, 0, (LPARAM)&ccs);
}
- int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage)
+ int __cdecl AuthRequest(MCONTACT hContact, const TCHAR *szMessage)
{
CCSDATA ccs = { hContact, PSS_AUTHREQUEST, 0, (LPARAM)szMessage };
ccs.lParam = (LPARAM)mir_t2a(szMessage);
@@ -134,11 +137,16 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE HANDLE __cdecl SearchBasic(const PROTOCHAR* id)
{
+ if (m_iVersion > 1)
+ return (HANDLE)ProtoCallService(m_szModuleName, PS_BASICSEARCH, 0, (LPARAM)id);
+
return (HANDLE)ProtoCallService(m_szModuleName, PS_BASICSEARCH, 0, (LPARAM)StrConvA(id));
}
HANDLE __cdecl SearchByEmail(const PROTOCHAR* email)
{
+ if (m_iVersion > 1)
+ return (HANDLE)ProtoCallService(m_szModuleName, PS_SEARCHBYEMAIL, 0, (LPARAM)email);
return (HANDLE)ProtoCallService(m_szModuleName, PS_SEARCHBYEMAIL, 0, (LPARAM)StrConvA(email));
}
@@ -245,6 +253,8 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE int __cdecl SetAwayMsg(int iStatus, const TCHAR* msg)
{
+ if (m_iVersion > 1)
+ return (int)ProtoCallService(m_szModuleName, PS_SETAWAYMSG, iStatus, (LPARAM)msg);
return (int)ProtoCallService(m_szModuleName, PS_SETAWAYMSG, iStatus, (LPARAM)StrConvA(msg));
}
|