git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@37 8e941d3f-bd1b-0410-a28a-d453659cc2b4

This commit is contained in:
inoussa
2006-11-12 13:31:22 +00:00
parent 0a7e8fc2c7
commit b5ff30595d
43 changed files with 807 additions and 791 deletions

View File

@@ -102,7 +102,7 @@ type
procedure ClearRepositoryData(var ARepository : PServiceRepository); procedure ClearRepositoryData(var ARepository : PServiceRepository);
implementation implementation
uses LResources, binary_streamer; uses wst_resources_imp, binary_streamer;
procedure ClearProperties(var AProps : PPropertyData); procedure ClearProperties(var AProps : PPropertyData);
var var
@@ -462,15 +462,19 @@ end;
{ TModuleMetadataMngr } { TModuleMetadataMngr }
procedure TModuleMetadataMngr.LoadRegisteredNames(); procedure TModuleMetadataMngr.LoadRegisteredNames();
var var
i, c : Integer; i : Integer;
itm : TLResource; L : TStrings;
begin begin
c := LazarusResources.Count; L:=TStringList.Create;
for i := 0 to Pred(c) do begin Try
itm := LazarusResources.Items[i]; GetWSTResourceManager.GetResourceList(L);
if AnsiSameText(sWST_META,itm.ValueType) then For I:=0 to L.Count-1 do
RegisterRepository(itm.Name); RegisterRepository(L[i]);
finally
L.Free;
end; end;
end; end;
@@ -498,17 +502,16 @@ var
tmpStrm : TMemoryStream; tmpStrm : TMemoryStream;
strBuffer : string; strBuffer : string;
i : Integer; i : Integer;
rs : TLResource;
tmpRes : PServiceRepository; tmpRes : PServiceRepository;
begin begin
rs := LazarusResources.Find(ARepName); If not GetWSTResourceManager.HasResource(ARepName) then
if not Assigned(rs) then
raise EMetadataException.CreateFmt('Repository not registered : "%s"',[ARepName]); raise EMetadataException.CreateFmt('Repository not registered : "%s"',[ARepName]);
Result := FindInnerListIndex(ARepName); Result := FindInnerListIndex(ARepName);
if ( Result < 0 ) then begin if ( Result < 0 ) then begin
tmpStrm := TMemoryStream.Create(); tmpStrm := TMemoryStream.Create();
try try
strBuffer := LazarusResources.Find(ARepName).Value; strBuffer := GetWSTResourceManager.ResourceAsString(ARepName);
i := Length(strBuffer); i := Length(strBuffer);
tmpStrm.Write(strBuffer[1],i); tmpStrm.Write(strBuffer[1],i);
tmpStrm.Position := 0; tmpStrm.Position := 0;

View File

@@ -1,7 +0,0 @@
LazarusResources.Add('METADATA_SERVICE','wst_meta',[
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#16'metadata_service'#1#0#0#0#19'IWSTMet'
+'adataService'#2#0#0#0#17'GetRepositoryList'#1#0#0#0#6'result'#0#0#0#23'TArr'
+'ayOfStringRemotable'#0#0#0#0#0#0#0#3#0#0#0#17'GetRepositoryInfo'#2#0#0#0#5
+'AName'#0#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#17'TWSTMtdRepo'
+'sitory'#0#0#0#0#0#0#0#3
]);

View File

@@ -0,0 +1,7 @@
GetWSTResourceManager().AddResource('METADATA_SERVICE',
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#16'metadata_service'#1#0#0#0#19'IWSTMe'
+'tadataService'#2#0#0#0#17'GetRepositoryList'#1#0#0#0#6'result'#0#0#0#23'TAr'
+'rayOfStringRemotable'#0#0#0#0#0#0#0#3#0#0#0#17'GetRepositoryInfo'#2#0#0#0#5
+'AName'#0#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#17'TWSTMtdRepo'
+'sitory'#0#0#0#0#0#0#0#3''
);

View File

@@ -2,7 +2,7 @@
This unit has been produced by ws_helper. This unit has been produced by ws_helper.
Input unit name : "metadata_service". Input unit name : "metadata_service".
This unit name : "metadata_service_binder". This unit name : "metadata_service_binder".
Date : "31/07/2006 23:18". Date : "12/11/2006 11:12".
} }
unit metadata_service_binder; unit metadata_service_binder;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
@@ -29,7 +29,7 @@ type
procedure Server_service_RegisterWSTMetadataServiceService(); procedure Server_service_RegisterWSTMetadataServiceService();
Implementation Implementation
uses TypInfo, LResources,metadata_repository; uses TypInfo, wst_resources_imp,metadata_repository;
{ TWSTMetadataService_ServiceBinder implementation } { TWSTMetadataService_ServiceBinder implementation }
procedure TWSTMetadataService_ServiceBinder.GetRepositoryListHandler(AFormatter:IFormatterResponse); procedure TWSTMetadataService_ServiceBinder.GetRepositoryListHandler(AFormatter:IFormatterResponse);
@@ -124,6 +124,6 @@ initialization
Register_metadata_service_NameSpace(); Register_metadata_service_NameSpace();
{$ENDIF} {$ENDIF}
{$i metadata_service.lrs} {$i metadata_service.wst}
End. End.

View File

@@ -2,7 +2,7 @@
This unit has been produced by ws_helper. This unit has been produced by ws_helper.
Input unit name : "metadata_service". Input unit name : "metadata_service".
This unit name : "metadata_service_proxy". This unit name : "metadata_service_proxy".
Date : "31/07/2006 23:11". Date : "12/11/2006 11:12".
} }
Unit metadata_service_proxy; Unit metadata_service_proxy;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
@@ -23,7 +23,7 @@ Type
End; End;
Implementation Implementation
uses LResources, metadata_repository; uses wst_resources_imp, metadata_repository;
{ TWSTMetadataService_Proxy implementation } { TWSTMetadataService_Proxy implementation }
@@ -82,7 +82,7 @@ End;
initialization initialization
{$i metadata_service.lrs} {$i metadata_service.wst}
{$IF DECLARED(Register_metadata_service_ServiceMetadata)} {$IF DECLARED(Register_metadata_service_ServiceMetadata)}
Register_metadata_service_ServiceMetadata(); Register_metadata_service_ServiceMetadata();

View File

@@ -7,7 +7,7 @@
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="1"/> <ActiveEditorIndexAtStart Value="6"/>
</General> </General>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
@@ -26,7 +26,7 @@
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item1> </Item1>
</RequiredPackages> </RequiredPackages>
<Units Count="25"> <Units Count="26">
<Unit0> <Unit0>
<Filename Value="mod_wst.lpr"/> <Filename Value="mod_wst.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@@ -122,8 +122,8 @@
<Filename Value="wst_apache_binding.pas"/> <Filename Value="wst_apache_binding.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="wst_apache_binding"/> <UnitName Value="wst_apache_binding"/>
<CursorPos X="29" Y="246"/> <CursorPos X="29" Y="298"/>
<TopLine Value="297"/> <TopLine Value="113"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="45"/> <UsageCount Value="45"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@@ -149,7 +149,7 @@
<Unit17> <Unit17>
<Filename Value="..\..\metadata_repository.pas"/> <Filename Value="..\..\metadata_repository.pas"/>
<UnitName Value="metadata_repository"/> <UnitName Value="metadata_repository"/>
<CursorPos X="6" Y="105"/> <CursorPos X="19" Y="105"/>
<TopLine Value="94"/> <TopLine Value="94"/>
<EditorIndex Value="4"/> <EditorIndex Value="4"/>
<UsageCount Value="22"/> <UsageCount Value="22"/>
@@ -158,9 +158,9 @@
<Unit18> <Unit18>
<Filename Value="..\..\metadata_wsdl.pas"/> <Filename Value="..\..\metadata_wsdl.pas"/>
<UnitName Value="metadata_wsdl"/> <UnitName Value="metadata_wsdl"/>
<CursorPos X="3" Y="589"/> <CursorPos X="5" Y="20"/>
<TopLine Value="576"/> <TopLine Value="1"/>
<EditorIndex Value="5"/> <EditorIndex Value="6"/>
<UsageCount Value="22"/> <UsageCount Value="22"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit18> </Unit18>
@@ -201,130 +201,39 @@
<Unit24> <Unit24>
<Filename Value="..\..\server_service_intf.pas"/> <Filename Value="..\..\server_service_intf.pas"/>
<UnitName Value="server_service_intf"/> <UnitName Value="server_service_intf"/>
<CursorPos X="1" Y="1"/> <CursorPos X="5" Y="20"/>
<TopLine Value="1"/> <TopLine Value="6"/>
<EditorIndex Value="2"/> <EditorIndex Value="2"/>
<UsageCount Value="14"/> <UsageCount Value="14"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit24> </Unit24>
<Unit25>
<Filename Value="..\..\wst_resources_imp.pas"/>
<UnitName Value="wst_resources_imp"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="5"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit25>
</Units> </Units>
<JumpHistory Count="29" HistoryIndex="28"> <JumpHistory Count="4" HistoryIndex="3">
<Position1> <Position1>
<Filename Value="wst_apache_binding.pas"/> <Filename Value="..\..\server_service_intf.pas"/>
<Caret Line="85" Column="46" TopLine="74"/> <Caret Line="17" Column="43" TopLine="10"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="wst_apache_binding.pas"/> <Filename Value="..\..\metadata_wsdl.pas"/>
<Caret Line="323" Column="28" TopLine="312"/> <Caret Line="5" Column="76" TopLine="1"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="wst_apache_binding.pas"/> <Filename Value="..\..\metadata_repository.pas"/>
<Caret Line="324" Column="48" TopLine="313"/> <Caret Line="105" Column="19" TopLine="94"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="wst_apache_binding.pas"/> <Filename Value="..\..\wst_resources_imp.pas"/>
<Caret Line="349" Column="32" TopLine="337"/> <Caret Line="226" Column="1" TopLine="189"/>
</Position4> </Position4>
<Position5>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position5>
<Position6>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="18" Column="15" TopLine="7"/>
</Position6>
<Position7>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="25" Column="40" TopLine="14"/>
</Position7>
<Position8>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="85" Column="33" TopLine="74"/>
</Position8>
<Position9>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="323" Column="28" TopLine="312"/>
</Position9>
<Position10>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position10>
<Position11>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="18" Column="15" TopLine="7"/>
</Position11>
<Position12>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="25" Column="40" TopLine="14"/>
</Position12>
<Position13>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="79" Column="28" TopLine="67"/>
</Position13>
<Position14>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="265" Column="11" TopLine="246"/>
</Position14>
<Position15>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position15>
<Position16>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="49" Column="32" TopLine="30"/>
</Position16>
<Position17>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="79" Column="28" TopLine="60"/>
</Position17>
<Position18>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="269" Column="1" TopLine="264"/>
</Position18>
<Position19>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position19>
<Position20>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="52" Column="11" TopLine="30"/>
</Position20>
<Position21>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="58" Column="74" TopLine="52"/>
</Position21>
<Position22>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="19" Column="20" TopLine="1"/>
</Position22>
<Position23>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="43" Column="1" TopLine="41"/>
</Position23>
<Position24>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="309" Column="1" TopLine="271"/>
</Position24>
<Position25>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="296" Column="38" TopLine="277"/>
</Position25>
<Position26>
<Filename Value="mod_wst.lpr"/>
<Caret Line="16" Column="1" TopLine="3"/>
</Position26>
<Position27>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="238" Column="18" TopLine="223"/>
</Position27>
<Position28>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="245" Column="20" TopLine="240"/>
</Position28>
<Position29>
<Filename Value="wst_apache_binding.pas"/>
<Caret Line="1" Column="19" TopLine="1"/>
</Position29>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>

View File

