unit VARELA_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.                 }
{----------------------------------------------------------------------------}

interface

uses
  {vcl:} Classes, TypInfo,
  {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf,
  {Used RODLs:} DataAbstract_Intf;

const
  { Library ID }
  LibraryUID = '{AD45905A-2C7F-4295-A913-3D4F93CE82CF}';

  { Service Interface ID's }
  IEDI_Inventary_IID : TGUID = '{079CAD81-712F-48D0-ACD9-3677BBB9B2AD}';
  IEDI_Sales_IID : TGUID = '{A9A65D73-350D-4530-AF81-FF69845C6B61}';
  IsrvLogin_IID : TGUID = '{6B132AE4-D45F-4AE8-8215-E95789358329}';
  IsrvVentasTerminadas_IID : TGUID = '{755D5EC4-06FD-4C26-BCD1-5C8F112B18A1}';
  IsrvInformes_IID : TGUID = '{78BEEBFF-E26F-48BB-82AF-F8D09A47E446}';
  IsrvTransfereciaFicheros_IID : TGUID = '{2A7AFE06-0600-46ED-9B7A-C694A1191311}';
  IsrvControles_IID : TGUID = '{A0C11144-A1B7-408D-BA07-63565D587662}';
  IsrvVentasEnProceso_IID : TGUID = '{1ADA4BDF-C8B6-4CD7-910B-EDB44C10ABDB}';
  IEDI_Log_IID : TGUID = '{F4EBB9F5-A0CC-4AF7-8B81-98ED00FA95B1}';
  IsrvReferenciaGenerica_IID : TGUID = '{994518CC-96BD-4976-ABC6-9B421A4B65D3}';
  IsrvRecepciones_IID : TGUID = '{02EB4B9C-155E-477C-AE2D-3E73B7846AB3}';
  IsrvDevoluciones_IID : TGUID = '{87C31D12-C353-437F-A7A3-10882373AB54}';
  IsrvTraspasos_IID : TGUID = '{47DA82A0-51AD-477A-85B3-CE9EEAAB29D6}';
  IsrvStock_IID : TGUID = '{F617B727-5B8B-4645-BBB2-3D645AB31981}';

  { Event ID's }

type
  { Forward declarations }
  IEDI_Inventary = interface;
  IEDI_Sales = interface;
  IsrvLogin = interface;
  IsrvVentasTerminadas = interface;
  IsrvInformes = interface;
  IsrvTransfereciaFicheros = interface;
  IsrvControles = interface;
  IsrvVentasEnProceso = interface;
  IEDI_Log = interface;
  IsrvReferenciaGenerica = interface;
  IsrvRecepciones = interface;
  IsrvDevoluciones = interface;
  IsrvTraspasos = interface;
  IsrvStock = interface;


  TLoginInfo = class;


  { TLoginInfo }
  TLoginInfo = class(TDALoginInfo)
  private
    fRoles: TDAStringArray;
    function GetRoles: TDAStringArray;
  public
    procedure Assign(iSource: TPersistent); override;
  published
    property Roles:TDAStringArray read GetRoles write fRoles;
  end;

  { TLoginInfoCollection }
  TLoginInfoCollection = class(TDALoginInfoCollection)
  protected
    constructor Create(aItemClass: TCollectionItemClass); overload;
    function GetItems(Index: integer): TLoginInfo;
    procedure SetItems(Index: integer; const Value: TLoginInfo);
  public
    constructor Create; overload;
    function Add: TLoginInfo; reintroduce;
    property Items[Index: integer]:TLoginInfo read GetItems write SetItems; default;
  end;

  { IEDI_Inventary }
  IEDI_Inventary = interface(IDARemoteService)
    ['{079CAD81-712F-48D0-ACD9-3677BBB9B2AD}']
    function CargarFicheroEDI(const FicheroCAB: String; const FicheroLIN: String; const FicheroCANT: String; out MsgError: String): Boolean;
  end;

  { CoEDI_Inventary }
  CoEDI_Inventary = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IEDI_Inventary;
  end;

  { TEDI_Inventary_Proxy }
  TEDI_Inventary_Proxy = class(TDARemoteService_Proxy, IEDI_Inventary)
  protected
    function __GetInterfaceName:string; override;

    function CargarFicheroEDI(const FicheroCAB: String; const FicheroLIN: String; const FicheroCANT: String; out MsgError: String): Boolean;
  end;

  { IEDI_Sales }
  IEDI_Sales = interface(IDARemoteService)
    ['{A9A65D73-350D-4530-AF81-FF69845C6B61}']
    function CargarFicheroEDI(const FicheroCAB: String; const FicheroLUG: String; const FicheroART: String; out MsgError: String): Boolean;
  end;

  { CoEDI_Sales }
  CoEDI_Sales = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IEDI_Sales;
  end;

  { TEDI_Sales_Proxy }
  TEDI_Sales_Proxy = class(TDARemoteService_Proxy, IEDI_Sales)
  protected
    function __GetInterfaceName:string; override;

    function CargarFicheroEDI(const FicheroCAB: String; const FicheroLUG: String; const FicheroART: String; out MsgError: String): Boolean;
  end;

  { IsrvLogin }
  IsrvLogin = interface
    ['{6B132AE4-D45F-4AE8-8215-E95789358329}']
    function Login(const UserID: String; const Password: String; out LoginInfo: TLoginInfo): Boolean;
    procedure Logout;
    function Ping: Boolean;
    function SetUserPassword(const UserID: String; const NewPassword: String): Boolean;
    function UpdateUsers(const UsersDelta: Binary): Binary;
  end;

  { CosrvLogin }
  CosrvLogin = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvLogin;
  end;

  { TsrvLogin_Proxy }
  TsrvLogin_Proxy = class(TROProxy, IsrvLogin)
  protected
    function __GetInterfaceName:string; override;

    function Login(const UserID: String; const Password: String; out LoginInfo: TLoginInfo): Boolean;
    procedure Logout;
    function Ping: Boolean;
    function SetUserPassword(const UserID: String; const NewPassword: String): Boolean;
    function UpdateUsers(const UsersDelta: Binary): Binary;
  end;

  { IsrvVentasTerminadas }
  IsrvVentasTerminadas = interface(IDARemoteService)
    ['{755D5EC4-06FD-4C26-BCD1-5C8F112B18A1}']
    function GetData(const DatasetName: String; const MaxRecords: Integer; const Columns: String; const Params: TDADatasetParamArray): Binary;
    function GetSchema(const DatasetName: String; const Columns: String): Binary;
    function GetDataCrossTab(const FechaIni: String; const FechaFin: String; const Coleccion: String): Binary;
    function GetSchemaCrossTab(const FechaIni: String; const FechaFin: String; const Coleccion: String): Binary;
  end;

  { CosrvVentasTerminadas }
  CosrvVentasTerminadas = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvVentasTerminadas;
  end;

  { TsrvVentasTerminadas_Proxy }
  TsrvVentasTerminadas_Proxy = class(TDARemoteService_Proxy, IsrvVentasTerminadas)
  protected
    function __GetInterfaceName:string; override;

    function GetData(const DatasetName: String; const MaxRecords: Integer; const Columns: String; const Params: TDADatasetParamArray): Binary;
    function GetSchema(const DatasetName: String; const Columns: String): Binary;
    function GetDataCrossTab(const FechaIni: String; const FechaFin: String; const Coleccion: String): Binary;
    function GetSchemaCrossTab(const FechaIni: String; const FechaFin: String; const Coleccion: String): Binary;
  end;

  { IsrvInformes }
  IsrvInformes = interface(IDARemoteService)
    ['{78BEEBFF-E26F-48BB-82AF-F8D09A47E446}']
  end;

  { CosrvInformes }
  CosrvInformes = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvInformes;
  end;

  { TsrvInformes_Proxy }
  TsrvInformes_Proxy = class(TDARemoteService_Proxy, IsrvInformes)
  protected
    function __GetInterfaceName:string; override;

  end;

  { IsrvTransfereciaFicheros }
  IsrvTransfereciaFicheros = interface
    ['{2A7AFE06-0600-46ED-9B7A-C694A1191311}']
    procedure UploadChunk(const IsFirst: Boolean; const Filename: String; const Filedata: Binary);
    procedure UploadFinished(const Filename: String; const Filesize: Int64);
  end;

  { CosrvTransfereciaFicheros }
  CosrvTransfereciaFicheros = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvTransfereciaFicheros;
  end;

  { TsrvTransfereciaFicheros_Proxy }
  TsrvTransfereciaFicheros_Proxy = class(TROProxy, IsrvTransfereciaFicheros)
  protected
    function __GetInterfaceName:string; override;

    procedure UploadChunk(const IsFirst: Boolean; const Filename: String; const Filedata: Binary);
    procedure UploadFinished(const Filename: String; const Filesize: Int64);
  end;

  { IsrvControles }
  IsrvControles = interface(IDARemoteService)
    ['{A0C11144-A1B7-408D-BA07-63565D587662}']
  end;

  { CosrvControles }
  CosrvControles = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvControles;
  end;

  { TsrvControles_Proxy }
  TsrvControles_Proxy = class(TDARemoteService_Proxy, IsrvControles)
  protected
    function __GetInterfaceName:string; override;

  end;

  { IsrvVentasEnProceso }
  IsrvVentasEnProceso = interface(IDARemoteService)
    ['{1ADA4BDF-C8B6-4CD7-910B-EDB44C10ABDB}']
    function GetData(const DatasetName: String; const MaxRecords: Integer; const Columns: String; const Params: TDADatasetParamArray): Binary;
    function GetSchema(const DatasetName: String; const Columns: String): Binary;
  end;

  { CosrvVentasEnProceso }
  CosrvVentasEnProceso = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvVentasEnProceso;
  end;

  { TsrvVentasEnProceso_Proxy }
  TsrvVentasEnProceso_Proxy = class(TDARemoteService_Proxy, IsrvVentasEnProceso)
  protected
    function __GetInterfaceName:string; override;

    function GetData(const DatasetName: String; const MaxRecords: Integer; const Columns: String; const Params: TDADatasetParamArray): Binary;
    function GetSchema(const DatasetName: String; const Columns: String): Binary;
  end;

  { IEDI_Log }
  IEDI_Log = interface(IDARemoteService)
    ['{F4EBB9F5-A0CC-4AF7-8B81-98ED00FA95B1}']
    procedure InsertarLog(const Fecha: DateTime; const Report: String; const OK: Boolean; const Error_msg: String);
  end;

  { CoEDI_Log }
  CoEDI_Log = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IEDI_Log;
  end;

  { TEDI_Log_Proxy }
  TEDI_Log_Proxy = class(TDARemoteService_Proxy, IEDI_Log)
  protected
    function __GetInterfaceName:string; override;

    procedure InsertarLog(const Fecha: DateTime; const Report: String; const OK: Boolean; const Error_msg: String);
  end;

  { IsrvReferenciaGenerica }
  IsrvReferenciaGenerica = interface(IDARemoteService)
    ['{994518CC-96BD-4976-ABC6-9B421A4B65D3}']
    function GetProducto(const Codigo: String; const Talla: String; const Color: String; out CodigoBarras: String; out Descripcion: String): Boolean;
    function GenerateReport(const Centro: String; const Vendedor: String; const Estado: String; const FiltroUsuario: String): Binary;
    procedure PasarProductosAEspera(const Centro: String; const Vendedor: String);
  end;

  { CosrvReferenciaGenerica }
  CosrvReferenciaGenerica = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvReferenciaGenerica;
  end;

  { TsrvReferenciaGenerica_Proxy }
  TsrvReferenciaGenerica_Proxy = class(TDARemoteService_Proxy, IsrvReferenciaGenerica)
  protected
    function __GetInterfaceName:string; override;

    function GetProducto(const Codigo: String; const Talla: String; const Color: String; out CodigoBarras: String; out Descripcion: String): Boolean;
    function GenerateReport(const Centro: String; const Vendedor: String; const Estado: String; const FiltroUsuario: String): Binary;
    procedure PasarProductosAEspera(const Centro: String; const Vendedor: String);
  end;

  { IsrvRecepciones }
  IsrvRecepciones = interface(IDARemoteService)
    ['{02EB4B9C-155E-477C-AE2D-3E73B7846AB3}']
  end;

  { CosrvRecepciones }
  CosrvRecepciones = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvRecepciones;
  end;

  { TsrvRecepciones_Proxy }
  TsrvRecepciones_Proxy = class(TDARemoteService_Proxy, IsrvRecepciones)
  protected
    function __GetInterfaceName:string; override;

  end;

  { IsrvDevoluciones }
  IsrvDevoluciones = interface(IDARemoteService)
    ['{87C31D12-C353-437F-A7A3-10882373AB54}']
  end;

  { CosrvDevoluciones }
  CosrvDevoluciones = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvDevoluciones;
  end;

  { TsrvDevoluciones_Proxy }
  TsrvDevoluciones_Proxy = class(TDARemoteService_Proxy, IsrvDevoluciones)
  protected
    function __GetInterfaceName:string; override;

  end;

  { IsrvTraspasos }
  IsrvTraspasos = interface(IDARemoteService)
    ['{47DA82A0-51AD-477A-85B3-CE9EEAAB29D6}']
  end;

  { CosrvTraspasos }
  CosrvTraspasos = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvTraspasos;
  end;

  { TsrvTraspasos_Proxy }
  TsrvTraspasos_Proxy = class(TDARemoteService_Proxy, IsrvTraspasos)
  protected
    function __GetInterfaceName:string; override;

  end;

  { IsrvStock }
  IsrvStock = interface(IDARemoteService)
    ['{F617B727-5B8B-4645-BBB2-3D645AB31981}']
  end;

  { CosrvStock }
  CosrvStock = class
    class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvStock;
  end;

  { TsrvStock_Proxy }
  TsrvStock_Proxy = class(TDARemoteService_Proxy, IsrvStock)
  protected
    function __GetInterfaceName:string; override;

  end;

implementation

uses
  {vcl:} SysUtils,
  {RemObjects:} uROEventRepository, uRORes;

{ TLoginInfo }

procedure TLoginInfo.Assign(iSource: TPersistent); 
var lSource:TLoginInfo;
begin
  inherited Assign(iSource);
  if (iSource is TLoginInfo) then begin
    lSource := TLoginInfo(iSource);
    Roles.Assign(lSource.Roles);
  end;
end;

function TLoginInfo.GetRoles: TDAStringArray;
begin
  if (fRoles = nil) then fRoles := TDAStringArray.Create();
  result := fRoles;
end;

{ TLoginInfoCollection }
constructor TLoginInfoCollection.Create;
begin
  inherited Create(TLoginInfo);
end;

constructor TLoginInfoCollection.Create(aItemClass: TCollectionItemClass);
begin
  inherited Create(aItemClass);
end;

function TLoginInfoCollection.Add: TLoginInfo;
begin
  result := TLoginInfo(inherited Add);
end;

function TLoginInfoCollection.GetItems(Index: integer): TLoginInfo;
begin
  result := TLoginInfo(inherited Items[Index]);
end;

procedure TLoginInfoCollection.SetItems(Index: integer; const Value: TLoginInfo);
begin
  TLoginInfo(inherited Items[Index]).Assign(Value);
end;

{ CoEDI_Inventary }

class function CoEDI_Inventary.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IEDI_Inventary;
begin
  result := TEDI_Inventary_Proxy.Create(aMessage, aTransportChannel);
end;

{ TEDI_Inventary_Proxy }

function TEDI_Inventary_Proxy.__GetInterfaceName:string;
begin
  result := 'EDI_Inventary';
end;

function TEDI_Inventary_Proxy.CargarFicheroEDI(const FicheroCAB: String; const FicheroLIN: String; const FicheroCANT: String; out MsgError: String): Boolean;
var
  __request, __response : TMemoryStream;
begin
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'CargarFicheroEDI');
     __Message.Write('FicheroCAB', TypeInfo(String), FicheroCAB, []);
     __Message.Write('FicheroLIN', TypeInfo(String), FicheroLIN, []);
     __Message.Write('FicheroCANT', TypeInfo(String), FicheroCANT, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Boolean), result, []);
     __Message.Read('MsgError', TypeInfo(String), MsgError, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

{ CoEDI_Sales }

class function CoEDI_Sales.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IEDI_Sales;
begin
  result := TEDI_Sales_Proxy.Create(aMessage, aTransportChannel);
end;

{ TEDI_Sales_Proxy }

function TEDI_Sales_Proxy.__GetInterfaceName:string;
begin
  result := 'EDI_Sales';
end;

function TEDI_Sales_Proxy.CargarFicheroEDI(const FicheroCAB: String; const FicheroLUG: String; const FicheroART: String; out MsgError: String): Boolean;
var
  __request, __response : TMemoryStream;
begin
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'CargarFicheroEDI');
     __Message.Write('FicheroCAB', TypeInfo(String), FicheroCAB, []);
     __Message.Write('FicheroLUG', TypeInfo(String), FicheroLUG, []);
     __Message.Write('FicheroART', TypeInfo(String), FicheroART, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Boolean), result, []);
     __Message.Read('MsgError', TypeInfo(String), MsgError, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

{ CosrvLogin }

class function CosrvLogin.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvLogin;
begin
  result := TsrvLogin_Proxy.Create(aMessage, aTransportChannel);
end;

{ TsrvLogin_Proxy }

function TsrvLogin_Proxy.__GetInterfaceName:string;
begin
  result := 'srvLogin';
end;

function TsrvLogin_Proxy.Login(const UserID: String; const Password: String; out LoginInfo: TLoginInfo): Boolean;
var
  __request, __response : TMemoryStream;
begin
  LoginInfo := nil;
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'Login');
     __Message.Write('UserID', TypeInfo(String), UserID, []);
     __Message.Write('Password', TypeInfo(String), Password, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Boolean), result, []);
     __Message.Read('LoginInfo', TypeInfo(VARELA_Intf.TLoginInfo), LoginInfo, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

procedure TsrvLogin_Proxy.Logout;
var
  __request, __response : TMemoryStream;
begin
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'Logout');
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

  finally
    __request.Free;
    __response.Free;
  end
