summaryrefslogtreecommitdiff
path: root/src/core/stdmsg
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-25 12:54:45 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-25 12:54:45 +0000
commitbd8a04455d9c991c15df2287e091abe4ba054efb (patch)
tree6af5485d60feef741669eb545a6378e7c209ab59 /src/core/stdmsg
parent7fdce14cd488e25e8e32e34098fbe9f5cb3021b7 (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 'src/core/stdmsg')
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp6
-rw-r--r--src/core/stdmsg/src/msgs.cpp10
-rw-r--r--src/core/stdmsg/src/msgtimedout.cpp9
3 files changed, 10 insertions, 15 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index dcd20353bf..22bd5b46e8 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -60,7 +60,7 @@ static void NotifyLocalWinEvent(HANDLE hContact, HWND hwnd, unsigned int type)
static char *MsgServiceName(HANDLE hContact)
{
char szServiceName[100];
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto == NULL)
return PSS_MESSAGE;
@@ -72,7 +72,7 @@ static char *MsgServiceName(HANDLE hContact)
static BOOL IsUtfSendAvailable(HANDLE hContact)
{
- char* szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
if ( szProto == NULL )
return FALSE;
@@ -719,7 +719,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
PostMessage(GetDlgItem(hwndDlg, IDC_MESSAGE), EM_SETSEL, len, len);
}
- dat->szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) dat->hContact, 0);
+ dat->szProto = GetContactProto(dat->hContact);
RichUtil_SubClass(GetDlgItem(hwndDlg, IDC_LOG));
RichUtil_SubClass(GetDlgItem(hwndDlg, IDC_MESSAGE));
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 940487b011..6167c53214 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -83,7 +83,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
/* new message */
SkinPlaySound("AlertMsg");
{
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) wParam, 0);
+ char *szProto = GetContactProto((HANDLE)wParam);
if (szProto && (g_dat->openFlags & SRMMStatusToPf2(CallProtoService(szProto, PS_GETSTATUS, 0, 0))))
{
struct NewMessageWindowLParam newData = { 0 };
@@ -116,7 +116,7 @@ INT_PTR SendMessageCmd(HANDLE hContact, char* msg, int isWchar)
HWND hwnd;
/* does the HCONTACT's protocol support IM messages? */
- szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szProto = GetContactProto(hContact);
if (!szProto || (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
return 1;
@@ -225,7 +225,7 @@ static int MessageSettingChanged(WPARAM wParam, LPARAM lParam)
WindowList_Broadcast(g_dat->hMessageWindowList, DM_NEWTIMEZONE, (WPARAM) cws, 0);
else
{
- char * szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
+ char * szProto = GetContactProto((HANDLE)wParam);
if (szProto && !strcmp(cws->szModule, szProto))
WindowList_Broadcast(g_dat->hMessageWindowList, DM_UPDATETITLE, (WPARAM) cws, 0);
}
@@ -273,7 +273,7 @@ static void RestoreUnreadMessageAlerts(void)
if (windowAlreadyExists)
continue;
{
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto && (g_dat->openFlags & SRMMStatusToPf2(CallProtoService(szProto, PS_GETSTATUS, 0, 0))))
{
autoPopup = 1;
@@ -374,7 +374,7 @@ static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
HANDLE hContact = (HANDLE)wParam;
if ( hContact ) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
CLISTMENUITEM clmi = {0};
clmi.cbSize = sizeof(CLISTMENUITEM);
diff --git a/src/core/stdmsg/src/msgtimedout.cpp b/src/core/stdmsg/src/msgtimedout.cpp
index 1b1773aa8e..b956faaf2a 100644
--- a/src/core/stdmsg/src/msgtimedout.cpp
+++ b/src/core/stdmsg/src/msgtimedout.cpp
@@ -70,14 +70,9 @@ INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
break;
case WM_COMMAND:
- switch (LOWORD(wParam))
- {
+ switch (LOWORD(wParam)) {
case IDOK:
- {
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) item->hContact, 0);
- SendMessageDirect(item->szMsg, item->hContact, szProto);
- }
-
+ SendMessageDirect(item->szMsg, item->hContact, GetContactProto(item->hContact));
DestroyWindow(hwndDlg);
break;