@@ -12,7 +12,6 @@
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="0"/>
</General> </General>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
@@ -26,21 +25,14 @@
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local> </local>
</RunParams> </RunParams>
<RequiredPackages Count="1"> <Units Count="21">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="20">
<Unit0> <Unit0>
<Filename Value="calc_client.pas"/> <Filename Value="calc_client.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="calc_client"/> <UnitName Value="calc_client"/>
<CursorPos X="22" Y="49"/> <CursorPos X="22" Y="49"/>
<TopLine Value="37"/> <TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="68"/> <UsageCount Value="68"/>
<Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="calculator_proxy.pas"/> <Filename Value="calculator_proxy.pas"/>
@@ -48,9 +40,7 @@
<UnitName Value="calculator_proxy"/> <UnitName Value="calculator_proxy"/>
<CursorPos X="44" Y="155"/> <CursorPos X="44" Y="155"/>
<TopLine Value="4"/> <TopLine Value="4"/>
<EditorIndex Value="3"/>
<UsageCount Value="68"/> <UsageCount Value="68"/>
<Loaded Value="True"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="..\..\..\..\base_service_intf.pas"/> <Filename Value="..\..\..\..\base_service_intf.pas"/>
@@ -111,9 +101,7 @@
<UnitName Value="calculator"/> <UnitName Value="calculator"/>
<CursorPos X="53" Y="67"/> <CursorPos X="53" Y="67"/>
<TopLine Value="33"/> <TopLine Value="33"/>
<EditorIndex Value="2"/>
<UsageCount Value="68"/> <UsageCount Value="68"/>
<Loaded Value="True"/>
</Unit9> </Unit9>
<Unit10> <Unit10>
<Filename Value="D:\lazarusClean\fpcsrc\rtl\win32\system.pp"/> <Filename Value="D:\lazarusClean\fpcsrc\rtl\win32\system.pp"/>
@@ -186,47 +174,32 @@
<UnitName Value="metadata_repository"/> <UnitName Value="metadata_repository"/>
<CursorPos X="6" Y="105"/> <CursorPos X="6" Y="105"/>
<TopLine Value="94"/> <TopLine Value="94"/>
<EditorIndex Value="1"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit19> </Unit19>
<Unit20>
<Filename Value="..\..\..\ics_tcp_protocol.pas"/>
<UnitName Value="ics_tcp_protocol"/>
<CursorPos X="3" Y="22"/>
<TopLine Value="8"/>
<UsageCount Value="10"/>
</Unit20>
</Units> </Units>
<JumpHistory Count="5" HistoryIndex="4"> <JumpHistory Count="0" HistoryIndex="-1"/>
<Position1>
<Filename Value="calc_client.pas"/>
<Caret Line="61" Column="49" TopLine="45"/>
</Position1>
<Position2>
<Filename Value="calc_client.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position2>
<Position3>
<Filename Value="calc_client.pas"/>
<Caret Line="3" Column="45" TopLine="1"/>
</Position3>
<Position4>
<Filename Value="..\..\..\metadata_repository.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position4>
<Position5>
<Filename Value="calculator_proxy.pas"/>
<Caret Line="93" Column="49" TopLine="77"/>
</Position5>
</JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="5"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="D:\LazarusClean\others_package\ics\latest_distr\Delphi\Vc32\;..\..\..\;..\..\..\tests\calculator\"/> <OtherUnitFiles Value="C:\LazarusClean\others_package\ics\latest_distr\Delphi\Vc32\;..\..\..\;..\..\..\tests\calculator\"/>
<UnitOutputDirectory Value="obj"/> <UnitOutputDirectory Value="obj"/>
<SrcPath Value="..\..\..\;D:\LazarusClean\others_package\ics\latest_distr\Delphi\Vc32\"/> <SrcPath Value="..\..\..\;C:\LazarusClean\others_package\ics\latest_distr\Delphi\Vc32\"/>
</SearchPaths> </SearchPaths>
<CodeGeneration> <CodeGeneration>
<Generate Value="Faster"/> <Generate Value="Faster"/>
</CodeGeneration> </CodeGeneration>
<Other> <Other>
<CustomOptions Value="-Xi"/> <CustomOptions Value="-Xi
"/>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>
</CompilerOptions> </CompilerOptions>

View File

@@ -1,13 +0,0 @@
LazarusResources.Add('CALCULATOR','wst_meta',[
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#10'calculator'#1#0#0#0#11'ICalculator'#4
+#0#0#0#6'AddInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0
+#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#17'TBinaryArgsResult'#0#0
+#0#0#0#0#0#3#0#0#0#6'DivInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0
+#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#7'Integer'#0
+#0#0#0#0#0#0#3#0#0#0#15'DoAllOperations'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0
+#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0
+#22'TBinaryArgsResultArray'#0#0#0#0#0#0#0#3#0#0#0#11'DoOperation'#4#0#0#0#1
+'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0
+#0#1#0#0#0#10'AOperation'#0#0#0#8'TCalc_Op'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0
+#0#0#17'TBinaryArgsResult'#0#0#0#0#0#0#0#3
]);

View File

@@ -0,0 +1,13 @@
GetWSTResourceManager().AddResource('CALCULATOR',
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#10'calculator'#1#0#0#0#11'ICalculator'#4
+#0#0#0#6'AddInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0
+#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#17'TBinaryArgsResult'#0#0
+#0#0#0#0#0#3#0#0#0#6'DivInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0
+#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#7'Integer'#0
+#0#0#0#0#0#0#3#0#0#0#15'DoAllOperations'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0
+#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0
+#22'TBinaryArgsResultArray'#0#0#0#0#0#0#0#3#0#0#0#11'DoOperation'#4#0#0#0#1'A'
+#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1
+#0#0#0#10'AOperation'#0#0#0#8'TCalc_Op'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0
+#17'TBinaryArgsResult'#0#0#0#0#0#0#0#3''
);

View File

@@ -2,7 +2,7 @@
This unit has been produced by ws_helper. This unit has been produced by ws_helper.
Input unit name : "calculator". Input unit name : "calculator".
This unit name : "calculator_proxy". This unit name : "calculator_proxy".
Date : "30/07/2006 01:54". Date : "12/11/2006 11:21".
} }
Unit calculator_proxy; Unit calculator_proxy;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
@@ -36,7 +36,7 @@ Type
End; End;
Implementation Implementation
uses LResources, metadata_repository; uses wst_resources_imp, metadata_repository;
{ TCalculator_Proxy implementation } { TCalculator_Proxy implementation }
@@ -156,7 +156,7 @@ End;
initialization initialization
{$i calculator.lrs} {$i calculator.wst}
{$IF DECLARED(Register_calculator_ServiceMetadata)} {$IF DECLARED(Register_calculator_ServiceMetadata)}
Register_calculator_ServiceMetadata(); Register_calculator_ServiceMetadata();

View File

@@ -1,13 +0,0 @@
LazarusResources.Add('CALCULATOR','wst_meta',[
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#10'calculator'#1#0#0#0#11'ICalculator'#4
+#0#0#0#6'AddInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0
+#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#17'TBinaryArgsResult'#0#0
+#0#0#0#0#0#3#0#0#0#6'DivInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0
+#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#7'Integer'#0
+#0#0#0#0#0#0#3#0#0#0#15'DoAllOperations'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0
+#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0
+#22'TBinaryArgsResultArray'#0#0#0#0#0#0#0#3#0#0#0#11'DoOperation'#4#0#0#0#1
+'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0
+#0#1#0#0#0#10'AOperation'#0#0#0#8'TCalc_Op'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0
+#0#0#17'TBinaryArgsResult'#0#0#0#0#0#0#0#3
]);

View File

@@ -0,0 +1,13 @@
GetWSTResourceManager().AddResource('CALCULATOR',
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#10'calculator'#1#0#0#0#11'ICalculator'#4
+#0#0#0#6'AddInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0
+#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#17'TBinaryArgsResult'#0#0
+#0#0#0#0#0#3#0#0#0#6'DivInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0
+#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#7'Integer'#0
+#0#0#0#0#0#0#3#0#0#0#15'DoAllOperations'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0
+#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0
+#22'TBinaryArgsResultArray'#0#0#0#0#0#0#0#3#0#0#0#11'DoOperation'#4#0#0#0#1'A'
+#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1
+#0#0#0#10'AOperation'#0#0#0#8'TCalc_Op'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0
+#17'TBinaryArgsResult'#0#0#0#0#0#0#0#3''
);

View File

@@ -2,7 +2,7 @@
This unit has been produced by ws_helper. This unit has been produced by ws_helper.
Input unit name : "calculator". Input unit name : "calculator".
This unit name : "calculator_proxy". This unit name : "calculator_proxy".
Date : "30/07/2006 01:54". Date : "12/11/2006 11:22".
} }
Unit calculator_proxy; Unit calculator_proxy;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
@@ -36,7 +36,7 @@ Type
End; End;
Implementation Implementation
uses LResources, metadata_repository; uses wst_resources_imp, metadata_repository;
{ TCalculator_Proxy implementation } { TCalculator_Proxy implementation }
@@ -156,7 +156,7 @@ End;
initialization initialization
{$i calculator.lrs} {$i calculator.wst}
{$IF DECLARED(Register_calculator_ServiceMetadata)} {$IF DECLARED(Register_calculator_ServiceMetadata)}
Register_calculator_ServiceMetadata(); Register_calculator_ServiceMetadata();

View File

@@ -7,7 +7,7 @@
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="0"/> <ActiveEditorIndexAtStart Value="1"/>
</General> </General>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
@@ -26,7 +26,7 @@
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item1> </Item1>
</RequiredPackages> </RequiredPackages>
<Units Count="39"> <Units Count="40">
<Unit0> <Unit0>
<Filename Value="test_calc.lpr"/> <Filename Value="test_calc.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@@ -41,9 +41,11 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ResourceFilename Value="main_unit.lrs"/> <ResourceFilename Value="main_unit.lrs"/>
<UnitName Value="main_unit"/> <UnitName Value="main_unit"/>
<CursorPos X="18" Y="131"/> <CursorPos X="28" Y="9"/>
<TopLine Value="109"/> <TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="80"/> <UsageCount Value="80"/>
<Loaded Value="True"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="..\calculator.pas"/> <Filename Value="..\calculator.pas"/>
@@ -57,9 +59,11 @@
<Filename Value="calculator_proxy.pas"/> <Filename Value="calculator_proxy.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="calculator_proxy"/> <UnitName Value="calculator_proxy"/>
<CursorPos X="28" Y="1"/> <CursorPos X="20" Y="39"/>
<TopLine Value="1"/> <TopLine Value="37"/>
<EditorIndex Value="1"/>
<UsageCount Value="80"/> <UsageCount Value="80"/>
<Loaded Value="True"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="..\..\..\..\service_intf.pas"/> <Filename Value="..\..\..\..\service_intf.pas"/>
@@ -298,12 +302,30 @@
<UnitName Value="library_protocol"/> <UnitName Value="library_protocol"/>
<CursorPos X="18" Y="24"/> <CursorPos X="18" Y="24"/>
<TopLine Value="10"/> <TopLine Value="10"/>
<EditorIndex Value="0"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit38> </Unit38>
<Unit39>
<Filename Value="..\..\..\wst_resources_imp.pas"/>
<UnitName Value="wst_resources_imp"/>
<CursorPos X="5" Y="132"/>
<TopLine Value="115"/>
<UsageCount Value="10"/>
</Unit39>
</Units> </Units>
<JumpHistory Count="0" HistoryIndex="-1"/> <JumpHistory Count="3" HistoryIndex="2">
<Position1>
<Filename Value="main_unit.pas"/>
<Caret Line="9" Column="28" TopLine="1"/>
</Position1>
<Position2>
<Filename Value="calculator_proxy.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position2>
<Position3>
<Filename Value="calculator_proxy.pas"/>
<Caret Line="39" Column="20" TopLine="37"/>
</Position3>
</JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="5"/>

View File

@@ -1,13 +0,0 @@
LazarusResources.Add('CALCULATOR','wst_meta',[
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#10'calculator'#1#0#0#0#11'ICalculator'#4
+#0#0#0#6'AddInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0
+#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#17'TBinaryArgsResult'#0#0
+#0#0#0#0#0#3#0#0#0#6'DivInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0
+#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#7'Integer'#0
+#0#0#0#0#0#0#3#0#0#0#15'DoAllOperations'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0
+#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0
+#22'TBinaryArgsResultArray'#0#0#0#0#0#0#0#3#0#0#0#11'DoOperation'#4#0#0#0#1
+'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0
+#0#1#0#0#0#10'AOperation'#0#0#0#8'TCalc_Op'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0
+#0#0#17'TBinaryArgsResult'#0#0#0#0#0#0#0#3
]);

View File

@@ -0,0 +1,13 @@
GetWSTResourceManager().AddResource('CALCULATOR',
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#10'calculator'#1#0#0#0#11'ICalculator'#4
+#0#0#0#6'AddInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0
+#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#17'TBinaryArgsResult'#0#0
+#0#0#0#0#0#3#0#0#0#6'DivInt'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0
+#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0#7'Integer'#0
+#0#0#0#0#0#0#3#0#0#0#15'DoAllOperations'#3#0#0#0#1'A'#0#0#0#7'Integer'#0#0#0
+#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0
+#22'TBinaryArgsResultArray'#0#0#0#0#0#0#0#3#0#0#0#11'DoOperation'#4#0#0#0#1'A'
+#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#1'B'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1
+#0#0#0#10'AOperation'#0#0#0#8'TCalc_Op'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0#0
+#17'TBinaryArgsResult'#0#0#0#0#0#0#0#3''
);

View File

@@ -2,7 +2,7 @@
This unit has been produced by ws_helper. This unit has been produced by ws_helper.
Input unit name : "calculator". Input unit name : "calculator".
This unit name : "calculator_binder". This unit name : "calculator_binder".
Date : "30/07/2006 01:52". Date : "12/11/2006 11:22".
} }
unit calculator_binder; unit calculator_binder;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
@@ -31,7 +31,7 @@ type
procedure Server_service_RegisterCalculatorService(); procedure Server_service_RegisterCalculatorService();
Implementation Implementation
uses TypInfo, LResources,metadata_repository; uses TypInfo, wst_resources_imp,metadata_repository;
{ TCalculator_ServiceBinder implementation } { TCalculator_ServiceBinder implementation }
procedure TCalculator_ServiceBinder.AddIntHandler(AFormatter:IFormatterResponse); procedure TCalculator_ServiceBinder.AddIntHandler(AFormatter:IFormatterResponse);
@@ -202,6 +202,6 @@ initialization
Register_calculator_NameSpace(); Register_calculator_NameSpace();
{$ENDIF} {$ENDIF}
{$i calculator.lrs} {$i calculator.wst}
End. End.

