unit uRODataSnap_Async; {----------------------------------------------------------------------------} { 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. } {----------------------------------------------------------------------------} interface uses {vcl:} Classes, TypInfo, {RemObjects:} uROClasses, uROTypes, uROClientIntf, uROAsync, {Project:} uRODataSnap_Intf; type { IAppServer_Async } IAppServer_Async = interface(IROAsyncInterface) ['{4F6AC4BD-0AAA-4621-9868-D26D32CC9E27}'] procedure Invoke_AS_ApplyUpdates(const ProviderName: WideString; const Delta: Binary; const MaxErrors: Integer; const OwnerData: String); procedure Invoke_AS_GetRecords(const ProviderName: WideString; const Count: Integer; const Options: Integer; const CommandText: WideString; const Params: Binary; const OwnerData: String); procedure Invoke_AS_DataRequest(const ProviderName: WideString; const Data: Binary); procedure Invoke_AS_GetProviderNames; procedure Invoke_AS_GetParams(const ProviderName: WideString; const OwnerData: String); procedure Invoke_AS_RowRequest(const ProviderName: WideString; const Row: Binary; const RequestType: Integer; const OwnerData: String); procedure Invoke_AS_Execute(const ProviderName: WideString; const CommandText: WideString; const Params: Binary; const OwnerData: String); function Retrieve_AS_ApplyUpdates(out ErrorCount: Integer; out OwnerData: String): binary; function Retrieve_AS_GetRecords(out RecsOut: Integer; out Params: Binary; out OwnerData: String): binary; function Retrieve_AS_DataRequest: binary; function Retrieve_AS_GetProviderNames: TProviderNames; function Retrieve_AS_GetParams(out OwnerData: String): binary; function Retrieve_AS_RowRequest(out OwnerData: String): binary; procedure Retrieve_AS_Execute(out Params: Binary; out OwnerData: String); end; { CoAppServer_Async } CoAppServer_Async = class class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IAppServer_Async; end; { TAppServer_AsyncProxy } TAppServer_AsyncProxy = class(TROAsyncProxy, IAppServer_Async) private protected function __GetInterfaceName:string; override; procedure Invoke_AS_ApplyUpdates(const ProviderName: WideString; const Delta: Binary; const MaxErrors: Integer; const OwnerData: String); procedure Invoke_AS_GetRecords(const ProviderName: WideString; const Count: Integer; const Options: Integer; const CommandText: WideString; const Params: Binary; const OwnerData: String); procedure Invoke_AS_DataRequest(const ProviderName: WideString; const Data: Binary); procedure Invoke_AS_GetProviderNames; procedure Invoke_AS_GetParams(const ProviderName: WideString; const OwnerData: String); procedure Invoke_AS_RowRequest(const ProviderName: WideString; const Row: Binary; const RequestType: Integer; const OwnerData: String); procedure Invoke_AS_Execute(const ProviderName: WideString; const CommandText: WideString; const Params: Binary; const OwnerData: String); function Retrieve_AS_ApplyUpdates(out ErrorCount: Integer; out OwnerData: String): binary; function Retrieve_AS_GetRecords(out RecsOut: Integer; out Params: Binary; out OwnerData: String): binary; function Retrieve_AS_DataRequest: binary; function Retrieve_AS_GetProviderNames: TProviderNames; function Retrieve_AS_GetParams(out OwnerData: String): binary; function Retrieve_AS_RowRequest(out OwnerData: String): binary; procedure Retrieve_AS_Execute(out Params: Binary; out OwnerData: String); end; implementation uses {vcl:} SysUtils; { CoAppServer } class function CoAppServer_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IAppServer_Async; begin result := TAppServer_AsyncProxy.Create(aMessage, aTransportChannel); end; { TAppServer_AsyncProxy } function TAppServer_AsyncProxy.__GetInterfaceName:string; begin result := 'AppServer'; end; procedure TAppServer_AsyncProxy.Invoke_AS_ApplyUpdates(const ProviderName: WideString; const Delta: Binary; const MaxErrors: Integer; const OwnerData: String); begin __AssertProxyNotBusy('AS_ApplyUpdates'); __Message.InitializeRequestMessage(__TransportChannel, 'uRODataSnap', __InterfaceName, 'AS_ApplyUpdates'); __Message.Write('ProviderName', TypeInfo(WideString), ProviderName, []); __Message.Write('Delta', TypeInfo(Binary), Delta, []); __Message.Write('MaxErrors', TypeInfo(Integer), MaxErrors, []); __Message.Write('OwnerData', TypeInfo(String), OwnerData, []); __DispatchAsyncRequest('AS_ApplyUpdates',__Message); end; function TAppServer_AsyncProxy.Retrieve_AS_ApplyUpdates(out ErrorCount: Integer; out OwnerData: String): binary; var __response:TStream; begin result := nil; __response := __RetrieveAsyncResponse('AS_ApplyUpdates'); __Message.ReadFromStream(__response); __Message.Read('Result', TypeInfo(binary), Result, []); __Message.Read('ErrorCount', TypeInfo(Integer), ErrorCount, []); __Message.Read('OwnerData', TypeInfo(String), OwnerData, []); __response.Free(); end; procedure TAppServer_AsyncProxy.Invoke_AS_GetRecords(const ProviderName: WideString; const Count: Integer; const Options: Integer; const CommandText: WideString; const Params: Binary; const OwnerData: String); begin __AssertProxyNotBusy('AS_GetRecords'); __Message.InitializeRequestMessage(__TransportChannel, 'uRODataSnap', __InterfaceName, 'AS_GetRecords'); __Message.Write('ProviderName', TypeInfo(WideString), ProviderName, []); __Message.Write('Count', TypeInfo(Integer), Count, []); __Message.Write('Options', TypeInfo(Integer), Options, []); __Message.Write('CommandText', TypeInfo(WideString), CommandText, []); __Message.Write('Params', TypeInfo(Binary), Params, []); __Message.Write('OwnerData', TypeInfo(String), OwnerData, []); __DispatchAsyncRequest('AS_GetRecords',__Message); end; function TAppServer_AsyncProxy.Retrieve_AS_GetRecords(out RecsOut: Integer; out Params: Binary; out OwnerData: String): binary; var __response:TStream; begin Params := nil; result := nil; __response := __RetrieveAsyncResponse('AS_GetRecords'); __Message.ReadFromStream(__response); __Message.Read('Result', TypeInfo(binary), Result, []); __Message.Read('RecsOut', TypeInfo(Integer), RecsOut, []); __Message.Read('Params', TypeInfo(Binary), Params, []); __Message.Read('OwnerData', TypeInfo(String), OwnerData, []); __response.Free(); end; procedure TAppServer_AsyncProxy.Invoke_AS_DataRequest(const ProviderName: WideString; const Data: Binary); begin __AssertProxyNotBusy('AS_DataRequest'); __Message.InitializeRequestMessage(__TransportChannel, 'uRODataSnap', __InterfaceName, 'AS_DataRequest'); __Message.Write('ProviderName', TypeInfo(WideString), ProviderName, []); __Message.Write('Data', TypeInfo(Binary), Data, []); __DispatchAsyncRequest('AS_DataRequest',__Message); end; function TAppServer_AsyncProxy.Retrieve_AS_DataRequest: binary; var __response:TStream; begin result := nil; __response := __RetrieveAsyncResponse('AS_DataRequest'); __Message.ReadFromStream(__response); __Message.Read('Result', TypeInfo(binary), Result, []); __response.Free(); end; procedure TAppServer_AsyncProxy.Invoke_AS_GetProviderNames; begin __AssertProxyNotBusy('AS_GetProviderNames'); __Message.InitializeRequestMessage(__TransportChannel, 'uRODataSnap', __InterfaceName, 'AS_GetProviderNames'); __DispatchAsyncRequest('AS_GetProviderNames',__Message); end; function TAppServer_AsyncProxy.Retrieve_AS_GetProviderNames: TProviderNames; var __response:TStream; begin result := nil; __response := __RetrieveAsyncResponse('AS_GetProviderNames'); __Message.ReadFromStream(__response); __Message.Read('Result', TypeInfo(TProviderNames), Result, []); __response.Free(); end; procedure TAppServer_AsyncProxy.Invoke_AS_GetParams(const ProviderName: WideString; const OwnerData: String); begin __AssertProxyNotBusy('AS_GetParams'); __Message.InitializeRequestMessage(__TransportChannel, 'uRODataSnap', __InterfaceName, 'AS_GetParams'); __Message.Write('ProviderName', TypeInfo(WideString), ProviderName, []); __Message.Write('OwnerData', TypeInfo(String), OwnerData, []); __DispatchAsyncRequest('AS_GetParams',__Message); end; function TAppServer_AsyncProxy.Retrieve_AS_GetParams(out OwnerData: String): binary; var __response:TStream; begin result := nil; __response := __RetrieveAsyncResponse('AS_GetParams'); __Message.ReadFromStream(__response); __Message.Read('Result', TypeInfo(binary), Result, []); __Message.Read('OwnerData', TypeInfo(String), OwnerData, []); __response.Free(); end; procedure TAppServer_AsyncProxy.Invoke_AS_RowRequest(const ProviderName: WideString; const Row: Binary; const RequestType: Integer; const OwnerData: String); begin __AssertProxyNotBusy('AS_RowRequest'); __Message.InitializeRequestMessage(__TransportChannel, 'uRODataSnap', __InterfaceName, 'AS_RowRequest'); __Message.Write('ProviderName', TypeInfo(WideString), ProviderName, []); __Message.Write('Row', TypeInfo(Binary), Row, []); __Message.Write('RequestType', TypeInfo(Integer), RequestType, []); __Message.Write('OwnerData', TypeInfo(String), OwnerData, []); __DispatchAsyncRequest('AS_RowRequest',__Message); end; function TAppServer_AsyncProxy.Retrieve_AS_RowRequest(out OwnerData: String): binary; var __response:TStream; begin result := nil; __response := __RetrieveAsyncResponse('AS_RowRequest'); __Message.ReadFromStream(__response); __Message.Read('Result', TypeInfo(binary), Result, []); __Message.Read('OwnerData', TypeInfo(String), OwnerData, []); __response.Free(); end; procedure TAppServer_AsyncProxy.Invoke_AS_Execute(const ProviderName: WideString; const CommandText: WideString; const Params: Binary; const OwnerData: String); begin __AssertProxyNotBusy('AS_Execute'); __Message.InitializeRequestMessage(__TransportChannel, 'uRODataSnap', __InterfaceName, 'AS_Execute'); __Message.Write('ProviderName', TypeInfo(WideString), ProviderName, []); __Message.Write('CommandText', TypeInfo(WideString), CommandText, []); __Message.Write('Params', TypeInfo(Binary), Params, []); __Message.Write('OwnerData', TypeInfo(String), OwnerData, []); __DispatchAsyncRequest('AS_Execute',__Message); end; procedure TAppServer_AsyncProxy.Retrieve_AS_Execute(out Params: Binary; out OwnerData: String); var __response:TStream; begin Params := nil; __response := __RetrieveAsyncResponse('AS_Execute'); __Message.ReadFromStream(__response); __Message.Read('Params', TypeInfo(Binary), Params, []); __Message.Read('OwnerData', TypeInfo(String), OwnerData, []); __response.Free(); end; initialization end.