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

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

#ifndef IntelnetserverHPP
#define IntelnetserverHPP

#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 <Inassignednumbers.hpp>	// Pascal unit
#include <Incontext.hpp>	// Pascal unit
#include <Intcpconnection.hpp>	// Pascal unit
#include <Inyarn.hpp>	// Pascal unit
#include <Intcpserver.hpp>	// Pascal unit
#include <Intask.hpp>	// Pascal unit
#include <Incomponent.hpp>	// Pascal unit
#include <Inbasecomponent.hpp>	// Pascal unit

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

namespace Intelnetserver
{
//-- 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 TInTelnetPeerContext;
class PASCALIMPLEMENTATION TInTelnetPeerContext : public Incontext::TInContext 
{
	typedef Incontext::TInContext inherited;
	
private:
	TTelnetData* FTelnetData;
	
public:
	__fastcall virtual TInTelnetPeerContext(Intcpconnection::TInTCPConnection* AConnection, Inyarn::TInYarn* AYarn, Classes::TThreadList* AList);
	__fastcall virtual ~TInTelnetPeerContext(void);
	__property TTelnetData* TelnetData = {read=FTelnetData};
};


typedef void __fastcall (__closure *TInTelnetNegotiateEvent)(Incontext::TInContext* AContext);

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

class DELPHICLASS TInTelnetServer;
class PASCALIMPLEMENTATION TInTelnetServer : public Intcpserver::TInTCPServer 
{
	typedef Intcpserver::TInTCPServer inherited;
	
protected:
	int FLoginAttempts;
	TAuthenticationEvent FOnAuthentication;
	AnsiString FLoginMessage;
	TInTelnetNegotiateEvent FOnNegotiate;
	virtual void __fastcall DoConnect(Incontext::TInContext* AContext);
	virtual void __fastcall InitComponent(void);
	
public:
	virtual bool __fastcall DoAuthenticate(Incontext::TInContext* AContext, const AnsiString AUsername, const AnsiString APassword);
	virtual void __fastcall DoNegotiate(Incontext::TInContext* 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 TInTelnetNegotiateEvent OnNegotiate = {read=FOnNegotiate, write=FOnNegotiate};
public:
	#pragma option push -w-inl
	/* TInTCPServer.Destroy */ inline __fastcall virtual ~TInTelnetServer(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TInBaseComponent.Create */ inline __fastcall TInTelnetServer(Classes::TComponent* AOwner)/* overload */ : Intcpserver::TInTCPServer(AOwner) { }
	#pragma option pop
	
};


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

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

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