end;

function TsrvLogin_Proxy.Ping: Boolean;
var
  __request, __response : TMemoryStream;
begin
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'Ping');
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Boolean), result, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

function TsrvLogin_Proxy.SetUserPassword(const UserID: String; const NewPassword: String): Boolean;
var
  __request, __response : TMemoryStream;
begin
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'SetUserPassword');
     __Message.Write('UserID', TypeInfo(String), UserID, []);
     __Message.Write('NewPassword', TypeInfo(String), NewPassword, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Boolean), result, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

function TsrvLogin_Proxy.UpdateUsers(const UsersDelta: Binary): Binary;
var
  __request, __response : TMemoryStream;
begin
  result := nil;
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'UpdateUsers');
     __Message.Write('UsersDelta', TypeInfo(Binary), UsersDelta, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Binary), result, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

{ CosrvVentasTerminadas }

class function CosrvVentasTerminadas.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvVentasTerminadas;
begin
  result := TsrvVentasTerminadas_Proxy.Create(aMessage, aTransportChannel);
end;

{ TsrvVentasTerminadas_Proxy }

function TsrvVentasTerminadas_Proxy.__GetInterfaceName:string;
begin
  result := 'srvVentasTerminadas';
end;

function TsrvVentasTerminadas_Proxy.GetData(const DatasetName: String; const MaxRecords: Integer; const Columns: String; const Params: TDADatasetParamArray): Binary;
var
  __request, __response : TMemoryStream;
