Componentes.Terceros.RemObj.../internal/5.0.23.613/1/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary_Async.pas
david d99a44999f - 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

git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@7 b6239004-a887-0f4b-9937-50029ccdca16
2007-09-10 13:36:58 +00:00

109 lines
3.2 KiB
ObjectPascal

unit NewLibrary_Async;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ Do not modify this unit manually, or your changes will be lost when this }
{ unit is regenerated the next time you compile the project. }
{----------------------------------------------------------------------------}
{$I Remobjects.inc}
interface
uses
{vcl:} Classes, TypInfo,
{RemObjects:} uROXMLIntf, uROClasses, uROTypes, uROClientIntf, uROAsync,
{Project:} NewLibrary_Intf;
type
{ INewService_Async }
INewService_Async = interface(IROAsyncInterface)
['{5814142C-9CC8-49F2-B1E3-6E1925846287}']
procedure Invoke_Sum(const A: Integer; const B: Integer);
procedure Invoke_GetServerTime;
function Retrieve_Sum: Integer;
function Retrieve_GetServerTime: DateTime;
end;
{ CoNewService_Async }
CoNewService_Async = class
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService_Async;
end;
{ TNewService_AsyncProxy }
TNewService_AsyncProxy = class(TROAsyncProxy, INewService_Async)
private
protected
function __GetInterfaceName:string; override;
procedure Invoke_Sum(const A: Integer; const B: Integer);
procedure Invoke_GetServerTime;
function Retrieve_Sum: Integer;
function Retrieve_GetServerTime: DateTime;
end;
implementation
uses
{vcl:} SysUtils;
{ CoNewService }
class function CoNewService_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService_Async;
begin
result := TNewService_AsyncProxy.Create(aMessage, aTransportChannel);
end;
{ TNewService_AsyncProxy }
function TNewService_AsyncProxy.__GetInterfaceName:string;
begin
result := 'NewService';
end;
procedure TNewService_AsyncProxy.Invoke_Sum(const A: Integer; const B: Integer);
begin
__AssertProxyNotBusy('Sum');
__Message.InitializeRequestMessage(__TransportChannel, 'NewLibrary', __InterfaceName, 'Sum');
__Message.Write('A', TypeInfo(Integer), A, []);
__Message.Write('B', TypeInfo(Integer), B, []);
__DispatchAsyncRequest('Sum',__Message);
end;
function TNewService_AsyncProxy.Retrieve_Sum: Integer;
var __response:TStream;
begin
__response := __RetrieveAsyncResponse('Sum');
__Message.ReadFromStream(__response);
__Message.Read('Result', TypeInfo(Integer), Result, []);
__response.Free();
end;
procedure TNewService_AsyncProxy.Invoke_GetServerTime;
begin
__AssertProxyNotBusy('GetServerTime');
__Message.InitializeRequestMessage(__TransportChannel, 'NewLibrary', __InterfaceName, 'GetServerTime');
__DispatchAsyncRequest('GetServerTime',__Message);
end;
function TNewService_AsyncProxy.Retrieve_GetServerTime: DateTime;
var __response:TStream;
begin
__response := __RetrieveAsyncResponse('GetServerTime');
__Message.ReadFromStream(__response);
__Message.Read('Result', TypeInfo(DateTime), Result, [paIsDateTime]);
__response.Free();
end;
initialization
end.