Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields  

sword::Cookie Class Reference

A cookie. More...


Public Methods

 Cookie (const std::string &name, const std::string &value)
 Creates a transient cookie.

 Cookie (const std::string &name, const std::string &value, const std::string &domain, const std::string &path, Time expires)
 Creates a permanent cookie.

 ~Cookie ()
 Destroy this cookie.

bool match (const URL &url) const
 Does this cookie match the URL (domain and path) ?

bool expired () const
 Is this cookie expired ? (always 'false' for transient).

bool transient () const
 Is this cookie transient (must not be persisted).

const std::string & name () const
 The cookie's name.

const std::string & value () const
 The cookie's value.


Detailed Description

A cookie.

This is the elementary persitent piece of data that a http server can store whithin an http client. The CookiesManager singleton is the repository for all active cookies, and the HttpClient automatically handles the send/receive procedure of cookies with the server.


Constructor & Destructor Documentation

sword::Cookie::Cookie const std::string &    name,
const std::string &    value
 

Creates a transient cookie.

sword::Cookie::Cookie const std::string &    name,
const std::string &    value,
const std::string &    domain,
const std::string &    path,
Time    expires
 

Creates a permanent cookie.

The given expires time must be UTC

sword::Cookie::~Cookie  
 

Destroy this cookie.


Member Function Documentation

bool sword::Cookie::expired   const
 

Is this cookie expired ? (always 'false' for transient).

bool sword::Cookie::match const URL   url const
 

Does this cookie match the URL (domain and path) ?

const std::string& sword::Cookie::name   const
 

The cookie's name.

bool sword::Cookie::transient   const
 

Is this cookie transient (must not be persisted).

const std::string& sword::Cookie::value   const
 

The cookie's value.


Generated on Tue Dec 23 20:08:57 2003 for SWORD by doxygen1.3-rc2