diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-30 20:10:26 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-30 20:10:26 +0000 |
commit | 2bbb9971bf1711850504d93828f571e27147abc7 (patch) | |
tree | 58d7b09d4a5f89f3990fff0ddd98c562e37b122c /plugins/HistoryPlusPlus | |
parent | 53bb473ba5f24175ac124098dac69df6ca3570a3 (diff) |
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
Diffstat (limited to 'plugins/HistoryPlusPlus')
-rw-r--r-- | plugins/HistoryPlusPlus/EmptyHistoryForm.pas | 6 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/GlobalSearch.pas | 2 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/HistoryForm.pas | 26 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/historypp.dpr | 2 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/historypp.dproj | 244 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_bookmarks.pas | 14 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_events.pas | 8 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_external.pas | 2 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_externalgrid.pas | 7 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_searchthread.pas | 8 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_services.pas | 4 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_sessionsthread.pas | 6 |
12 files changed, 286 insertions, 43 deletions
diff --git a/plugins/HistoryPlusPlus/EmptyHistoryForm.pas b/plugins/HistoryPlusPlus/EmptyHistoryForm.pas index 699e88df51..e6235fd9f9 100644 --- a/plugins/HistoryPlusPlus/EmptyHistoryForm.pas +++ b/plugins/HistoryPlusPlus/EmptyHistoryForm.pas @@ -290,12 +290,12 @@ var hDBEvent,prevhDbEvent: THandle;
begin
BookmarkServer.Contacts[hContact].Clear;
- hDBEvent := CallService(MS_DB_EVENT_FINDLAST,hContact,0);
+ hDBEvent := db_event_last(hContact);
SetSafetyMode(False);
while hDBEvent <> 0 do
begin
- prevhDbEvent := CallService(MS_DB_EVENT_FINDPREV,hDBEvent,0);
- if CallService(MS_DB_EVENT_DELETE,hContact,hDBEvent) = 0 then
+ prevhDbEvent := db_event_prev(hDBEvent);
+ if db_event_delete(hContact,hDBEvent) = 0 then
hDBEvent := prevhDbEvent
else
hDBEvent := 0;
diff --git a/plugins/HistoryPlusPlus/GlobalSearch.pas b/plugins/HistoryPlusPlus/GlobalSearch.pas index da86686671..2c0c6bc7b1 100644 --- a/plugins/HistoryPlusPlus/GlobalSearch.pas +++ b/plugins/HistoryPlusPlus/GlobalSearch.pas @@ -1190,7 +1190,7 @@ var begin
si := GetSearchItem(Index);
if (FormState = gsDelete) and (si.hDBEvent <> 0) then
- CallService(MS_DB_EVENT_DELETE, si.Contact.Handle, si.hDBEvent);
+ db_event_delete(si.Contact.Handle, si.hDBEvent);
if FFiltered then
Index := FilterHistory[Index];
DeleteEventFromLists(Index);
diff --git a/plugins/HistoryPlusPlus/HistoryForm.pas b/plugins/HistoryPlusPlus/HistoryForm.pas index e657c09fd7..0cdca49b7a 100644 --- a/plugins/HistoryPlusPlus/HistoryForm.pas +++ b/plugins/HistoryPlusPlus/HistoryForm.pas @@ -471,7 +471,7 @@ implementation uses
EventDetailForm, PassForm, hpp_options, hpp_services, hpp_eventfilters,
- hpp_database, hpp_contacts, hpp_itemprocess, hpp_events, hpp_forms, hpp_richedit,
+ hpp_database, hpp_contacts, hpp_itemprocess, hpp_events, hpp_forms, hpp_richedit,
hpp_messages, hpp_bookmarks, Checksum, CustomizeFiltersForm, CustomizeToolbar;
{$R *.DFM}
@@ -594,7 +594,7 @@ procedure THistoryFrm.LoadHistory(Sender: TObject); LineIdx: Integer;
ToRead: Integer;
begin
- HistoryLength := CallService(MS_DB_EVENT_GETCOUNT, hContact, 0);
+ HistoryLength := db_event_count(hContact);
if HistoryLength = -1 then
begin
// contact is missing
@@ -604,14 +604,14 @@ procedure THistoryFrm.LoadHistory(Sender: TObject); SetLength(History, HistoryLength);
if HistoryLength = 0 then
Exit;
- hDBEvent := CallService(MS_DB_EVENT_FINDLAST, hContact, 0);
+ hDBEvent := db_event_last(hContact);
History[HistoryLength - 1] := NotZero(hDBEvent);
{ if NeedhDBEvent = 0 then toRead := Max(0,HistoryLength-hppLoadBlock-1)
else toRead := 0; }
ToRead := Max(0, HistoryLength - hppFirstLoadBlock - 1);
LineIdx := HistoryLength - 2;
repeat
- hDBEvent := CallService(MS_DB_EVENT_FINDPREV, hDBEvent, 0);
+ hDBEvent := db_event_prev(hDBEvent);
History[LineIdx] := NotZero(hDBEvent);
{ if NeedhDBEvent = hDbEvent then begin
Result := HistoryLength-LineIdx-1;
@@ -1513,7 +1513,7 @@ begin if fromRowIdx > HistoryLength - 1 then
begin
fromRowIdx := HistoryLength - 1;
- hDBEvent := CallService(MS_DB_EVENT_FINDLAST, hContact, 0);
+ hDBEvent := db_event_last(hContact);
History[fromRowIdx] := hDBEvent;
end
else
@@ -1522,7 +1522,7 @@ begin begin
if History[ridx] <> 0 then
break;
- hDBEvent := CallService(MS_DB_EVENT_FINDPREV, hDBEvent, 0);
+ hDBEvent := db_event_prev(hDBEvent);
History[ridx] := NotZero(hDBEvent);
end;
end
@@ -1531,7 +1531,7 @@ begin if tillRowIdx < 0 then
begin
tillRowIdx := 0;
- hDBEvent := CallService(MS_DB_EVENT_FINDFIRST, hContact, 0);
+ hDBEvent := db_event_first(hContact);
History[tillRowIdx] := hDBEvent;
end
else
@@ -1540,7 +1540,7 @@ begin begin
if History[ridx] <> 0 then
break;
- hDBEvent := CallService(MS_DB_EVENT_FINDNEXT, hDBEvent, 0);
+ hDBEvent := db_event_next(hDBEvent);
History[ridx] := NotZero(hDBEvent);
end;
end;
@@ -1860,15 +1860,15 @@ begin begin // routine is called from DeleteAll
if FormState = gsDelete then
begin // probably unnecessary considering prev check
- hDBEvent := CallService(MS_DB_EVENT_FINDFIRST, hContact, 0);
- CallService(MS_DB_EVENT_DELETE, hContact, hDBEvent);
+ hDBEvent := db_event_first(hContact);
+ db_event_delete(hContact, hDBEvent);
end;
end
else
begin
idx := GridIndexToHistory(Index);
if (FormState = gsDelete) and (History[idx] <> 0) then
- CallService(MS_DB_EVENT_DELETE, hContact, History[idx]);
+ db_event_delete(hContact, History[idx]);
DeleteEventFromSessions(idx);
DeleteHistoryItem(idx);
end;
@@ -2085,7 +2085,7 @@ begin begin
if Sessions[idx].hDBEventLast = hDBEvent then
begin
- hDBEvent := CallService(MS_DB_EVENT_FINDPREV, hDBEvent, 0);
+ hDBEvent := db_event_prev(hDBEvent);
if hDBEvent <> 0 then
begin
Sessions[idx].hDBEventLast := hDBEvent;
@@ -2144,7 +2144,7 @@ begin Sessions[idx].TimestampLast := 0;
Exit;
end;
- hDBEvent := CallService(MS_DB_EVENT_FINDNEXT, hDBEvent, 0);
+ hDBEvent := db_event_next(hDBEvent);
if hDBEvent <> 0 then
begin
Sessions[idx].hDBEventFirst := hDBEvent;
diff --git a/plugins/HistoryPlusPlus/historypp.dpr b/plugins/HistoryPlusPlus/historypp.dpr index 45573f1314..2430605be8 100644 --- a/plugins/HistoryPlusPlus/historypp.dpr +++ b/plugins/HistoryPlusPlus/historypp.dpr @@ -496,7 +496,7 @@ var res: Integer;
begin
Result := 0;
- count := CallService(MS_DB_EVENT_GETCOUNT, awParam, 0);
+ count := db_event_count(THandle(awParam));
if (PrevShowHistoryCount xor ShowHistoryCount) or (count <> MenuCount) then
begin
ZeroMemory(@menuitem, SizeOf(menuItem));
diff --git a/plugins/HistoryPlusPlus/historypp.dproj b/plugins/HistoryPlusPlus/historypp.dproj new file mode 100644 index 0000000000..b11475abd0 --- /dev/null +++ b/plugins/HistoryPlusPlus/historypp.dproj @@ -0,0 +1,244 @@ + <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{96A80EED-B5F9-4F77-A788-278EBF602BE9}</ProjectGuid>
+ <MainSource>historypp.dpr</MainSource>
+ <Base>True</Base>
+ <Config Condition="'$(Config)'==''">Release</Config>
+ <TargetedPlatforms>3</TargetedPlatforms>
+ <AppType>Library</AppType>
+ <FrameworkType>VCL</FrameworkType>
+ <ProjectVersion>13.4</ProjectVersion>
+ <Platform Condition="'$(Platform)'==''">Win64</Platform>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
+ <Base_Win64>true</Base_Win64>
+ <CfgParent>Base</CfgParent>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
+ <Base_Win32>true</Base_Win32>
+ <CfgParent>Base</CfgParent>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
+ <Cfg_1>true</Cfg_1>
+ <CfgParent>Base</CfgParent>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
+ <Cfg_1_Win64>true</Cfg_1_Win64>
+ <CfgParent>Cfg_1</CfgParent>
+ <Cfg_1>true</Cfg_1>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
+ <Cfg_1_Win32>true</Cfg_1_Win32>
+ <CfgParent>Cfg_1</CfgParent>
+ <Cfg_1>true</Cfg_1>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
+ <Cfg_2>true</Cfg_2>
+ <CfgParent>Base</CfgParent>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
+ <Cfg_2_Win64>true</Cfg_2_Win64>
+ <CfgParent>Cfg_2</CfgParent>
+ <Cfg_2>true</Cfg_2>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Base)'!=''">
+ <VerInfo_Locale>1049</VerInfo_Locale>
+ <DCC_E>false</DCC_E>
+ <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+ <DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;$(DCC_Namespace)</DCC_Namespace>
+ <DCC_ImageBase>00400000</DCC_ImageBase>
+ <DCC_S>false</DCC_S>
+ <GenDll>true</GenDll>
+ <DCC_N>false</DCC_N>
+ <DCC_F>false</DCC_F>
+ <DCC_K>false</DCC_K>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Base_Win64)'!=''">
+ <DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+ <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+ <VerInfo_Locale>1033</VerInfo_Locale>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Base_Win32)'!=''">
+ <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+ <DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
+ <VerInfo_Locale>1033</VerInfo_Locale>
+ <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_1)'!=''">
+ <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
+ <DCC_DebugInformation>false</DCC_DebugInformation>
+ <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
+ <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
+ <BRCC_OutputDir>..\..\bin10\temp\res\</BRCC_OutputDir>
+ <DCC_UnitSearchPath>..\..\include\delphi;..\..\plugins\ExternalAPI\delphi;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
+ <DCC_ExeOutput>..\..\bin10\Release64\Plugins\</DCC_ExeOutput>
+ <DCC_BplOutput>..\..\bin10\Release64\Plugins\</DCC_BplOutput>
+ <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+ <DCC_DcuOutput>..\..\bin10\Release64\Obj\hpp\</DCC_DcuOutput>
+ <DCC_DcpOutput>..\..\bin10\Release64\Obj\hpp\</DCC_DcpOutput>
+ <Manifest_File>None</Manifest_File>
+ <VerInfo_Locale>1033</VerInfo_Locale>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
+ <DCC_UnitSearchPath>..\..\include\delphi;..\..\plugins\ExternalAPI\delphi;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
+ <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+ <DCC_BplOutput>..\..\bin10\Release\Plugins\</DCC_BplOutput>
+ <BRCC_OutputDir>..\..\bin10\temp\res\</BRCC_OutputDir>
+ <DCC_ExeOutput>..\..\bin10\Release\Plugins\</DCC_ExeOutput>
+ <VerInfo_Locale>1033</VerInfo_Locale>
+ <DCC_DcpOutput>..\..\bin10\Release\Obj\hpp\</DCC_DcpOutput>
+ <Manifest_File>None</Manifest_File>
+ <DCC_DcuOutput>..\..\bin10\Release\Obj\hpp\</DCC_DcuOutput>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_2)'!=''">
+ <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+ <DCC_Optimize>false</DCC_Optimize>
+ <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
+ <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+ <Manifest_File>None</Manifest_File>
+ <VerInfo_Locale>1033</VerInfo_Locale>
+ </PropertyGroup>
+ <ItemGroup>
+ <DelphiCompile Include="$(MainSource)">
+ <MainSource>MainSource</MainSource>
+ </DelphiCompile>
+ <RcCompile Include="hpp_resource.rc">
+ <Form>hpp_resource.res</Form>
+ </RcCompile>
+ <RcCompile Include="hpp_res_ver.rc">
+ <Form>hpp_res_ver.res</Form>
+ </RcCompile>
+ <RcCompile Include="hpp_opt_dialog.rc">
+ <Form>hpp_opt_dialog.res</Form>
+ </RcCompile>
+ <DCCReference Include="hpp_global.pas"/>
+ <DCCReference Include="hpp_contacts.pas"/>
+ <DCCReference Include="hpp_database.pas"/>
+ <DCCReference Include="hpp_events.pas"/>
+ <DCCReference Include="hpp_services.pas"/>
+ <DCCReference Include="hpp_itemprocess.pas"/>
+ <DCCReference Include="hpp_options.pas"/>
+ <DCCReference Include="hpp_messages.pas"/>
+ <DCCReference Include="HistoryGrid.pas"/>
+ <DCCReference Include="VertSB.pas"/>
+ <DCCReference Include="HistoryForm.pas">
+ <Form>HistoryFrm</Form>
+ </DCCReference>
+ <DCCReference Include="EventDetailForm.pas">
+ <Form>EventDetailsFrm</Form>
+ </DCCReference>
+ <DCCReference Include="EmptyHistoryForm.pas">
+ <Form>EmptyHistoryFrm</Form>
+ </DCCReference>
+ <DCCReference Include="PassForm.pas">
+ <Form>fmPass</Form>
+ </DCCReference>
+ <DCCReference Include="PassNewForm.pas">
+ <Form>fmPassNew</Form>
+ </DCCReference>
+ <DCCReference Include="PassCheckForm.pas">
+ <Form>fmPassCheck</Form>
+ </DCCReference>
+ <DCCReference Include="GlobalSearch.pas">
+ <Form>fmGlobalSearch</Form>
+ </DCCReference>
+ <DCCReference Include="hpp_searchthread.pas"/>
+ <DCCReference Include="hpp_bookmarks.pas"/>
+ <DCCReference Include="hpp_sessionsthread.pas"/>
+ <DCCReference Include="hpp_arrays.pas"/>
+ <DCCReference Include="hpp_strparser.pas"/>
+ <DCCReference Include="hpp_forms.pas"/>
+ <DCCReference Include="hpp_opt_dialog.pas"/>
+ <DCCReference Include="hpp_eventfilters.pas"/>
+ <DCCReference Include="hpp_mescatcher.pas"/>
+ <DCCReference Include="CustomizeFiltersForm.pas">
+ <Form>fmCustomizeFilters</Form>
+ </DCCReference>
+ <DCCReference Include="CustomizeToolbar.pas">
+ <Form>fmCustomizeToolbar</Form>
+ </DCCReference>
+ <DCCReference Include="hpp_external.pas"/>
+ <DCCReference Include="hpp_externalgrid.pas"/>
+ <DCCReference Include="hpp_richedit.pas"/>
+ <DCCReference Include="hpp_olesmileys.pas"/>
+ <DCCReference Include="HistoryControls.pas"/>
+ <DCCReference Include="Base64.pas"/>
+ <DCCReference Include="Checksum.pas"/>
+ <DCCReference Include="hpp_JclSysUtils.pas"/>
+ <DCCReference Include="hpp_puny.pas"/>
+ <BuildConfiguration Include="Debug">
+ <Key>Cfg_2</Key>
+ <CfgParent>Base</CfgParent>
+ </BuildConfiguration>
+ <BuildConfiguration Include="Base">
+ <Key>Base</Key>
+ </BuildConfiguration>
+ <BuildConfiguration Include="Release">
+ <Key>Cfg_1</Key>
+ <CfgParent>Base</CfgParent>
+ </BuildConfiguration>
+ </ItemGroup>
+ <ProjectExtensions>
+ <Borland.Personality>Delphi.Personality.12</Borland.Personality>
+ <Borland.ProjectType/>
+ <BorlandProject>
+ <Delphi.Personality>
+ <Source>
+ <Source Name="MainSource">historypp.dpr</Source>
+ </Source>
+ <VersionInfo>
+ <VersionInfo Name="IncludeVerInfo">False</VersionInfo>
+ <VersionInfo Name="AutoIncBuild">False</VersionInfo>
+ <VersionInfo Name="MajorVer">1</VersionInfo>
+ <VersionInfo Name="MinorVer">0</VersionInfo>
+ <VersionInfo Name="Release">0</VersionInfo>
+ <VersionInfo Name="Build">0</VersionInfo>
+ <VersionInfo Name="Debug">False</VersionInfo>
+ <VersionInfo Name="PreRelease">False</VersionInfo>
+ <VersionInfo Name="Special">False</VersionInfo>
+ <VersionInfo Name="Private">False</VersionInfo>
+ <VersionInfo Name="DLL">False</VersionInfo>
+ <VersionInfo Name="Locale">1049</VersionInfo>
+ <VersionInfo Name="CodePage">1251</VersionInfo>
+ </VersionInfo>
+ <VersionInfoKeys>
+ <VersionInfoKeys Name="CompanyName"/>
+ <VersionInfoKeys Name="FileDescription"/>
+ <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="InternalName"/>
+ <VersionInfoKeys Name="LegalCopyright"/>
+ <VersionInfoKeys Name="LegalTrademarks"/>
+ <VersionInfoKeys Name="OriginalFilename"/>
+ <VersionInfoKeys Name="ProductName"/>
+ <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="Comments"/>
+ </VersionInfoKeys>
+ <Excluded_Packages>
+ <Excluded_Packages Name="$(BDSBIN)\dcloffice2k160.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
+ <Excluded_Packages Name="$(BDSBIN)\dclofficexp160.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
+ </Excluded_Packages>
+ </Delphi.Personality>
+ <Platforms>
+ <Platform value="Win64">True</Platform>
+ <Platform value="Win32">True</Platform>
+ </Platforms>
+ </BorlandProject>
+ <ProjectFileVersion>12</ProjectFileVersion>
+ </ProjectExtensions>
+ <Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
+ <Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
+ </Project>
diff --git a/plugins/HistoryPlusPlus/hpp_bookmarks.pas b/plugins/HistoryPlusPlus/hpp_bookmarks.pas index 7db2328e91..5d0ec98640 100644 --- a/plugins/HistoryPlusPlus/hpp_bookmarks.pas +++ b/plugins/HistoryPlusPlus/hpp_bookmarks.pas @@ -521,7 +521,7 @@ begin ped^.hDBEvent := EventData.hDBEvent;
ped^.CRC32 := EventData.CRC32;
ped^.Timestamp := EventData.Timestamp;
- ItemExists := (CallService(MS_DB_EVENT_GETBLOBSIZE, EventData.hDBEvent, 0) >= 0);
+ ItemExists := (db_event_getBlobSize(EventData.hDBEvent) >= 0);
ItemCorrect := false; // added by Awkward, default value
if ItemExists then
begin
@@ -607,11 +607,11 @@ var begin
Result := false;
- hDBEvent := CallService(MS_DB_EVENT_FINDFIRST, Contact.hContact, 0);
+ hDBEvent := db_event_first(Contact.hContact);
if hDBEvent = 0 then
exit;
first_ts := GetEventTimestamp(hDBEvent);
- hDBEvent := CallService(MS_DB_EVENT_FINDLAST, Contact.hContact, 0);
+ hDBEvent := db_event_last(Contact.hContact);
if hDBEvent = 0 then
exit;
last_ts := GetEventTimestamp(hDBEvent);
@@ -622,7 +622,7 @@ begin if StartFromFirst then
begin
- hDBEvent := CallService(MS_DB_EVENT_FINDFIRST, Contact.hContact, 0);
+ hDBEvent := db_event_first(Contact.hContact);
while hDBEvent <> 0 do
begin
cur_ts := GetEventTimestamp(hDBEvent);
@@ -634,12 +634,12 @@ begin Result := True;
break;
end;
- hDBEvent := CallService(MS_DB_EVENT_FINDNEXT, hDBEvent, 0);
+ hDBEvent := db_event_next(hDBEvent);
end;
end
else
begin
- hDBEvent := CallService(MS_DB_EVENT_FINDLAST, Contact.hContact, 0);
+ hDBEvent := db_event_last(Contact.hContact);
while hDBEvent <> 0 do
begin
cur_ts := GetEventTimestamp(hDBEvent);
@@ -651,7 +651,7 @@ begin Result := True;
break;
end;
- hDBEvent := CallService(MS_DB_EVENT_FINDPREV, hDBEvent, 0);
+ hDBEvent := db_event_prev(hDBEvent);
end;
end;
end;
diff --git a/plugins/HistoryPlusPlus/hpp_events.pas b/plugins/HistoryPlusPlus/hpp_events.pas index 66d9e7228c..7c7ff4da53 100644 --- a/plugins/HistoryPlusPlus/hpp_events.pas +++ b/plugins/HistoryPlusPlus/hpp_events.pas @@ -255,7 +255,7 @@ begin ZeroMemory(@RecentEventInfo, SizeOf(RecentEventInfo));
RecentEventInfo.cbSize := SizeOf(RecentEventInfo);
RecentEventInfo.cbBlob := 0;
- CallService(MS_DB_EVENT_GET, hDBEvent, LPARAM(@RecentEventInfo));
+ db_event_get(hDBEvent, @RecentEventInfo);
RecentEvent := hDBEvent;
end;
Result := RecentEventInfo.timestamp;
@@ -270,7 +270,7 @@ begin ZeroMemory(@RecentEventInfo, SizeOf(RecentEventInfo));
RecentEventInfo.cbSize := SizeOf(RecentEventInfo);
RecentEventInfo.cbBlob := 0;
- CallService(MS_DB_EVENT_GET, hDBEvent, LPARAM(@RecentEventInfo));
+ db_event_get(hDBEvent, @RecentEventInfo);
RecentEvent := hDBEvent;
end;
Result := GetMessageType(RecentEventInfo,EventIndex);
@@ -432,7 +432,7 @@ var begin
ZeroMemory(@Result, SizeOf(Result));
Result.cbSize := SizeOf(Result);
- BlobSize := CallService(MS_DB_EVENT_GETBLOBSIZE, hDBEvent, 0);
+ BlobSize := db_event_getBlobSize(hDBEvent);
if BlobSize > 0 then
begin
EventBuffer.Allocate(BlobSize);
@@ -441,7 +441,7 @@ begin else
BlobSize := 0;
Result.cbBlob := BlobSize;
- if CallService(MS_DB_EVENT_GET, hDBEvent, LPARAM(@Result)) = 0 then
+ if db_event_get(hDBEvent, @Result) = 0 then
Result.cbBlob := BlobSize
else
Result.cbBlob := 0;
diff --git a/plugins/HistoryPlusPlus/hpp_external.pas b/plugins/HistoryPlusPlus/hpp_external.pas index 97224d6355..95ea03a1bf 100644 --- a/plugins/HistoryPlusPlus/hpp_external.pas +++ b/plugins/HistoryPlusPlus/hpp_external.pas @@ -178,7 +178,7 @@ begin not boolean(event.dwFlags and IEEF_NO_SCROLLING));
if eventCount > 0 then Dec(eventCount);
if eventCount <> 0 then
- hDBNext := CallService(MS_DB_EVENT_FINDNEXT,hDBNext,0);
+ hDBNext := db_event_next(hDBNext);
end;
ExtGrid.EndUpdate;
end;
diff --git a/plugins/HistoryPlusPlus/hpp_externalgrid.pas b/plugins/HistoryPlusPlus/hpp_externalgrid.pas index 932b968219..3b499b5769 100644 --- a/plugins/HistoryPlusPlus/hpp_externalgrid.pas +++ b/plugins/HistoryPlusPlus/hpp_externalgrid.pas @@ -541,14 +541,13 @@ begin MessageTypesToDWord([mtMessage, mtUrl]) > 0) then
begin
if (not Item.IsRead) then
- CallService(MS_DB_EVENT_MARKREAD, Items[Index].hContact,
- Items[Index].hDBEvent);
+ db_event_markRead(Items[Index].hContact, Items[Index].hDBEvent);
CallService(MS_CLIST_REMOVEEVENT, Items[Index].hContact, Items[Index].hDBEvent);
end
else if (not Item.IsRead) and (MessageTypesToDWord(Item.MessageType) and
MessageTypesToDWord([mtStatus, mtNickChange, mtAvatarChange]) > 0) then
begin
- CallService(MS_DB_EVENT_MARKREAD, Items[Index].hContact, Items[Index].hDBEvent);
+ db_event_markRead(Items[Index].hContact, Items[Index].hDBEvent);
end;
end;
@@ -980,7 +979,7 @@ end; procedure TExternalGrid.GridItemDelete(Sender: TObject; Index: Integer);
begin
if (FGridState = gsDelete) and (Items[Index].hDBEvent <> 0) and (not Items[Index].Custom) then
- CallService(MS_DB_EVENT_DELETE, Items[Index].hContact, Items[Index].hDBEvent);
+ db_event_delete(Items[Index].hContact, Items[Index].hDBEvent);
if Index <> High(Items) then
begin
Finalize(Items[Index]);
diff --git a/plugins/HistoryPlusPlus/hpp_searchthread.pas b/plugins/HistoryPlusPlus/hpp_searchthread.pas index 7d1669a5e4..30effa8ae4 100644 --- a/plugins/HistoryPlusPlus/hpp_searchthread.pas +++ b/plugins/HistoryPlusPlus/hpp_searchthread.pas @@ -204,7 +204,7 @@ procedure TSearchThread.BuildContactsList; SetLength(Contacts, Length(Contacts) + 1);
Contacts[High(Contacts)].hContact := Cont;
Contacts[High(Contacts)].Timestamp := 0;
- hDB := CallService(MS_DB_EVENT_FINDLAST, Cont, 0);
+ hDB := db_event_last(Cont);
if hDB <> 0 then
begin
Contacts[High(Contacts)].Timestamp := GetEventTimestamp(hDB);
@@ -415,7 +415,7 @@ end; function TSearchThread.GetItemsCount(hContact: THandle): Integer;
begin
- Result := CallService(MS_DB_EVENT_GETCOUNT, hContact, 0);
+ Result := db_event_count(hContact);
end;
procedure TSearchThread.IncProgress;
@@ -432,12 +432,12 @@ begin CurContactCP := GetContactCodePage(Contact);
CurContact := Contact;
DoMessage(HM_STRD_NEXTCONTACT, wParam(Contact), lParam(GetContactsCount));
- hDBEvent := CallService(MS_DB_EVENT_FINDLAST, Contact, 0);
+ hDBEvent := db_event_last(Contact);
while (hDBEvent <> 0) and (not Terminated) do
begin
if SearchEvent(hDBEvent) then
SendItem(hDBEvent);
- hDBEvent := CallService(MS_DB_EVENT_FINDPREV, hDBEvent, 0);
+ hDBEvent := db_event_prev(hDBEvent);
end;
SendBatch;
end;
diff --git a/plugins/HistoryPlusPlus/hpp_services.pas b/plugins/HistoryPlusPlus/hpp_services.pas index 6b2d2310d7..84944c3c40 100644 --- a/plugins/HistoryPlusPlus/hpp_services.pas +++ b/plugins/HistoryPlusPlus/hpp_services.pas @@ -197,12 +197,12 @@ begin if Assigned(POpenEventParams(wParam)) then
begin
oep := POpenEventParams(wParam)^;
- hDbEvent := CallService(MS_DB_EVENT_FINDLAST, oep.hContact, 0);
+ hDbEvent := db_event_last(oep.hContact);
item := 0;
sel := -1;
while (hDbEvent <> oep.hDbEvent) and (hDbEvent <> 0) do
begin
- hDbEvent := CallService(MS_DB_EVENT_FINDPREV, hDbEvent, 0);
+ hDbEvent := db_event_prev(hDbEvent);
Inc(item);
end;
if hDbEvent = oep.hDbEvent then
diff --git a/plugins/HistoryPlusPlus/hpp_sessionsthread.pas b/plugins/HistoryPlusPlus/hpp_sessionsthread.pas index c6d55c13b8..57535d7004 100644 --- a/plugins/HistoryPlusPlus/hpp_sessionsthread.pas +++ b/plugins/HistoryPlusPlus/hpp_sessionsthread.pas @@ -176,13 +176,13 @@ begin FirstBatch := True;
try
DoMessage(HM_SESS_PREPARE, 0, 0);
- hDBEvent := CallService(MS_DB_EVENT_FINDFIRST, FContact, 0);
+ hDBEvent := db_event_first(FContact);
while (hDBEvent <> 0) and not Terminated do
begin
ZeroMemory(@Event, SizeOf(Event));
Event.cbSize := SizeOf(Event);
Event.cbBlob := 0;
- CallService(MS_DB_EVENT_GET, hDBEvent, LPARAM(@Event));
+ db_event_get(hDBEvent, @Event);
CurTime := Event.Timestamp;
if PrevTime = 0 then
begin
@@ -209,7 +209,7 @@ begin Inc(Count);
PrevTime := CurTime;
end;
- hDBEvent := CallService(MS_DB_EVENT_FINDNEXT, hDBEvent, 0);
+ hDBEvent := db_event_next(hDBEvent);
end;
SendItem(FirstEvent, LastEvent, FirstTimestamp, LastTimestamp, Count);
SendBatch;
|