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

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

#ifndef IdtelnetserverHPP
#define IdtelnetserverHPP

#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 <Idobjs.hpp>	// Pascal unit
#include <Idsys.hpp>	// Pascal unit
#include <Idbasecomponent.hpp>	// Pascal unit
#include <Idassignednumbers.hpp>	// Pascal unit
#include <Idcontext.hpp>	// Pascal unit
#include <Idcustomtcpserver.hpp>	// Pascal unit
#include <Idtcpconnection.hpp>	// Pascal unit
#include <Idyarn.hpp>	// Pascal unit
#include <Idtask.hpp>	// Pascal unit
#include <Idcomponent.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit

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

namespace Idtelnetserver
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TTelnetData;
class PASCALIMPLEMENTATION TTelnetData : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	AnsiString Username;
	AnsiString Password;
	unsigned HUserToken;
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TTelnetData(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TTelnetData(void) { }
	#pragma option pop
	
};


class DELPHICLASS TIdTelnetPeerContext;
class PASCALIMPLEMENTATION TIdTelnetPeerContext : public Idcontext::TIdContext 
{
	typedef Idcontext::TIdContext inherited;
	
private:
	TTelnetData* FTelnetData;
	
public:
	__fastcall virtual TIdTelnetPeerContext(Idtcpconnection::TIdTCPConnection* AConnection, Idyarn::TIdYarn* AYarn, Classes::TThreadList* AList);
	__fastcall virtual ~TIdTelnetPeerContext(void);
	__property TTelnetData* TelnetData = {read=FTelnetData};
};


typedef void __fastcall (__closure *TIdTelnetNegotiateEvent)(Idcontext::TIdContext* AContext);

typedef void __fastcall (__closure *TAuthenticationEvent)(Idcontext::TIdContext* AContext, const AnsiString AUsername, const AnsiString APassword, bool &AAuthenticated);

class DELPHICLASS TIdTelnetServer;
class PASCALIMPLEMENTATION TIdTelnetServer : public Idcustomtcpserver::TIdCustomTCPServer 
{
	typedef Idcustomtcpserver::TIdCustomTCPServer inherited;
	
protected:
	int FLoginAttempts;
	TAuthenticationEvent FOnAuthentication;
	AnsiString FLoginMessage;
	TIdTelnetNegotiateEvent FOnNegotiate;
	virtual void __fastcall DoConnect(Idcontext::TIdContext* AContext);
	virtual void __fastcall InitComponent(void);
	
public:
	virtual bool __fastcall DoAuthenticate(Idcontext::TIdContext* AContext, const AnsiString AUsername, const AnsiString APassword);
	virtual void __fastcall DoNegotiate(Idcontext::TIdContext* AContext);
	
__published:
	__property DefaultPort  = {default=23};
	__property int LoginAttempts = {read=FLoginAttempts, write=FLoginAttempts, default=3};
	__property AnsiString LoginMessage = {read=FLoginMessage, write=FLoginMessage};
	__property TAuthenticationEvent OnAuthentication = {read=FOnAuthentication, write=FOnAuthentication};
	__property TIdTelnetNegotiateEvent OnNegotiate = {read=FOnNegotiate, write=FOnNegotiate};
	__property OnExecute ;
public:
	#pragma option push -w-inl
	/* TIdCustomTCPServer.Destroy */ inline __fastcall virtual ~TIdTelnetServer(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TIdBaseComponent.Create */ inline __fastcall TIdTelnetServer(Classes::TComponent* AOwner)/* overload */ : Idcustomtcpserver::TIdCustomTCPServer(AOwner) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint GLoginAttempts = 0x3;

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

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