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

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

#ifndef IdidentserverHPP
#define IdidentserverHPP

#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 <Idassignednumbers.hpp>	// Pascal unit
#include <Idtcpserver.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Idcomponent.hpp>	// Pascal unit

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

namespace Ididentserver
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TIdIdentQueryEvent)(Idtcpserver::TIdPeerThread* AThread, int AServerPort, int AClientPort);

#pragma option push -b-
enum TIdIdentErrorType { ieInvalidPort, ieNoUser, ieHiddenUser, ieUnknownError };
#pragma option pop

class DELPHICLASS TIdIdentServer;
class PASCALIMPLEMENTATION TIdIdentServer : public Idtcpserver::TIdTCPServer 
{
	typedef Idtcpserver::TIdTCPServer inherited;
	
protected:
	TIdIdentQueryEvent FOnIdentQuery;
	int FQueryTimeOut;
	virtual bool __fastcall DoExecute(Idtcpserver::TIdPeerThread* AThread);
	
public:
	__fastcall virtual TIdIdentServer(Classes::TComponent* AOwner);
	void __fastcall ReplyError(Idtcpserver::TIdPeerThread* AThread, int AServerPort, int AClientPort, TIdIdentErrorType AErr);
	void __fastcall ReplyIdent(Idtcpserver::TIdPeerThread* AThread, int AServerPort, int AClientPort, AnsiString AOS, AnsiString AUserName, const AnsiString ACharset = "");
	void __fastcall ReplyOther(Idtcpserver::TIdPeerThread* AThread, int AServerPort, int AClientPort, AnsiString AOther);
	
__published:
	__property int QueryTimeOut = {read=FQueryTimeOut, write=FQueryTimeOut, default=60000};
	__property TIdIdentQueryEvent OnIdentQuery = {read=FOnIdentQuery, write=FOnIdentQuery};
	__property DefaultPort  = {default=113};
public:
	#pragma option push -w-inl
	/* TIdTCPServer.Destroy */ inline __fastcall virtual ~TIdIdentServer(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Word IdDefIdentQueryTimeOut = 0xea60;

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

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