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 /src/core | |
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 'src/core')
-rw-r--r-- | src/core/stdauth/src/auth.cpp | 4 | ||||
-rw-r--r-- | src/core/stdauth/src/main.cpp | 2 | ||||
-rw-r--r-- | src/core/stdchat/src/window.cpp | 12 | ||||
-rw-r--r-- | src/core/stdfile/src/file.cpp | 11 | ||||
-rw-r--r-- | src/core/stdmsg/src/msglog.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 2 | ||||
-rw-r--r-- | src/core/stduseronline/src/useronline.cpp | 4 |
7 files changed, 17 insertions, 20 deletions
diff --git a/src/core/stdauth/src/auth.cpp b/src/core/stdauth/src/auth.cpp index 1358e7858c..adb4577ab3 100644 --- a/src/core/stdauth/src/auth.cpp +++ b/src/core/stdauth/src/auth.cpp @@ -93,7 +93,7 @@ static int AuthEventAdded(WPARAM, LPARAM lParam) cli.hIcon = Skin_LoadIcon(SKINICON_AUTH_REQUEST);
cli.pszService = MS_AUTH_SHOWREQUEST;
- CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cli);
+ pcli->pfnAddEvent(&cli);
}
else if (dbei.eventType == EVENTTYPE_ADDED) {
SkinPlaySound("AddedEvent");
@@ -104,7 +104,7 @@ static int AuthEventAdded(WPARAM, LPARAM lParam) cli.hIcon = Skin_LoadIcon(SKINICON_AUTH_ADD);
cli.pszService = MS_AUTH_SHOWADDED;
- CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cli);
+ pcli->pfnAddEvent(&cli);
}
return 0;
}
diff --git a/src/core/stdauth/src/main.cpp b/src/core/stdauth/src/main.cpp index f5f9e27d74..bfda91b735 100644 --- a/src/core/stdauth/src/main.cpp +++ b/src/core/stdauth/src/main.cpp @@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., int LoadSendRecvAuthModule(void);
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
@@ -56,6 +57,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRAUTH extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
LoadSendRecvAuthModule();
return 0;
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp index fec7afd472..00abe9297a 100644 --- a/src/core/stdchat/src/window.cpp +++ b/src/core/stdchat/src/window.cpp @@ -1734,8 +1734,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar if (s->wState & GC_EVENT_HIGHLIGHT) {
s->wState &= ~GC_EVENT_HIGHLIGHT;
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)s->hContact, 0))
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)s->hContact, (LPARAM)GC_FAKE_EVENT);
+ if (pcli->pfnGetEvent(s->hContact, 0))
+ pcli->pfnRemoveEvent(s->hContact, GC_FAKE_EVENT);
}
SendMessage(hwndDlg, GC_FIXTABICONS, 0, (LPARAM)s);
@@ -1914,8 +1914,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar db_set_dw(si->hContact, CHAT_MODULE, "roomwidth", si->iWidth);
db_set_dw(si->hContact, CHAT_MODULE, "roomheight", si->iHeight);
}
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, 0))
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->hContact, (LPARAM)GC_FAKE_EVENT);
+ if (pcli->pfnGetEvent(si->hContact, 0))
+ pcli->pfnRemoveEvent(si->hContact, GC_FAKE_EVENT);
si->wState &= ~STATE_TALK;
db_set_w(si->hContact, si->pszModule, "ApparentMode", 0);
SendMessage(hwndDlg, GC_CLOSEWINDOW, 0, 0);
@@ -2087,8 +2087,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar FlashWindow(hwndDlg, FALSE);
if (db_get_w(si->hContact, si->pszModule, "ApparentMode", 0) != 0)
db_set_w(si->hContact, si->pszModule, "ApparentMode", (LPARAM)0);
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, 0))
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->hContact, (LPARAM)GC_FAKE_EVENT);
+ if (pcli->pfnGetEvent(si->hContact, 0))
+ pcli->pfnRemoveEvent(si->hContact, GC_FAKE_EVENT);
}
break;
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 752c1f1fae..33d6a5df66 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -128,7 +128,7 @@ void PushFileEvent(MCONTACT hContact, MEVENT hdbe, LPARAM lParam) cle.flags |= CLEF_TCHAR;
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_FILE);
cle.pszService = "SRFile/RecvFile";
- CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
+ pcli->pfnAddEvent(&cle);
}
}
@@ -321,14 +321,9 @@ static int SRFileProtoAck(WPARAM, LPARAM lParam) if (ack->type != ACKTYPE_FILE) return 0;
int iEvent = 0;
- CLISTEVENT *cle = NULL;
- while ((cle = (CLISTEVENT*)CallService(MS_CLIST_GETEVENT, ack->hContact, iEvent++)) != NULL)
- {
+ while (CLISTEVENT *cle = pcli->pfnGetEvent(ack->hContact, iEvent++))
if (cle->lParam == (LPARAM)ack->hProcess)
- {
- CallService(MS_CLIST_REMOVEEVENT, ack->hContact, cle->hDbEvent);
- }
- }
+ pcli->pfnRemoveEvent(ack->hContact, cle->hDbEvent);
return 0;
}
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index 66ae2ab483..29ab6af1f9 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -221,7 +221,7 @@ static char* CreateRTFFromDbEvent(SrmmWindowData *dat, MCONTACT hContact, MEVENT }
if (!(dbei.flags & DBEF_SENT) && (dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei))) {
db_event_markRead(hContact, hDbEvent);
- CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)hDbEvent);
+ pcli->pfnRemoveEvent(hContact, hDbEvent);
}
else if (dbei.eventType == EVENTTYPE_JABBER_CHATSTATES || dbei.eventType == EVENTTYPE_JABBER_PRESENCE) {
db_event_markRead(hContact, hDbEvent);
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index ebb815c423..aeeaceb504 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -58,7 +58,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam) if (dbei.flags & (DBEF_SENT | DBEF_READ) || !(dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei)))
return 0;
- CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, 1);
+ pcli->pfnRemoveEvent(hContact, 1);
/* does a window for the contact exist? */
HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (hwnd) {
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp index 12f7cda357..20ba0e68cf 100644 --- a/src/core/stduseronline/src/useronline.cpp +++ b/src/core/stduseronline/src/useronline.cpp @@ -47,7 +47,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) int lastEvent = (int)db_get_dw(hContact, "UserOnline", "LastEvent", 0);
if (lastEvent) {
- CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)lastEvent);
+ pcli->pfnRemoveEvent(hContact, lastEvent);
db_set_dw(hContact, "UserOnline", "LastEvent", 0);
}
}
@@ -67,7 +67,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_USERONLINE, false);
cle.pszService = "UserOnline/Description";
cle.ptszTooltip = tooltip;
- CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
+ pcli->pfnAddEvent(&cle);
IcoLib_ReleaseIcon(cle.hIcon, 0);
db_set_dw(cle.hContact, "UserOnline", "LastEvent", (DWORD)cle.hDbEvent);
SkinPlaySound("UserOnline");
|