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

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

#ifndef IncmdtcpclientHPP
#define IncmdtcpclientHPP

#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 <Sysutils.hpp>	// Pascal unit
#include <Incontext.hpp>	// Pascal unit
#include <Inglobal.hpp>	// Pascal unit
#include <Inreply.hpp>	// Pascal unit
#include <Inthread.hpp>	// Pascal unit
#include <Intcpclient.hpp>	// Pascal unit
#include <Incommandhandlers.hpp>	// Pascal unit
#include <Intcpconnection.hpp>	// Pascal unit
#include <Incomponent.hpp>	// Pascal unit
#include <Inbasecomponent.hpp>	// Pascal unit

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

namespace Incmdtcpclient
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TInCmdTCPClient;
typedef void __fastcall (__closure *TInCmdTCPClientAfterCommandHandlerEvent)(TInCmdTCPClient* ASender, Incontext::TInContext* AContext);

typedef void __fastcall (__closure *TInCmdTCPClientBeforeCommandHandlerEvent)(TInCmdTCPClient* ASender, AnsiString &AData, Incontext::TInContext* AContext);

class DELPHICLASS TInCmdTCPClientListeningThread;
class PASCALIMPLEMENTATION TInCmdTCPClientListeningThread : public Inthread::TInThread 
{
	typedef Inthread::TInThread inherited;
	
protected:
	Incontext::TInContext* FContext;
	TInCmdTCPClient* FClient;
	AnsiString FRecvData;
	virtual void __fastcall Run(void);
	
public:
	__fastcall TInCmdTCPClientListeningThread(TInCmdTCPClient* AClient);
	__fastcall virtual ~TInCmdTCPClientListeningThread(void);
	__property TInCmdTCPClient* Client = {read=FClient};
	__property AnsiString RecvData = {read=FRecvData, write=FRecvData};
};


class PASCALIMPLEMENTATION TInCmdTCPClient : public Intcpclient::TInTCPClient 
{
	typedef Intcpclient::TInTCPClient inherited;
	
protected:
	Inreply::TInReply* FExceptionReply;
	Classes::TNotifyEvent FOnConnect;
	Classes::TNotifyEvent FOnDisconnect;
	TInCmdTCPClientListeningThread* FListeningThread;
	Incommandhandlers::TInCommandHandlers* FCommandHandlers;
	bool FCommandHandlersEnabled;
	TInCmdTCPClientAfterCommandHandlerEvent FOnAfterCommandHandler;
	TInCmdTCPClientBeforeCommandHandlerEvent FOnBeforeCommandHandler;
	void __fastcall DoAfterCommandHandler(Incommandhandlers::TInCommandHandlers* ASender, Incontext::TInContext* AContext);
	void __fastcall DoBeforeCommandHandler(Incommandhandlers::TInCommandHandlers* ASender, AnsiString &AData, Incontext::TInContext* AContext);
	virtual void __fastcall InitComponent(void);
	void __fastcall SetExceptionReply(Inreply::TInReply* AValue);
	
public:
	virtual void __fastcall Connect(void)/* overload */;
	__fastcall virtual ~TInCmdTCPClient(void);
	virtual void __fastcall Disconnect(bool AImmediate)/* overload */;
	
__published:
	__property Incommandhandlers::TInCommandHandlers* CommandHandlers = {read=FCommandHandlers, write=FCommandHandlers};
	__property bool CommandHandlersEnabled = {read=FCommandHandlersEnabled, write=FCommandHandlersEnabled, default=1};
	__property Inreply::TInReply* ExceptionReply = {read=FExceptionReply, write=SetExceptionReply};
	__property TInCmdTCPClientAfterCommandHandlerEvent OnAfterCommandHandler = {read=FOnAfterCommandHandler, write=FOnAfterCommandHandler};
	__property TInCmdTCPClientBeforeCommandHandlerEvent OnBeforeCommandHandler = {read=FOnBeforeCommandHandler, write=FOnBeforeCommandHandler};
	__property Classes::TNotifyEvent OnConnect = {read=FOnConnect, write=FOnConnect};
	__property Classes::TNotifyEvent OnDisconnect = {read=FOnDisconnect, write=FOnDisconnect};
public:
	#pragma option push -w-inl
	/* TInBaseComponent.Create */ inline __fastcall TInCmdTCPClient(Classes::TComponent* AOwner)/* overload */ : Intcpclient::TInTCPClient(AOwner) { }
	#pragma option pop
	
	
/* Hoisted overloads: */
	
public:
	inline void __fastcall  Connect(const AnsiString AHost, const int APort = 0xffffffff){ TInTCPClientCustom::Connect(AHost, APort); }
	inline void __fastcall  Disconnect(void){ TInTCPConnection::Disconnect(); }
	
};


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

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

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