// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Idtrivialftp.pas' rev: 10.00

#ifndef IdtrivialftpHPP
#define IdtrivialftpHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Idassignednumbers.hpp>	// Pascal unit
#include <Idtrivialftpbase.hpp>	// Pascal unit
#include <Idudpclient.hpp>	// Pascal unit
#include <Idudpbase.hpp>	// Pascal unit
#include <Idcomponent.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Idtrivialftp
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TIdTrivialFTP;
class PASCALIMPLEMENTATION TIdTrivialFTP : public Idudpclient::TIdUDPClient 
{
	typedef Idudpclient::TIdUDPClient inherited;
	
protected:
	Idtrivialftpbase::TIdTFTPMode FMode;
	int FRequestedBlockSize;
	int FPeerPort;
	AnsiString FPeerIP;
	AnsiString __fastcall ModeToStr();
	void __fastcall CheckOptionAck(const AnsiString optionpacket);
	void __fastcall SendAck(const Word BlockNumber);
	void __fastcall RaiseError(const AnsiString errorpacket);
	
public:
	__fastcall virtual TIdTrivialFTP(Classes::TComponent* AnOwner);
	void __fastcall Get(const AnsiString ServerFile, Classes::TStream* DestinationStream)/* overload */;
	void __fastcall Get(const AnsiString ServerFile, const AnsiString LocalFile)/* overload */;
	void __fastcall Put(Classes::TStream* SourceStream, const AnsiString ServerFile)/* overload */;
	void __fastcall Put(const AnsiString LocalFile, const AnsiString ServerFile)/* overload */;
	
__published:
	__property Idtrivialftpbase::TIdTFTPMode TransferMode = {read=FMode, write=FMode, default=1};
	__property int RequestedBlockSize = {read=FRequestedBlockSize, write=FRequestedBlockSize, default=1500};
	__property OnWork ;
	__property OnWorkBegin ;
	__property OnWorkEnd ;
public:
	#pragma option push -w-inl
	/* TIdUDPBase.Destroy */ inline __fastcall virtual ~TIdTrivialFTP(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
#define GTransferMode (Idtrivialftpbase::TIdTFTPMode)(1)
static const Word GFRequestedBlockSize = 0x5dc;
static const Word GReceiveTimeout = 0xfa0;

}	/* namespace Idtrivialftp */
using namespace Idtrivialftp;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Idtrivialftp
