www.pudn.com > acdx.rar > HttpResponse.h


#if !defined(HttpResponse_H) 
#define HttpResponse_H 
 
 
#include "HttpUtil.h" 
#include "HttpRequest.h" 
#include "HttpServerInfo.h" 
#include "TextFile.h" 
 
 
#include  
#include  
#include  
 
#include "../acdx.h" 
 
using namespace std; 
 
 
#pragma warning( disable:4172 ) 
 
 
///////////////////////////////////////////////////////////////////////////////////// 
// HttpResponse 
// 
// Purpose:	represent an http response 
 
//##ModelId=424BB64401AD 
class HttpResponse : 
	public HttpRequest 
{ 
protected: 
 
	////////////////////////////////////////////////////////// 
	// http response format  
	// 
	// Response Line Required 
	// General Header Optional 
	// Response Header Optional 
	// Entity Header Optional 
	// Entity Body Optional 
 
	// static ref to server 
	//##ModelId=424BB64401BE 
	static HttpServerInfo * _server; 
 
 
	// handle to file 
	//##ModelId=424BB64401CC 
	HANDLE			_hFile;				// handle to file associated with response 
	//##ModelId=424BB64401DD 
	TextFile		_file;				// file associated with response 
 
public: 
 
	//ACDX* acdx; 
	//##ModelId=424BB64401E1 
	HttpResponse (); 
	//##ModelId=424BB64401EC 
	HttpResponse ( HttpRequest & request ); 
	//##ModelId=424BB64401EE 
	virtual ~HttpResponse (); 
 
	// create/release 
	//##ModelId=424BB64401FB 
	bool create  (); 
	//##ModelId=424BB64401FC 
	void release (); 
 
	// set static server ptr 
	//##ModelId=424BB64401FD 
	static setServer ( HttpServerInfo & server ) 
	{ 
		_server = &server; 
		 
		//acdx = &_acdx; 
	} 
 
/* 
		static setACDX(ACDX * _acdx) 
		{ 
			acdx = _acdx; 
		}*/ 
	 
 
	// content add methods 
	//##ModelId=424BB644020D 
	bool	startResponse	(); 
	//##ModelId=424BB644020E 
	bool	startServerApp	(); 
	//##ModelId=424BB644021B 
	bool	addHeading		(); 
	//##ModelId=424BB644021C 
	void	addTagetInfo	(); 
	//##ModelId=424BB644021D 
	void	addListing		(); 
	//##ModelId=424BB644022A 
	int		addListingFile	( WIN32_FIND_DATA * pfd, const string& strDir, bool bIcons ); 
	//##ModelId=424BB644023A 
	void	addContentType	(); 
 
}; 
 
 
 
#endif