From 2bbb9971bf1711850504d93828f571e27147abc7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 30 Mar 2013 20:10:26 +0000 Subject: MS_DB_EVENT_* services' calls removed from pascal sources git-svn-id: http://svn.miranda-ng.org/main/trunk@4262 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ImportTXT/BICQ5IP.inc | 2 +- plugins/ImportTXT/BRMSIP.inc | 2 +- plugins/ImportTXT/BbayanIP.inc | 2 +- plugins/ImportTXT/BmContactIP.inc | 2 +- plugins/ImportTXT/BqhfIP.inc | 4 ++-- plugins/ImportTXT/ImportThrd.pas | 17 +++++++---------- 6 files changed, 13 insertions(+), 16 deletions(-) (limited to 'plugins/ImportTXT') 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 -- cgit v1.2.3