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/AvatarHistory/src/AvatarDlg.cpp | 10 ++++------ plugins/AvatarHistory/src/AvatarHistory.cpp | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'plugins/AvatarHistory') diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index d71bbc1880..3adf17107c 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -244,7 +244,7 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l HANDLE hContact = (HANDLE) GetWindowLongPtr(hwnd, GWLP_USERDATA); if (le->hDbEvent) - CallService(MS_DB_EVENT_DELETE, (WPARAM)hContact, (LPARAM)le->hDbEvent); + db_event_delete(hContact, le->hDbEvent); else DeleteFile(le->filelink); @@ -283,7 +283,7 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l DeleteFile(le->filename); if (le->hDbEvent) - CallService(MS_DB_EVENT_DELETE, (WPARAM)hContact, (LPARAM)le->hDbEvent); + db_event_delete(hContact, le->hDbEvent); else DeleteFile(le->filelink); @@ -407,13 +407,11 @@ int FillAvatarListFromDB(HWND list, HANDLE hContact) { int max_pos = 0; BYTE blob[2048]; - for (HANDLE hDbEvent = (HANDLE) CallService(MS_DB_EVENT_FINDFIRST, (WPARAM)hContact, 0); - hDbEvent != NULL; - hDbEvent = (HANDLE) CallService(MS_DB_EVENT_FINDNEXT, (WPARAM)hDbEvent, 0)) { + for (HANDLE hDbEvent = db_event_first(hContact); hDbEvent; hDbEvent = db_event_next(hDbEvent)) { DBEVENTINFO dbei = { sizeof(dbei) }; dbei.cbBlob = sizeof(blob); dbei.pBlob = blob; - if ( CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei) != 0) continue; + if (db_event_get(hDbEvent, &dbei) != 0) continue; if (dbei.eventType != EVENTTYPE_AVATAR_CHANGE) continue; // Get time diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index 4087b1fec5..2c4e8e1ee2 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -227,7 +227,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) dbei.eventType = EVENTTYPE_AVATAR_CHANGE; dbei.cbBlob = (DWORD) strlen(blob) + 1; dbei.pBlob = (PBYTE)(char*)blob; - CallService(MS_DB_EVENT_ADD,(WPARAM)hContact,(LPARAM)&dbei); + db_event_add(hContact, &dbei); } } -- cgit v1.2.3