fastcgi++
Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | Friends
Fastcgipp::Http::SessionId Class Reference

Defines ID values for HTTP sessions. More...

#include <http.hpp>

List of all members.

Public Member Functions

 SessionId ()
 The default constructor initializes the ID data to a random value.
 SessionId (const SessionId &x)
const SessionIdoperator= (const SessionId &x)
template<class charT >
const SessionIdoperator= (charT *data_)
 Assign the ID data with a base64 encoded string.
template<class charT >
 SessionId (charT *data_)
 Initialize the ID data with a base64 encoded string.
bool operator< (const SessionId &x) const
bool operator== (const SessionId &x) const
void refresh () const
 Resets the last access timestamp to the current time.
const char * getInternalPointer () const

Static Public Attributes

static const int size = 12
 Size in bytes of the ID data.

Private Attributes

char data [size]
 ID data.
boost::posix_time::ptime timestamp
 Contains the time this session was last used.

Static Private Attributes

static bool seeded = false
 Set to true once the random number generator has been seeded.

Friends

class Sessions
template<class charT , class Traits >
std::basic_ostream< charT,
Traits > & 
operator<< (std::basic_ostream< charT, Traits > &os, const SessionId &x)
 Output the ID data in base64 encoding.

Detailed Description

Defines ID values for HTTP sessions.

Definition at line 430 of file http.hpp.


Constructor & Destructor Documentation

Fastcgipp::Http::SessionId::SessionId ( )

The default constructor initializes the ID data to a random value.

Definition at line 459 of file http.cpp.

Fastcgipp::Http::SessionId::SessionId ( const SessionId x)
inline

Definition at line 460 of file http.hpp.

References data, and size.

template<class charT >
Fastcgipp::Http::SessionId::SessionId ( charT *  data_)
inline

Initialize the ID data with a base64 encoded string.

Note that only size*4/3 bytes will be read from the string.

Parameters:
data_

Definition at line 479 of file http.hpp.


Member Function Documentation

const char* Fastcgipp::Http::SessionId::getInternalPointer ( ) const
inline

Definition at line 491 of file http.hpp.

References data.

bool Fastcgipp::Http::SessionId::operator< ( const SessionId x) const
inline

Definition at line 483 of file http.hpp.

References data, and size.

const SessionId& Fastcgipp::Http::SessionId::operator= ( const SessionId x)
inline

Definition at line 461 of file http.hpp.

References data, size, and timestamp.

template<class charT >
const Fastcgipp::Http::SessionId & Fastcgipp::Http::SessionId::operator= ( charT *  data_)

Assign the ID data with a base64 encoded string.

Note that only size*4/3 bytes will be read from the string.

Parameters:
data_Iterator set at begin of base64 encoded string

Definition at line 474 of file http.cpp.

References Fastcgipp::Http::base64Decode().

bool Fastcgipp::Http::SessionId::operator== ( const SessionId x) const
inline

Definition at line 484 of file http.hpp.

References data, and size.

void Fastcgipp::Http::SessionId::refresh ( ) const
inline

Resets the last access timestamp to the current time.

Definition at line 489 of file http.hpp.

References timestamp.


Friends And Related Function Documentation

template<class charT , class Traits >
std::basic_ostream<charT, Traits>& operator<< ( std::basic_ostream< charT, Traits > &  os,
const SessionId x 
)
friend

Output the ID data in base64 encoding.

Definition at line 497 of file http.hpp.

friend class Sessions
friend

Definition at line 453 of file http.hpp.


Member Data Documentation

char Fastcgipp::Http::SessionId::data[size]
private

ID data.

Definition at line 441 of file http.hpp.

Referenced by getInternalPointer(), operator<(), operator=(), operator==(), and SessionId().

bool Fastcgipp::Http::SessionId::seeded = false
staticprivate

Set to true once the random number generator has been seeded.

Definition at line 451 of file http.hpp.

const int Fastcgipp::Http::SessionId::size = 12
static

Size in bytes of the ID data.

Definition at line 435 of file http.hpp.

Referenced by operator<(), Fastcgipp::Http::operator<<(), operator=(), operator==(), and SessionId().

boost::posix_time::ptime Fastcgipp::Http::SessionId::timestamp
private

Contains the time this session was last used.

Definition at line 446 of file http.hpp.

Referenced by operator=(), and refresh().


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