git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@68 b6239004-a887-0f4b-9937-50029ccdca16
63 lines
1.6 KiB
ObjectPascal
63 lines
1.6 KiB
ObjectPascal
unit TestService_Impl;
|
|
|
|
{----------------------------------------------------------------------------}
|
|
{ This unit was automatically generated by the RemObjects SDK after reading }
|
|
{ the RODL file associated with this project . }
|
|
{ }
|
|
{ This is where you are supposed to code the implementation of your objects. }
|
|
{----------------------------------------------------------------------------}
|
|
|
|
{$I RemObjects.inc}
|
|
|
|
interface
|
|
|
|
uses
|
|
{$IFDEF FPC}LResources,{$ENDIF}
|
|
{vcl:} Classes, SysUtils,
|
|
{RemObjects:} uROXMLIntf, uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
|
|
{Required:} uRORemoteDataModule,
|
|
{Generated:} PairingLibrary_Intf;
|
|
|
|
type
|
|
{ TTestService }
|
|
TTestService = class(TRORemoteDataModule, ITestService)
|
|
private
|
|
protected
|
|
{ ITestService methods }
|
|
function GetServerTime: DateTime;
|
|
end;
|
|
|
|
implementation
|
|
|
|
{$IFNDEF FPC}
|
|
{$R *.dfm}
|
|
{$ENDIF}
|
|
uses
|
|
{Generated:} PairingLibrary_Invk;
|
|
|
|
procedure Create_TestService(out anInstance : IUnknown);
|
|
begin
|
|
anInstance := TTestService.Create(nil);
|
|
end;
|
|
|
|
{ TestService }
|
|
function TTestService.GetServerTime: DateTime;
|
|
begin
|
|
result := Now;
|
|
end;
|
|
|
|
var
|
|
fClassFactory: IROClassFactory;
|
|
initialization
|
|
{$IFDEF FPC}
|
|
{$I TestService_Impl.lrs}
|
|
{$ENDIF}
|
|
fClassFactory := TROClassFactory.Create('TestService', Create_TestService, TTestService_Invoker);
|
|
// RegisterForZeroConf(fClassFactory,'_TestService_rosdk._tcp.');
|
|
|
|
finalization
|
|
UnRegisterClassFactory(fClassFactory);
|
|
fClassFactory := nil;
|
|
|
|
end.
|