diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-25 12:54:45 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-25 12:54:45 +0000 |
commit | bd8a04455d9c991c15df2287e091abe4ba054efb (patch) | |
tree | 6af5485d60feef741669eb545a6378e7c209ab59 /plugins/MirOTR | |
parent | 7fdce14cd488e25e8e32e34098fbe9f5cb3021b7 (diff) |
typed stub for MS_PROTO_GETCONTACTBASEPROTO
git-svn-id: http://svn.miranda-ng.org/main/trunk@2480 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR')
-rw-r--r-- | plugins/MirOTR/MirOTR/src/svcs_proto.cpp | 4 | ||||
-rw-r--r-- | plugins/MirOTR/MirOTR/src/svcs_srmm.cpp | 6 | ||||
-rw-r--r-- | plugins/MirOTR/MirOTR/src/utils.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/plugins/MirOTR/MirOTR/src/svcs_proto.cpp b/plugins/MirOTR/MirOTR/src/svcs_proto.cpp index 618034cc10..a681763be6 100644 --- a/plugins/MirOTR/MirOTR/src/svcs_proto.cpp +++ b/plugins/MirOTR/MirOTR/src/svcs_proto.cpp @@ -18,7 +18,7 @@ INT_PTR SVC_OTRSendMessage(WPARAM wParam,LPARAM lParam){ if (ccs->wParam & PREF_BYPASS_OTR) // bypass for OTR-messages
return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)ccs->hContact, 0);
+ char *proto = GetContactProto(ccs->hContact);
if(proto && g_metaproto && strcmp(proto, g_metaproto) == 0) // bypass for metacontacts
return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
if (!proto || !ccs->hContact) return 1; // error
@@ -166,7 +166,7 @@ INT_PTR SVC_OTRRecvMessage(WPARAM wParam,LPARAM lParam){ return CallService(MS_PROTO_CHAINRECV, wParam, lParam);
}
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)ccs->hContact, 0);
+ char *proto = GetContactProto(ccs->hContact);
if (!proto)
return 1; //error
else if(proto && g_metaproto && strcmp(proto, g_metaproto) == 0) // bypass for metacontacts
diff --git a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp index 707eb0a020..8ad883bfd6 100644 --- a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp +++ b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp @@ -39,7 +39,7 @@ int SVC_IconPressed(WPARAM wParam, LPARAM lParam) { return 0;
if(strcmp(sicd->szModule, MODULENAME) == 0) {
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
if(proto && DBGetContactSettingByte(hContact, proto, "ChatRoom", 0))
return 0;
ShowOTRMenu(hContact, sicd->clickLocation);
@@ -145,7 +145,7 @@ void SetEncryptionStatus(HANDLE hContact, TrustLevel level) { //strcat(dbg_msg, "Set encyption status: ");
//strcat(dbg_msg, (encrypted ? "true" : "false"));
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
bool chat_room = (proto && DBGetContactSettingByte(hContact, proto, "ChatRoom", 0));
// if (!chat_room) DBWriteContactSettingByte(hContact, MODULENAME, "Encrypted", (encrypted ? 1 : 0));
@@ -225,7 +225,7 @@ int SVC_ButtonsBarPressed(WPARAM w, LPARAM l) { if (cbcd->cbSize == (int)sizeof(CustomButtonClickData) && cbcd->dwButtonId == 0 && strcmp(cbcd->pszModule, MODULENAME)==0) {
HANDLE hContact = (HANDLE)w;
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
if(proto && DBGetContactSettingByte(hContact, proto, "ChatRoom", 0))
return 0;
ShowOTRMenu(hContact, cbcd->pt);
diff --git a/plugins/MirOTR/MirOTR/src/utils.cpp b/plugins/MirOTR/MirOTR/src/utils.cpp index ce2bbc5b9a..ea9b55b619 100644 --- a/plugins/MirOTR/MirOTR/src/utils.cpp +++ b/plugins/MirOTR/MirOTR/src/utils.cpp @@ -144,7 +144,7 @@ __inline const TCHAR* contact_get_nameT(HANDLE hContact) { }
__inline const char* contact_get_proto(HANDLE hContact) {
- char *uproto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *uproto = GetContactProto(hContact);
return uproto;
}
@@ -367,7 +367,7 @@ void ShowMessage(const HANDLE hContact, const TCHAR *msg) { /*
bool GetEncryptionStatus(HANDLE hContact) {
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
bool chat_room = (proto && DBGetContactSettingByte(hContact, proto, "ChatRoom", 0));
if (!chat_room) {
|