View File

@@ -1,9 +0,0 @@
LazarusResources.Add('EBAY','wst_meta',[
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#4'ebay'#1#0#0#0#24'IeBayAPIInterfaceSer'
+'vice'#2#0#0#0#13'GetCategories'#2#0#0#0#20'GetCategoriesRequest'#0#0#0#25'T'
+'GetCategoriesRequestType'#0#0#0#0#0#0#0#1#0#0#0#21'GetCategoriesResponse'#0
+#0#0#26'TGetCategoriesResponseType'#0#0#0#0#0#0#0#3#0#0#0#18'GetPopularKeywo'
+'rds'#2#0#0#0#25'GetPopularKeywordsRequest'#0#0#0#30'TGetPopularKeywordsRequ'
+'estType'#0#0#0#0#0#0#0#1#0#0#0#26'GetPopularKeywordsResponse'#0#0#0#31'TGet'
+'PopularKeywordsResponseType'#0#0#0#0#0#0#0#3
]);

View File

@@ -8,7 +8,7 @@ uses
Classes, SysUtils, base_service_intf; Classes, SysUtils, base_service_intf;
const const
sAPP_ID = '<your AppId>'; sAPP_ID = 'INOUSSAOUEU258CIC9Z5E83UXC1BE5';//'<your AppId>';
sEBAY_VERSION = '467'; sEBAY_VERSION = '467';
type type

View File

@@ -0,0 +1,9 @@
GetWSTResourceManager().AddResource('EBAY',
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#4'ebay'#1#0#0#0#24'IeBayAPIInterfaceSe'
+'rvice'#2#0#0#0#13'GetCategories'#2#0#0#0#20'GetCategoriesRequest'#0#0#0#25'T'
+'GetCategoriesRequestType'#0#0#0#0#0#0#0#1#0#0#0#21'GetCategoriesResponse'#0
+#0#0#26'TGetCategoriesResponseType'#0#0#0#0#0#0#0#3#0#0#0#18'GetPopularKeywo'
+'rds'#2#0#0#0#25'GetPopularKeywordsRequest'#0#0#0#30'TGetPopularKeywordsRequ'
+'estType'#0#0#0#0#0#0#0#1#0#0#0#26'GetPopularKeywordsResponse'#0#0#0#31'TGet'
+'PopularKeywordsResponseType'#0#0#0#0#0#0#0#3''
);

View File

@@ -2,7 +2,7 @@
This unit has been produced by ws_helper. This unit has been produced by ws_helper.
Input unit name : "ebay". Input unit name : "ebay".
This unit name : "ebay_proxy". This unit name : "ebay_proxy".
Date : "30/07/2006 21:52". Date : "12/11/2006 11:44".
} }
Unit ebay_proxy; Unit ebay_proxy;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
@@ -27,7 +27,7 @@ Type
End; End;
Implementation Implementation
uses LResources, metadata_repository; uses wst_resources_imp, metadata_repository;
{ TeBayAPIInterfaceService_Proxy implementation } { TeBayAPIInterfaceService_Proxy implementation }
@@ -90,7 +90,7 @@ End;
initialization initialization
{$i ebay.lrs} {$i ebay.wst}
{$IF DECLARED(Register_ebay_ServiceMetadata)} {$IF DECLARED(Register_ebay_ServiceMetadata)}
Register_ebay_ServiceMetadata(); Register_ebay_ServiceMetadata();

View File

@@ -21,29 +21,26 @@
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local> </local>
</RunParams> </RunParams>
<RequiredPackages Count="1"> <Units Count="23">
<Item1>
<PackageName Value="indylaz"/>
</Item1>
</RequiredPackages>
<Units Count="22">
<Unit0> <Unit0>
<Filename Value="test_ebay.lpr"/> <Filename Value="test_ebay.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="test_ebay"/> <UnitName Value="test_ebay"/>
<CursorPos X="34" Y="63"/> <CursorPos X="38" Y="10"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="43"/> <UsageCount Value="45"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="ebay.pas"/> <Filename Value="ebay.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ebay"/> <UnitName Value="ebay"/>
<CursorPos X="18" Y="103"/> <CursorPos X="10" Y="525"/>
<TopLine Value="156"/> <TopLine Value="519"/>
<UsageCount Value="43"/> <EditorIndex Value="2"/>
<UsageCount Value="45"/>
<Loaded Value="True"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="..\..\service_intf.pas"/> <Filename Value="..\..\service_intf.pas"/>
@@ -51,8 +48,8 @@
<UnitName Value="service_intf"/> <UnitName Value="service_intf"/>
<CursorPos X="1" Y="151"/> <CursorPos X="1" Y="151"/>
<TopLine Value="140"/> <TopLine Value="140"/>
<EditorIndex Value="2"/> <EditorIndex Value="3"/>
<UsageCount Value="43"/> <UsageCount Value="45"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
@@ -60,10 +57,8 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="soap_formatter"/> <UnitName Value="soap_formatter"/>
<CursorPos X="25" Y="244"/> <CursorPos X="25" Y="244"/>
<TopLine Value="236"/> <TopLine Value="131"/>
<EditorIndex Value="6"/> <UsageCount Value="45"/>
<UsageCount Value="43"/>
<Loaded Value="True"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="..\..\base_service_intf.pas"/> <Filename Value="..\..\base_service_intf.pas"/>
@@ -71,7 +66,7 @@
<UnitName Value="base_service_intf"/> <UnitName Value="base_service_intf"/>
<CursorPos X="20" Y="30"/> <CursorPos X="20" Y="30"/>
<TopLine Value="11"/> <TopLine Value="11"/>
<UsageCount Value="43"/> <UsageCount Value="45"/>
</Unit4> </Unit4>
<Unit5> <Unit5>
<Filename Value="..\..\base_soap_formatter.pas"/> <Filename Value="..\..\base_soap_formatter.pas"/>
@@ -79,7 +74,7 @@
<UnitName Value="base_soap_formatter"/> <UnitName Value="base_soap_formatter"/>
<CursorPos X="1" Y="619"/> <CursorPos X="1" Y="619"/>
<TopLine Value="608"/> <TopLine Value="608"/>
<UsageCount Value="43"/> <UsageCount Value="45"/>
<Bookmarks Count="1"> <Bookmarks Count="1">
<Item0 X="11" Y="610" ID="1"/> <Item0 X="11" Y="610" ID="1"/>
</Bookmarks> </Bookmarks>
@@ -88,10 +83,10 @@
<Filename Value="ebay_proxy.pas"/> <Filename Value="ebay_proxy.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ebay_proxy"/> <UnitName Value="ebay_proxy"/>
<CursorPos X="1" Y="34"/> <CursorPos X="14" Y="93"/>
<TopLine Value="23"/> <TopLine Value="70"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="43"/> <UsageCount Value="45"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
@@ -140,11 +135,9 @@
<Filename Value="..\..\synapse_http_protocol.pas"/> <Filename Value="..\..\synapse_http_protocol.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="synapse_http_protocol"/> <UnitName Value="synapse_http_protocol"/>
<CursorPos X="1" Y="155"/> <CursorPos X="33" Y="21"/>
<TopLine Value="132"/> <TopLine Value="3"/>
<EditorIndex Value="3"/> <UsageCount Value="26"/>
<UsageCount Value="24"/>
<Loaded Value="True"/>
</Unit13> </Unit13>
<Unit14> <Unit14>
<Filename Value="D:\lazarusClean\others_package\synapse\httpsend.pas"/> <Filename Value="D:\lazarusClean\others_package\synapse\httpsend.pas"/>
@@ -191,132 +184,38 @@
<UnitName Value="httpsend"/> <UnitName Value="httpsend"/>
<CursorPos X="1" Y="566"/> <CursorPos X="1" Y="566"/>
<TopLine Value="555"/> <TopLine Value="555"/>
<EditorIndex Value="4"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit20> </Unit20>
<Unit21> <Unit21>
<Filename Value="D:\Lazarus\others_package\synapse\blcksock.pas"/> <Filename Value="D:\Lazarus\others_package\synapse\blcksock.pas"/>
<UnitName Value="blcksock"/> <UnitName Value="blcksock"/>
<CursorPos X="1" Y="1901"/> <CursorPos X="1" Y="1901"/>
<TopLine Value="1890"/> <TopLine Value="1890"/>
<EditorIndex Value="5"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit21> </Unit21>
<Unit22>
<Filename Value="ebay.wst"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit22>
</Units> </Units>
<JumpHistory Count="26" HistoryIndex="25"> <JumpHistory Count="2" HistoryIndex="1">
<Position1> <Position1>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/> <Filename Value="test_ebay.lpr"/>
<Caret Line="531" Column="1" TopLine="520"/> <Caret Line="55" Column="65" TopLine="46"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/> <Filename Value="test_ebay.lpr"/>
<Caret Line="534" Column="1" TopLine="523"/> <Caret Line="24" Column="29" TopLine="19"/>
</Position2> </Position2>
<Position3>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="537" Column="1" TopLine="526"/>
</Position3>
<Position4>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="538" Column="11" TopLine="527"/>
</Position4>
<Position5>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="541" Column="32" TopLine="530"/>
</Position5>
<Position6>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="543" Column="1" TopLine="532"/>
</Position6>
<Position7>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="544" Column="1" TopLine="533"/>
</Position7>
<Position8>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="558" Column="1" TopLine="547"/>
</Position8>
<Position9>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="559" Column="1" TopLine="548"/>
</Position9>
<Position10>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="561" Column="1" TopLine="550"/>
</Position10>
<Position11>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="562" Column="1" TopLine="551"/>
</Position11>
<Position12>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="563" Column="1" TopLine="552"/>
</Position12>
<Position13>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="565" Column="1" TopLine="554"/>
</Position13>
<Position14>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="566" Column="1" TopLine="555"/>
</Position14>
<Position15>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="572" Column="1" TopLine="561"/>
</Position15>
<Position16>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="574" Column="1" TopLine="563"/>
</Position16>
<Position17>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="580" Column="1" TopLine="569"/>
</Position17>
<Position18>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="582" Column="1" TopLine="571"/>
</Position18>
<Position19>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="561" Column="1" TopLine="550"/>
</Position19>
<Position20>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="562" Column="1" TopLine="551"/>
</Position20>
<Position21>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="563" Column="1" TopLine="552"/>
</Position21>
<Position22>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="565" Column="1" TopLine="554"/>
</Position22>
<Position23>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
<Caret Line="566" Column="1" TopLine="555"/>
</Position23>
<Position24>
<Filename Value="test_ebay.lpr"/>
<Caret Line="75" Column="64" TopLine="58"/>
</Position24>
<Position25>
<Filename Value="test_ebay.lpr"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position25>
<Position26>
<Filename Value="test_ebay.lpr"/>
<Caret Line="63" Column="34" TopLine="52"/>
</Position26>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="5"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="..\..\;D:\Lazarus\others_package\ics\latest_distr\Delphi\Vc32\;D:\Lazarus\others_package\indy\indy-10.2.0.1\fpc\Protocols\;D:\lazarus\others_package\synapse\"/> <OtherUnitFiles Value="..\..\;C:\LazarusClean\others_package\ics\latest_distr\Delphi\Vc32\;C:\LazarusClean\others_package\indy\indy-10.2.0.1\fpc\Protocols\;C:\LazarusClean\others_package\synapse\"/>
<UnitOutputDirectory Value="obj"/> <UnitOutputDirectory Value="obj"/>
</SearchPaths> </SearchPaths>
<CodeGeneration> <CodeGeneration>

View File