begin
  result := nil;
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'GetData');
     __Message.Write('DatasetName', TypeInfo(String), DatasetName, []);
     __Message.Write('MaxRecords', TypeInfo(Integer), MaxRecords, []);
     __Message.Write('Columns', TypeInfo(String), Columns, []);
     __Message.Write('Params', TypeInfo(DataAbstract_Intf.TDADatasetParamArray), Params, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Binary), result, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

function TsrvVentasTerminadas_Proxy.GetSchema(const DatasetName: String; const Columns: String): Binary;
var
  __request, __response : TMemoryStream;
begin
  result := nil;
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'GetSchema');
     __Message.Write('DatasetName', TypeInfo(String), DatasetName, []);
     __Message.Write('Columns', TypeInfo(String), Columns, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Binary), result, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

function TsrvVentasTerminadas_Proxy.GetDataCrossTab(const FechaIni: String; const FechaFin: String; const Coleccion: String): Binary;
var
  __request, __response : TMemoryStream;
begin
  result := nil;
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'GetDataCrossTab');
     __Message.Write('FechaIni', TypeInfo(String), FechaIni, []);
     __Message.Write('FechaFin', TypeInfo(String), FechaFin, []);
     __Message.Write('Coleccion', TypeInfo(String), Coleccion, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Binary), result, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

