summaryrefslogtreecommitdiff
path: root/plugins/SMS/src/functions.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-30 17:32:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-30 17:32:39 +0000
commit109877a3c75cb290c55755dcfc88794d2453669d (patch)
tree3ede8b9170b2fc3f6f35dc2cea6742d44b19d631 /plugins/SMS/src/functions.cpp
parentfee8d991bdf4a59b563d1b92165ea0ed2f7bacb8 (diff)
MS_DB_EVENT_* services remained, but their calls removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@4255 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SMS/src/functions.cpp')
-rw-r--r--plugins/SMS/src/functions.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/plugins/SMS/src/functions.cpp b/plugins/SMS/src/functions.cpp
index 157b85d78f..0bdb9ce46e 100644
--- a/plugins/SMS/src/functions.cpp
+++ b/plugins/SMS/src/functions.cpp
@@ -66,16 +66,15 @@ LPSTR GetModuleName(HANDLE hContact)
{
LPSTR lpszRet;
- if (hContact)
- {
- lpszRet=(LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO,(WPARAM)hContact,0);
- if (lpszRet==NULL) lpszRet=PROTOCOL_NAMEA;
- }else{
- lpszRet=PROTOCOL_NAMEA;
+ if (hContact) {
+ lpszRet = GetContactProto(hContact);
+ if (lpszRet == NULL)
+ lpszRet = PROTOCOL_NAMEA;
}
-return(lpszRet);
-}
+ else lpszRet = PROTOCOL_NAMEA;
+ return lpszRet;
+}
void EnableControlsArray(HWND hWndDlg,WORD *pwControlsList,SIZE_T dwControlsListCount,BOOL bEnabled)
{
@@ -211,11 +210,9 @@ BOOL IsContactPhone(HANDLE hContact,LPWSTR lpwszPhone,SIZE_T dwPhoneSize)
{
BOOL bRet=FALSE;
WCHAR wszPhoneLocal[MAX_PHONE_LEN];
- LPSTR lpszProto;
- SIZE_T dwPhoneSizeLocal;
- dwPhoneSizeLocal=CopyNumberW(wszPhoneLocal,lpwszPhone,dwPhoneSize);
- lpszProto=(LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO,(WPARAM)hContact,0);
+ SIZE_T dwPhoneSizeLocal = CopyNumberW(wszPhoneLocal,lpwszPhone,dwPhoneSize);
+ LPSTR lpszProto = GetContactProto(hContact);
if (lpszProto) {
if (bRet==FALSE) bRet=IsContactPhoneParam(hContact,lpszProto,"Phone",wszPhoneLocal,dwPhoneSizeLocal);
if (bRet==FALSE) bRet=IsContactPhoneParam(hContact,lpszProto,"Cellular",wszPhoneLocal,dwPhoneSizeLocal);