From 109877a3c75cb290c55755dcfc88794d2453669d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 30 Mar 2013 17:32:39 +0000 Subject: 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 --- plugins/NewsAggregator/Src/Utils.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'plugins/NewsAggregator') diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index f55d1ea9b0..8ec665374a 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -1059,19 +1059,18 @@ VOID CheckCurrentFeed(HANDLE hContact) else stamp = DateToUnixTime(datetime, 0); - HANDLE hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRST, (WPARAM)hContact, 0); + HANDLE hDbEvent = db_event_first(hContact); BOOL MesExist = FALSE; while (hDbEvent) { - DBEVENTINFO olddbei = {0}; - olddbei.cbSize = sizeof(olddbei); - olddbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0); + DBEVENTINFO olddbei = { sizeof(olddbei) }; + olddbei.cbBlob = db_event_getBlobSize(hDbEvent); olddbei.pBlob = (PBYTE)mir_alloc(olddbei.cbBlob); - CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&olddbei); + db_event_get(hDbEvent, &olddbei); char *pszTemp = mir_utf8encodeT(message); if (olddbei.cbBlob == lstrlenA(pszTemp) + 1 && !lstrcmpA((char*)olddbei.pBlob, pszTemp)) MesExist = TRUE; - hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDNEXT, (WPARAM)hDbEvent, 0); + hDbEvent = db_event_next(hDbEvent); mir_free(olddbei.pBlob); mir_free(pszTemp); } @@ -1352,19 +1351,18 @@ VOID CheckCurrentFeed(HANDLE hContact) else stamp = DateToUnixTime(datetime, 1); - HANDLE hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRST, (WPARAM)hContact, 0); + HANDLE hDbEvent = db_event_first(hContact); BOOL MesExist = FALSE; while (hDbEvent) { - DBEVENTINFO olddbei = {0}; - olddbei.cbSize = sizeof(olddbei); - olddbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0); + DBEVENTINFO olddbei = { sizeof(olddbei) }; + olddbei.cbBlob = db_event_getBlobSize(hDbEvent); olddbei.pBlob = (PBYTE)mir_alloc(olddbei.cbBlob); - CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&olddbei); + db_event_get(hDbEvent, &olddbei); char *pszTemp = mir_utf8encodeT(message); if (olddbei.cbBlob == lstrlenA(pszTemp) + 1 && !lstrcmpA((char*)olddbei.pBlob, pszTemp)) MesExist = TRUE; - hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDNEXT, (WPARAM)hDbEvent, 0); + hDbEvent = db_event_next(hDbEvent); mir_free(olddbei.pBlob); mir_free(pszTemp); } -- cgit v1.2.3