summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-30 17:32:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-30 17:32:39 +0000
commit109877a3c75cb290c55755dcfc88794d2453669d (patch)
tree3ede8b9170b2fc3f6f35dc2cea6742d44b19d631 /plugins/NewsAggregator/Src
parentfee8d991bdf4a59b563d1b92165ea0ed2f7bacb8 (diff)
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
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);
}