DomainPlug-insDocumentation
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
CurlClient Class Reference

#include <curlclient.h>

Public Member Functions

 CurlClient ()
virtual ~CurlClient ()
void setUrl (const std::string &sUrl)
void setTimeOut (int iTimeOut)
void setConnectTimeOut (int iConnectTimeOut)
void setContentType (const std::string &sContentType)
void setHeader (const std::string &sHeader)
void setUseSSLv3 ()
void setClientCert (const std::string &cert)
void setClientCertType (const std::string &type)
void setClientKey (const std::string &key)
void setClientKeyType (const std::string &type)
void setHttpAuth (const std::string &s_username, const std::string &s_password)
void clearHeaders ()
std::string getResultHeader () const
const std::string getErrorBuffer () const
int getErrorCode () const
int getHttpStatus () const
const std::string callGet ()
const std::string callPost (const std::string &postData)
void uploadToFTP (std::stringstream &in)
const std::string callHttpPost (const CurlForm &data)
const std::string downloadFromFTP (void)
const std::string getFullErrorMessage (void) const

Static Public Member Functions

static std::string escapeUrl (const std::string &url)
static std::string unescapeUrl (const std::string &url)

Private Member Functions

void initInstance ()
void setInstance ()
void cleanInstance ()
void getInfo ()
void clean ()

Static Private Member Functions

static size_t callbackWriteFunction (char *data, size_t size, size_t nmemb, std::string *stream)
static size_t callbackReadFunction (char *data, size_t size, size_t nmemb, std::stringstream *stream)

Private Attributes

CURLinstance
std::string bufferHeader
char * errorBuffer
int errorCode
struct curl_slist * pcsHeaders
std::string url
int timeOut
int connectTimeOut
std::string contentType
std::list< std::string > lsHeader
bool useSSLv3
std::string clientCert
std::string clientCertType
std::string clientKey
std::string clientKeyType
std::string username
std::string password
int httpStatus

Detailed Description

Wrapper for curl library


Constructor & Destructor Documentation

CurlClient::CurlClient ( )
CurlClient::~CurlClient ( ) [virtual]

Member Function Documentation

size_t CurlClient::callbackReadFunction ( char *  data,
size_t  size,
size_t  nmemb,
std::stringstream *  stream 
) [static, private]
size_t CurlClient::callbackWriteFunction ( char *  data,
size_t  size,
size_t  nmemb,
std::string *  stream 
) [static, private]
void CurlClient::clean ( ) [private]
void CurlClient::cleanInstance ( ) [private]
void CurlClient::getInfo ( ) [private]
void CurlClient::initInstance ( ) [private]
void CurlClient::setInstance ( ) [private]
void CurlClient::setUrl ( const std::string &  sUrl)

Set URL


Field Documentation

std::string CurlClient::bufferHeader [private]
std::string CurlClient::clientCert [private]
std::string CurlClient::clientCertType [private]
std::string CurlClient::clientKey [private]
std::string CurlClient::clientKeyType [private]
std::string CurlClient::contentType [private]
char* CurlClient::errorBuffer [private]
int CurlClient::errorCode [private]
int CurlClient::httpStatus [private]
std::list<std::string> CurlClient::lsHeader [private]
std::string CurlClient::password [private]
struct curl_slist* CurlClient::pcsHeaders [private]
int CurlClient::timeOut [private]
std::string CurlClient::url [private]
std::string CurlClient::username [private]

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