summaryrefslogtreecommitdiff
path: root/src/core/stdfile
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 /src/core/stdfile
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 'src/core/stdfile')
-rw-r--r--src/core/stdfile/file.cpp25
-rw-r--r--src/core/stdfile/filerecvdlg.cpp9
-rw-r--r--src/core/stdfile/filexferdlg.cpp2
3 files changed, 15 insertions, 21 deletions
diff --git a/src/core/stdfile/file.cpp b/src/core/stdfile/file.cpp
index a29b71bc33..048125abac 100644
--- a/src/core/stdfile/file.cpp
+++ b/src/core/stdfile/file.cpp
@@ -140,12 +140,11 @@ static int FileEventAdded(WPARAM wParam, LPARAM lParam)
{
DWORD dwSignature;
- DBEVENTINFO dbei = {0};
- dbei.cbSize = sizeof(dbei);
+ DBEVENTINFO dbei = { sizeof(dbei) };
dbei.cbBlob = sizeof(DWORD);
dbei.pBlob = (PBYTE)&dwSignature;
- CallService(MS_DB_EVENT_GET, lParam, (LPARAM)&dbei);
- if (dbei.flags&(DBEF_SENT|DBEF_READ) || dbei.eventType != EVENTTYPE_FILE || dwSignature == 0)
+ db_event_get((HANDLE)lParam, &dbei);
+ if (dbei.flags & (DBEF_SENT|DBEF_READ) || dbei.eventType != EVENTTYPE_FILE || dwSignature == 0)
return 0;
PushFileEvent((HANDLE)wParam, (HANDLE)lParam, 0);
@@ -288,19 +287,15 @@ void UpdateProtoFileTransferStatus(PROTOFILETRANSFERSTATUS *dest, PROTOFILETRANS
static void RemoveUnreadFileEvents(void)
{
- DBEVENTINFO dbei = {0};
- HANDLE hDbEvent, hContact;
-
- dbei.cbSize = sizeof(dbei);
- hContact = db_find_first();
+ HANDLE hContact = db_find_first();
while (hContact) {
- hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRSTUNREAD, (WPARAM)hContact, 0);
+ HANDLE hDbEvent = db_event_firstUnread(hContact);
while (hDbEvent) {
- dbei.cbBlob = 0;
- CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei);
+ DBEVENTINFO dbei = { sizeof(dbei) };
+ db_event_get(hDbEvent, &dbei);
if ( !(dbei.flags&(DBEF_SENT|DBEF_READ)) && dbei.eventType == EVENTTYPE_FILE)
- CallService(MS_DB_EVENT_MARKREAD, (WPARAM)hContact, (LPARAM)hDbEvent);
- hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDNEXT, (WPARAM)hDbEvent, 0);
+ db_event_markRead(hContact, hDbEvent);
+ hDbEvent = db_event_next(hDbEvent);
}
hContact = db_find_next(hContact);
}
@@ -413,7 +408,7 @@ static INT_PTR Proto_RecvFileT(WPARAM, LPARAM lParam)
}
mir_free(szDescr);
- HANDLE hdbe = (HANDLE)CallService(MS_DB_EVENT_ADD, (WPARAM)ccs->hContact, (LPARAM)&dbei);
+ HANDLE hdbe = db_event_add(ccs->hContact, &dbei);
PushFileEvent(ccs->hContact, hdbe, pre->lParam);
mir_free(dbei.pBlob);
diff --git a/src/core/stdfile/filerecvdlg.cpp b/src/core/stdfile/filerecvdlg.cpp
index ac082ac140..f9e2c3ddce 100644
--- a/src/core/stdfile/filerecvdlg.cpp
+++ b/src/core/stdfile/filerecvdlg.cpp
@@ -247,14 +247,13 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
DBFreeVariant(&dbv);
}
- CallService(MS_DB_EVENT_MARKREAD, (WPARAM)dat->hContact, (LPARAM)dat->hDbEvent);
+ db_event_markRead(dat->hContact, dat->hDbEvent);
- DBEVENTINFO dbei = {0};
- dbei.cbSize = sizeof(dbei);
- dbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)dat->hDbEvent, 0);
+ DBEVENTINFO dbei = { sizeof(dbei) };
+ dbei.cbBlob = db_event_getBlobSize(dat->hDbEvent);
if (dbei.cbBlob > 4 && dbei.cbBlob <= 8196) {
dbei.pBlob = (PBYTE)alloca(dbei.cbBlob + 1);
- CallService(MS_DB_EVENT_GET, (WPARAM)dat->hDbEvent, (LPARAM)&dbei);
+ db_event_get(dat->hDbEvent, &dbei);
dbei.pBlob[dbei.cbBlob] = 0;
dat->fs = cle->lParam ? (HANDLE)cle->lParam : (HANDLE)*(PDWORD)dbei.pBlob;
diff --git a/src/core/stdfile/filexferdlg.cpp b/src/core/stdfile/filexferdlg.cpp
index bcb51e6a62..93354d07d4 100644
--- a/src/core/stdfile/filexferdlg.cpp
+++ b/src/core/stdfile/filexferdlg.cpp
@@ -654,7 +654,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
DBEVENTINFO dbei = {0};
FillSendData(dat, dbei);
- CallService(MS_DB_EVENT_ADD, (WPARAM)dat->hContact, (LPARAM)&dbei);
+ db_event_add(dat->hContact, &dbei);
if (dbei.pBlob)
mir_free(dbei.pBlob);
dat->files = NULL; //protocol library frees this