@@ -26,37 +26,11 @@ begin
rsp := nil; rsp := nil;
locHdr := TCustomSecurityHeaderType.Create(); locHdr := TCustomSecurityHeaderType.Create();
try try
locHdr.eBayAuthToken := { locHdr.eBayAuthToken := '...';
'AgAAAA**AQAAAA**aAAAAA**OeGvRA**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJnY+lAZOE'+
'pgqdj6x9nY+seQ**uoUAAA**AAMAAA**z5djiOw1a7Tk12KGGPqSpvnxxNYOVUtaSbmQ7hYd4p'+
'X4XfafLKBtImKsW9SUsbmBS9fXOyBnXA3k0jLelpiMptvlZ8N52UQA/ePc6+JE7LJFrARMoBaW5l'+
'HEQOMESJLAdFJiGmLwrnagdeo6WRI89guRtDkydPyHwHUJ7aCFQvwzeD/b+1pnXelHQvQBRFtD3drU'+
'BV9FbAf1/d4w/C+x5EHrBHyA+/T9uBelb3wkI8Rk/jnwF+L1qZlSW90pcyi3uxoSuBGVolgihrL/IKE'+
'2mPcK3GAtqROu6Tsasjzz/tqkSIuFLeJ9HphAzdB+LNhyR1NGbe+l+goY74saRbEb2iqYo5wCTTLELC2k3'+
'9p0V1Fp7CWn3Fet+y6fz8PXMb1BfYKg6fLzHXaqCRaffHJCSkvhrWwIVEuxbot4o5T8/v'+
'TcmmAm3T78S4B6NBdLPv7f4WxbzYYRS8Y8k7Y9GZ1/8Jomfv+LlGNrs0/sN+PkCJATAJZ3W'+
'tIWqyg9GHnHVA+oKCdmItd2j6nEiNq7whNdJegMOWp3jI2BvJoauJc06lw6ZMHhuj4zDiDnEwP'+
'DCBmY6sHWMUx1xacahKYrRsvKYvE9/eOlEaQP7OCDmJm6VVwJIkSejOnmnMmUxLGMu6to17jruAj'+
'Wb4s0oXSKPg9J/M2rvgE0l0tWj3O6kt9jPH533K5Wj2I/i6s0blc9z9eY/WY4+HDHe+VFX9AqMmHuD'+
'yog//CUNDaG5HUSw10GM26gvswNpYWGih5Ju5ylvf9B';}
'AgAAAA**AQAAAA**aAAAAA**5Ca0RA**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJnY+lAZSFpg'+
'Wdj6x9nY+seQ**uoUAAA**AAMAAA**CVYGMzI5zQ2Wh9dcHROrT0o6/BWlHNSzb+sPVl+W7UK8o0'+
'zpmispZNrnzXjlqd5m5nZjWfXzEGFTZVw7B+2k14tcQyiCQQn0nD6ft5KUWsxZ4Ugx/EgilEFNhT7l'+
'iQXBxblWq1K3CJJtyCRu1Q/eyW0c4cttutktG3c5wFGR20QUm8pFBaXVNEB11jAyzz2dB+Ij3efuSTZR'+
'umGNaVHeNXkLXTfaVuOzREjU5zye4bh1cHtw72pS+oTbmKB+Svflhtq7asqnfrsllRENP6fEpCzJSVqbMW'+
'Om+rulRa0qKOOpEGk2Mme8HDdccwtqHIq1MwT9WbcF2pV6aGKpllU4H+ii7SYwDTr8mwb45t7l26loyszoZo'+
'NelhXq3TS85KwmDqwgZzVlHoY+4yZVe8FRvOY7rYbtCJtZnwv7fx8+tdoogeE2eW5hNkXPvuS+Wh9yj+T1yexp'+
'5szSfOVmn1Obik6Cz/qOxF+AIHpdO1N8qC6D/x85nlkxUbvVWBHkAVYsAxbQ1uZzpRIednc8wKLZ47cTUGPinP1B'+
'hgC9+l14Isquhsx5gx9t3vc79lzfRPMOaQ5k42vZaUFYTpQ2tYn7kQ9y850NPBdNVmUxLi5hCActWCHFplNrYVnnnm'+
'WOcuZT+DTUmh2OHiL59Av33CPhGNCGktEX0/I3FNTbM2OHCqet/eSRXNHM4JuuLhP2p7IyDfbowkXpwDZtanew64itUr'+
'iSInDbHpO9xlVK32t/+na6yNuCGqFEEtnl5gJ2OI1P';
//locHdr.Credentials.Username := 'inousa12'; locHdr.Credentials.AppId := '...';
//locHdr.Credentials.Password := 'atou121076'; locHdr.Credentials.DevId := '...';
locHdr.Credentials.AppId := 'INOUSSAOUEU258CIC9Z5E83UXC1BE5'; locHdr.Credentials.AuthCert := '...';
locHdr.Credentials.DevId := 'L11ZDC63VDJ1FPLJL5EA161OQ2MS95';
locHdr.Credentials.AuthCert := 'A266GKZC9F5$HI2HIH58A-D3JH2YA4';//'L11ZDC63VDJ1FPLJL5EA161OQ2MS95;INOUSSAOUEU258CIC9Z5E83UXC1BE5;A266GKZC9F5$HI2HIH58A-D3JH2YA4';
locService := TeBayAPIInterfaceService_Proxy.Create( locService := TeBayAPIInterfaceService_Proxy.Create(
'eBayAPIInterfaceService', 'eBayAPIInterfaceService',
'SOAP:Style=Document;EncodingStyle=Litteral', 'SOAP:Style=Document;EncodingStyle=Litteral',

View File

@@ -7,7 +7,7 @@
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="3"/> <ActiveEditorIndexAtStart Value="2"/>
</General> </General>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
@@ -52,7 +52,7 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="synapse_http_protocol"/> <UnitName Value="synapse_http_protocol"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="157"/> <TopLine Value="153"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="63"/> <UsageCount Value="63"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@@ -109,8 +109,8 @@
<Filename Value="ebay.pas"/> <Filename Value="ebay.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ebay"/> <UnitName Value="ebay"/>
<CursorPos X="13" Y="536"/> <CursorPos X="42" Y="535"/>
<TopLine Value="525"/> <TopLine Value="534"/>
<EditorIndex Value="3"/> <EditorIndex Value="3"/>
<UsageCount Value="47"/> <UsageCount Value="47"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@@ -137,7 +137,7 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ebay_proxy"/> <UnitName Value="ebay_proxy"/>
<CursorPos X="26" Y="96"/> <CursorPos X="26" Y="96"/>
<TopLine Value="77"/> <TopLine Value="70"/>
<EditorIndex Value="2"/> <EditorIndex Value="2"/>
<UsageCount Value="47"/> <UsageCount Value="47"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@@ -206,28 +206,7 @@
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit22> </Unit22>
</Units> </Units>
<JumpHistory Count="5" HistoryIndex="4"> <JumpHistory Count="0" HistoryIndex="-1"/>
<Position1>
<Filename Value="umain.pas"/>
<Caret Line="31" Column="25" TopLine="26"/>
</Position1>
<Position2>
<Filename Value="umain.pas"/>
<Caret Line="149" Column="36" TopLine="138"/>
</Position2>
<Position3>
<Filename Value="umain.pas"/>
<Caret Line="46" Column="24" TopLine="33"/>
</Position3>
<Position4>
<Filename Value="ebay_proxy.pas"/>
<Caret Line="96" Column="26" TopLine="77"/>
</Position4>
<Position5>
<Filename Value="ebay.pas"/>
<Caret Line="524" Column="5" TopLine="515"/>
</Position5>
</JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="5"/>
@@ -248,7 +227,6 @@
</Options> </Options>
</Linking> </Linking>
<Other> <Other>
<CustomOptions Value=""/>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>
</CompilerOptions> </CompilerOptions>

View File

@@ -1,13 +0,0 @@
LazarusResources.Add('GOOGLEWEBAPI','wst_meta',[
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#12'googlewebapi'#1#0#0#0#13'IGoogleSear'
+'ch'#2#0#0#0#20'doSpellingSuggestion'#3#0#0#0#3'key'#0#0#0#6'string'#0#0#0#0
+#0#0#0#1#0#0#0#6'phrase'#0#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0
+#0#6'string'#0#0#0#0#0#0#0#3#0#0#0#14'doGoogleSearch'#11#0#0#0#3'key'#0#0#0#6
+'string'#0#0#0#0#0#0#0#1#0#0#0#1'q'#0#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#5
+'start'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#10'maxResults'#0#0#0#7'Intege'
+'r'#0#0#0#0#0#0#0#1#0#0#0#6'filter'#0#0#0#7'Boolean'#0#0#0#0#0#0#0#1#0#0#0#8
+'restrict'#0#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#10'safeSearch'#0#0#0#7'Bool'
+'ean'#0#0#0#0#0#0#0#1#0#0#0#2'lr'#0#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#2'ie'
+#0#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#2'oe'#0#0#0#6'string'#0#0#0#0#0#0#0#1
+#0#0#0#6'result'#0#0#0#19'TGoogleSearchResult'#0#0#0#0#0#0#0#3
]);

View File

@@ -0,0 +1,13 @@
GetWSTResourceManager().AddResource('GOOGLEWEBAPI',
#0#0#0#20'WST_METADATA_0.2.2.0'#0#0#0#12'googlewebapi'#1#0#0#0#13'IGoogleSea'
+'rch'#2#0#0#0#20'doSpellingSuggestion'#3#0#0#0#3'key'#0#0#0#6'string'#0#0#0#0
+#0#0#0#1#0#0#0#6'phrase'#0#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#6'result'#0#0
+#0#6'string'#0#0#0#0#0#0#0#3#0#0#0#14'doGoogleSearch'#11#0#0#0#3'key'#0#0#0#6
+'string'#0#0#0#0#0#0#0#1#0#0#0#1'q'#0#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#5's'
+'tart'#0#0#0#7'Integer'#0#0#0#0#0#0#0#1#0#0#0#10'maxResults'#0#0#0#7'Integer'
+#0#0#0#0#0#0#0#1#0#0#0#6'filter'#0#0#0#7'Boolean'#0#0#0#0#0#0#0#1#0#0#0#8're'
+'strict'#0#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#10'safeSearch'#0#0#0#7'Boolea'
+'n'#0#0#0#0#0#0#0#1#0#0#0#2'lr'#0#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#2'ie'#0
+#0#0#6'string'#0#0#0#0#0#0#0#1#0#0#0#2'oe'#0#0#0#6'string'#0#0#0#0#0#0#0#1#0
+#0#0#6'result'#0#0#0#19'TGoogleSearchResult'#0#0#0#0#0#0#0#3''
);

View File

@@ -2,15 +2,15 @@
This unit has been produced by ws_helper. This unit has been produced by ws_helper.
Input unit name : "googlewebapi". Input unit name : "googlewebapi".
This unit name : "googlewebapi_binder". This unit name : "googlewebapi_binder".
Date : "08/06/2006 23:28". Date : "12/11/2006 00:24".
} }
Unit googlewebapi_binder; unit googlewebapi_binder;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
Interface interface
Uses SysUtils, Classes, base_service_intf, server_service_intf, googlewebapi; uses SysUtils, Classes, base_service_intf, server_service_intf, googlewebapi;
Type type
TGoogleSearch_ServiceBinder=class(TBaseServiceBinder) TGoogleSearch_ServiceBinder=class(TBaseServiceBinder)
@@ -29,11 +29,12 @@ Type
procedure Server_service_RegisterGoogleSearchService(); procedure Server_service_RegisterGoogleSearchService();
Implementation Implementation
uses TypInfo; uses TypInfo, wst_resources_imp,metadata_repository;
{ TGoogleSearch_ServiceBinder implementation } { TGoogleSearch_ServiceBinder implementation }
procedure TGoogleSearch_ServiceBinder.doSpellingSuggestionHandler(AFormatter:IFormatterResponse); procedure TGoogleSearch_ServiceBinder.doSpellingSuggestionHandler(AFormatter:IFormatterResponse);
Var Var
cllCntrl : ICallControl;
tmpObj : IGoogleSearch; tmpObj : IGoogleSearch;
callCtx : ICallContext; callCtx : ICallContext;
strPrmName : string; strPrmName : string;
@@ -41,14 +42,15 @@ Var
key : string; key : string;
phrase : string; phrase : string;
returnVal : string; returnVal : string;
locTypeInfo : PTypeInfo;
Begin Begin
callCtx := CreateCallContext(); callCtx := GetCallContext();
strPrmName := 'key'; AFormatter.Get(TypeInfo(string),strPrmName,key); strPrmName := 'key'; AFormatter.Get(TypeInfo(string),strPrmName,key);
strPrmName := 'phrase'; AFormatter.Get(TypeInfo(string),strPrmName,phrase); strPrmName := 'phrase'; AFormatter.Get(TypeInfo(string),strPrmName,phrase);
tmpObj := Self.GetFactory().CreateInstance() as IGoogleSearch; tmpObj := Self.GetFactory().CreateInstance() as IGoogleSearch;
if Supports(tmpObj,ICallControl,cllCntrl) then
cllCntrl.SetCallContext(GetCallContext());
returnVal := tmpObj.doSpellingSuggestion(key,phrase); returnVal := tmpObj.doSpellingSuggestion(key,phrase);
@@ -64,6 +66,7 @@ End;
procedure TGoogleSearch_ServiceBinder.doGoogleSearchHandler(AFormatter:IFormatterResponse); procedure TGoogleSearch_ServiceBinder.doGoogleSearchHandler(AFormatter:IFormatterResponse);
Var Var
cllCntrl : ICallControl;
tmpObj : IGoogleSearch; tmpObj : IGoogleSearch;
callCtx : ICallContext; callCtx : ICallContext;
strPrmName : string; strPrmName : string;
@@ -79,12 +82,9 @@ Var
ie : string; ie : string;
oe : string; oe : string;
returnVal : TGoogleSearchResult; returnVal : TGoogleSearchResult;
locTypeInfo : PTypeInfo;
Begin Begin
callCtx := CreateCallContext(); callCtx := GetCallContext();
locTypeInfo := TypeInfo(TGoogleSearchResult); Pointer(returnVal) := Nil;
If ( locTypeInfo^.Kind in [tkClass,tkInterface] ) Then
Pointer(returnVal) := Nil;
strPrmName := 'key'; AFormatter.Get(TypeInfo(string),strPrmName,key); strPrmName := 'key'; AFormatter.Get(TypeInfo(string),strPrmName,key);
strPrmName := 'q'; AFormatter.Get(TypeInfo(string),strPrmName,q); strPrmName := 'q'; AFormatter.Get(TypeInfo(string),strPrmName,q);
@@ -98,11 +98,12 @@ Begin
strPrmName := 'oe'; AFormatter.Get(TypeInfo(string),strPrmName,oe); strPrmName := 'oe'; AFormatter.Get(TypeInfo(string),strPrmName,oe);
tmpObj := Self.GetFactory().CreateInstance() as IGoogleSearch; tmpObj := Self.GetFactory().CreateInstance() as IGoogleSearch;
if Supports(tmpObj,ICallControl,cllCntrl) then
cllCntrl.SetCallContext(GetCallContext());
returnVal := tmpObj.doGoogleSearch(key,q,start,maxResults,filter,restrict,safeSearch,lr,ie,oe); returnVal := tmpObj.doGoogleSearch(key,q,start,maxResults,filter,restrict,safeSearch,lr,ie,oe);
locTypeInfo := TypeInfo(TGoogleSearchResult); If Assigned(Pointer(returnVal)) Then
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(returnVal)) Then callCtx.AddObjectToFree(TObject(returnVal));
callCtx.AddObject(TObject(returnVal));
procName := AFormatter.GetCallProcedureName(); procName := AFormatter.GetCallProcedureName();
trgName := AFormatter.GetCallTarget(); trgName := AFormatter.GetCallTarget();
@@ -117,7 +118,7 @@ End;
constructor TGoogleSearch_ServiceBinder.Create(); constructor TGoogleSearch_ServiceBinder.Create();
Begin Begin
Inherited Create(GetServiceImplementationRegistry().FindFactory('GoogleSearch')); Inherited Create(GetServiceImplementationRegistry().FindFactory('IGoogleSearch'));
RegisterVerbHandler('doSpellingSuggestion',@doSpellingSuggestionHandler); RegisterVerbHandler('doSpellingSuggestion',@doSpellingSuggestionHandler);
RegisterVerbHandler('doGoogleSearch',@doGoogleSearchHandler); RegisterVerbHandler('doGoogleSearch',@doGoogleSearchHandler);
End; End;
@@ -132,7 +133,15 @@ End;
procedure Server_service_RegisterGoogleSearchService(); procedure Server_service_RegisterGoogleSearchService();
Begin Begin
GetServerServiceRegistry().Register('GoogleSearch',TGoogleSearch_ServiceBinderFactory.Create() as IItemFactory); GetServerServiceRegistry().Register('IGoogleSearch',TGoogleSearch_ServiceBinderFactory.Create() as IItemFactory);
End; End;
initialization
{$IF DECLARED(Register_googlewebapi_NameSpace)}
Register_googlewebapi_NameSpace();
{$ENDIF}
{$i googlewebapi.wst}
End. End.

