summaryrefslogtreecommitdiff
path: root/plugins/Boltun/src
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/Boltun/src
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/Boltun/src')
-rw-r--r--plugins/Boltun/src/actionQueue.cpp2
-rw-r--r--plugins/Boltun/src/boltun.cpp9
2 files changed, 5 insertions, 6 deletions
diff --git a/plugins/Boltun/src/actionQueue.cpp b/plugins/Boltun/src/actionQueue.cpp
index c8e8e02aa4..e652ce8061 100644
--- a/plugins/Boltun/src/actionQueue.cpp
+++ b/plugins/Boltun/src/actionQueue.cpp
@@ -125,7 +125,7 @@ static void TimerAnswer(HANDLE hContact, const TalkBot::MessageInfo* info)
ldbei.szModule = BOLTUN_NAME;
ldbei.timestamp = (DWORD)time(NULL);
- CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)&ldbei);
+ db_event_add(hContact, &ldbei);
bot->AnswerGiven(hContact, *info);
delete info;
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp
index 99eb76ef2b..fdf9fbf78c 100644
--- a/plugins/Boltun/src/boltun.cpp
+++ b/plugins/Boltun/src/boltun.cpp
@@ -220,8 +220,7 @@ static bool BoltunAutoChat(HANDLE hContact)
static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
{
- //DBEVENTINFO ldbei;
- HANDLE hContact = (HANDLE)wParam;
+ HANDLE hContact = (HANDLE)wParam, hDbEvent = (HANDLE)lParam;
if (!BoltunAutoChat(hContact))
return 0;
@@ -230,7 +229,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
dbei.cbSize = sizeof(dbei);
dbei.cbBlob = 0;
- dbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, lParam, 0);
+ dbei.cbBlob = db_event_getBlobSize(hDbEvent);
if (dbei.cbBlob == -1)
return 0;
@@ -238,7 +237,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
if (dbei.pBlob == NULL)
return 0;
- CallService(MS_DB_EVENT_GET, lParam, (LPARAM)&dbei);
+ db_event_get(hDbEvent, &dbei);
if (dbei.flags & DBEF_SENT || dbei.flags & DBEF_READ || dbei.eventType != EVENTTYPE_MESSAGE)
return 0;
DBEVENTGETTEXT egt;
@@ -248,7 +247,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
TCHAR* s = (TCHAR*)(void*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&egt);
free(dbei.pBlob);
if (Config.MarkAsRead)
- CallService(MS_DB_EVENT_MARKREAD, wParam, lParam);
+ db_event_markRead(hContact, hDbEvent);
AnswerToContact(hContact, s);
mir_free(s);