My Project
SallyAPI::Network::NetworkHelper Class Reference

Network helper. More...

#include <NetworkHelper.h>

List of all members.

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.

Detailed Description

Network helper.

Author:
Christian Knobloch
Date:
19.04.2010

Member Function Documentation

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.

Author:
Christian Knobloch
Date:
13.05.2010
Parameters:
serverThe server.
portThe port.
requestThe request.
imageFileThe image file.
proxyThe proxy.
proxyBypassThe proxy bypass.
Returns:
true if it succeeds, false if it fails.
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.

Author:
Christian Knobloch
Date:
17.12.2010
Parameters:
serverThe server.
portThe port.
requestThe request.
[in,out]byteReadIf non-null, the byte read.
hFileHandle of the file.
proxyThe proxy.
proxyBypassThe proxy bypass.
iFlagThe flag.
timeoutSecondsThe timeout in seconds.
[in,out]headerDataIf non-null, information describing the header.
[in,out]postDataIf non-null, information describing the post.
Returns:
The file content.
void NetworkHelper::GetHeaderData ( HINTERNET  httpRequest,
std::string *  headerData 
) [static]

Gets a header data from an HINTERNET request.

Author:
Christian Knobloch
Date:
17.12.2010
Parameters:
httpRequestThe http request.
[in,out]headerDataIf 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.

Author:
Christian Knobloch
Date:
17.12.2010
Parameters:
serverThe server.
portThe port.
requestThe request.
[in,out]byteReadIf non-null, the byte read.
[in,out]responseIf non-null, the response.
proxyThe proxy.
proxyBypassThe proxy bypass.
iFlagThe flag.
timeoutSecondsThe timeout in seconds.
[in,out]headerDataIf non-null, information describing the header.
[in,out]postDataIf non-null, information describing the post.
Returns:
The http content.
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.

Author:
Christian Knobloch
Date:
17.12.2010
Parameters:
serverThe server.
portThe port.
requestThe request.
[in,out]byteReadIf non-null, the byte read.
[in,out]responseIf non-null, the response.
proxyThe proxy.
proxyBypassThe proxy bypass.
iFlagThe flag.
timeoutSecondsThe timeout in seconds.
[in,out]headerDataIf non-null, information describing the header.
[in,out]postDataIf non-null, information describing the post.
Returns:
The http text.
std::string NetworkHelper::HTMLEncode ( const std::string &  stringToEncode) [static]
void NetworkHelper::OpenURL ( const std::string &  url) [static]

Opens a url.

Author:
Christian Knobloch
Date:
27.01.2012
Parameters:
urlURL of the document.
std::string NetworkHelper::URLDecode ( const std::string &  stringToDecode) [static]

Url decode.

Author:
Christian Knobloch
Date:
20.08.2011
Parameters:
stringToDecodeThe string to decode.
Returns:
.
std::string NetworkHelper::URLEncode ( const std::string &  stringToEncode) [static]

Url encode.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
stringToEncodeThe string to encode.
Returns:
.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines