diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-30 17:32:39 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-30 17:32:39 +0000 |
commit | 109877a3c75cb290c55755dcfc88794d2453669d (patch) | |
tree | 3ede8b9170b2fc3f6f35dc2cea6742d44b19d631 /plugins/AvatarHistory | |
parent | fee8d991bdf4a59b563d1b92165ea0ed2f7bacb8 (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/AvatarHistory')
-rw-r--r-- | plugins/AvatarHistory/src/AvatarDlg.cpp | 10 | ||||
-rw-r--r-- | plugins/AvatarHistory/src/AvatarHistory.cpp | 2 |
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);
}
}
|