Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit ATTTerm.EngineFtp;
- interface
- uses Classes, IdFTP,SysUtils,idftpcommon;
- type TAtttermEngineFtp = class( TThread )
- private
- {Private declaration}
- Ftp : TidFTP;
- FPassword: string;
- FHost: string;
- FUserName: string;
- FCaminhoDiretorioFtp: string;
- protected
- {Protected declaration}
- public
- procedure AfterConstruction; override;
- procedure BeforeDestruction; override;
- {Public declaration declaration}
- property Host: string read FHost write FHost;
- property UserName: string read FUserName write FUserName;
- property password: string read FPassword write FPassword;
- function EfetuaConexaocomservidor( aIdFtp: TIDFtP ): Boolean;
- constructor Create( const DiretorioFtp: string ); reintroduce; Overload; (*Metodos do Constructor*)
- destructor Destroy; override;
- published
- {Protected declaration}
- end;
- implementation
- { TAtttermEngineFtp }
- procedure TAtttermEngineFtp.AfterConstruction;
- begin
- inherited AfterConstruction;
- end;
- procedure TAtttermEngineFtp.BeforeDestruction;
- begin
- inherited BeforeDestruction;
- end;
- constructor TAtttermEngineFtp.Create(const DiretorioFtp: string);
- begin
- FCaminhoDiretorioFtp := DiretorioFtp;
- end;
- destructor TAtttermEngineFtp.Destroy;
- begin
- inherited;
- end;
- function TAtttermEngineFtp.EfetuaConexaocomservidor( aIdFtp: TIDFtP ): Boolean;
- begin
- if Not Assigned( aIdFtp ) then
- begin
- aIdFtp := TIdFTP.Create( nil );
- end;
- aIdFtp.Host := FHost;
- aIdFtp.Password := FPassword;
- aIdFtp.Username := FUserName;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement