diff options
author | George Hazan <george.hazan@gmail.com> | 2016-01-28 16:04:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-01-28 16:04:16 +0000 |
commit | bb5aff746c50564ded61159c5ae28e6218d0a49d (patch) | |
tree | 0ec2ef5c4b6b6b9cf6c3bb4a606cf632e69b6d31 /protocols | |
parent | 1042a84dd1f01c249a946ec708d3dae2881ecfab (diff) |
another atavism removed: old stub services for clist events
git-svn-id: http://svn.miranda-ng.org/main/trunk@16181 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/GTalkExt/src/GTalkExt.cpp | 2 | ||||
-rw-r--r-- | protocols/GTalkExt/src/notifications.cpp | 6 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/core.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/clist.cpp | 6 | ||||
-rw-r--r-- | protocols/IRCG/src/main.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iq_handlers.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_notes.cpp | 3 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_rc.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_mail.cpp | 10 | ||||
-rw-r--r-- | protocols/MSN/src/msn_menu.cpp | 3 | ||||
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 5 | ||||
-rw-r--r-- | protocols/MSN/src/msn_svcs.cpp | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_trouter.cpp | 12 | ||||
-rw-r--r-- | protocols/Tox/src/tox_multimedia.cpp | 3 | ||||
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_feed.cpp | 3 |
17 files changed, 35 insertions, 36 deletions
diff --git a/protocols/GTalkExt/src/GTalkExt.cpp b/protocols/GTalkExt/src/GTalkExt.cpp index 6d0eb2f435..506e59af32 100644 --- a/protocols/GTalkExt/src/GTalkExt.cpp +++ b/protocols/GTalkExt/src/GTalkExt.cpp @@ -28,6 +28,7 @@ #include "Version.h"
#include "inbox.h"
+CLIST_INTERFACE *pcli;
int hLangpack;
HICON g_hPopupIcon = 0;
@@ -79,6 +80,7 @@ LRESULT CALLBACK WndProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam) extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
WNDCLASS cls = { 0 };
cls.lpfnWndProc = WndProc;
diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp index 6978e81507..9c0d1e409c 100644 --- a/protocols/GTalkExt/src/notifications.cpp +++ b/protocols/GTalkExt/src/notifications.cpp @@ -70,13 +70,13 @@ void MarkEventRead(MCONTACT hCnt, MEVENT hEvt) ReadCheckbox(0, IDC_PSEUDOCONTACTENABLED, settings) &&
ReadCheckbox(0, IDC_MARKEVENTREAD, settings) &&
db_event_markRead(hCnt, hEvt) != -1)
- CallService(MS_CLIST_REMOVEEVENT, hCnt, hEvt);
+ pcli->pfnRemoveEvent(hCnt, hEvt);
}
int OnEventDeleted(WPARAM hContact, LPARAM hDbEvent, LPARAM wnd)
{
if (db_get_b((MCONTACT)hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
- CallService(MS_CLIST_REMOVEEVENT, hContact, hDbEvent);
+ pcli->pfnRemoveEvent(hContact, hDbEvent);
PostMessage((HWND)wnd, EVENT_DELETED_MSG, hContact, hDbEvent);
}
@@ -116,7 +116,7 @@ LRESULT CALLBACK PopupProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam) if (ppdh->MarkRead && ppdh->hDbEvent && (acc = GetJidAcc(ppdh->jid))) {
ReadNotificationSettings(acc);
MarkEventRead(ppdh->hContact, ppdh->hDbEvent);
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)ppdh->hContact, (LPARAM)ppdh->hDbEvent);
+ pcli->pfnRemoveEvent(ppdh->hContact, ppdh->hDbEvent);
}
RemoveProp(wnd, PLUGIN_DATA_PROP_NAME);
free(ppdh);
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 3f8c63cdd3..a73ffa447d 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -1017,7 +1017,7 @@ retry: cle.lParam = (LPARAM)img;
cle.pszService = service;
cle.pszTooltip = Translate("Incoming image");
- CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
+ pcli->pfnAddEvent(&cle);
ReleaseIconEx("image", FALSE);
}
}
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index cd52f2297f..22be4d9471 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -73,9 +73,9 @@ BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask, cle.ptszTooltip = szNick;
cle.lParam = (LPARAM)pdci;
- if (CallService(MS_CLIST_GETEVENT, hContact, 0))
- CallService(MS_CLIST_REMOVEEVENT, hContact, -100);
- CallService(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
+ if (pcli->pfnGetEvent(hContact, 0))
+ pcli->pfnRemoveEvent(hContact, -100);
+ pcli->pfnAddEvent(&cle);
}
return TRUE;
}
diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp index accf27a448..549e9dc8ed 100644 --- a/protocols/IRCG/src/main.cpp +++ b/protocols/IRCG/src/main.cpp @@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
#include "version.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst = NULL;
int hLangpack;
@@ -89,6 +90,7 @@ static int ircProtoUninit(CIrcProto *ppro) extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
InitIcons();
InitServers();
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index 53c9ef9f72..2a7a706a50 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -458,7 +458,7 @@ BOOL CJabberProto::AddClistHttpAuthEvent(CJabberHttpAuthParams *pParams) cle.lParam = (LPARAM)pParams;
cle.pszService = szService;
cle.ptszTooltip = TranslateT("Http authentication request received");
- CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
+ pcli->pfnAddEvent(&cle);
return TRUE;
}
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index dffac55378..00ab589b8c 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -786,8 +786,7 @@ bool CJabberProto::OnIncomingNote(const TCHAR *szFrom, HXML hXml) cle.lParam = (LPARAM)pItem;
cle.pszService = szService;
cle.ptszTooltip = TranslateT("Incoming note");
- CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
-
+ pcli->pfnAddEvent(&cle);
return true;
}
diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index 1e95257ab2..caef4f795d 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -603,7 +603,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe db_event_markRead(hContact, hDbEvent);
if (bRemoveCListEvents)
- CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)hDbEvent);
+ pcli->pfnRemoveEvent(hContact, hDbEvent);
}
}
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index f63e04ecf9..26b6ddd8ae 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -670,7 +670,7 @@ void CMraProto::MraUpdateEmailStatus(const CMStringA &pszFrom, const CMStringA & memcpy(pszServiceFunctionName, MRA_GOTO_INBOX, sizeof(MRA_GOTO_INBOX));
cle.pszService = szServiceFunction;
}
- CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
+ pcli->pfnAddEvent(&cle);
}
SkinPlaySound(szNewMailSound);
@@ -683,7 +683,7 @@ void CMraProto::MraUpdateEmailStatus(const CMStringA &pszFrom, const CMStringA & else {
if ( !force_display && getByte("IncrementalNewMailNotify", MRA_DEFAULT_INC_NEW_MAIL_NOTIFY)) {
if (bTrayIconNewMailNotify)
- CallService(MS_CLIST_REMOVEEVENT, 0, (LPARAM)m_szModuleName);
+ pcli->pfnRemoveEvent(0, (LPARAM)m_szModuleName);
PUDeletePopup(hWndEMailPopupStatus);
hWndEMailPopupStatus = NULL;
}
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp index 6723946566..99ea736122 100644 --- a/protocols/MSN/src/msn_mail.cpp +++ b/protocols/MSN/src/msn_mail.cpp @@ -282,21 +282,21 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial) MCONTACT hContact = MSN_HContactFromEmail(MyOptions.szEmail);
if (hContact) {
- CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)1);
+ pcli->pfnRemoveEvent(hContact, 1);
displayEmailCount(hContact);
if (ShowPopup && !getByte("DisableHotmailTray", 1)) {
+ char buf[64];
+ mir_snprintf(buf, "%s%s", m_szModuleName, MS_GOTO_INBOX);
+
CLISTEVENT cle = {};
cle.hContact = hContact;
cle.hDbEvent = 1;
cle.flags = CLEF_URGENT | CLEF_TCHAR;
cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_SENDEMAIL);
cle.ptszTooltip = tBuffer2;
- char buf[64];
- mir_snprintf(buf, "%s%s", m_szModuleName, MS_GOTO_INBOX);
cle.pszService = buf;
-
- CallService(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
+ pcli->pfnAddEvent(&cle);
}
}
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index 396e7803da..d607bb1dbb 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -48,7 +48,8 @@ INT_PTR CMsnProto::MsnBlockCommand(WPARAM hContact, LPARAM) INT_PTR CMsnProto::MsnGotoInbox(WPARAM, LPARAM)
{
MCONTACT hContact = MSN_HContactFromEmail(MyOptions.szEmail);
- if (hContact) CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)1);
+ if (hContact)
+ pcli->pfnRemoveEvent(hContact, 1);
MsnInvokeMyURL(true, "http://mail.live.com?rru=inbox");
return 0;
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index c170355e62..3ac46a9223 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -943,7 +943,8 @@ void HandlePopupData(PopupData *tData) { if (tData != NULL) {
if (tData->flags & MSN_HOTMAIL_POPUP) {
MCONTACT hContact = tData->proto->MSN_HContactFromEmail(tData->proto->MyOptions.szEmail, NULL);
- if (hContact) CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)1);
+ if (hContact)
+ pcli->pfnRemoveEvent(hContact, 1);
if (tData->flags & MSN_ALLOW_ENTER)
tData->proto->MsnInvokeMyURL(true, tData->url);
}
@@ -956,7 +957,7 @@ void RemovePopupData(PopupData *tData) { if (tData != NULL && (tData->flags & MSN_HOTMAIL_POPUP)) {
MCONTACT hContact = tData->proto->MSN_HContactFromEmail(tData->proto->MyOptions.szEmail, NULL);
if (hContact)
- CallService(MS_CLIST_REMOVEEVENT, hContact, 1);
+ pcli->pfnRemoveEvent(hContact, 1);
}
}
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 70a49450bd..502ed01b46 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -393,7 +393,7 @@ int CMsnProto::OnContactDeleted(WPARAM hContact, LPARAM) else {
char szEmail[MSN_MAX_EMAIL_LEN];
if (MSN_IsMeByContact(hContact, szEmail))
- CallService(MS_CLIST_REMOVEEVENT, hContact, 1);
+ pcli->pfnRemoveEvent(hContact, 1);
if (szEmail[0]) {
debugLogA("Deleted Handler Email");
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index 933747d290..e7b1057a49 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -210,8 +210,7 @@ void CSkypeProto::OnTrouterEvent(const JSONNode &body, const JSONNode &) CMString tooltip(FORMAT, TranslateT("Incoming call from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
cle.ptszTooltip = tooltip.GetBuffer();
-
- CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
+ pcli->pfnAddEvent(&cle);
ShowNotification(pcli->pfnGetContactDisplayName(hContact, 0), TranslateT("Incoming call"), hContact, SKYPE_DB_EVENT_TYPE_INCOMING_CALL);
}
@@ -234,12 +233,9 @@ INT_PTR CSkypeProto::OnIncomingCallCLE(WPARAM, LPARAM lParam) INT_PTR CSkypeProto::OnIncomingCallPP(WPARAM wParam, LPARAM hContact)
{
- CLISTEVENT *cle = NULL;
- while ((cle = (CLISTEVENT*)CallService(MS_CLIST_GETEVENT, hContact, 0)))
- {
- if (cle->lParam == SKYPE_DB_EVENT_TYPE_INCOMING_CALL)
- {
- CallService(MS_CLIST_REMOVEEVENT, hContact, cle->hDbEvent);
+ while (CLISTEVENT *cle = pcli->pfnGetEvent(hContact, 0)) {
+ if (cle->lParam == SKYPE_DB_EVENT_TYPE_INCOMING_CALL) {
+ pcli->pfnRemoveEvent(hContact, cle->hDbEvent);
break;
}
}
diff --git a/protocols/Tox/src/tox_multimedia.cpp b/protocols/Tox/src/tox_multimedia.cpp index 9bd2aefb41..0ef2cec23a 100644 --- a/protocols/Tox/src/tox_multimedia.cpp +++ b/protocols/Tox/src/tox_multimedia.cpp @@ -358,8 +358,7 @@ INT_PTR CToxProto::OnRecvAudioCall(WPARAM hContact, LPARAM lParam) char szService[MAX_PATH];
mir_snprintf(szService, "%s/Audio/Ring", GetContactProto(hContact));
cle.pszService = szService;
-
- CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
+ pcli->pfnAddEvent(&cle);
return hEvent;
}
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index ca29e5bb6d..16a207c66a 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -683,10 +683,10 @@ void CVkProto::MarkDialogAsRead(MCONTACT hContact) MCONTACT hMContact = db_mc_tryMeta(hContact);
while ((hDBEvent = db_event_firstUnread(hContact)) != NULL) {
db_event_markRead(hContact, hDBEvent);
- int res1 = CallService(MS_CLIST_REMOVEEVENT, hMContact, hDBEvent);
+ int res1 = pcli->pfnRemoveEvent(hMContact, hDBEvent);
int res2 = 2;
if (hContact != hMContact)
- res2 = CallService(MS_CLIST_REMOVEEVENT, hContact, hDBEvent);
+ res2 = pcli->pfnRemoveEvent(hContact, hDBEvent);
debugLogA("CVkProto::MarkDialogAsRead [1] result = (%d, %d), hDbEvent = %d", res1, res2, (int)hDBEvent);
}
}
diff --git a/protocols/VKontakte/src/vk_feed.cpp b/protocols/VKontakte/src/vk_feed.cpp index 83c1e2b18e..e78cb3ca5e 100644 --- a/protocols/VKontakte/src/vk_feed.cpp +++ b/protocols/VKontakte/src/vk_feed.cpp @@ -87,8 +87,7 @@ void CVkProto::AddCListEvent(bool bNews) TCHAR toolTip[255];
mir_sntprintf(toolTip, bNews ? TranslateT("New news") : TranslateT("New notifications"));
cle.ptszTooltip = toolTip;
-
- CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
+ pcli->pfnAddEvent(&cle);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////
|