Componentes.Terceros.RemObj.../official/5.0.35.741/RemObjects SDK for Delphi/Source/uRODiscovery_Intf.pas
2009-02-27 15:16:56 +00:00

104 lines
3.4 KiB
ObjectPascal

unit uRODiscovery_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 = '{943975A3-664A-4F07-AD0F-7357744276BF}';
TargetNamespace = '';
{ Service Interface ID's }
IRODiscoveryService_IID : TGUID = '{D0F69433-544B-4003-946F-AD35046169B0}';
{ Event ID's }
type
{ Forward declarations }
IRODiscoveryService = interface;
TRODiscoveryOptions = class;
{ TRODiscoveryOptions }
{ Description:
Use this base class to define custom Option strcuts that you can pass back from your Server Discovery calls }
TRODiscoveryOptions = class(TROComplexType)
end;
{ IRODiscoveryService }
IRODiscoveryService = interface
['{D0F69433-544B-4003-946F-AD35046169B0}']
function FindService(const iName: AnsiString; var ioServerOptions: TRODiscoveryOptions): AnsiString;
end;
{ CoIRODiscoveryService }
CoRODiscoveryService = class
class function Create(const aMessage : IROMessage; aTransportChannel : IROTransportChannel) : IRODiscoveryService;
end;
TRODiscoveryService_Proxy = class(TROProxy, IRODiscoveryService)
protected
function __GetInterfaceName:string; override;
function FindService(const iName: AnsiString; var ioServerOptions: TRODiscoveryOptions): AnsiString;
end;
implementation
uses
{vcl:} SysUtils,
{RemObjects:} uROEventRepository, uROSerializer, uRORes;
{ CoIRODiscoveryService }
class function CoRODiscoveryService.Create(const aMessage : IROMessage; aTransportChannel : IROTransportChannel) : IRODiscoveryService;
begin
result := TRODiscoveryService_Proxy.Create(aMessage, aTransportChannel);
end;
{ TRODiscoveryService_Proxy }
function TRODiscoveryService_Proxy.__GetInterfaceName:string;
begin
result := 'IRODiscoveryService';
end;
function TRODiscoveryService_Proxy.FindService(const iName: AnsiString; var ioServerOptions: TRODiscoveryOptions): AnsiString;
begin
try
__Message.InitializeRequestMessage(__TransportChannel, 'RODiscovery', __InterfaceName, 'FindService');
__Message.Write('iName', TypeInfo(AnsiString), iName, []);
__Message.Write('ioServerOptions', TypeInfo(TRODiscoveryOptions), ioServerOptions, []);
__Message.Finalize;
__TransportChannel.Dispatch(__Message);
__Message.Read('Result', TypeInfo(AnsiString), result, []);
__Message.Read('ioServerOptions', TypeInfo(TRODiscoveryOptions), ioServerOptions, []);
finally
__Message.UnsetAttributes(__TransportChannel);
__Message.FreeStream;
end
end;
initialization
RegisterROClass(TRODiscoveryOptions);
RegisterProxyClass(IRODiscoveryService_IID, TRODiscoveryService_Proxy);
finalization
UnregisterROClass(TRODiscoveryOptions);
UnregisterProxyClass(IRODiscoveryService_IID);
end.