Componentes.Terceros.RemObj.../internal/6.0.43.801/1/RemObjects Samples/RemObjects SDK for Delphi/BonjourDiscovery/BonjourDiscoverableService_Impl.pas
2010-01-29 16:17:43 +00:00

66 lines
2.0 KiB
ObjectPascal

unit BonjourDiscoverableService_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
{vcl:} Classes, SysUtils,
{RemObjects:} uROXMLIntf, uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
{Required:} uRORemoteDataModule,
{Generated:} BonjourDiscoverableLibrary_Intf;
type
{ TBonjourDiscoverableService }
TBonjourDiscoverableService = class(TRORemoteDataModule, IBonjourDiscoverableService)
private
protected
{ IBonjourDiscoverableService methods }
function IntroduceMyself(const MyName: AnsiString): AnsiString;
function WhoAreYou: AnsiString;
end;
implementation
{$R *.dfm}
uses
fServerForm,
{Generated:} BonjourDiscoverableLibrary_Invk;
procedure Create_BonjourDiscoverableService(out anInstance : IUnknown);
begin
anInstance := TBonjourDiscoverableService.Create(nil);
end;
{ BonjourDiscoverableService }
function TBonjourDiscoverableService.IntroduceMyself(const MyName: AnsiString): AnsiString;
begin
Result := 'Hello, ' + MyName;
end;
function TBonjourDiscoverableService.WhoAreYou: AnsiString;
begin
Result := ServerForm.WhoAmI;
end;
var
fClassFactory: IROClassFactory;
initialization
fClassFactory := TROClassFactory.Create('BonjourDiscoverableService', Create_BonjourDiscoverableService, TBonjourDiscoverableService_Invoker);
RegisterForZeroConf(fClassFactory,'_bonjourdiscoverableservice_rosdk._tcp.');
finalization
UnRegisterClassFactory(fClassFactory);
fClassFactory := nil;
end.