summaryrefslogtreecommitdiff
path: root/plugins/MetaContacts
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/MetaContacts
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/MetaContacts')
-rwxr-xr-xplugins/MetaContacts/src/meta_services.cpp11
-rw-r--r--plugins/MetaContacts/src/meta_utils.cpp11
2 files changed, 8 insertions, 14 deletions
diff --git a/plugins/MetaContacts/src/meta_services.cpp b/plugins/MetaContacts/src/meta_services.cpp
index a86b255730..20b76c484d 100755
--- a/plugins/MetaContacts/src/meta_services.cpp
+++ b/plugins/MetaContacts/src/meta_services.cpp
@@ -253,8 +253,7 @@ INT_PTR MetaFilter_SendMessage(WPARAM wParam,LPARAM lParam)
if ( ccs->wParam & PREF_UNICODE )
dbei.cbBlob *= ( sizeof( wchar_t )+1 );
dbei.pBlob = (PBYTE)ccs->lParam;
-
- CallService(MS_DB_EVENT_ADD, (WPARAM)hMeta, (LPARAM)&dbei);
+ db_event_add(hMeta, &dbei);
}
return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
@@ -348,8 +347,7 @@ INT_PTR Meta_SendMessage(WPARAM wParam,LPARAM lParam)
if ( ccs->wParam & PREF_UNICODE )
dbei.cbBlob *= ( sizeof( wchar_t )+1 );
dbei.pBlob = (PBYTE)ccs->lParam;
-
- CallService(MS_DB_EVENT_ADD, (WPARAM) ccs->hContact, (LPARAM)&dbei);
+ db_event_add(ccs->hContact, &dbei);
}
}
@@ -449,8 +447,7 @@ INT_PTR MetaFilter_RecvMessage(WPARAM wParam,LPARAM lParam)
dbei.cbBlob *= ( sizeof( wchar_t )+1 );
}
dbei.pBlob = (PBYTE) pre->szMessage;
-
- CallService(MS_DB_EVENT_ADD, (WPARAM) hMeta, (LPARAM)&dbei);
+ db_event_add(hMeta, &dbei);
}
}
@@ -510,7 +507,7 @@ INT_PTR Meta_RecvMessage(WPARAM wParam, LPARAM lParam)
if ( pre->flags & PREF_UNICODE )
dbei.cbBlob *= ( sizeof( wchar_t )+1 );
dbei.pBlob = (PBYTE) pre->szMessage;
- CallService(MS_DB_EVENT_ADD, (WPARAM) ccs->hContact, (LPARAM)&dbei);
+ db_event_add(ccs->hContact, &dbei);
return 0;
}
diff --git a/plugins/MetaContacts/src/meta_utils.cpp b/plugins/MetaContacts/src/meta_utils.cpp
index ca2fc7abf3..6e722ea08d 100644
--- a/plugins/MetaContacts/src/meta_utils.cpp
+++ b/plugins/MetaContacts/src/meta_utils.cpp
@@ -1462,21 +1462,18 @@ void copyHistory(HANDLE hContactFrom,HANDLE hContactTo)
prog = GetDlgItem(progress_dialog, IDC_PROG);
//CallService(MS_DB_SETSAFETYMODE, (WPARAM)FALSE, 0);
- for (hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRST,(WPARAM)hContactFrom, 0);
- hDbEvent;
- hDbEvent=(HANDLE)CallService(MS_DB_EVENT_FINDNEXT,(WPARAM)hDbEvent,0))
+ for (hDbEvent = db_event_first(hContactFrom); hDbEvent; hDbEvent = db_event_next(hDbEvent))
{
// get the event
ZeroMemory(&dbei, sizeof(dbei));
dbei.cbSize = sizeof(dbei);
- if ((dbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0)) == -1)
+ if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == -1)
break;
buffer = (BYTE *)mir_realloc(buffer, dbei.cbBlob);// + id_length);
dbei.pBlob = buffer;
-
- if (CallService(MS_DB_EVENT_GET,(WPARAM)hDbEvent,(LPARAM)&dbei))
+ if ( db_event_get(hDbEvent, &dbei))
break;
// i.e. optoins.days_history == 0;
@@ -1495,7 +1492,7 @@ void copyHistory(HANDLE hContactFrom,HANDLE hContactTo)
dbei.szModule = META_PROTO;
dbei.flags &= ~DBEF_FIRST;
- CallService(MS_DB_EVENT_ADD, (WPARAM)hContactTo, (LPARAM)&dbei);
+ db_event_add(hContactTo, &dbei);
}
DestroyWindow(progress_dialog);