//---------------------- CSPRequest.h -------------------------

//*************************************************************
//*****       Copyright ©2002 - 2004 Micronovae Ltd       *****
//*****                All rights reserved                *****
//*************************************************************


#ifndef _CSPREQUEST
#define _CSPREQUEST

#include "CSPConf.h"
#include "CSPLib.h"
#include <httpext.h>
#include "CSPParameters.h"
#include "CSPCookies.h"
#include "CSPBuffer.h"

class CSPOBJ_CLASS_EXPORT CSPRequest : public CSPObject
{
	public:
		CSPQueryString QueryString;
		CSPForm Form;
		CSPGetCookieSet Cookies;
		

		CSPRequest(LPEXTENSION_CONTROL_BLOCK p_ecb);
		virtual ~CSPRequest();

		CSPString GetServerVariable( const CSPString& strVarName ) const;
		void GetServerVariable( const CSPString& strVarName, CSPBuffer& Binary ) const;
		unsigned long CSPRequest::BinaryRead( CSPBuffer& Data, unsigned long ulSize = 0 ) const;
		unsigned long GetTotalBytes() const;
		unsigned long GetAvailableBytes() const;
		CSPString MapPath( const CSPString& strLogPath ) const;
		CSPString ContentType;
		CSPString NativeQueryString;

	protected:	
		mutable unsigned long ulPostedDataRead;
		LPEXTENSION_CONTROL_BLOCK pECB;

	private:
		CSPRequest( const CSPRequest& );
		CSPRequest& operator = ( const CSPRequest& );
};

#endif
