TROIndyProgress

Overview

TROIndyProgress is a support class that subscribes to TIdComponent progress events: OnWork, OnWorkBegin, OnWorkEnd and calls TROTransportChannel.TriggerProgress with collected data.

Usage:

constructor TROCustomIndyTCPChannel.Create(aOwner: TComponent);
begin
  inherited;
  fIndyClient := CreateIndyClient;
  fIndyProgress:= TROIndyProgress.Create(Self,fIndyClient,pdUnknown);
...
end;

This class is designed only for internal usage.

Location

  • Unit: uROIndySupport.pas

Properties


Total

Number of bytes to be read or written.

property Total: integer read write

Instance Methods


constructor Create

Creates a new instance and assigns DoWork, DoWorkBegin, DoWorkEnd to correspondents events of AIndyComponent.

constructor Create(AOwner: TROTransportChannel; AIndyComponent: TIdComponent; ALogDirection: TProgressDirection)

Parameters:

  • AOwner: Indy Channel
  • AIndyComponent: Indy component
  • ALogDirection: Direction

DoWork  protected

Method that is assigned to TIdComponent.

procedure DoWork(ASender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer)

Parameters:

  • ASender: sender
  • AWorkMode: work mode
  • AWorkCount: work count

DoWorkBegin  protected

Method that is assigned to TIdComponent.OnWorkBegin.

procedure DoWorkBegin(ASender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer)

Parameters:

  • ASender: sender
  • AWorkMode: work mode
  • AWorkCountMax: work count max

DoWorkEnd  protected

Method that is assigned to TIdComponent.OnWorkEnd.

procedure DoWorkEnd(ASender: TObject; AWorkMode: TWorkMode)

Parameters:

  • ASender: sender
  • AWorkMode: work mode

See Also