Public Member Functions | Static Public Attributes | Private Types | Private Attributes

ACE::HTTP::Response Class Reference

#include <HTTP_Response.h>

Inheritance diagram for ACE::HTTP::Response:
Inheritance graph
[legend]
Collaboration diagram for ACE::HTTP::Response:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Response ()
 Constructor.
 Response (const Status &status)
 Response (const ACE_CString &version, const Status &status=Status())
virtual ~Response ()
 Destructor.
void reset ()
 Reset the response object.
void reset (const Status &status)
void reset (const ACE_CString &version, const Status &status=Status())
void set_status (const Status &status)
 Set the status.
const Statusget_status () const
 Return the status.
void add_cookie (const ACE_CString &cookie)
 Adds a Cookie header.
void get_cookies (ACE_Array< ACE_CString > &cookies) const
 Get cookies from Cookie header(s)).
virtual void write (std::ostream &str) const
 Writes the HTTP response to the given stream.
virtual bool read (std::istream &str)

Static Public Attributes

static const ACE_CString COOKIE = "Set-Cookie"

Private Types

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

Limits for reading a header.

More...

Private Attributes

Status status_

Detailed Description

Definition at line 38 of file HTTP_Response.h.


Member Enumeration Documentation

Limits for reading a header.

Enumerator:
MAX_VERSION_LENGTH 
MAX_STATUS_LENGTH 
MAX_REASON_LENGTH 

Reimplemented from ACE::INet::HeaderBase.

Definition at line 82 of file HTTP_Response.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 25 of file HTTP_Response.cpp.

      {
      }

ACE::HTTP::Response::Response ( const Status status  ) 

Definition at line 29 of file HTTP_Response.cpp.

      : status_ (status)
      {
      }

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

Definition at line 34 of file HTTP_Response.cpp.

      : Header (version), status_ (status)
      {
      }

ACE::HTTP::Response::~Response (  )  [virtual]

Destructor.

Definition at line 39 of file HTTP_Response.cpp.

      {
      }


Member Function Documentation

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

Adds a Cookie header.

Definition at line 43 of file HTTP_Response.cpp.

      {
        this->add (COOKIE, cookie);
      }

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

Get cookies from Cookie header(s)).

Definition at line 48 of file HTTP_Response.cpp.

      {
        this->get_values (COOKIE, cookies);
      }

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

Return the status.

Definition at line 44 of file HTTP_Response.inl.

      {
        return this->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 ( void   )  [inline]

Reset the response object.

Definition at line 13 of file HTTP_Response.inl.

      {
        this->clear ();
        this->set_version (EMPTY);
        this->status_ = Status ();
      }

void ACE::HTTP::Response::reset ( const Status status  )  [inline]

Definition at line 21 of file HTTP_Response.inl.

      {
        this->clear ();
        this->set_version (EMPTY);
        this->status_ = status;
      }

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

Definition at line 29 of file HTTP_Response.inl.

      {
        this->clear ();
        this->set_version (version);
        this->status_ = status;
      }

void ACE::HTTP::Response::set_status ( const Status status  )  [inline]

Set the status.

Definition at line 37 of file HTTP_Response.inl.

      {
        this->status_ = 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]

Definition at line 79 of file HTTP_Response.h.

Definition at line 89 of file HTTP_Response.h.


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