HoverRace  2.0
Public Member Functions | Private Attributes | List of all members
HoverRace::Net::Agent Class Reference

The network transfer agent (wrapper for libcurl). More...

#include <Agent.h>

Public Member Functions

 Agent (const std::string &url="")
 Constructor. More...
 
virtual ~Agent ()
 
void Get (std::string &buf, std::shared_ptr< CancelFlag > cancelFlag={})
 Easy URL retrieval to a string. More...
 
void Get (std::ostream &buf, std::shared_ptr< CancelFlag > cancelFlag={})
 Easy URL retrieval to a stream. More...
 
const std::string & GetUrl () const
 
void SetUrl (const std::string &url)
 

Private Attributes

std::string url
 

Detailed Description

The network transfer agent (wrapper for libcurl).

Author
Michael Imamura

Constructor & Destructor Documentation

Agent::Agent ( const std::string &  url = "")

Constructor.

Parameters
urlThe URL to retrieve.
Agent::~Agent ( )
virtual

Member Function Documentation

void Agent::Get ( std::string &  buf,
std::shared_ptr< CancelFlag cancelFlag = {} 
)

Easy URL retrieval to a string.

This method blocks until the transfer is complete.

Parameters
bufThe string to store to.
cancelFlagOptional control to check for cancellation (may be NULL).
void Agent::Get ( std::ostream &  buf,
std::shared_ptr< CancelFlag cancelFlag = {} 
)

Easy URL retrieval to a stream.

This method blocks until the transfer is complete.

Parameters
bufThe stream to write to.
cancelFlagOptional control to check for cancellation (may be NULL).
const std::string& HoverRace::Net::Agent::GetUrl ( ) const
inline
void Agent::SetUrl ( const std::string &  url)

Member Data Documentation

std::string HoverRace::Net::Agent::url
private

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