From bd8a04455d9c991c15df2287e091abe4ba054efb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 25 Nov 2012 12:54:45 +0000 Subject: typed stub for MS_PROTO_GETCONTACTBASEPROTO git-svn-id: http://svn.miranda-ng.org/main/trunk@2480 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewXstatusNotify/src/indsnd.cpp | 4 ++-- plugins/NewXstatusNotify/src/main.cpp | 12 ++++++------ plugins/NewXstatusNotify/src/popup.cpp | 4 ++-- plugins/NewXstatusNotify/src/xstatus.cpp | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/NewXstatusNotify/src') diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 573b631648..f516f44e02 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -119,7 +119,7 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TranslateDialogDefault(hwndDlg); hContact = (HANDLE)lParam; - char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + char *szProto = GetContactProto(hContact); HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST); ListView_SetImageList(hList, GetStatusIconsImgList(szProto), LVSIL_SMALL); @@ -377,7 +377,7 @@ void SetAllContactsIcons(HWND hwndList) HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0); if (hItem) { - char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO,(WPARAM)hContact,0); + char *szProto = GetContactProto(hContact); if (szProto) { EnableSounds = db_get_b(hContact, MODULE, "EnableSounds", 1); diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index ff58ca697f..dc590828b1 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -70,7 +70,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_USERONL BYTE GetGender(HANDLE hContact) { - char *szProto =(char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + char *szProto =GetContactProto(hContact); if (szProto) { switch (db_get_b(hContact, szProto, "Gender", 0)) { case 'M': case 'm': @@ -108,7 +108,7 @@ bool IsNewExtraStatus(HANDLE hContact, char *szSetting, TCHAR *newStatusTitle) int ProcessExtraStatus(DBCONTACTWRITESETTING *cws, HANDLE hContact) { XSTATUSCHANGE *xsc; - char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + char *szProto = GetContactProto(hContact); if ( ProtoServiceExists(szProto, JS_PARSE_XMPP_URI)) { if (cws->value.type == DBVT_DELETED) @@ -472,7 +472,7 @@ int ProcessStatus(DBCONTACTWRITESETTING *cws, HANDLE hContact) if (!db_get_b(NULL, MODULE, dbSetting, 1)) return 0; } - smi.proto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + smi.proto = GetContactProto(hContact); //don't show popup when mradio connecting and disconnecting if (_stricmp(smi.proto, "mRadio") == 0 && !cws->value.type == DBVT_DELETED) { @@ -565,7 +565,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) if (hContact == NULL) return 0; - char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + char *szProto = GetContactProto(hContact); if (szProto == NULL) return 0; @@ -776,7 +776,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam) char buff[8], szProto[64], szSubProto[64]; bool bEnablePopup = true, bEnableSound = true; - char *hlpProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0); + char *hlpProto = GetContactProto((HANDLE)wParam); if (hlpProto == NULL || opt.TempDisabled) return 0; @@ -785,7 +785,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam) if (strcmp(szProto, szMetaModuleName) == 0) { //this contact is Meta HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0); - strcpy(szSubProto, (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hSubContact,0)); + strcpy(szSubProto, GetContactProto(hSubContact)); if (newStatus == ID_STATUS_OFFLINE) { // read last online proto for metaconatct if exists, diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp index be7c39fd1c..7d6f1d9672 100644 --- a/plugins/NewXstatusNotify/src/popup.cpp +++ b/plugins/NewXstatusNotify/src/popup.cpp @@ -29,7 +29,7 @@ extern OPTIONS opt; void QueryAwayMessage(HWND hWnd, PLUGINDATA *pdp) { HANDLE hContact = PUGetContact(hWnd); - char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + char *szProto = GetContactProto(hContact); if (szProto) { if ((CallProtoService(szProto, PS_GETCAPS,PFLAGNUM_1, 0) & PF1_MODEMSGRECV) && @@ -154,7 +154,7 @@ INT_PTR CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa case UM_INITPOPUP: pdp = (PLUGINDATA *)PUGetPluginData(hwnd); if (pdp != NULL) { - char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)PUGetContact(hwnd), 0); + char *szProto = GetContactProto( PUGetContact(hwnd)); if (szProto && opt.ReadAwayMsg && StatusHasAwayMessage(szProto, pdp->newStatus)) { WORD myStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0); if (myStatus != ID_STATUS_INVISIBLE) diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp index bc2bb541e6..48897840dc 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -438,7 +438,7 @@ void AddEventThread(void *arg) HANDLE hContact = (HANDLE)arg; TCHAR stzTitle[MAX_TITLE_LEN], stzText[MAX_TEXT_LEN]; - char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + char *szProto = GetContactProto(hContact); if (szProto == NULL) return; -- cgit v1.2.3