View File

@@ -2,7 +2,7 @@
This unit has been produced by ws_helper. This unit has been produced by ws_helper.
Input unit name : "googlewebapi". Input unit name : "googlewebapi".
This unit name : "googlewebapi_proxy". This unit name : "googlewebapi_proxy".
Date : "29/10/2006 15:02". Date : "12/11/2006 00:24".
} }
Unit googlewebapi_proxy; Unit googlewebapi_proxy;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
@@ -35,7 +35,7 @@ Type
End; End;
Implementation Implementation
uses LResources, metadata_repository; uses wst_resources_imp, metadata_repository;
{ TGoogleSearch_Proxy implementation } { TGoogleSearch_Proxy implementation }
@@ -115,7 +115,7 @@ End;
initialization initialization
{$i googlewebapi.lrs} {$i googlewebapi.wst}
{$IF DECLARED(Register_googlewebapi_ServiceMetadata)} {$IF DECLARED(Register_googlewebapi_ServiceMetadata)}
Register_googlewebapi_ServiceMetadata(); Register_googlewebapi_ServiceMetadata();

View File

@@ -1,200 +0,0 @@
{
This unit has been produced by ws_helper.
Input unit name : "googlewebapi".
This unit name : "googlewebapi_stub".
Date : "17/05/2006 21:28".
}
Unit googlewebapi_stub;
{$mode objfpc}{$H+}
Interface
Uses SysUtils, Classes, server_service_intf, googlewebapi;
Type
TGoogleSearch_ServiceBinder=class(TBaseServiceBinder)
Protected
procedure doSpellingSuggestionHandler(AFormatter:IFormatterResponse);
procedure doGoogleSearchHandler(AFormatter:IFormatterResponse);
Public
constructor Create();
End;
TGoogleSearchServiceBinderFactory = class(TInterfacedObject,IItemFactory)
protected
function CreateInstance():IInterface;
End;
procedure Server_service_RegisterGoogleSearchService();
Implementation
uses TypInfo, server_service_imputils;
{ TGoogleSearch_ServiceBinder implementation }
procedure TGoogleSearch_ServiceBinder.doSpellingSuggestionHandler(AFormatter:IFormatterResponse);
Var
tmpObj : IGoogleSearch;
callCtx : ICallContext;
strPrmName : string;
procName,trgName : string;
key : string;
phrase : string;
returnVal : string;
locTypeInfo : PTypeInfo;
Begin
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(returnVal) := Nil;
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(key) := Nil;
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(phrase) := Nil;
strPrmName := 'key'; AFormatter.Get(TypeInfo(string),strPrmName,key);
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(key)) Then
callCtx.AddObject(TObject(key));
strPrmName := 'phrase'; AFormatter.Get(TypeInfo(string),strPrmName,phrase);
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(phrase)) Then
callCtx.AddObject(TObject(phrase));
tmpObj := Self.GetFactory().CreateInstance() as IGoogleSearch;
returnVal := tmpObj.doSpellingSuggestion(key,phrase);
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(returnVal)) Then
callCtx.AddObject(TObject(returnVal));
procName := AFormatter.GetCallProcedureName();
trgName := AFormatter.GetCallTarget();
AFormatter.Clear();
AFormatter.BeginCallResponse(procName,trgName);
AFormatter.Put('return',TypeInfo(string),returnVal);
AFormatter.EndCallResponse();
End;
procedure TGoogleSearch_ServiceBinder.doGoogleSearchHandler(AFormatter:IFormatterResponse);
Var
tmpObj : IGoogleSearch;
callCtx : ICallContext;
strPrmName : string;
procName,trgName : string;
key : string;
q : string;
start : Integer;
maxResults : Integer;
filter : Boolean;
restrict : string;
safeSearch : Boolean;
lr : string;
ie : string;
oe : string;
returnVal : TGoogleSearchResult;
locTypeInfo : PTypeInfo;
Begin
locTypeInfo := TypeInfo(TGoogleSearchResult);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(returnVal) := Nil;
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(key) := Nil;
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(q) := Nil;
locTypeInfo := TypeInfo(Integer);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(start) := Nil;
locTypeInfo := TypeInfo(Integer);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(maxResults) := Nil;
locTypeInfo := TypeInfo(Boolean);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(filter) := Nil;
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(restrict) := Nil;
locTypeInfo := TypeInfo(Boolean);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(safeSearch) := Nil;
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(lr) := Nil;
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(ie) := Nil;
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind in [tkClass,tkObject,tkInterface] ) Then
Pointer(oe) := Nil;
strPrmName := 'key'; AFormatter.Get(TypeInfo(string),strPrmName,key);
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(key)) Then
callCtx.AddObject(TObject(key));
strPrmName := 'q'; AFormatter.Get(TypeInfo(string),strPrmName,q);
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(q)) Then
callCtx.AddObject(TObject(q));
strPrmName := 'start'; AFormatter.Get(TypeInfo(Integer),strPrmName,start);
locTypeInfo := TypeInfo(Integer);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(start)) Then
callCtx.AddObject(TObject(start));
strPrmName := 'maxResults'; AFormatter.Get(TypeInfo(Integer),strPrmName,maxResults);
locTypeInfo := TypeInfo(Integer);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(maxResults)) Then
callCtx.AddObject(TObject(maxResults));
strPrmName := 'filter'; AFormatter.Get(TypeInfo(Boolean),strPrmName,filter);
locTypeInfo := TypeInfo(Boolean);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(filter)) Then
callCtx.AddObject(TObject(filter));
strPrmName := 'restrict'; AFormatter.Get(TypeInfo(string),strPrmName,restrict);
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(restrict)) Then
callCtx.AddObject(TObject(restrict));
strPrmName := 'safeSearch'; AFormatter.Get(TypeInfo(Boolean),strPrmName,safeSearch);
locTypeInfo := TypeInfo(Boolean);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(safeSearch)) Then
callCtx.AddObject(TObject(safeSearch));
strPrmName := 'lr'; AFormatter.Get(TypeInfo(string),strPrmName,lr);
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(lr)) Then
callCtx.AddObject(TObject(lr));
strPrmName := 'ie'; AFormatter.Get(TypeInfo(string),strPrmName,ie);
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(ie)) Then
callCtx.AddObject(TObject(ie));
strPrmName := 'oe'; AFormatter.Get(TypeInfo(string),strPrmName,oe);
locTypeInfo := TypeInfo(string);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(oe)) Then
callCtx.AddObject(TObject(oe));
tmpObj := Self.GetFactory().CreateInstance() as IGoogleSearch;
returnVal := tmpObj.doGoogleSearch(key,q,start,maxResults,filter,restrict,safeSearch,lr,ie,oe);
locTypeInfo := TypeInfo(TGoogleSearchResult);
If ( locTypeInfo^.Kind = tkClass ) And Assigned(Pointer(returnVal)) Then
callCtx.AddObject(TObject(returnVal));
procName := AFormatter.GetCallProcedureName();
trgName := AFormatter.GetCallTarget();
AFormatter.Clear();
AFormatter.BeginCallResponse(procName,trgName);
AFormatter.Put('return',TypeInfo(TGoogleSearchResult),returnVal);
AFormatter.EndCallResponse();
End;
{ TGoogleSearchServiceBinderFactory }
function TGoogleSearchServiceBinderFactory.CreateInstance():IInterface;
Begin
Result := TGoogleSearch_ServiceBinder.Create() as IInterface;
End;
procedure Server_service_RegisterGoogleSearchService();
Begin
GetServerServiceRegistry().Register('GoogleSearch',TGoogleSearchServiceBinderFactory.Create() as IItemFactory);
End;

View File

