Componentes.Terceros.RemObj.../internal/5.0.23.613/1/RemObjects SDK for Delphi/Source/DataSnap/uRODataSnap_Invk.pas
david 2824855ea7 - Modificación del paquete RemObjects_Core_D10 para que sea un paquete de runtime/designtime (antes era designtime sólo)
- Recompilación en Delphi10 de todos los paquetes de RO para generar las DCU's en Lib\D10
- Recompilación en Delphi10 de todos los paquetes de DA para generar las DCU's en Lib\D10

git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@9 b6239004-a887-0f4b-9937-50029ccdca16
2007-09-10 14:06:19 +00:00

213 lines
9.0 KiB
ObjectPascal

unit uRODataSnap_Invk;
interface
uses Classes, uROServer, uROClientIntf, uROServerIntf;
type
TAppServer_Invoker = class(TROInvoker)
published
procedure Invoke_AS_ApplyUpdates(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_AS_GetRecords(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_AS_DataRequest(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_AS_GetProviderNames(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_AS_GetParams(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_AS_RowRequest(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_AS_Execute(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
end;
implementation
uses {$IFDEF DEBUG_REMOBJECTS_DATASNAP}eDebugServer, uROBinMessage,{$ENDIF}
uROTypes, uRODataSnap_Intf;
procedure TAppServer_Invoker.Invoke_AS_ApplyUpdates(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
{ function AS_ApplyUpdates(const ProviderName: WideString; const Delta: Binary; const MaxErrors: Integer; out ErrorCount: Integer; var OwnerData: String): binary; }
var
ProviderName: WideString;
Delta: Binary;
MaxErrors: Integer;
ErrorCount: Integer;
OwnerData: String;
Result: binary;
begin
Delta := NIL;
Result := NIL;
try
__Message.Read('ProviderName', TypeInfo(WideString), ProviderName, []);
__Message.Read('Delta', TypeInfo(Binary), Delta, []);
__Message.Read('MaxErrors', TypeInfo(Integer), MaxErrors, []);
__Message.Read('OwnerData', TypeInfo(String), OwnerData, []);
Result := (__Instance as IAppServer).AS_ApplyUpdates(ProviderName, Delta, MaxErrors, ErrorCount, OwnerData);
__Message.InitializeResponseMessage(__Transport, '', 'IAppServer', 'AS_ApplyUpdatesResponse');
__Message.Write('ErrorCount', TypeInfo(Integer), ErrorCount, []);
__Message.Write('OwnerData', TypeInfo(String), OwnerData, []);
__Message.Write('Result', TypeInfo(binary), Result, []);
__Message.Finalize;
finally
Delta.Free;
Result.Free;
end;
end;
procedure TAppServer_Invoker.Invoke_AS_GetRecords(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
{ function AS_GetRecords(const ProviderName: WideString; const Count: Integer; out RecsOut: Integer; const Options: Integer; const CommandText: WideString; var Params: Binary; var OwnerData: String): binary; }
var
ProviderName: WideString;
Count: Integer;
RecsOut: Integer;
Options: Integer;
CommandText: WideString;
Params: Binary;
OwnerData: String;
Result: binary;
begin
Params := NIL;
Result := NIL;
try
__Message.Read('ProviderName', TypeInfo(WideString), ProviderName, []);
__Message.Read('Count', TypeInfo(Integer), Count, []);
__Message.Read('Options', TypeInfo(Integer), Options, []);
__Message.Read('CommandText', TypeInfo(WideString), CommandText, []);
__Message.Read('Params', TypeInfo(Binary), Params, []);
__Message.Read('OwnerData', TypeInfo(String), OwnerData, []);
Result := (__Instance as uRODataSnap_Intf.IAppServer).AS_GetRecords(ProviderName, Count, RecsOut, Options, CommandText, Params, OwnerData);
__Message.InitializeResponseMessage(__Transport, '', 'IAppServer', 'AS_GetRecordsResponse');
__Message.Write('RecsOut', TypeInfo(Integer), RecsOut, []);
__Message.Write('Params', TypeInfo(Binary), Params, []);
__Message.Write('OwnerData', TypeInfo(String), OwnerData, []);
__Message.Write('Result', TypeInfo(binary), Result, []);
__Message.Finalize;
finally
Params.Free;
Result.Free;
end;
end;
procedure TAppServer_Invoker.Invoke_AS_DataRequest(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
{ function AS_DataRequest(const ProviderName: WideString; const Data: Binary): binary; }
var
ProviderName: WideString;
Data: Binary;
Result: binary;
begin
Data := NIL;
Result := NIL;
try
__Message.Read('ProviderName', TypeInfo(WideString), ProviderName, []);
__Message.Read('Data', TypeInfo(Binary), Data, []);
Result := (__Instance as IAppServer).AS_DataRequest(ProviderName, Data);
__Message.InitializeResponseMessage(__Transport, '', 'IAppServer', 'AS_DataRequestResponse');
__Message.Write('Result', TypeInfo(binary), Result, []);
__Message.Finalize;
finally
Data.Free;
Result.Free;
end;
end;
procedure TAppServer_Invoker.Invoke_AS_GetProviderNames(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
{ function AS_GetProviderNames: TProviderNames; }
var
Result: TProviderNames;
begin
Result := NIL;
try
Result := (__Instance as IAppServer).AS_GetProviderNames;
__Message.InitializeResponseMessage(__Transport, '', 'IAppServer', 'AS_GetProviderNamesResponse');
__Message.Write('Result', TypeInfo(TProviderNames), Result, []);
__Message.Finalize;
finally
Result.Free;
end;
end;
procedure TAppServer_Invoker.Invoke_AS_GetParams(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
{ function AS_GetParams(const ProviderName: WideString; var OwnerData: String): binary; }
var
ProviderName: WideString;
OwnerData: String;
Result: binary;
begin
Result := NIL;
try
__Message.Read('ProviderName', TypeInfo(WideString), ProviderName, []);
__Message.Read('OwnerData', TypeInfo(String), OwnerData, []);
Result := (__Instance as IAppServer).AS_GetParams(ProviderName, OwnerData);
__Message.InitializeResponseMessage(__Transport, '', 'IAppServer', 'AS_GetParamsResponse');
__Message.Write('OwnerData', TypeInfo(String), OwnerData, []);
__Message.Write('Result', TypeInfo(binary), Result, []);
__Message.Finalize;
finally
Result.Free;
end;
end;
procedure TAppServer_Invoker.Invoke_AS_RowRequest(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
{ function AS_RowRequest(const ProviderName: WideString; const Row: Binary; const RequestType: Integer; var OwnerData: String): binary; }
var
ProviderName: WideString;
Row: Binary;
RequestType: Integer;
OwnerData: String;
Result: binary;
begin
Row := NIL;
Result := NIL;
try
__Message.Read('ProviderName', TypeInfo(WideString), ProviderName, []);
__Message.Read('Row', TypeInfo(Binary), Row, []);
__Message.Read('RequestType', TypeInfo(Integer), RequestType, []);
__Message.Read('OwnerData', TypeInfo(String), OwnerData, []);
Result := (__Instance as IAppServer).AS_RowRequest(ProviderName, Row, RequestType, OwnerData);
__Message.InitializeResponseMessage(__Transport, '', 'IAppServer', 'AS_RowRequestResponse');
__Message.Write('OwnerData', TypeInfo(String), OwnerData, []);
__Message.Write('Result', TypeInfo(binary), Result, []);
__Message.Finalize;
finally
Row.Free;
Result.Free;
end;
end;
procedure TAppServer_Invoker.Invoke_AS_Execute(const __Instance : IInterface; const __Message : IROMessage; const __Transport : IROTransport; out __oResponseOptions:TROResponseOptions);
{ procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString; var Params: Binary; var OwnerData: String); }
var
ProviderName: WideString;
CommandText: WideString;
Params: Binary;
OwnerData: String;
begin
Params := NIL;
try
__Message.Read('ProviderName', TypeInfo(WideString), ProviderName, []);
__Message.Read('CommandText', TypeInfo(WideString), CommandText, []);
__Message.Read('Params', TypeInfo(Binary), Params, []);
__Message.Read('OwnerData', TypeInfo(String), OwnerData, []);
(__Instance as IAppServer).AS_Execute(ProviderName, CommandText, Params, OwnerData);
__Message.InitializeResponseMessage(__Transport, '', 'IAppServer', 'AS_ExecuteResponse');
__Message.Write('Params', TypeInfo(Binary), Params, []);
__Message.Write('OwnerData', TypeInfo(String), OwnerData, []);
__Message.Finalize;
finally
Params.Free;
end;
end;
end.