// QLRequest.h: interface for the CQLRequest class.
|
//
|
//////////////////////////////////////////////////////////////////////
|
|
#if _MSC_VER > 1000
|
#pragma once
|
#endif // _MSC_VER > 1000
|
|
#include "QLCommand.h"
|
#include "QLCommander.h"
|
|
enum REQSTATUS
|
{
|
REQ_START=0, REQ_PARAMETER, REQ_PROPERTY, REQ_BODY, REQ_END, REQ_ERR
|
};
|
|
class AFX_EXT_CLASS CQLRequest : public CQLCommand
|
{
|
public:
|
CQLRequest( CQLCommander *pCommander);
|
virtual ~CQLRequest();
|
|
// Operations
|
public:
|
const DWORD GetReqStatus();
|
CQLCommander* GetCommander();
|
DWORD RecvBuf( LPBYTE pBuf, long &nSize );
|
long Write(const LPVOID pVoid, long nSize);
|
long GetSendSize(); // ·µ»Øµ±Ç°ÒѾ·¢Ë͵ÄÄÚÈÝ´óС
|
void SetBody( CString strBody );
|
|
private:
|
long StuffMethod(LPBYTE pBuf, int nSize);
|
long StuffProperty(LPBYTE pBuf, int nSize);
|
long StuffParam(LPBYTE pBuf, int nSize);
|
|
long StuffMethodU(LPBYTE pBuf, int nSize); // _UTOMUL
|
long StuffMethodA(LPBYTE pBuf, int nSize );
|
long StuffPropertyU(LPBYTE pBuf, int nSize);
|
long StuffPropertyA(LPBYTE pBuf, int nSize);
|
long StuffParamU(LPBYTE pBuf, int nSize);
|
long StuffParamA(LPBYTE pBuf, int nSize);
|
|
CQLCommander *m_pCommander;
|
REQSTATUS m_reqStatus;
|
|
POSITION m_posParam; // µ±Ç°´¦ÀíµÄ²ÎÊýÁбíµÄλÖÃ
|
POSITION m_posProp; // µ±Ç°´¦ÀíµÄÊôÐÔÁбíλÖÃ
|
|
#ifndef _UNICODE
|
CString m_strBuff;
|
#else
|
CByteArray m_arBuff;
|
#endif
|
|
long m_nSendSize;
|
|
};
|