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

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

#ifndef IdmappedftpHPP
#define IdmappedftpHPP

#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 <Idtcpserver.hpp>	// Pascal unit
#include <Idmappedporttcp.hpp>	// Pascal unit
#include <Idassignednumbers.hpp>	// Pascal unit
#include <Idthread.hpp>	// Pascal unit
#include <Idtcpconnection.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Idcomponent.hpp>	// Pascal unit

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

namespace Idmappedftp
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TIdMappedFtpThread;
class DELPHICLASS TIdMappedFtpDataThread;
class PASCALIMPLEMENTATION TIdMappedFtpDataThread : public Idthread::TIdThread 
{
	typedef Idthread::TIdThread inherited;
	
protected:
	TIdMappedFtpThread* FMappedFtpThread;
	Idtcpconnection::TIdTCPConnection* FConnection;
	Idtcpconnection::TIdTCPConnection* FOutboundClient;
	Classes::TList* FReadList;
	AnsiString FNetData;
	virtual void __fastcall BeforeRun(void);
	virtual void __fastcall Run(void);
	
public:
	__fastcall TIdMappedFtpDataThread(TIdMappedFtpThread* AMappedFtpThread);
	__fastcall virtual ~TIdMappedFtpDataThread(void);
	__property TIdMappedFtpThread* MappedFtpThread = {read=FMappedFtpThread};
	__property Idtcpconnection::TIdTCPConnection* Connection = {read=FConnection};
	__property Idtcpconnection::TIdTCPConnection* OutboundClient = {read=FOutboundClient};
	__property AnsiString NetData = {read=FNetData, write=FNetData};
};


class PASCALIMPLEMENTATION TIdMappedFtpThread : public Idmappedporttcp::TIdMappedPortThread 
{
	typedef Idmappedporttcp::TIdMappedPortThread inherited;
	
protected:
	AnsiString FFtpCommand;
	AnsiString FFtpParams;
	AnsiString FHost;
	AnsiString FoutboundHost;
	int FPort;
	int FoutboundPort;
	TIdMappedFtpDataThread* FDataChannelThread;
	AnsiString __fastcall GetFtpCmdLine();
	void __fastcall CreateDataChannelThread(void);
	virtual bool __fastcall ProcessFtpCommand(void);
	virtual void __fastcall ProcessOutboundDc(const bool APASV);
	virtual void __fastcall ProcessDataCommand(void);
	
public:
	__fastcall virtual TIdMappedFtpThread(bool ACreateSuspended);
	__property AnsiString FtpCommand = {read=FFtpCommand, write=FFtpCommand};
	__property AnsiString FtpParams = {read=FFtpParams, write=FFtpParams};
	__property AnsiString FtpCmdLine = {read=GetFtpCmdLine};
	__property AnsiString Host = {read=FHost, write=FHost};
	__property AnsiString OutboundHost = {read=FoutboundHost, write=FoutboundHost};
	__property int Port = {read=FPort, write=FPort, nodefault};
	__property int OutboundPort = {read=FoutboundPort, write=FoutboundPort, nodefault};
	__property TIdMappedFtpDataThread* DataChannelThread = {read=FDataChannelThread};
public:
	#pragma option push -w-inl
	/* TIdMappedPortThread.Destroy */ inline __fastcall virtual ~TIdMappedFtpThread(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TIdMappedFtpOutboundDcMode { fdcmClient, fdcmPort, fdcmPasv };
#pragma option pop

class DELPHICLASS TIdMappedFTP;
class PASCALIMPLEMENTATION TIdMappedFTP : public Idmappedporttcp::TIdMappedPortTCP 
{
	typedef Idmappedporttcp::TIdMappedPortTCP inherited;
	
protected:
	TIdMappedFtpOutboundDcMode FOutboundDcMode;
	virtual bool __fastcall DoExecute(Idtcpserver::TIdPeerThread* AThread);
	
public:
	__fastcall virtual TIdMappedFTP(Classes::TComponent* AOwner);
	
__published:
	__property DefaultPort  = {default=21};
	__property MappedPort  = {default=21};
	__property TIdMappedFtpOutboundDcMode OutboundDcMode = {read=FOutboundDcMode, write=FOutboundDcMode, default=0};
public:
	#pragma option push -w-inl
	/* TIdTCPServer.Destroy */ inline __fastcall virtual ~TIdMappedFTP(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------

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

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