Wexus2 0.20
wexus::SessionManager Class Reference

#include <SessionManager.h>

List of all members.

Classes

class  Data
class  Locker

Public Member Functions

 SessionManager (int expiry_seconds=3600)
Locker getData (const QUuid &id)
Locker getDataByCookie (Cookies &cookies)
void putData (const QUuid &id, std::shared_ptr< Data > &dat)

Protected Member Functions

void pruneExpiredSessions (const QDateTime &now)

Detailed Description

A map of UUIDs to sessions. rename this, perhaps?

Author:
Aleksander Demko

Constructor & Destructor Documentation

wexus::SessionManager::SessionManager ( int  expiry_seconds = 3600)

Constructs a session manager with the expiry time length.

Parameters:
expiry_secondsthe expiry time, in seconds. Could be 0, for no expiry, but this is not recommended (could leak sessions, then)
Author:
Aleksander Demko

Member Function Documentation

Locker wexus::SessionManager::getData ( const QUuid &  id)

Gets a session based on the given id. If one doesn't exist, a new one will be created and returned.

Author:
Aleksander Demko
Locker wexus::SessionManager::getDataByCookie ( Cookies cookies)

Extra the session by the UUID stored in the session cookie, if any.

Author:
Aleksander Demko
void wexus::SessionManager::putData ( const QUuid &  id,
std::shared_ptr< Data > &  dat 
)

Stores the given Data at the given ID. this is used by Locker.

Author:
Aleksander Demko

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Enumerator