@@ -12,7 +12,7 @@
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<ActiveEditorIndexAtStart Value="3"/> <ActiveEditorIndexAtStart Value="0"/>
</General> </General>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
@@ -32,15 +32,15 @@
<PackageName Value="indylaz"/> <PackageName Value="indylaz"/>
</Item1> </Item1>
</RequiredPackages> </RequiredPackages>
<Units Count="44"> <Units Count="47">
<Unit0> <Unit0>
<Filename Value="test_google_api.pas"/> <Filename Value="test_google_api.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="test_google_api"/> <UnitName Value="test_google_api"/>
<CursorPos X="19" Y="30"/> <CursorPos X="54" Y="12"/>
<TopLine Value="21"/> <TopLine Value="12"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="151"/> <UsageCount Value="154"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
@@ -49,7 +49,7 @@
<UnitName Value="googlewebapi"/> <UnitName Value="googlewebapi"/>
<CursorPos X="47" Y="85"/> <CursorPos X="47" Y="85"/>
<TopLine Value="73"/> <TopLine Value="73"/>
<UsageCount Value="151"/> <UsageCount Value="154"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="googlewebapiimpunit.pas"/> <Filename Value="googlewebapiimpunit.pas"/>
@@ -153,7 +153,7 @@
<UnitName Value="indy_http_protocol"/> <UnitName Value="indy_http_protocol"/>
<CursorPos X="45" Y="166"/> <CursorPos X="45" Y="166"/>
<TopLine Value="156"/> <TopLine Value="156"/>
<UsageCount Value="66"/> <UsageCount Value="69"/>
</Unit16> </Unit16>
<Unit17> <Unit17>
<Filename Value="..\..\ics_http_protocol.pas"/> <Filename Value="..\..\ics_http_protocol.pas"/>
@@ -161,7 +161,7 @@
<UnitName Value="ics_http_protocol"/> <UnitName Value="ics_http_protocol"/>
<CursorPos X="3" Y="17"/> <CursorPos X="3" Y="17"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="128"/> <UsageCount Value="131"/>
</Unit17> </Unit17>
<Unit18> <Unit18>
<Filename Value="D:\Lazarus\others_package\ics\latest_distr\Delphi\Vc32\HttpProt.pas"/> <Filename Value="D:\Lazarus\others_package\ics\latest_distr\Delphi\Vc32\HttpProt.pas"/>
@@ -231,7 +231,7 @@
<CursorPos X="36" Y="29"/> <CursorPos X="36" Y="29"/>
<TopLine Value="12"/> <TopLine Value="12"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="47"/> <UsageCount Value="49"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit27> </Unit27>
<Unit28> <Unit28>
@@ -240,15 +240,17 @@
<CursorPos X="3" Y="694"/> <CursorPos X="3" Y="694"/>
<TopLine Value="666"/> <TopLine Value="666"/>
<EditorIndex Value="2"/> <EditorIndex Value="2"/>
<UsageCount Value="47"/> <UsageCount Value="49"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit28> </Unit28>
<Unit29> <Unit29>
<Filename Value="..\..\base_service_intf.pas"/> <Filename Value="..\..\base_service_intf.pas"/>
<UnitName Value="base_service_intf"/> <UnitName Value="base_service_intf"/>
<CursorPos X="32" Y="1595"/> <CursorPos X="55" Y="2854"/>
<TopLine Value="1593"/> <TopLine Value="2811"/>
<UsageCount Value="31"/> <EditorIndex Value="6"/>
<UsageCount Value="33"/>
<Loaded Value="True"/>
</Unit29> </Unit29>
<Unit30> <Unit30>
<Filename Value="D:\lazarusClean\fpcsrc\rtl\objpas\objpas.pp"/> <Filename Value="D:\lazarusClean\fpcsrc\rtl\objpas\objpas.pp"/>
@@ -274,11 +276,9 @@
<Filename Value="googlewebapi_proxy.pas"/> <Filename Value="googlewebapi_proxy.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="googlewebapi_proxy"/> <UnitName Value="googlewebapi_proxy"/>
<CursorPos X="19" Y="104"/> <CursorPos X="6" Y="38"/>
<TopLine Value="93"/> <TopLine Value="24"/>
<EditorIndex Value="7"/> <UsageCount Value="72"/>
<UsageCount Value="69"/>
<Loaded Value="True"/>
</Unit33> </Unit33>
<Unit34> <Unit34>
<Filename Value="..\..\..\v0.2\base_service_intf.pas"/> <Filename Value="..\..\..\v0.2\base_service_intf.pas"/>
@@ -298,10 +298,8 @@
<Filename Value="..\..\synapse_http_protocol.pas"/> <Filename Value="..\..\synapse_http_protocol.pas"/>
<UnitName Value="synapse_http_protocol"/> <UnitName Value="synapse_http_protocol"/>
<CursorPos X="3" Y="178"/> <CursorPos X="3" Y="178"/>
<TopLine Value="153"/> <TopLine Value="134"/>
<EditorIndex Value="3"/>
<UsageCount Value="12"/> <UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit36> </Unit36>
<Unit37> <Unit37>
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/> <Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
@@ -336,32 +334,53 @@
<UnitName Value="imp_utils"/> <UnitName Value="imp_utils"/>
<CursorPos X="1" Y="86"/> <CursorPos X="1" Y="86"/>
<TopLine Value="72"/> <TopLine Value="72"/>
<EditorIndex Value="6"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit41> </Unit41>
<Unit42> <Unit42>
<Filename Value="..\..\..\..\..\lazarusClean\lcl\include\lclintf.inc"/> <Filename Value="..\..\..\..\..\lazarusClean\lcl\include\lclintf.inc"/>
<CursorPos X="49" Y="342"/> <CursorPos X="49" Y="342"/>
<TopLine Value="336"/> <TopLine Value="336"/>
<EditorIndex Value="5"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit42> </Unit42>
<Unit43> <Unit43>
<Filename Value="..\..\..\..\..\lazarusClean\others_package\synapse\httpsend.pas"/> <Filename Value="..\..\..\..\..\lazarusClean\others_package\synapse\httpsend.pas"/>
<UnitName Value="httpsend"/> <UnitName Value="httpsend"/>
<CursorPos X="14" Y="143"/> <CursorPos X="14" Y="143"/>
<TopLine Value="120"/> <TopLine Value="120"/>
<UsageCount Value="10"/>
</Unit43>
<Unit44>
<Filename Value="..\..\metadata_repository.pas"/>
<UnitName Value="metadata_repository"/>
<CursorPos X="1" Y="498"/>
<TopLine Value="139"/>
<EditorIndex Value="4"/> <EditorIndex Value="4"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit44>
<Unit45>
<Filename Value="..\..\wst_resources_imp.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="wst_resources_imp"/>
<CursorPos X="23" Y="1"/>
<TopLine Value="19"/>
<EditorIndex Value="5"/>
<UsageCount Value="23"/>
<Loaded Value="True"/>
</Unit45>
<Unit46>
<Filename Value="googlewebapi.wst"/>
<CursorPos X="74" Y="13"/>
<TopLine Value="1"/>
<EditorIndex Value="3"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit43> </Unit46>
</Units> </Units>
<JumpHistory Count="1" HistoryIndex="0"> <JumpHistory Count="1" HistoryIndex="0">
<Position1> <Position1>
<Filename Value="test_google_api.pas"/> <Filename Value="googlewebapi.wst"/>
<Caret Line="30" Column="19" TopLine="21"/> <Caret Line="13" Column="74" TopLine="1"/>
</Position1> </Position1>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>

View File

@@ -9,7 +9,7 @@ uses
//indy_http_protocol, //indy_http_protocol,
ics_http_protocol, ics_http_protocol,
synapse_http_protocol, synapse_http_protocol,
googlewebapi, googlewebapi_proxy; googlewebapi, googlewebapi_proxy, wst_resources_imp;
Const Const
//sADRESS = 'http:Address=http://api.google.com/search/beta2;Proxy'; //sADRESS = 'http:Address=http://api.google.com/search/beta2;Proxy';

View File

@@ -7,6 +7,7 @@
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="0"/>
</General> </General>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
@@ -43,9 +44,11 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ResourceFilename Value="umain.lrs"/> <ResourceFilename Value="umain.lrs"/>
<UnitName Value="umain"/> <UnitName Value="umain"/>
<CursorPos X="9" Y="81"/> <CursorPos X="59" Y="99"/>
<TopLine Value="79"/> <TopLine Value="79"/>
<EditorIndex Value="0"/>
<UsageCount Value="74"/> <UsageCount Value="74"/>
<Loaded Value="True"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="..\..\metadata_service_proxy.pas"/> <Filename Value="..\..\metadata_service_proxy.pas"/>

View File

@@ -7,7 +7,7 @@
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="2"/> <ActiveEditorIndexAtStart Value="1"/>
</General> </General>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
@@ -53,8 +53,8 @@
<Filename Value="server_unit.pas"/> <Filename Value="server_unit.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="server_unit"/> <UnitName Value="server_unit"/>
<CursorPos X="25" Y="189"/> <CursorPos X="3" Y="9"/>
<TopLine Value="174"/> <TopLine Value="1"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="127"/> <UsageCount Value="127"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@@ -316,26 +316,22 @@
<UsageCount Value="20"/> <UsageCount Value="20"/>
</Unit37> </Unit37>
</Units> </Units>
<JumpHistory Count="3" HistoryIndex="2"> <JumpHistory Count="2" HistoryIndex="1">
<Position1> <Position1>
<Filename Value="server_unit.pas"/> <Filename Value="server_unit.pas"/>
<Caret Line="189" Column="25" TopLine="174"/> <Caret Line="189" Column="25" TopLine="174"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="..\..\server_service_intf.pas"/> <Filename Value="server_unit.pas"/>
<Caret Line="187" Column="31" TopLine="173"/> <Caret Line="9" Column="3" TopLine="1"/>
</Position2> </Position2>
<Position3>
<Filename Value="..\..\server_service_intf.pas"/>
<Caret Line="43" Column="3" TopLine="51"/>
</Position3>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="5"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="D:\Lazarus\others_package\ics\latest_distr\Delphi\Vc32\;..\calculator\;..\calculator\srv\;..\..\"/> <OtherUnitFiles Value="c:\LazarusClean\others_package\ics\latest_distr\Delphi\Vc32\;..\calculator\;..\calculator\srv\;..\..\"/>
<UnitOutputDirectory Value="obj"/> <UnitOutputDirectory Value="obj"/>
<SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\"/> <SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\"/>
</SearchPaths> </SearchPaths>
@@ -358,7 +354,8 @@
</Options> </Options>
</Linking> </Linking>
<Other> <Other>
<CustomOptions Value="-Xi"/> <CustomOptions Value="-Xi
"/>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>
</CompilerOptions> </CompilerOptions>

View File

@@ -876,7 +876,7 @@ begin
try try
AssertEquals(0,a.Length); AssertEquals(0,a.Length);
a.SetLength(0); a.SetLength(0);
AssertEquals(0,a.Length); AssertEquals('Length 1', 0,a.Length);
a.SetLength(AR_LEN); a.SetLength(AR_LEN);
AssertEquals(AR_LEN,a.Length); AssertEquals(AR_LEN,a.Length);
@@ -902,7 +902,7 @@ begin
x := 'a'; x := 'a';
f.Get(TypeInfo(TArrayOfStringRemotable),x,a); f.Get(TypeInfo(TArrayOfStringRemotable),x,a);
f.EndScopeRead(); f.EndScopeRead();
AssertEquals(AR_LEN,a.Length); AssertEquals('Length 2', AR_LEN,a.Length);
for i := 0 to Pred(AR_LEN) do for i := 0 to Pred(AR_LEN) do
AssertEquals(VAL_AR[i],a[i]); AssertEquals(VAL_AR[i],a[i]);

View File

@@ -7,7 +7,7 @@
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
<ActiveEditorIndexAtStart Value="6"/> <ActiveEditorIndexAtStart Value="9"/>
</General> </General>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
@@ -18,7 +18,7 @@
<RunParams> <RunParams>
<local> <local>
<FormatVersion Value="1"/> <FormatVersion Value="1"/>
<CommandLineParams Value="-a >E:\Inoussa\Sources\lazarus\wst\v0.3\tests\test_suite\obj\res.xml"/> <CommandLineParams Value="-a"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local> </local>
</RunParams> </RunParams>
@@ -27,23 +27,23 @@
<PackageName Value="FPCUnitTestRunner"/> <PackageName Value="FPCUnitTestRunner"/>
</Item1> </Item1>
</RequiredPackages> </RequiredPackages>
<Units Count="46"> <Units Count="47">
<Unit0> <Unit0>
<Filename Value="wst_test_suite.lpr"/> <Filename Value="wst_test_suite.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="wst_test_suite"/> <UnitName Value="wst_test_suite"/>
<CursorPos X="69" Y="11"/> <CursorPos X="69" Y="11"/>
<TopLine Value="9"/> <TopLine Value="9"/>
<UsageCount Value="148"/> <UsageCount Value="149"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="testformatter_unit.pas"/> <Filename Value="testformatter_unit.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="testformatter_unit"/> <UnitName Value="testformatter_unit"/>
<CursorPos X="55" Y="66"/> <CursorPos X="27" Y="905"/>
<TopLine Value="150"/> <TopLine Value="886"/>
<EditorIndex Value="9"/> <EditorIndex Value="9"/>
<UsageCount Value="148"/> <UsageCount Value="149"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
@@ -51,9 +51,9 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="server_service_soap"/> <UnitName Value="server_service_soap"/>
<CursorPos X="20" Y="205"/> <CursorPos X="20" Y="205"/>
<TopLine Value="171"/> <TopLine Value="162"/>
<EditorIndex Value="2"/> <EditorIndex Value="2"/>
<UsageCount Value="148"/> <UsageCount Value="149"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
@@ -63,7 +63,7 @@
<CursorPos X="8" Y="97"/> <CursorPos X="8" Y="97"/>
<TopLine Value="86"/> <TopLine Value="86"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="148"/> <UsageCount Value="149"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
@@ -73,7 +73,7 @@
<CursorPos X="39" Y="180"/> <CursorPos X="39" Y="180"/>
<TopLine Value="171"/> <TopLine Value="171"/>
<EditorIndex Value="6"/> <EditorIndex Value="6"/>
<UsageCount Value="148"/> <UsageCount Value="149"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit4> </Unit4>
<Unit5> <Unit5>
@@ -83,7 +83,7 @@
<CursorPos X="3" Y="106"/> <CursorPos X="3" Y="106"/>
<TopLine Value="121"/> <TopLine Value="121"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="148"/> <UsageCount Value="149"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit5> </Unit5>
<Unit6> <Unit6>
@@ -93,7 +93,7 @@
<CursorPos X="1" Y="1082"/> <CursorPos X="1" Y="1082"/>
<TopLine Value="1061"/> <TopLine Value="1061"/>
<EditorIndex Value="7"/> <EditorIndex Value="7"/>
<UsageCount Value="148"/> <UsageCount Value="149"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
@@ -103,7 +103,7 @@
<CursorPos X="15" Y="44"/> <CursorPos X="15" Y="44"/>
<TopLine Value="33"/> <TopLine Value="33"/>
<EditorIndex Value="4"/> <EditorIndex Value="4"/>
<UsageCount Value="148"/> <UsageCount Value="149"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit7> </Unit7>
<Unit8> <Unit8>
@@ -112,7 +112,7 @@
<UnitName Value="binary_streamer"/> <UnitName Value="binary_streamer"/>
<CursorPos X="32" Y="38"/> <CursorPos X="32" Y="38"/>
<TopLine Value="22"/> <TopLine Value="22"/>
<UsageCount Value="148"/> <UsageCount Value="149"/>
</Unit8> </Unit8>
<Unit9> <Unit9>
<Filename Value="..\..\server_binary_formatter.pas"/> <Filename Value="..\..\server_binary_formatter.pas"/>
@@ -120,7 +120,7 @@
<UnitName Value="server_binary_formatter"/> <UnitName Value="server_binary_formatter"/>
<CursorPos X="5" Y="136"/> <CursorPos X="5" Y="136"/>
<TopLine Value="92"/> <TopLine Value="92"/>
<UsageCount Value="148"/> <UsageCount Value="149"/>
</Unit9> </Unit9>
<Unit10> <Unit10>
<Filename Value="D:\lazarusClean\fpcsrc\fcl\fpcunit\fpcunit.pp"/> <Filename Value="D:\lazarusClean\fpcsrc\fcl\fpcunit\fpcunit.pp"/>
@@ -181,7 +181,7 @@
<UnitName Value="metadata_repository"/> <UnitName Value="metadata_repository"/>
<CursorPos X="3" Y="79"/> <CursorPos X="3" Y="79"/>
<TopLine Value="70"/> <TopLine Value="70"/>
<UsageCount Value="123"/> <UsageCount Value="124"/>
</Unit18> </Unit18>
<Unit19> <Unit19>
<Filename Value="D:\Lazarus\fpcsrc\rtl\objpas\typinfo.pp"/> <Filename Value="D:\Lazarus\fpcsrc\rtl\objpas\typinfo.pp"/>
@@ -197,7 +197,7 @@
<CursorPos X="83" Y="119"/> <CursorPos X="83" Y="119"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="8"/> <EditorIndex Value="8"/>
<UsageCount Value="116"/> <UsageCount Value="117"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit20> </Unit20>
<Unit21> <Unit21>
@@ -206,7 +206,7 @@
<UnitName Value="metadata_generator"/> <UnitName Value="metadata_generator"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="31"/> <TopLine Value="31"/>
<UsageCount Value="116"/> <UsageCount Value="117"/>
</Unit21> </Unit21>
<Unit22> <Unit22>
<Filename Value="..\..\ws_helper\parserdefs.pas"/> <Filename Value="..\..\ws_helper\parserdefs.pas"/>
@@ -214,7 +214,7 @@
<UnitName Value="parserdefs"/> <UnitName Value="parserdefs"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="116"/> <UsageCount Value="117"/>
</Unit22> </Unit22>
<Unit23> <Unit23>
<Filename Value="D:\Lazarus\fpcsrc\fcl\fpcunit\fpcunit.pp"/> <Filename Value="D:\Lazarus\fpcsrc\fcl\fpcunit\fpcunit.pp"/>
@@ -254,7 +254,7 @@
<UnitName Value="metadata_wsdl"/> <UnitName Value="metadata_wsdl"/>
<CursorPos X="38" Y="148"/> <CursorPos X="38" Y="148"/>
<TopLine Value="142"/> <TopLine Value="142"/>
<UsageCount Value="108"/> <UsageCount Value="109"/>
</Unit28> </Unit28>
<Unit29> <Unit29>
<Filename Value="D:\Lazarus\fpcsrc\fcl\xml\dom.pp"/> <Filename Value="D:\Lazarus\fpcsrc\fcl\xml\dom.pp"/>
@@ -315,7 +315,7 @@
<CursorPos X="35" Y="379"/> <CursorPos X="35" Y="379"/>
<TopLine Value="376"/> <TopLine Value="376"/>
<EditorIndex Value="3"/> <EditorIndex Value="3"/>
<UsageCount Value="42"/> <UsageCount Value="43"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit37> </Unit37>
<Unit38> <Unit38>
@@ -374,8 +374,28 @@
<TopLine Value="193"/> <TopLine Value="193"/>
<UsageCount Value="9"/> <UsageCount Value="9"/>
</Unit45> </Unit45>
<Unit46>
<Filename Value="..\..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\fpcunit\fpcunit.pp"/>
<UnitName Value="fpcunit"/>
<CursorPos X="21" Y="94"/>
<TopLine Value="80"/>
<UsageCount Value="10"/>
</Unit46>
</Units> </Units>
<JumpHistory Count="0" HistoryIndex="-1"/> <JumpHistory Count="3" HistoryIndex="2">
<Position1>
<Filename Value="testformatter_unit.pas"/>
<Caret Line="875" Column="3" TopLine="866"/>
</Position1>
<Position2>
<Filename Value="testformatter_unit.pas"/>
<Caret Line="2126" Column="1" TopLine="143"/>
</Position2>
<Position3>
<Filename Value="testformatter_unit.pas"/>
<Caret Line="877" Column="26" TopLine="863"/>
</Position3>
</JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="5"/>
@@ -403,7 +423,7 @@
</Other> </Other>
</CompilerOptions> </CompilerOptions>
<Debugging> <Debugging>
<BreakPoints Count="21"> <BreakPoints Count="19">
<Item1> <Item1>
<Source Value="..\google_api\home\inoussa\Projets\Laz\tests\soap\test_soap.pas"/> <Source Value="..\google_api\home\inoussa\Projets\Laz\tests\soap\test_soap.pas"/>
<Line Value="15"/> <Line Value="15"/>
@@ -477,17 +497,9 @@
<Line Value="363"/> <Line Value="363"/>
</Item18> </Item18>
<Item19> <Item19>
<Source Value="testformatter_unit.pas"/>
<Line Value="821"/>
</Item19>
<Item20>
<Source Value="testformatter_unit.pas"/>
<Line Value="809"/>
</Item20>
<Item21>
<Source Value="testformatter_unit.pas"/> <Source Value="testformatter_unit.pas"/>
<Line Value="909"/> <Line Value="909"/>
</Item21> </Item19>
</BreakPoints> </BreakPoints>
<Watches Count="2"> <Watches Count="2">
<Item1> <Item1>

View File

@@ -28,7 +28,10 @@ uses
Classes, SysUtils, Classes, SysUtils,
parserdefs, source_utils; parserdefs, source_utils;
Type const
sWST_EXTENSION = 'wst';
type
{ TBaseGenerator } { TBaseGenerator }
@@ -185,7 +188,7 @@ begin
SetCurrentStream(FImpStream); SetCurrentStream(FImpStream);
WriteLn(''); WriteLn('');
WriteLn('Implementation'); WriteLn('Implementation');
WriteLn('uses LResources, metadata_repository;'); WriteLn('uses wst_resources_imp, metadata_repository;');
end; end;
procedure TProxyGenerator.GenerateUnitImplementationFooter(); procedure TProxyGenerator.GenerateUnitImplementationFooter();
@@ -195,7 +198,7 @@ begin
SetCurrentStream(FImpStream); SetCurrentStream(FImpStream);
NewLine(); NewLine();
WriteLn('initialization'); WriteLn('initialization');
WriteLn(' {$i %s.lrs}',[SymbolTable.Name]); WriteLn(' {$i %s.%s}',[SymbolTable.Name,sWST_EXTENSION]);
NewLine(); NewLine();
s := Format('Register_%s_ServiceMetadata',[SymbolTable.Name]); s := Format('Register_%s_ServiceMetadata',[SymbolTable.Name]);
WriteLn(' {$IF DECLARED(%s)}',[s]); WriteLn(' {$IF DECLARED(%s)}',[s]);
@@ -590,7 +593,7 @@ begin
SetCurrentStream(FImpStream); SetCurrentStream(FImpStream);
WriteLn(''); WriteLn('');
WriteLn('Implementation'); WriteLn('Implementation');
WriteLn('uses TypInfo, LResources,metadata_repository;'); WriteLn('uses TypInfo, wst_resources_imp,metadata_repository;');
end; end;
procedure TBinderGenerator.GenerateUnitImplementationFooter(); procedure TBinderGenerator.GenerateUnitImplementationFooter();
@@ -605,7 +608,7 @@ begin
WriteLn(' %s();',[s]); WriteLn(' %s();',[s]);
WriteLn(' {$ENDIF}'); WriteLn(' {$ENDIF}');
NewLine(); NewLine();
WriteLn(' {$i %s.lrs}',[SymbolTable.Name]); WriteLn(' {$i %s.%s}',[SymbolTable.Name,sWST_EXTENSION]);
NewLine(); NewLine();
WriteLn('End.'); WriteLn('End.');
end; end;

View File

@@ -1,3 +1,22 @@
{
This unit is part of the Web Service Toolkit
Copyright (c) 2006 by Inoussa OUEDRAOGO
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit metadata_generator; unit metadata_generator;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}

View File

@@ -27,42 +27,39 @@
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
</local> </local>
</RunParams> </RunParams>
<RequiredPackages Count="2"> <RequiredPackages Count="1">
<Item1> <Item1>
<PackageName Value="LCL"/>
</Item1>
<Item2>
<PackageName Value="FCL"/> <PackageName Value="FCL"/>
</Item2> </Item1>
</RequiredPackages> </RequiredPackages>
<Units Count="30"> <Units Count="35">
<Unit0> <Unit0>
<Filename Value="ws_helper.pas"/> <Filename Value="ws_helper.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ws_helper"/> <UnitName Value="ws_helper"/>
<CursorPos X="1" Y="95"/> <CursorPos X="1" Y="1"/>
<TopLine Value="84"/> <TopLine Value="1"/>
<UsageCount Value="195"/> <UsageCount Value="200"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="ws_parser.pas"/> <Filename Value="ws_parser.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ws_parser"/> <UnitName Value="ws_parser"/>
<CursorPos X="20" Y="456"/> <CursorPos X="21" Y="192"/>
<TopLine Value="453"/> <TopLine Value="234"/>
<UsageCount Value="195"/> <UsageCount Value="200"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="generator.pas"/> <Filename Value="generator.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="generator"/> <UnitName Value="generator"/>
<CursorPos X="1" Y="870"/> <CursorPos X="39" Y="16"/>
<TopLine Value="859"/> <TopLine Value="148"/>
<UsageCount Value="195"/> <UsageCount Value="200"/>
<Bookmarks Count="3"> <Bookmarks Count="3">
<Item0 X="43" Y="689" ID="0"/> <Item0 X="43" Y="692" ID="0"/>
<Item1 X="69" Y="826" ID="1"/> <Item1 X="69" Y="829" ID="1"/>
<Item2 X="17" Y="191" ID="2"/> <Item2 X="17" Y="194" ID="2"/>
</Bookmarks> </Bookmarks>
</Unit2> </Unit2>
<Unit3> <Unit3>
@@ -71,7 +68,7 @@
<UnitName Value="parserdefs"/> <UnitName Value="parserdefs"/>
<CursorPos X="14" Y="119"/> <CursorPos X="14" Y="119"/>
<TopLine Value="29"/> <TopLine Value="29"/>
<UsageCount Value="195"/> <UsageCount Value="200"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="parserutils.pas"/> <Filename Value="parserutils.pas"/>
@@ -79,7 +76,7 @@
<UnitName Value="parserutils"/> <UnitName Value="parserutils"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="23"/> <TopLine Value="23"/>
<UsageCount Value="195"/> <UsageCount Value="200"/>
</Unit4> </Unit4>
<Unit5> <Unit5>
<Filename Value="ws_helper.lpi"/> <Filename Value="ws_helper.lpi"/>
@@ -136,7 +133,7 @@
<UnitName Value="source_utils"/> <UnitName Value="source_utils"/>
<CursorPos X="1" Y="231"/> <CursorPos X="1" Y="231"/>
<TopLine Value="220"/> <TopLine Value="220"/>
<UsageCount Value="174"/> <UsageCount Value="179"/>
</Unit12> </Unit12>
<Unit13> <Unit13>
<Filename Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/> <Filename Value="D:\lazarusClean\fpcsrc\rtl\inc\getopts.pp"/>
@@ -170,15 +167,15 @@
<UnitName Value="command_line_parser"/> <UnitName Value="command_line_parser"/>
<CursorPos X="1" Y="53"/> <CursorPos X="1" Y="53"/>
<TopLine Value="42"/> <TopLine Value="42"/>
<UsageCount Value="154"/> <UsageCount Value="159"/>
</Unit17> </Unit17>
<Unit18> <Unit18>
<Filename Value="metadata_generator.pas"/> <Filename Value="metadata_generator.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="metadata_generator"/> <UnitName Value="metadata_generator"/>
<CursorPos X="15" Y="30"/> <CursorPos X="1" Y="19"/>
<TopLine Value="30"/> <TopLine Value="1"/>
<UsageCount Value="105"/> <UsageCount Value="110"/>
</Unit18> </Unit18>
<Unit19> <Unit19>
<Filename Value="..\binary_streamer.pas"/> <Filename Value="..\binary_streamer.pas"/>
@@ -186,7 +183,7 @@
<UnitName Value="binary_streamer"/> <UnitName Value="binary_streamer"/>
<CursorPos X="6" Y="13"/> <CursorPos X="6" Y="13"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="105"/> <UsageCount Value="110"/>
</Unit19> </Unit19>
<Unit20> <Unit20>
<Filename Value="D:\Lazarus\fpcsrc\rtl\objpas\sysutils\finah.inc"/> <Filename Value="D:\Lazarus\fpcsrc\rtl\objpas\sysutils\finah.inc"/>
@@ -251,6 +248,40 @@
<TopLine Value="299"/> <TopLine Value="299"/>
<UsageCount Value="8"/> <UsageCount Value="8"/>
</Unit29> </Unit29>
<Unit30>
<Filename Value="wst_resources_utils.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="wst_resources_utils"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="25"/>
</Unit30>
<Unit31>
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\win32\classes.pp"/>
<UnitName Value="Classes"/>
<CursorPos X="8" Y="27"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit31>
<Unit32>
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\win32\sysutils.pp"/>
<UnitName Value="sysutils"/>
<CursorPos X="15" Y="33"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit32>
<Unit33>
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysutilh.inc"/>
<CursorPos X="15" Y="19"/>
<TopLine Value="7"/>
<UsageCount Value="10"/>
</Unit33>
<Unit34>
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\osutilsh.inc"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit34>
</Units> </Units>
<JumpHistory Count="0" HistoryIndex="-1"/> <JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectOptions> </ProjectOptions>

