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/FavContacts/src/contact_cache.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'plugins/FavContacts') diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp index e535738ffb..1167d98f0d 100644 --- a/plugins/FavContacts/src/contact_cache.cpp +++ b/plugins/FavContacts/src/contact_cache.cpp @@ -7,7 +7,7 @@ int __cdecl CContactCache::OnDbEventAdded(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = {0}; dbei.cbSize = sizeof(dbei); - CallService(MS_DB_EVENT_GET, (WPARAM)hEvent, (LPARAM)&dbei); + db_event_get(hEvent, &dbei); if (dbei.eventType != EVENTTYPE_MESSAGE) return 0; float weight = GetEventWeight(time(NULL) - dbei.timestamp); @@ -88,23 +88,19 @@ void CContactCache::Rebuild() info->hContact = hContact; info->rate = 0; - HANDLE hEvent = (HANDLE)CallService(MS_DB_EVENT_FINDLAST, (WPARAM)hContact, 0); + HANDLE hEvent = db_event_last(hContact); while (hEvent) { - DBEVENTINFO dbei = {0}; - dbei.cbSize = sizeof(dbei); - if (!CallService(MS_DB_EVENT_GET, (WPARAM)hEvent, (LPARAM)&dbei)) - { + DBEVENTINFO dbei = { sizeof(dbei) }; + if (!db_event_get(hEvent, &dbei)) { if (float weight = GetEventWeight(timestamp - dbei.timestamp)) { if (dbei.eventType == EVENTTYPE_MESSAGE) info->rate += weight; - } else - { - break; } + else break; } - hEvent = (HANDLE)CallService(MS_DB_EVENT_FINDPREV, (WPARAM)hEvent, 0); + hEvent = db_event_prev(hEvent); } m_cache.insert(info); -- cgit v1.2.3