CurlHttpClient Class Reference

(Internal) CurlHttpClient is a class that wraps client side interaction with libcurl. More...

#include <librets/CurlHttpClient.h>

Inheritance diagram for CurlHttpClient:

RetsHttpClient

List of all members.

Public Member Functions

 CurlHttpClient ()
 ~CurlHttpClient ()
virtual void SetUserCredentials (std::string userName, std::string password)
std::string GetCookie (const char *name)
virtual void SetDefaultHeader (std::string name, std::string value)
virtual std::string GetDefaultHeader (std::string name) const
virtual void ClearDefaultHeader (std::string name)
virtual void SetUserAgent (std::string userAgent)
virtual std::string GetUserAgent () const
virtual RetsHttpResponsePtr StartRequest (RetsHttpRequest *request)
 Start an HTTP request using the cURL multi-interface.
virtual bool ContinueRequest ()
 Continue the current in process request.
virtual void SetLogger (RetsHttpLogger *logger)
virtual RetsHttpLoggerGetLogger () const
virtual void SetModeFlags (unsigned int flags)
 Set the mode flags to be used.
virtual void SetProxy (std::string url, std::string password)
 Set the proxy url and password.
virtual void SetTimeout (int seconds)
 Set the timeout for the Http transaction.

Static Public Member Functions

static RetsHttpClientPtr CreateDefault ()


Detailed Description

(Internal) CurlHttpClient is a class that wraps client side interaction with libcurl.

Constructor & Destructor Documentation

CurlHttpClient (  ) 

~CurlHttpClient (  ) 


Member Function Documentation

virtual void ClearDefaultHeader ( std::string  name  )  [virtual]

Implements RetsHttpClient.

virtual bool ContinueRequest (  )  [virtual]

Continue the current in process request.

This is part of the streaming interface and should only be called by CurlHttpClient::GetResponseCode and CurlStream::read and CurlStream::eof. Data may be transferred with this request.

Returns:
A boolean that if TRUE indicates that there is more data to process.
See also:
CurlHttpClient::GetResponseCode

CurlStream::eof

CurlStream::read

Implements RetsHttpClient.

static RetsHttpClientPtr CreateDefault (  )  [static, inherited]

std::string GetCookie ( const char *  name  )  [virtual]

Implements RetsHttpClient.

virtual std::string GetDefaultHeader ( std::string  name  )  const [virtual]

Implements RetsHttpClient.

virtual RetsHttpLogger* GetLogger (  )  const [virtual]

Implements RetsHttpClient.

virtual std::string GetUserAgent (  )  const [virtual]

Implements RetsHttpClient.

virtual void SetDefaultHeader ( std::string  name,
std::string  value 
) [virtual]

Implements RetsHttpClient.

virtual void SetLogger ( RetsHttpLogger logger  )  [virtual]

Implements RetsHttpClient.

virtual void SetModeFlags ( unsigned int  flags  )  [virtual]

Set the mode flags to be used.

Parameters:
flags An unsigned integer containing the mode flags.

Implements RetsHttpClient.

virtual void SetProxy ( std::string  url,
std::string  password 
) [virtual]

Set the proxy url and password.

Parameters:
url A string containing the URL of the proxy server.
password A string containing the password when the proxy server requires authentication. Leave this as an empty string otherwise.

Implements RetsHttpClient.

virtual void SetTimeout ( int  seconds  )  [virtual]

Set the timeout for the Http transaction.

Parameters:
seconds An integer containing the number of seconds to set for the timeout. A zero value will disable the timeout.

Implements RetsHttpClient.

virtual void SetUserAgent ( std::string  userAgent  )  [virtual]

Implements RetsHttpClient.

virtual void SetUserCredentials ( std::string  userName,
std::string  password 
) [virtual]

Implements RetsHttpClient.

virtual RetsHttpResponsePtr StartRequest ( RetsHttpRequest request  )  [virtual]

Start an HTTP request using the cURL multi-interface.

This will perform the first invocation if cURL using the multi-interface for the current transaction.

Parameters:
request A pointer to a RetsHttpRequest to be sent to cURL.

Implements RetsHttpClient.


Generated by  doxygen