summaryrefslogtreecommitdiff
path: root/plugins/AvatarHistory
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AvatarHistory')
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp10
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp2
2 files changed, 5 insertions, 7 deletions
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);
}
}