// QLCommand.h: interface for the CCommand class.
|
//
|
//////////////////////////////////////////////////////////////////////
|
|
#define SPACE 0x20
|
#define LF 0x0A
|
#define COLON 0x3A
|
|
#if _MSC_VER > 1000
|
#pragma once
|
#endif // _MSC_VER > 1000
|
|
#include "QLObj.h"
|
|
CString URLDecode( const CString &str );
|
CString AMGetHostName( );
|
|
// Str
|
bool GetStrByWStr( CString strInValue, CByteArray &arOutValue );
|
bool GetWStrByStr( LPCSTR lpsInValue, long nInDataLength, CString &strOutValue );
|
bool GetWStrByStrEx( LPCSTR lpsInValue, long nInDataLength, CString &strOutValue, BOOL &bLined );
|
bool GetWStrByStrEx( BYTE bTrunc, LPCSTR lpsInValue, long nInDataLength, CString &strOutValue, BOOL &bLined );
|
|
bool GetWStrByStrEx( CByteArray &arValue, CString &strOutValue, BOOL &bLined );
|
bool GetWStrByStr( CByteArray &arInValue, CByteArray &arOutValue );
|
|
void CopyStrToArray( CString strValue, CByteArray &arValue );
|
void CopyArrayToStr( CByteArray &arValue, CString &strValue, BOOL &bLined );
|
void CopyBufferToString( CString &strData, LPBYTE lpBuffer, long nLength, BOOL &bLined );
|
|
class AFX_EXT_CLASS CQLCommand : public CQLObj
|
{
|
public:
|
CQLCommand();
|
virtual ~CQLCommand();
|
|
// Attributers
|
protected:
|
CString m_strMethod;
|
long m_nBodySize;
|
CByteArray m_body;
|
CStringList m_listParam;
|
|
public:
|
CMapStringToString m_mapProp;
|
|
// Operations
|
public:
|
int GetPropCount();
|
void SetProp( LPCTSTR lpszName, LPCTSTR lpszValue );
|
void SetProp( CString &strName, LPCTSTR lpszValue );
|
CString GetProp( CString strName );
|
void SetProp( CString strName, long nValue );
|
void SetBigProp( const CString strName, LONGLONG nValue );
|
CString GetPropName( int nNum );
|
CString GetPropData( int nNum );
|
|
void SetBodySize( long nSize );
|
long GetBodySize();
|
|
void SetMethod( LPCTSTR lpszMethod );
|
CString GetMethod();
|
|
void SetParam( LPCTSTR lpszParameters );
|
void SetParam( long nIndex, LPCTSTR lpszParam );
|
void SetParam( long nIndex, long nParam );
|
CString GetParam( long nIndex );
|
long GetParamInt( long nIndex );
|
LONGLONG GetParamBigInt( long nIndex );
|
BOOL InsertParam( LPCTSTR lpszParam, long nIndex = 0 /*Á㿪ʼ¼ÆÊýµÄÐòºÅ*/ );
|
void AppendParam( LPCTSTR lpszParame );
|
void AppendParam( long nParame );
|
void AppendBigParam( LONGLONG nParam );
|
void RemoveAllParam();
|
int GetParamCount();
|
|
bool RemoveParam( long nIndex = 0 );
|
|
};
|