summaryrefslogtreecommitdiff
path: root/plugins/ImportTXT
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ImportTXT')
-rw-r--r--plugins/ImportTXT/BICQ5IP.inc2
-rw-r--r--plugins/ImportTXT/BRMSIP.inc2
-rw-r--r--plugins/ImportTXT/BbayanIP.inc2
-rw-r--r--plugins/ImportTXT/BmContactIP.inc2
-rw-r--r--plugins/ImportTXT/BqhfIP.inc4
-rw-r--r--plugins/ImportTXT/ImportThrd.pas17
6 files changed, 13 insertions, 16 deletions
diff --git a/plugins/ImportTXT/BICQ5IP.inc b/plugins/ImportTXT/BICQ5IP.inc
index f86762451b..bd9ea9aca6 100644
--- a/plugins/ImportTXT/BICQ5IP.inc
+++ b/plugins/ImportTXT/BICQ5IP.inc
@@ -88,7 +88,7 @@ begin
dbei.cbBlob := lstrlena(tempstr) + 1;
dbei.pBlob := PByte(tempstr);
if not IsDuplicateEvent(DContact.hContact, dbei) then
- if CallService(MS_DB_EVENT_ADD, wParam(DContact.hContact), lParam(@dbei)) <> 0 then
+ if db_event_add(wParam(DContact.hContact), @dbei) <> 0 then
Inc(AddedMessages)
else
begin
diff --git a/plugins/ImportTXT/BRMSIP.inc b/plugins/ImportTXT/BRMSIP.inc
index 8010a8973c..8e776bf121 100644
--- a/plugins/ImportTXT/BRMSIP.inc
+++ b/plugins/ImportTXT/BRMSIP.inc
@@ -52,7 +52,7 @@ begin
try
if not IsDuplicateEvent(DContact.hContact, dbei) then
- if CallService(MS_DB_EVENT_ADD, wParam(DContact.hContact), lParam(@dbei))<>0 then
+ if db_event_add(DContact.hContact, @dbei) <> 0 then
inc(AddedMessages)
else
begin
diff --git a/plugins/ImportTXT/BbayanIP.inc b/plugins/ImportTXT/BbayanIP.inc
index 00d6de054a..c8c22eaf97 100644
--- a/plugins/ImportTXT/BbayanIP.inc
+++ b/plugins/ImportTXT/BbayanIP.inc
@@ -50,7 +50,7 @@ begin
dbei.pBlob := PByte(WideToUTF8(PWideChar(s), PAnsiChar(pBlob)));
end;
if not IsDuplicateEvent(DContact.hContact, dbei) then
- if CallService(MS_DB_EVENT_ADD, wParam(DContact.hContact), lParam(@dbei)) <> 0 then
+ if db_event_add(wParam(DContact.hContact), @dbei) <> 0 then
inc(AddedMessages)
else
begin
diff --git a/plugins/ImportTXT/BmContactIP.inc b/plugins/ImportTXT/BmContactIP.inc
index a582d26d35..21823b9347 100644
--- a/plugins/ImportTXT/BmContactIP.inc
+++ b/plugins/ImportTXT/BmContactIP.inc
@@ -30,7 +30,7 @@ begin
dbei.pBlob := PBYTE(pt + i + dbei.cbSize);
if not IsDuplicateEvent(DContact.hContact, dbei) then
- if CallService(MS_DB_EVENT_ADD, wParam(DContact.hContact), lParam(@dbei)) <> 0 then
+ if db_event_add(DContact.hContact, @dbei) <> 0 then
inc(AddedMessages)
else
begin
diff --git a/plugins/ImportTXT/BqhfIP.inc b/plugins/ImportTXT/BqhfIP.inc
index 26f8737b7f..0648880175 100644
--- a/plugins/ImportTXT/BqhfIP.inc
+++ b/plugins/ImportTXT/BqhfIP.inc
@@ -71,7 +71,7 @@ begin
inc(pt, $2E + UIDLen + 2 + NickLen);
if fsz <> FileLen - ($2E + UIDLen + 2 + NickLen) then
fsz := FileLen - ($2E + UIDLen + 2 + NickLen);
-
+
if (DContact.hContact = 0) or (DContact.hContact = INVALID_HANDLE_VALUE)
then
begin
@@ -111,7 +111,7 @@ begin
Move(DecodeQHFMsg(qhfver, pt + i + szMsgHd, dbei.cbBlob - 1)[1],
dbei.pBlob^, dbei.cbBlob - 1);
if not IsDuplicateEvent(DContact.hContact, dbei) then
- if CallService(MS_DB_EVENT_ADD, wParam(DContact.hContact), lParam(@dbei))<>0 then
+ if db_event_add(DContact.hContact, @dbei) <> 0 then
inc(AddedMessages)
else
begin
diff --git a/plugins/ImportTXT/ImportThrd.pas b/plugins/ImportTXT/ImportThrd.pas
index 2742ccd63e..b344b48e72 100644
--- a/plugins/ImportTXT/ImportThrd.pas
+++ b/plugins/ImportTXT/ImportThrd.pas
@@ -87,7 +87,7 @@ begin
result := FALSE;
if not CheckForDuplicates then
exit;
- hExistingDbEvent := CallService(MS_DB_EVENT_FINDFIRST, hContact, 0);
+ hExistingDbEvent := db_event_first(hContact);
if hExistingDbEvent = 0 then
begin
result := FALSE;
@@ -97,11 +97,10 @@ begin
FillChar(dbeiExisting, SizeOf(dbeiExisting), Byte(0));
dbeiExisting.cbSize := SizeOf(dbeiExisting);
dbeiExisting.cbBlob := 0;
- CallService(MS_DB_EVENT_GET, wParam(hExistingDbEvent), lParam(@dbeiExisting));
+ db_event_get(hExistingDbEvent, @dbeiExisting);
dwFirstEventTimeStamp := dbeiExisting.timestamp;
- hExistingDbEvent := CallService(MS_DB_EVENT_FINDLAST, wParam(hContact),
- lParam(0));
+ hExistingDbEvent := db_event_last(hContact);
if hExistingDbEvent = 0 then
begin
result := FALSE;
@@ -111,7 +110,7 @@ begin
FillChar(dbeiExisting, SizeOf(dbeiExisting), Byte(0));
dbeiExisting.cbSize := SizeOf(dbeiExisting);
dbeiExisting.cbBlob := 0;
- CallService(MS_DB_EVENT_GET, wParam(hExistingDbEvent), lParam(@dbeiExisting));
+ db_event_get(hExistingDbEvent, @dbeiExisting);
dwLastEventTimeStamp := dbeiExisting.timestamp;
// If before the first
@@ -137,8 +136,7 @@ begin
FillChar(dbeiExisting, SizeOf(dbeiExisting), Byte(0));
dbeiExisting.cbSize := SizeOf(dbeiExisting);
dbeiExisting.cbBlob := 0;
- CallService(MS_DB_EVENT_GET, wParam(hExistingDbEvent),
- lParam(@dbeiExisting));
+ db_event_get(hExistingDbEvent, @dbeiExisting);
// compare event
if (dbei.timestamp = dbeiExisting.timestamp) and
((dbei.flags) = (dbeiExisting.flags and not DBEF_FIRST)) and
@@ -156,8 +154,7 @@ begin
exit;
end;
// get the previous
- hExistingDbEvent := CallService(MS_DB_EVENT_FINDPREV,
- wParam(hExistingDbEvent), 0);
+ hExistingDbEvent := db_event_prev(hExistingDbEvent);
end;
end;
end;
@@ -222,7 +219,7 @@ begin
try
Move(Text[1], dbei.pBlob^, dbei.cbBlob);
if not IsDuplicateEvent(hContact, dbei) then
- if CallService(MS_DB_EVENT_ADD, wParam(hContact), lParam(@dbei)) <> 0 then
+ if db_event_add(hContact, @dbei) <> 0 then
inc(AddMsg)
else
begin