git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@68 b6239004-a887-0f4b-9937-50029ccdca16
172 lines
5.1 KiB
ObjectPascal
172 lines
5.1 KiB
ObjectPascal
unit PairingLibrary_Intf;
|
|
|
|
{----------------------------------------------------------------------------}
|
|
{ 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, uROClient, uROTypes, uROClientIntf;
|
|
|
|
const
|
|
{ Library ID }
|
|
LibraryUID = '{C04AE0F2-540E-434F-96FA-08B8A7810005}';
|
|
TargetNamespace = '';
|
|
|
|
{ Service Interface ID's }
|
|
ITestService_IID : TGUID = '{7941D2C3-63AE-4559-BB62-3443C5B3EB3F}';
|
|
IPairingService_IID : TGUID = '{CBA27400-AE3F-4945-8520-0EA97EC5DE41}';
|
|
|
|
{ Event ID's }
|
|
|
|
type
|
|
TSeekOrigin = Classes.TSeekOrigin; // fake declaration
|
|
{ Forward declarations }
|
|
ITestService = interface;
|
|
IPairingService = interface;
|
|
|
|
|
|
{ Enumerateds }
|
|
PairingStatus = (PairingStatus_Successfull,PairingStatus_PairingRequired,PairingStatus_PairingBusy);
|
|
|
|
{ ITestService }
|
|
ITestService = interface
|
|
['{7941D2C3-63AE-4559-BB62-3443C5B3EB3F}']
|
|
function GetServerTime: DateTime;
|
|
end;
|
|
|
|
{ CoTestService }
|
|
CoTestService = class
|
|
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ITestService;
|
|
end;
|
|
|
|
{ TTestService_Proxy }
|
|
TTestService_Proxy = class(TROProxy, ITestService)
|
|
protected
|
|
function __GetInterfaceName:string; override;
|
|
|
|
function GetServerTime: DateTime;
|
|
end;
|
|
|
|
{ IPairingService }
|
|
IPairingService = interface
|
|
['{CBA27400-AE3F-4945-8520-0EA97EC5DE41}']
|
|
function LoginAttempt(const ClientGuid: Guid): Integer;
|
|
function ConfirmCode(const Code: AnsiString; const ClientGuid: Guid): Boolean;
|
|
end;
|
|
|
|
{ CoPairingService }
|
|
CoPairingService = class
|
|
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IPairingService;
|
|
end;
|
|
|
|
{ TPairingService_Proxy }
|
|
TPairingService_Proxy = class(TROProxy, IPairingService)
|
|
protected
|
|
function __GetInterfaceName:string; override;
|
|
|
|
function LoginAttempt(const ClientGuid: Guid): Integer;
|
|
function ConfirmCode(const Code: AnsiString; const ClientGuid: Guid): Boolean;
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses
|
|
{vcl:} SysUtils,
|
|
{RemObjects:} uROEventRepository, uROSerializer, uRORes;
|
|
|
|
{ CoTestService }
|
|
|
|
class function CoTestService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ITestService;
|
|
begin
|
|
result := TTestService_Proxy.Create(aMessage, aTransportChannel);
|
|
end;
|
|
|
|
{ TTestService_Proxy }
|
|
|
|
function TTestService_Proxy.__GetInterfaceName:string;
|
|
begin
|
|
result := 'TestService';
|
|
end;
|
|
|
|
function TTestService_Proxy.GetServerTime: DateTime;
|
|
begin
|
|
try
|
|
__Message.InitializeRequestMessage(__TransportChannel, 'PairingLibrary', __InterfaceName, 'GetServerTime');
|
|
__Message.Finalize;
|
|
|
|
__TransportChannel.Dispatch(__Message);
|
|
|
|
__Message.Read('Result', TypeInfo(DateTime), result, [paIsDateTime]);
|
|
finally
|
|
__Message.UnsetAttributes(__TransportChannel);
|
|
__Message.FreeStream;
|
|
end
|
|
end;
|
|
|
|
{ CoPairingService }
|
|
|
|
class function CoPairingService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IPairingService;
|
|
begin
|
|
result := TPairingService_Proxy.Create(aMessage, aTransportChannel);
|
|
end;
|
|
|
|
{ TPairingService_Proxy }
|
|
|
|
function TPairingService_Proxy.__GetInterfaceName:string;
|
|
begin
|
|
result := 'PairingService';
|
|
end;
|
|
|
|
function TPairingService_Proxy.LoginAttempt(const ClientGuid: Guid): Integer;
|
|
begin
|
|
try
|
|
__Message.InitializeRequestMessage(__TransportChannel, 'PairingLibrary', __InterfaceName, 'LoginAttempt');
|
|
__Message.Write('ClientGuid', TypeInfo(Guid), ClientGuid, []);
|
|
__Message.Finalize;
|
|
|
|
__TransportChannel.Dispatch(__Message);
|
|
|
|
__Message.Read('Result', TypeInfo(Integer), result, []);
|
|
finally
|
|
__Message.UnsetAttributes(__TransportChannel);
|
|
__Message.FreeStream;
|
|
end
|
|
end;
|
|
|
|
function TPairingService_Proxy.ConfirmCode(const Code: AnsiString; const ClientGuid: Guid): Boolean;
|
|
begin
|
|
try
|
|
__Message.InitializeRequestMessage(__TransportChannel, 'PairingLibrary', __InterfaceName, 'ConfirmCode');
|
|
__Message.Write('Code', TypeInfo(AnsiString), Code, []);
|
|
__Message.Write('ClientGuid', TypeInfo(Guid), ClientGuid, []);
|
|
__Message.Finalize;
|
|
|
|
__TransportChannel.Dispatch(__Message);
|
|
|
|
__Message.Read('Result', TypeInfo(Boolean), result, []);
|
|
finally
|
|
__Message.UnsetAttributes(__TransportChannel);
|
|
__Message.FreeStream;
|
|
end
|
|
end;
|
|
|
|
initialization
|
|
RegisterProxyClass(ITestService_IID, TTestService_Proxy);
|
|
RegisterProxyClass(IPairingService_IID, TPairingService_Proxy);
|
|
|
|
|
|
finalization
|
|
UnregisterProxyClass(ITestService_IID);
|
|
UnregisterProxyClass(IPairingService_IID);
|
|
|
|
end.
|