summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewsAggregator/Src')
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp22
1 files changed, 10 insertions, 12 deletions
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);
}