function TsrvVentasTerminadas_Proxy.GetSchemaCrossTab(const FechaIni: String; const FechaFin: String; const Coleccion: String): Binary;
var
  __request, __response : TMemoryStream;
begin
  result := nil;
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'GetSchemaCrossTab');
     __Message.Write('FechaIni', TypeInfo(String), FechaIni, []);
     __Message.Write('FechaFin', TypeInfo(String), FechaFin, []);
     __Message.Write('Coleccion', TypeInfo(String), Coleccion, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Binary), result, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

{ CosrvInformes }

class function CosrvInformes.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvInformes;
begin
  result := TsrvInformes_Proxy.Create(aMessage, aTransportChannel);
end;

function TsrvInformes_Proxy.__GetInterfaceName:string;
begin
  result := 'srvInformes';
end;

{ CosrvTransfereciaFicheros }

class function CosrvTransfereciaFicheros.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvTransfereciaFicheros;
begin
  result := TsrvTransfereciaFicheros_Proxy.Create(aMessage, aTransportChannel);
end;

{ TsrvTransfereciaFicheros_Proxy }

function TsrvTransfereciaFicheros_Proxy.__GetInterfaceName:string;
begin
  result := 'srvTransfereciaFicheros';
end;

procedure TsrvTransfereciaFicheros_Proxy.UploadChunk(const IsFirst: Boolean; const Filename: String; const Filedata: Binary);
var
  __request, __response : TMemoryStream;
begin
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'UploadChunk');
     __Message.Write('IsFirst', TypeInfo(Boolean), IsFirst, []);
     __Message.Write('Filename', TypeInfo(String), Filename, []);
     __Message.Write('Filedata', TypeInfo(Binary), Filedata, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

  finally
    __request.Free;
    __response.Free;
  end
end;

procedure TsrvTransfereciaFicheros_Proxy.UploadFinished(const Filename: String; const Filesize: Int64);
var
  __request, __response : TMemoryStream;
begin
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'UploadFinished');
     __Message.Write('Filename', TypeInfo(String), Filename, []);
     __Message.Write('Filesize', TypeInfo(Int64), Filesize, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

  finally
    __request.Free;
    __response.Free;
  end
end;

{ CosrvControles }

class function CosrvControles.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvControles;
begin
  result := TsrvControles_Proxy.Create(aMessage, aTransportChannel);
end;

function TsrvControles_Proxy.__GetInterfaceName:string;
begin
  result := 'srvControles';
end;

{ CosrvVentasEnProceso }

class function CosrvVentasEnProceso.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvVentasEnProceso;
begin
  result := TsrvVentasEnProceso_Proxy.Create(aMessage, aTransportChannel);
end;

{ TsrvVentasEnProceso_Proxy }

function TsrvVentasEnProceso_Proxy.__GetInterfaceName:string;
begin
  result := 'srvVentasEnProceso';
end;

function TsrvVentasEnProceso_Proxy.GetData(const DatasetName: String; const MaxRecords: Integer; const Columns: String; const Params: TDADatasetParamArray): Binary;
var
  __request, __response : TMemoryStream;
begin
  result := nil;
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'GetData');
     __Message.Write('DatasetName', TypeInfo(String), DatasetName, []);
     __Message.Write('MaxRecords', TypeInfo(Integer), MaxRecords, []);
     __Message.Write('Columns', TypeInfo(String), Columns, []);
     __Message.Write('Params', TypeInfo(DataAbstract_Intf.TDADatasetParamArray), Params, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Binary), result, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

function TsrvVentasEnProceso_Proxy.GetSchema(const DatasetName: String; const Columns: String): Binary;
var
  __request, __response : TMemoryStream;
begin
  result := nil;
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'GetSchema');
     __Message.Write('DatasetName', TypeInfo(String), DatasetName, []);
     __Message.Write('Columns', TypeInfo(String), Columns, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Binary), result, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

{ CoEDI_Log }

class function CoEDI_Log.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IEDI_Log;
begin
  result := TEDI_Log_Proxy.Create(aMessage, aTransportChannel);
end;

{ TEDI_Log_Proxy }

function TEDI_Log_Proxy.__GetInterfaceName:string;
begin
  result := 'EDI_Log';
end;

procedure TEDI_Log_Proxy.InsertarLog(const Fecha: DateTime; const Report: String; const OK: Boolean; const Error_msg: String);
var
  __request, __response : TMemoryStream;
begin
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'InsertarLog');
     __Message.Write('Fecha', TypeInfo(DateTime), Fecha, [paIsDateTime]);
     __Message.Write('Report', TypeInfo(String), Report, []);
     __Message.Write('OK', TypeInfo(Boolean), OK, []);
     __Message.Write('Error_msg', TypeInfo(String), Error_msg, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

  finally
    __request.Free;
    __response.Free;
  end
end;

{ CosrvReferenciaGenerica }

class function CosrvReferenciaGenerica.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvReferenciaGenerica;
begin
  result := TsrvReferenciaGenerica_Proxy.Create(aMessage, aTransportChannel);
end;

{ TsrvReferenciaGenerica_Proxy }

function TsrvReferenciaGenerica_Proxy.__GetInterfaceName:string;
begin
  result := 'srvReferenciaGenerica';
end;

function TsrvReferenciaGenerica_Proxy.GetProducto(const Codigo: String; const Talla: String; const Color: String; out CodigoBarras: String; out Descripcion: String): Boolean;
var
  __request, __response : TMemoryStream;
begin
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'GetProducto');
     __Message.Write('Codigo', TypeInfo(String), Codigo, []);
     __Message.Write('Talla', TypeInfo(String), Talla, []);
     __Message.Write('Color', TypeInfo(String), Color, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Boolean), result, []);
     __Message.Read('CodigoBarras', TypeInfo(String), CodigoBarras, []);
     __Message.Read('Descripcion', TypeInfo(String), Descripcion, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

function TsrvReferenciaGenerica_Proxy.GenerateReport(const Centro: String; const Vendedor: String; const Estado: String; const FiltroUsuario: String): Binary;
var
  __request, __response : TMemoryStream;
begin
  result := nil;
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'GenerateReport');
     __Message.Write('Centro', TypeInfo(String), Centro, []);
     __Message.Write('Vendedor', TypeInfo(String), Vendedor, []);
     __Message.Write('Estado', TypeInfo(String), Estado, []);
     __Message.Write('FiltroUsuario', TypeInfo(String), FiltroUsuario, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

     __Message.Read('Result', TypeInfo(Binary), result, []);
  finally
    __request.Free;
    __response.Free;
  end
end;

procedure TsrvReferenciaGenerica_Proxy.PasarProductosAEspera(const Centro: String; const Vendedor: String);
var
  __request, __response : TMemoryStream;
begin
  __request := TMemoryStream.Create;
  __response := TMemoryStream.Create;

  try
     __Message.Initialize(__TransportChannel, 'VARELA', __InterfaceName, 'PasarProductosAEspera');
     __Message.Write('Centro', TypeInfo(String), Centro, []);
     __Message.Write('Vendedor', TypeInfo(String), Vendedor, []);
     __Message.Finalize;

     __Message.WriteToStream(__request);
     __TransportChannel.Dispatch(__request, __response);
     __Message.ReadFromStream(__response);

  finally
    __request.Free;
    __response.Free;
  end
end;

{ CosrvRecepciones }

class function CosrvRecepciones.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvRecepciones;
begin
  result := TsrvRecepciones_Proxy.Create(aMessage, aTransportChannel);
end;

function TsrvRecepciones_Proxy.__GetInterfaceName:string;
begin
  result := 'srvRecepciones';
end;

{ CosrvDevoluciones }

class function CosrvDevoluciones.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvDevoluciones;
begin
  result := TsrvDevoluciones_Proxy.Create(aMessage, aTransportChannel);
end;

function TsrvDevoluciones_Proxy.__GetInterfaceName:string;
begin
  result := 'srvDevoluciones';
end;

{ CosrvTraspasos }

class function CosrvTraspasos.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvTraspasos;
begin
  result := TsrvTraspasos_Proxy.Create(aMessage, aTransportChannel);
end;

function TsrvTraspasos_Proxy.__GetInterfaceName:string;
begin
  result := 'srvTraspasos';
end;

{ CosrvStock }

class function CosrvStock.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvStock;
begin
  result := TsrvStock_Proxy.Create(aMessage, aTransportChannel);
end;

function TsrvStock_Proxy.__GetInterfaceName:string;
begin
  result := 'srvStock';
end;

initialization
  RegisterROClass(TLoginInfo);
  RegisterProxyClass(IEDI_Inventary_IID, TEDI_Inventary_Proxy);
  RegisterProxyClass(IEDI_Sales_IID, TEDI_Sales_Proxy);
  RegisterProxyClass(IsrvLogin_IID, TsrvLogin_Proxy);
  RegisterProxyClass(IsrvVentasTerminadas_IID, TsrvVentasTerminadas_Proxy);
  RegisterProxyClass(IsrvInformes_IID, TsrvInformes_Proxy);
  RegisterProxyClass(IsrvTransfereciaFicheros_IID, TsrvTransfereciaFicheros_Proxy);
  RegisterProxyClass(IsrvControles_IID, TsrvControles_Proxy);
  RegisterProxyClass(IsrvVentasEnProceso_IID, TsrvVentasEnProceso_Proxy);
  RegisterProxyClass(IEDI_Log_IID, TEDI_Log_Proxy);
  RegisterProxyClass(IsrvReferenciaGenerica_IID, TsrvReferenciaGenerica_Proxy);
  RegisterProxyClass(IsrvRecepciones_IID, TsrvRecepciones_Proxy);
  RegisterProxyClass(IsrvDevoluciones_IID, TsrvDevoluciones_Proxy);
  RegisterProxyClass(IsrvTraspasos_IID, TsrvTraspasos_Proxy);
  RegisterProxyClass(IsrvStock_IID, TsrvStock_Proxy);


finalization
  UnregisterROClass(TLoginInfo);
  UnregisterProxyClass(IEDI_Inventary_IID);
  UnregisterProxyClass(IEDI_Sales_IID);
  UnregisterProxyClass(IsrvLogin_IID);
  UnregisterProxyClass(IsrvVentasTerminadas_IID);
  UnregisterProxyClass(IsrvInformes_IID);
  UnregisterProxyClass(IsrvTransfereciaFicheros_IID);
  UnregisterProxyClass(IsrvControles_IID);
  UnregisterProxyClass(IsrvVentasEnProceso_IID);
  UnregisterProxyClass(IEDI_Log_IID);
  UnregisterProxyClass(IsrvReferenciaGenerica_IID);
  UnregisterProxyClass(IsrvRecepciones_IID);
  UnregisterProxyClass(IsrvDevoluciones_IID);
  UnregisterProxyClass(IsrvTraspasos_IID);
  UnregisterProxyClass(IsrvStock_IID);

end.