View File

@@ -23,7 +23,7 @@ program ws_helper;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
uses uses
Classes, SysUtils, LResources, Classes, SysUtils, wst_resources_utils,
parserdefs, ws_parser, generator, parserutils, source_utils, parserdefs, ws_parser, generator, parserutils, source_utils,
command_line_parser, metadata_generator, binary_streamer; command_line_parser, metadata_generator, binary_streamer;
@@ -109,8 +109,9 @@ Var
mtdaFS.SaveToFile(ChangeFileExt(inFileName,'.' + sWST_META)); mtdaFS.SaveToFile(ChangeFileExt(inFileName,'.' + sWST_META));
rsrcStrm := TMemoryStream.Create(); rsrcStrm := TMemoryStream.Create();
mtdaFS.Position := 0; mtdaFS.Position := 0;
BinaryToLazarusResourceCode(mtdaFS,rsrcStrm,UpperCase(p.SymbolTable.Name),sWST_META); //BinaryToLazarusResourceCode(mtdaFS,rsrcStrm,UpperCase(p.SymbolTable.Name),sWST_META);
rsrcStrm.SaveToFile(outPath + ChangeFileExt(ExtractFileName(inFileName),'.lrs')); BinToWstRessource(UpperCase(p.SymbolTable.Name),mtdaFS,rsrcStrm);
rsrcStrm.SaveToFile(outPath + ChangeFileExt(ExtractFileName(inFileName),'.' + sWST_EXTENSION));
end; end;
Result := True; Result := True;

View File

@@ -197,6 +197,7 @@ begin
Tokenizer.CheckToken(toSymbol); Tokenizer.CheckToken(toSymbol);
If Tokenizer.TokenSymbolIs(GetPascalTokenStr(ptUses)) Then If Tokenizer.TokenSymbolIs(GetPascalTokenStr(ptUses)) Then
ParseUses(); ParseUses();
ReadUntil(GetPascalTokenStr(ptType),True);
Tokenizer.CheckToken(toSymbol); Tokenizer.CheckToken(toSymbol);
If Tokenizer.TokenSymbolIs(GetPascalTokenStr(ptType)) Then Begin If Tokenizer.TokenSymbolIs(GetPascalTokenStr(ptType)) Then Begin
NextToken(); NextToken();

View File

@@ -0,0 +1,127 @@
unit wst_resources_utils;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
procedure BinToWstRessource(
const AResourceName : string;
ABinStream,
AWstRstream : TStream
);
implementation
procedure BinToWstRessource(
const AResourceName : string;
ABinStream,
AWstRstream : TStream
);
const MAX_LINE_LEN = 80; READ_LEN = 1024; WRITE_LEN = 1024;
type TWritingState = ( wsBegin, wsInString, wsOutString);
var
locInBuffer, locOutBuffer : string;
locInBufferLen, locOutBufferLen, locLineLen, locInIdx : Integer;
locChar : Char;
locState : TWritingState;
locTotalRead : Integer;
procedure FillInBuffer();
begin
locInIdx := 1;
SetLength(locInBuffer,READ_LEN);
locInBufferLen := ABinStream.Read(Pointer(locInBuffer)^,READ_LEN);
SetLength(locInBuffer,locInBufferLen);
Inc(locTotalRead,locInBufferLen);
end;
procedure FlushBuffer();
begin
locOutBufferLen := Length(locOutBuffer);
if ( locOutBufferLen > 0 ) then begin
AWstRstream.Write(Pointer(locOutBuffer)^,locOutBufferLen);
locOutBuffer := '';
locOutBufferLen := 0;
end;
end;
function ReadChar():Boolean;
begin
if ( locInBufferLen = 0 ) or ( locInIdx > locInBufferLen ) then
FillInBuffer();
Result := ( locInBufferLen > 0 ) and ( locInIdx <= locInBufferLen );
if Result then begin
locChar := locInBuffer[locInIdx];
Inc(locInIdx);
end;
end;
procedure WriteChar(const AChar : Char);
begin
locOutBuffer := locOutBuffer + AChar;
Inc(locLineLen);
end;
var
s : string;
begin
locTotalRead := 0;
locLineLen := 0;
locInBufferLen := 0;
locOutBufferLen := 0;
locInIdx := 0;
locState := wsBegin;
locInBuffer := '';
locOutBuffer := Format(' GetWSTResourceManager().AddResource(''%s'','+sLineBreak + ' ',[AResourceName]);
while ReadChar() do begin
if ( Ord(locChar) in [32..127] ) then begin
case locState of
wsBegin : WriteChar('''');
wsInString : ;
wsOutString : WriteChar('''');
end;
WriteChar(locChar);
if ( locChar = '''' ) then
WriteChar(locChar);
locState := wsInString;
end else begin
case locState of
wsBegin : ;
wsInString : WriteChar('''');
wsOutString : ;
end;
WriteChar('#');
s := IntToStr(Ord(locChar));
locOutBuffer := locOutBuffer + s;
Inc(locLineLen,Length(s));
locState := wsOutString;
end;
if ( ( locLineLen + 4 ) >= MAX_LINE_LEN ) then begin
if ( locState = wsInString ) then
WriteChar('''');
locOutBuffer := locOutBuffer + sLineBreak + ' +';
locLineLen := 0;
locState := wsBegin;
end;
locOutBufferLen := Length(locOutBuffer);
if ( locOutBufferLen >= WRITE_LEN ) then begin
FlushBuffer();
end;
end;
if ( locInBufferLen = 0 ) then begin
locState := wsInString;
WriteChar('''');
end;
if ( locState = wsInString ) then
WriteChar('''');
if ( locLineLen > 0 ) then
locOutBuffer := locOutBuffer + sLineBreak;
locOutBuffer := locOutBuffer + ' );';
FlushBuffer();
end;
end.

View File

@@ -0,0 +1,236 @@
unit wst_resources_imp;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
type
EWSTResourceException = class(Exception)
end;
TWSTResourceManager = Class(TPersistent)
Public
Procedure Assign(Source : TPersistent); override;
Function HasResource(Const AName : String) : Boolean; virtual; abstract;
Function ResourceAsString(Const AName : String) : String; virtual; abstract;
Procedure AddResource(Const AName,AValue : String); virtual; Abstract;
Procedure AddResource(const Name: AnsiString; Values: array of string);
Procedure GetResourceList(List : TStrings); virtual; abstract;
end;
Function GetWSTResourceManager(Force : Boolean = True) : TWSTResourceManager;
Function SetWSTResourceManager(AValue : TWSTResourceManager) : TWSTResourceManager;
implementation
ResourceString
SErrNoSuchResource = 'No such resource in resource list: "%s"';
Type
{ Default implementation of resource manager }
TWSTResourceItem = Class(TCollectionItem)
Private
FName : String;
FValue : String;
Public
Property Name : String Read FName Write FName;
Property Value : String Read FValue Write FValue;
end;
TWSTResourceItems = Class(TCollection)
Private
Function GetResource(AIndex : Integer) : TWSTResourceItem;
Procedure SetResource(AIndex : Integer; AValue : TWSTResourceItem);
Public
Function IndexOfResource(AName : String) : Integer;
Function FindResource(AName : String) : TWSTResourceItem;
Function ResourceByName(AName : String) : TWSTResourceItem;
Property Resources[Index : Integer] : TWSTResourceItem Read GetResource Write SetResource; default;
end;
TCollectionResourceManager = Class(TWSTResourceManager)
FResources : TWSTResourceItems;
Public
Constructor Create;
Destructor Destroy; override;
Function HasResource(Const AName : String) : Boolean; override;
Function ResourceAsString(Const AName : String) : String; override;
Procedure AddResource(Const AName,AValue : String); override;
Procedure GetResourceList(List : TStrings); override;
end;
Function TWSTResourceItems.GetResource(AIndex : Integer) : TWSTResourceItem;
begin
Result:=TWSTResourceItem(Items[AIndex]);
end;
Procedure TWSTResourceItems.SetResource(AIndex : Integer; AValue : TWSTResourceItem);
begin
Items[AIndex]:=AValue;
end;
Function TWSTResourceItems.IndexOfResource(AName : String) : Integer;
begin
Result:=Count-1;
While (Result>=0) and (CompareText(GetResource(Result).Name,AName)<>0) do
Dec(Result);
end;
Function TWSTResourceItems.FindResource(AName : String) : TWSTResourceItem;
Var
I : Integer;
begin
I:=IndexOfResource(AName);
If (I=-1) then
Result:=Nil
else
Result:=GetResource(I);
end;
Function TWSTResourceItems.ResourceByName(AName : String) : TWSTResourceItem;
begin
Result:=FindResource(AName);
If (Result=Nil) then
Raise EWSTResourceException.CreateFmt(SErrNoSuchResource,[ANAme]);
end;
Procedure TWSTResourceManager.Assign(Source : TPersistent);
Var
I : integer;
L : TStringList;
S : String;
R : TWSTResourceManager;
begin
If Source is TWSTResourceManager then
begin
L:=TStringList.Create;
try
R:=TWSTResourceManager(Source);
R.GetResourceList(L);
For I:=0 to L.Count-1 do
begin
S:=R.ResourceAsString(L[i]);
Self.AddResource(L[i],S);
end;
finally
L.free;
end;
end;
end;
procedure TWSTResourceManager.AddResource(const Name: AnsiString; Values: array of string);
var
i,L,TLen, p: integer;
S : String;
begin
L:=High(Values)-Low(Values)+1;
If (L=1) then
S:=Values[0]
else if (L>1) then
begin
TLen:=0;
for I:=Low(Values) to High(Values) do
TLen:=TLen+Length(Values[i]);
SetLength(S,TLen);
p:=1;
for i:=Low(Values) to High(Values) do
begin
L:=length(Values[i]);
if (L>0) then
begin
Move(Values[i][1],S[p],l);
inc(p,l);
end;
end;
end;
If (S<>'') then
AddResource(Name,S);
end;
Function TCollectionResourceManager.HasResource(Const AName : String) : Boolean;
begin
Result:=FResources.IndexOfResource(AName)<>-1;
end;
Function TCollectionResourceManager.ResourceAsString(Const AName : String) : String;
begin
Result:=FResources.ResourceByName(AName).Value;
end;
Procedure TCollectionResourceManager.AddResource(Const AName,AValue : String);
Var
R : TWSTResourceItem;
begin
R:=FResources.Add as TWSTResourceItem;
R.Name:=AName;
R.Value:=AValue;
end;
Procedure TCollectionResourceManager.GetResourceList(List : TStrings);
Var
I : Integer;
begin
For I:=0 to FResources.Count-1 do
List.Add(FResources[i].Name);
end;
Constructor TCollectionResourceManager.Create;
begin
FResources:=TWSTResourceItems.Create(TWSTResourceItem);
end;
Destructor TCollectionResourceManager.Destroy;
begin
FResources.Free;
Inherited;
end;
Var
ResMGR : TWSTResourceManager;
Function GetWSTResourceManager(Force : Boolean = True) : TWSTResourceManager;
begin
Result:=ResMGR;
If (ResMgr=Nil) and Force then
ResMGr:=TCollectionResourceManager.Create;
Result:=ResMGR;
end;
Function SetWSTResourceManager(AValue : TWSTResourceManager) : TWSTResourceManager;
begin
// Copy resources if needed.
If Assigned(ResMGR) and Assigned(AValue) then
AValue.Assign(ResMGR);
FreeAndNil(ResMGR);
ResMGR:=AValue;
end;
end.