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

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

#ifndef SockrequestinterpreterHPP
#define SockrequestinterpreterHPP

#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 <Idtcpclient.hpp>	// Pascal unit
#include <Idtcpconnection.hpp>	// Pascal unit
#include <Socktransport.hpp>	// Pascal unit
#include <Indysocktransport.hpp>	// Pascal unit
#include <Httpapp.hpp>	// Pascal unit
#include <Idudpserver.hpp>	// Pascal unit
#include <Idsockethandle.hpp>	// Pascal unit
#include <Idudpclient.hpp>	// Pascal unit
#include <Syncobjs.hpp>	// Pascal unit
#include <Contnrs.hpp>	// Pascal unit

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

namespace Sockrequestinterpreter
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TWebRequestDataBlockInterpreter;
class PASCALIMPLEMENTATION TWebRequestDataBlockInterpreter : public Socktransport::TCustomDataBlockInterpreter 
{
	typedef Socktransport::TCustomDataBlockInterpreter inherited;
	
private:
	Httpapp::TWebRequest* FWebRequest;
	Httpapp::TWebResponse* FWebResponse;
	bool FUsingStub;
	Socktransport::_di_IDataBlock __fastcall DoGetFieldByName(Socktransport::_di_IDataBlock Data);
	Socktransport::_di_IDataBlock __fastcall DoReadClient(Socktransport::_di_IDataBlock Data);
	Socktransport::_di_IDataBlock __fastcall DoReadString(Socktransport::_di_IDataBlock Data);
	Socktransport::_di_IDataBlock __fastcall DoTranslateURI(Socktransport::_di_IDataBlock Data);
	Socktransport::_di_IDataBlock __fastcall DoWriteClient(Socktransport::_di_IDataBlock Data);
	Socktransport::_di_IDataBlock __fastcall DoWriteHeaders(Socktransport::_di_IDataBlock Data);
	Socktransport::_di_IDataBlock __fastcall DoUsingStub(Socktransport::_di_IDataBlock Data);
	Socktransport::_di_IDataBlock __fastcall DoGetStringVariable(Socktransport::_di_IDataBlock Data);
	
protected:
	virtual Socktransport::_di_IDataBlock __fastcall DoHandleRequest(Socktransport::_di_IDataBlock Data) = 0 ;
	
public:
	void __fastcall CallHandleRequest(Httpapp::TWebRequest* ARequest, Httpapp::TWebResponse* AResponse, bool AUsingStub);
	AnsiString __fastcall CallGetFieldByName(const AnsiString AName);
	int __fastcall CallReadClient(AnsiString &ABuffer, int ACount);
	int __fastcall CallReadString(AnsiString &ABuffer, int ACount);
	AnsiString __fastcall CallTranslateURI(const AnsiString Value);
	int __fastcall CallWriteClient(const AnsiString ABuffer);
	AnsiString __fastcall CallGetStringVariable(int Index);
	bool __fastcall CallWriteHeaders(int StatusCode, AnsiString StatusText, AnsiString Headers);
	bool __fastcall CallUsingStub(void);
	virtual void __fastcall InterpretData(const Socktransport::_di_IDataBlock Data);
public:
	#pragma option push -w-inl
	/* TCustomDataBlockInterpreter.Create */ inline __fastcall TWebRequestDataBlockInterpreter(Socktransport::_di_ISendDataBlock ASendDataBlock) : Socktransport::TCustomDataBlockInterpreter(ASendDataBlock) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TWebRequestDataBlockInterpreter(void) { }
	#pragma option pop
	
};


class DELPHICLASS TLogWebAppDataBlockInterpreter;
class PASCALIMPLEMENTATION TLogWebAppDataBlockInterpreter : public TWebRequestDataBlockInterpreter 
{
	typedef TWebRequestDataBlockInterpreter inherited;
	
private:
	bool FComplete;
	
protected:
	virtual Socktransport::_di_IDataBlock __fastcall DoHandleRequest(Socktransport::_di_IDataBlock Data);
	
__published:
	__property bool Complete = {read=FComplete, nodefault};
public:
	#pragma option push -w-inl
	/* TCustomDataBlockInterpreter.Create */ inline __fastcall TLogWebAppDataBlockInterpreter(Socktransport::_di_ISendDataBlock ASendDataBlock) : TWebRequestDataBlockInterpreter(ASendDataBlock) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TLogWebAppDataBlockInterpreter(void) { }
	#pragma option pop
	
};


class DELPHICLASS TLogSendDataBlock;
class PASCALIMPLEMENTATION TLogSendDataBlock : public Socktransport::TSendDataBlock 
{
	typedef Socktransport::TSendDataBlock inherited;
	
protected:
	virtual Socktransport::_di_IDataBlock __stdcall Send(const Socktransport::_di_IDataBlock Data, bool WaitForResult);
public:
	#pragma option push -w-inl
	/* TSendDataBlock.Create */ inline __fastcall TLogSendDataBlock(Socktransport::_di_ITransport ATransport) : Socktransport::TSendDataBlock(ATransport) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TLogSendDataBlock(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint asError = 0x1;
static const Shortint asHandleRequest = 0x2;
static const Shortint asGetFieldByName = 0x3;
static const Shortint asReadClient = 0x4;
static const Shortint asReadString = 0x5;
static const Shortint asTranslateURI = 0x6;
static const Shortint asWriteClient = 0x7;
static const Shortint asWriteHeaders = 0x8;
static const Shortint asUsingStub = 0x9;
static const Shortint asGetStringVariable = 0xa;

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

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