libmoost
moost::murcl::response Class Reference

This class is an object representation of a LibCurl response. More...

#include <response.hpp>

Collaboration diagram for moost::murcl::response:

List of all members.

Classes

struct  userdata
 Represents the userdata object to the request callback. More...

Public Member Functions

 response ()
 Construct a response object and an suitably initialised userdata POD.
std::string const & get () const
 get the response string
userdataoperator() ()
 A function operator to return a pointer to user data.

Static Public Member Functions

static size_t callback (char *ptr, size_t size, size_t nmemb, void *userdata)

Static Private Member Functions

static bool validate (userdata *prud)

Private Attributes

std::string data_
userdata userdata_

Detailed Description

This class is an object representation of a LibCurl response.

Definition at line 52 of file response.hpp.


Constructor & Destructor Documentation

Construct a response object and an suitably initialised userdata POD.

Definition at line 73 of file response.hpp.


Member Function Documentation

static size_t moost::murcl::response::callback ( char *  ptr,
size_t  size,
size_t  nmemb,
void *  userdata 
) [inline, static]
Parameters:
ptrpointer to data that needs to be written
sizesize of a single datum to be written
nmembthe number of data to be written
userdataa user definable object (here it is set to 'this')
Returns:
The amount of data successfully stored

This callback needs to be registered with LibCurl. If this class is used in conjunction with murcl::request the registration is done automatically.

Definition at line 97 of file response.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string const& moost::murcl::response::get ( ) const [inline]

get the response string

Returns:
the response string

Definition at line 123 of file response.hpp.

userdata* moost::murcl::response::operator() ( ) [inline]

A function operator to return a pointer to user data.

Returns:
a pointer to user data

Definition at line 134 of file response.hpp.

static bool moost::murcl::response::validate ( userdata prud) [inline, static, private]

Definition at line 140 of file response.hpp.

Here is the caller graph for this function:


Member Data Documentation

std::string moost::murcl::response::data_ [private]

Definition at line 146 of file response.hpp.

Definition at line 147 of file response.hpp.


The documentation for this class was generated from the following file: