ACE_INet  6.1.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Attributes | Private Types | Private Attributes | List of all members
ACE::HTTP::Response Class Reference

#include <HTTP_Response.h>

Inheritance diagram for ACE::HTTP::Response:
Inheritance graph
Collaboration diagram for ACE::HTTP::Response:
Collaboration graph

Public Member Functions

 Response ()
 Constructor. More...
 
 Response (const Status &status)
 
 Response (const ACE_CString &version, const Status &status=Status())
 
virtual ~Response ()
 Destructor. More...
 
void reset ()
 Reset the response object. More...
 
void reset (const Status &status)
 
void reset (const ACE_CString &version, const Status &status=Status())
 
void set_status (const Status &status)
 Set the status. More...
 
const Statusget_status () const
 Return the status. More...
 
void add_cookie (const ACE_CString &cookie)
 Adds a Cookie header. More...
 
void get_cookies (ACE_Array< ACE_CString > &cookies) const
 Get cookies from Cookie header(s)). More...
 
virtual void write (std::ostream &str) const
 Writes the HTTP response to the given stream. More...
 
virtual bool read (std::istream &str)
 
- Public Member Functions inherited from ACE::INet::Response
 Response ()
 
- Public Member Functions inherited from ACE::HTTP::Header
 Header ()
 Constructor. More...
 
 Header (const ACE_CString &version)
 Constructor. More...
 
virtual ~Header ()
 Destructor. More...
 
void set_version (const ACE_CString &version)
 Sets the HTTP version to use. More...
 
const ACE_CStringget_version () const
 Returns the HTTP version. More...
 
void set_chunked_transfer_encoding (bool flag)
 
bool has_chunked_transfer_encoding () const
 
void set_keep_alive (bool keep_alive)
 
bool has_keep_alive () const
 
- Public Member Functions inherited from ACE::INet::HeaderBase
 HeaderBase ()
 Constructor. More...
 
virtual ~HeaderBase ()
 Destructor. More...
 
virtual void set_content_length (int length)
 
virtual int get_content_length () const
 
virtual void set_content_type (const ACE_CString &mime_type)
 
virtual ACE_CString get_content_type () const
 
void clear ()
 
void set (const ACE_CString &name, const ACE_CString &value)
 Sets header <name> to . Overwrites existing vaues. More...
 
void add (const ACE_CString &name, const ACE_CString &value)
 Adds header <name> with . Allows duplicates. More...
 
void remove (const ACE_CString &name)
 Removes header <name> (first found). More...
 
bool get (const ACE_CString &name, ACE_CString &value) const
 Retrieves value for header <name> into (first found). More...
 
bool has (const ACE_CString &name) const
 Returns true if a header <name> exists (1 or more), false otherwise. More...
 
void get_values (const ACE_CString &name, ACE_Array< ACE_CString > &values) const
 Retrieves values for all headers <name> into <values>. More...
 

Static Public Attributes

static const ACE_CString COOKIE = "Set-Cookie"
 
- Static Public Attributes inherited from ACE::HTTP::Header
static const ACE_CString HTTP_1_0 = "HTTP/1.0"
 
static const ACE_CString HTTP_1_1 = "HTTP/1.1"
 
static const ACE_CString CHUNKED_TRANSFER_ENCODING = "chunked"
 
static const ACE_CString TRANSFER_ENCODING = "Transfer-Encoding"
 
static const ACE_CString CONNECTION = "Connection"
 
static const ACE_CString CONNECTION_KEEP_ALIVE = "Keep-Alive"
 
static const ACE_CString CONNECTION_CLOSE = "Close"
 
- Static Public Attributes inherited from ACE::INet::HeaderBase
static const int UNKNOWN_CONTENT_LENGTH = -1
 
static const ACE_CString UNKNOWN_CONTENT_TYPE
 
static const ACE_CString CONTENT_LENGTH = "Content-Length"
 
static const ACE_CString CONTENT_TYPE = "Content-Type"
 
static const ACE_CString EMPTY
 

Private Types

enum  Limits { MAX_VERSION_LENGTH = 8, MAX_STATUS_LENGTH = 3, MAX_REASON_LENGTH = 512 }
 

Private Attributes

Status status_
 

Additional Inherited Members

- Protected Member Functions inherited from ACE::INet::HeaderBase
int read_field (std::istream &str, ACE_CString &var, size_t maxlen, char delim)
 
int read_ws_field (std::istream &str, ACE_CString &var, size_t maxlen)
 
- Static Protected Attributes inherited from ACE::INet::HeaderBase
static const int eof_ = std::char_traits<char>::eof()
 

Member Enumeration Documentation

Enumerator
MAX_VERSION_LENGTH 
MAX_STATUS_LENGTH 
MAX_REASON_LENGTH 

Constructor & Destructor Documentation

ACE::HTTP::Response::Response ( )

Constructor.

ACE::HTTP::Response::Response ( const Status status)
ACE::HTTP::Response::Response ( const ACE_CString version,
const Status status = Status() 
)
ACE::HTTP::Response::~Response ( )
virtual

Destructor.

Reimplemented from ACE::INet::Response.

Member Function Documentation

void ACE::HTTP::Response::add_cookie ( const ACE_CString cookie)

Adds a Cookie header.

void ACE::HTTP::Response::get_cookies ( ACE_Array< ACE_CString > &  cookies) const

Get cookies from Cookie header(s)).

const Status & ACE::HTTP::Response::get_status ( ) const
inline

Return the status.

virtual bool ACE::HTTP::Response::read ( std::istream &  str)
virtual

Reads the HTTP response from the given stream. 100 Continue responses are ignored.

Reimplemented from ACE::INet::HeaderBase.

void ACE::HTTP::Response::reset ( )
inline

Reset the response object.

void ACE::HTTP::Response::reset ( const Status status)
inline
void ACE::HTTP::Response::reset ( const ACE_CString version,
const Status status = Status() 
)
inline
void ACE::HTTP::Response::set_status ( const Status status)
inline

Set the status.

virtual void ACE::HTTP::Response::write ( std::ostream &  str) const
virtual

Writes the HTTP response to the given stream.

Reimplemented from ACE::INet::HeaderBase.

Member Data Documentation

const ACE_CString ACE::HTTP::Response::COOKIE = "Set-Cookie"
static
Status ACE::HTTP::Response::status_
private

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