C++ common classes
General purpose classes for use across projects (Apache license)
|
#include <CHTTPClient.h>
Public Member Functions | |
CHTTPClient () | |
virtual | ~CHTTPClient () |
BOOL | CheckConnect (const char *szHost, BOOL bSecure, long lPort, const char *szProxy, long lProxyPort, const char *szProxyUser, const char *szProxyPswd, long dwTimeout) |
BOOL | GetHTTPBytesReceived (long &dwLength) |
BOOL | GetHTTPContent (char *lpBuffer) |
BOOL | GetHTTPContentType (char *lpBuffer) |
BOOL | GetHTTPLastModified (char *lpBuffer) |
BOOL | GetHTTPNewLocation (char *lpBuffer) |
BOOL | GetHTTPServer (char *lpBuffer) |
BOOL | GetHTTPStatus (long &dwStatus) |
BOOL | SendRequest (const char *szHost, const char *szHostName, const char *szPath, const char *szUserID, const char *szPassword, long lPort, const char *szProxy, long lProxyPort, const char *szProxyUser, const char *szProxyPswd, const char *szUserAgent, const char *szPost, long dwTimeOut, const char *szTransaction=NULL) |
Public Attributes | |
BOOL | bReadComplete |
BOOL | bConnectFailed |
long | dwStartTime |
long | dwFirstByte |
long | dwLastByte |
string | sDebugSendHeader |
string | sDebugRecvHeader |
Protected Member Functions | |
void | DeleteCookieFile (const char *lpName) |
void | Disconnected () |
When the ServiceConnectionThread stops, this gets called. | |
long | GetTimeLeft (long dwTimeout, long dwStart) |
BOOL | ReadCookieFile (const char *lpName) |
void | ParseHeader () |
BOOL | ProcessData (unsigned char *lpData, int iLen) |
Pure virtual function to process data. | |
void | RequestComplete () |
void | SendCookie (char *lpBuffer) |
BOOL | WriteCookieFile (const char *lpName) |
Protected Attributes | |
BOOL | bHeader |
BOOL | bHeadRequest |
CXPlatEvent | cRecvEvent |
string | cHeader |
string | cHeaderLwr |
string | cContent |
string | cContentType |
string | cLastModified |
string | cLocation |
string | cServer |
string | cDomain |
string | cPath |
string | cCookieBuf |
string | cTransaction |
string | cRequestNum |
long | lContentLength |
long | lReceivedLength |
char | szSendBuffer [INTERNET_MAX_URL_LENGTH_RTM+1] |
char | szStatus [4] |
Definition at line 40 of file CHTTPClient.h.
Definition at line 55 of file CHTTPClient.cpp.
CHTTPClient::~CHTTPClient | ( | ) | [virtual] |
Definition at line 63 of file CHTTPClient.cpp.
BOOL CHTTPClient::CheckConnect | ( | const char * | szHost, |
BOOL | bSecure, | ||
long | lPort, | ||
const char * | szProxy, | ||
long | lProxyPort, | ||
const char * | szProxyUser, | ||
const char * | szProxyPswd, | ||
long | dwTimeout | ||
) |
Definition at line 1175 of file CHTTPClient.cpp.
void CHTTPClient::DeleteCookieFile | ( | const char * | lpName | ) | [protected] |
Definition at line 1069 of file CHTTPClient.cpp.
void CHTTPClient::Disconnected | ( | ) | [protected, virtual] |
When the ServiceConnectionThread stops, this gets called.
Called when the socket is disconnecting WARNING: this may occasionally get called more than once - code appropriately
Reimplemented from CConnectionSocket.
Definition at line 196 of file CHTTPClient.cpp.
BOOL CHTTPClient::GetHTTPBytesReceived | ( | long & | dwLength | ) |
Definition at line 1103 of file CHTTPClient.cpp.
BOOL CHTTPClient::GetHTTPContent | ( | char * | lpBuffer | ) |
Definition at line 1112 of file CHTTPClient.cpp.
BOOL CHTTPClient::GetHTTPContentType | ( | char * | lpBuffer | ) |
Definition at line 1121 of file CHTTPClient.cpp.
BOOL CHTTPClient::GetHTTPLastModified | ( | char * | lpBuffer | ) |
Definition at line 1130 of file CHTTPClient.cpp.
BOOL CHTTPClient::GetHTTPNewLocation | ( | char * | lpBuffer | ) |
Definition at line 1139 of file CHTTPClient.cpp.
BOOL CHTTPClient::GetHTTPServer | ( | char * | lpBuffer | ) |
Definition at line 1148 of file CHTTPClient.cpp.
BOOL CHTTPClient::GetHTTPStatus | ( | long & | dwStatus | ) |
Definition at line 1085 of file CHTTPClient.cpp.
long CHTTPClient::GetTimeLeft | ( | long | dwTimeout, |
long | dwStart | ||
) | [protected] |
Definition at line 1160 of file CHTTPClient.cpp.
void CHTTPClient::ParseHeader | ( | ) | [protected] |
Definition at line 741 of file CHTTPClient.cpp.
BOOL CHTTPClient::ProcessData | ( | unsigned char * | lpData, |
int | iLen | ||
) | [protected, virtual] |
Pure virtual function to process data.
Implements CConnectionSocket.
Definition at line 93 of file CHTTPClient.cpp.
BOOL CHTTPClient::ReadCookieFile | ( | const char * | lpName | ) | [protected] |
Definition at line 987 of file CHTTPClient.cpp.
void CHTTPClient::RequestComplete | ( | ) | [protected] |
Definition at line 181 of file CHTTPClient.cpp.
void CHTTPClient::SendCookie | ( | char * | lpBuffer | ) | [protected] |
Definition at line 916 of file CHTTPClient.cpp.
BOOL CHTTPClient::SendRequest | ( | const char * | szHost, |
const char * | szHostName, | ||
const char * | szPath, | ||
const char * | szUserID, | ||
const char * | szPassword, | ||
long | lPort, | ||
const char * | szProxy, | ||
long | lProxyPort, | ||
const char * | szProxyUser, | ||
const char * | szProxyPswd, | ||
const char * | szUserAgent, | ||
const char * | szPost, | ||
long | dwTimeOut, | ||
const char * | szTransaction = NULL |
||
) |
Definition at line 204 of file CHTTPClient.cpp.
BOOL CHTTPClient::WriteCookieFile | ( | const char * | lpName | ) | [protected] |
Definition at line 1037 of file CHTTPClient.cpp.
Definition at line 100 of file CHTTPClient.h.
BOOL CHTTPClient::bHeader [protected] |
Definition at line 126 of file CHTTPClient.h.
BOOL CHTTPClient::bHeadRequest [protected] |
Definition at line 127 of file CHTTPClient.h.
Definition at line 99 of file CHTTPClient.h.
string CHTTPClient::cContent [protected] |
Definition at line 131 of file CHTTPClient.h.
string CHTTPClient::cContentType [protected] |
Definition at line 132 of file CHTTPClient.h.
string CHTTPClient::cCookieBuf [protected] |
Definition at line 138 of file CHTTPClient.h.
string CHTTPClient::cDomain [protected] |
Definition at line 136 of file CHTTPClient.h.
string CHTTPClient::cHeader [protected] |
Definition at line 129 of file CHTTPClient.h.
string CHTTPClient::cHeaderLwr [protected] |
Definition at line 130 of file CHTTPClient.h.
string CHTTPClient::cLastModified [protected] |
Definition at line 133 of file CHTTPClient.h.
string CHTTPClient::cLocation [protected] |
Definition at line 134 of file CHTTPClient.h.
string CHTTPClient::cPath [protected] |
Definition at line 137 of file CHTTPClient.h.
CXPlatEvent CHTTPClient::cRecvEvent [protected] |
Definition at line 128 of file CHTTPClient.h.
string CHTTPClient::cRequestNum [protected] |
Definition at line 140 of file CHTTPClient.h.
string CHTTPClient::cServer [protected] |
Definition at line 135 of file CHTTPClient.h.
string CHTTPClient::cTransaction [protected] |
Definition at line 139 of file CHTTPClient.h.
Definition at line 103 of file CHTTPClient.h.
Definition at line 104 of file CHTTPClient.h.
Definition at line 102 of file CHTTPClient.h.
long CHTTPClient::lContentLength [protected] |
Definition at line 141 of file CHTTPClient.h.
long CHTTPClient::lReceivedLength [protected] |
Definition at line 142 of file CHTTPClient.h.
Definition at line 110 of file CHTTPClient.h.
Definition at line 109 of file CHTTPClient.h.
char CHTTPClient::szSendBuffer[INTERNET_MAX_URL_LENGTH_RTM+1] [protected] |
Definition at line 143 of file CHTTPClient.h.
char CHTTPClient::szStatus[4] [protected] |
Definition at line 144 of file CHTTPClient.h.