My Project
|
#include <NetworkHelper.h>
Static Public Member Functions | |
static SallyAPI::Network::NETWORK_RETURN | GetHTTPText (const std::string &server, int port, const std::string &request, int *byteRead, std::string *response, const std::string &proxy, const std::string &proxyBypass, DWORD iFlag=0, int timeoutSeconds=10, std::string *headerData=NULL, std::string *postData=NULL) |
Gets a http text. | |
static SallyAPI::Network::NETWORK_RETURN | GetHTTPContent (const std::string &server, int port, const std::string &request, int *byteRead, char **response, const std::string &proxy, const std::string &proxyBypass, DWORD iFlag=0, int timeoutSeconds=10, std::string *headerData=NULL, std::string *postData=NULL) |
Gets a http content. | |
static SallyAPI::Network::NETWORK_RETURN | GetFileContent (const std::string &server, int port, const std::string &request, int *byteRead, HANDLE hFile, const std::string &proxy, const std::string &proxyBypass, DWORD iFlag=0, int timeoutSeconds=10, std::string *headerData=NULL, std::string *postData=NULL) |
Gets a file content. | |
static std::string | URLEncode (const std::string &stringToEncode) |
Url encode. | |
static std::string | URLDecode (const std::string &stringToDecode) |
Url decode. | |
static std::string | HTMLEncode (const std::string &stringToEncode) |
static bool | DownloadFile (const std::string &server, int port, const std::string &request, const std::string &imageFile, const std::string &proxy, const std::string &proxyBypass) |
Downloads a file. | |
static void | GetHeaderData (HINTERNET httpRequest, std::string *headerData) |
Gets a header data from an HINTERNET request. | |
static void | OpenURL (const std::string &url) |
Opens a url. |
Network helper.
bool NetworkHelper::DownloadFile | ( | const std::string & | server, |
int | port, | ||
const std::string & | request, | ||
const std::string & | imageFile, | ||
const std::string & | proxy, | ||
const std::string & | proxyBypass | ||
) | [static] |
Downloads a file.
server | The server. |
port | The port. |
request | The request. |
imageFile | The image file. |
proxy | The proxy. |
proxyBypass | The proxy bypass. |
SallyAPI::Network::NETWORK_RETURN NetworkHelper::GetFileContent | ( | const std::string & | server, |
int | port, | ||
const std::string & | request, | ||
int * | byteRead, | ||
HANDLE | hFile, | ||
const std::string & | proxy, | ||
const std::string & | proxyBypass, | ||
DWORD | iFlag = 0 , |
||
int | timeoutSeconds = 10 , |
||
std::string * | headerData = NULL , |
||
std::string * | postData = NULL |
||
) | [static] |
Gets a file content.
server | The server. | |
port | The port. | |
request | The request. | |
[in,out] | byteRead | If non-null, the byte read. |
hFile | Handle of the file. | |
proxy | The proxy. | |
proxyBypass | The proxy bypass. | |
iFlag | The flag. | |
timeoutSeconds | The timeout in seconds. | |
[in,out] | headerData | If non-null, information describing the header. |
[in,out] | postData | If non-null, information describing the post. |
void NetworkHelper::GetHeaderData | ( | HINTERNET | httpRequest, |
std::string * | headerData | ||
) | [static] |
Gets a header data from an HINTERNET request.
httpRequest | The http request. | |
[in,out] | headerData | If non-null, information describing the header. |
SallyAPI::Network::NETWORK_RETURN NetworkHelper::GetHTTPContent | ( | const std::string & | server, |
int | port, | ||
const std::string & | request, | ||
int * | byteRead, | ||
char ** | response, | ||
const std::string & | proxy, | ||
const std::string & | proxyBypass, | ||
DWORD | iFlag = 0 , |
||
int | timeoutSeconds = 10 , |
||
std::string * | headerData = NULL , |
||
std::string * | postData = NULL |
||
) | [static] |
Gets a http content.
server | The server. | |
port | The port. | |
request | The request. | |
[in,out] | byteRead | If non-null, the byte read. |
[in,out] | response | If non-null, the response. |
proxy | The proxy. | |
proxyBypass | The proxy bypass. | |
iFlag | The flag. | |
timeoutSeconds | The timeout in seconds. | |
[in,out] | headerData | If non-null, information describing the header. |
[in,out] | postData | If non-null, information describing the post. |
SallyAPI::Network::NETWORK_RETURN NetworkHelper::GetHTTPText | ( | const std::string & | server, |
int | port, | ||
const std::string & | request, | ||
int * | byteRead, | ||
std::string * | response, | ||
const std::string & | proxy, | ||
const std::string & | proxyBypass, | ||
DWORD | iFlag = 0 , |
||
int | timeoutSeconds = 10 , |
||
std::string * | headerData = NULL , |
||
std::string * | postData = NULL |
||
) | [static] |
Gets a http text.
server | The server. | |
port | The port. | |
request | The request. | |
[in,out] | byteRead | If non-null, the byte read. |
[in,out] | response | If non-null, the response. |
proxy | The proxy. | |
proxyBypass | The proxy bypass. | |
iFlag | The flag. | |
timeoutSeconds | The timeout in seconds. | |
[in,out] | headerData | If non-null, information describing the header. |
[in,out] | postData | If non-null, information describing the post. |
std::string NetworkHelper::HTMLEncode | ( | const std::string & | stringToEncode | ) | [static] |
void NetworkHelper::OpenURL | ( | const std::string & | url | ) | [static] |
Opens a url.
url | URL of the document. |
std::string NetworkHelper::URLDecode | ( | const std::string & | stringToDecode | ) | [static] |
Url decode.
stringToDecode | The string to decode. |
std::string NetworkHelper::URLEncode | ( | const std::string & | stringToEncode | ) | [static] |
Url encode.
stringToEncode | The string to encode. |