Componentes.Terceros.RemObj.../internal/5.0.35.741/1/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatLibrary_Invk.pas
2009-02-28 17:16:16 +00:00

126 lines
4.6 KiB
ObjectPascal

unit HTTPChatLibrary_Invk;
{----------------------------------------------------------------------------}
{ 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,
{RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
{Generated:} HTTPChatLibrary_Intf;
type
THTTPChatService_Invoker = class(TROInvoker)
private
protected
public
constructor Create; override;
published
procedure Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_SendMessage(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GetLoggedUsers(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
end;
implementation
uses
{RemObjects:} uRORes, uROClient;
{ THTTPChatService_Invoker }
constructor THTTPChatService_Invoker.Create;
begin
inherited Create;
FAbstract := False;
end;
procedure THTTPChatService_Invoker.Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function Login(const aUserID: Widestring): Widestring; }
var
aUserID: Widestring;
lResult: Widestring;
begin
try
__Message.Read('aUserID', TypeInfo(Widestring), aUserID, []);
lResult := (__Instance as IHTTPChatService).Login(aUserID);
__Message.InitializeResponseMessage(__Transport, 'HTTPChatLibrary', 'HTTPChatService', 'LoginResponse');
__Message.Write('Result', TypeInfo(Widestring), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
end;
end;
procedure THTTPChatService_Invoker.Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ procedure Logout; }
begin
try
(__Instance as IHTTPChatService).Logout;
__Message.InitializeResponseMessage(__Transport, 'HTTPChatLibrary', 'HTTPChatService', 'LogoutResponse');
__Message.Finalize;
finally
end;
end;
procedure THTTPChatService_Invoker.Invoke_SendMessage(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ procedure SendMessage(const aMessageText: Widestring; const aDestination: Widestring); }
var
aMessageText: Widestring;
aDestination: Widestring;
begin
try
__Message.Read('aMessageText', TypeInfo(Widestring), aMessageText, []);
__Message.Read('aDestination', TypeInfo(Widestring), aDestination, []);
(__Instance as IHTTPChatService).SendMessage(aMessageText, aDestination);
__Message.InitializeResponseMessage(__Transport, 'HTTPChatLibrary', 'HTTPChatService', 'SendMessageResponse');
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
end;
end;
procedure THTTPChatService_Invoker.Invoke_GetLoggedUsers(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function GetLoggedUsers: TUserInfoArray; }
var
lResult: HTTPChatLibrary_Intf.TUserInfoArray;
__lObjectDisposer: TROObjectDisposer;
begin
lResult := nil;
try
lResult := (__Instance as IHTTPChatService).GetLoggedUsers;
__Message.InitializeResponseMessage(__Transport, 'HTTPChatLibrary', 'HTTPChatService', 'GetLoggedUsersResponse');
__Message.Write('Result', TypeInfo(HTTPChatLibrary_Intf.TUserInfoArray), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
try
__lObjectDisposer.Add(lResult);
finally
__lObjectDisposer.Free();
end;
end;
end;
initialization
end.