Cutelyst  1.11.0
Public Member Functions | List of all members
Cutelyst::SessionStore Class Referenceabstract
Inheritance diagram for Cutelyst::SessionStore:
Inheritance graph
[legend]

Public Member Functions

 SessionStore (QObject *parent=nullptr)
 
virtual bool deleteExpiredSessions (Context *c, quint64 expires)=0
 
virtual bool deleteSessionData (Context *c, const QString &sid, const QString &key)=0
 
virtual QVariant getSessionData (Context *c, const QString &sid, const QString &key, const QVariant &defaultValue=QVariant())=0
 
virtual bool storeSessionData (Context *c, const QString &sid, const QString &key, const QVariant &value)=0
 

Detailed Description

Definition at line 29 of file session.h.

Constructor & Destructor Documentation

SessionStore::SessionStore ( QObject *  parent = nullptr)
explicit

Constructs a new session store object with the given parent.

Definition at line 598 of file session.cpp.

Member Function Documentation

virtual bool Cutelyst::SessionStore::deleteExpiredSessions ( Context c,
quint64  expires 
)
pure virtual

Removes all expired sessions which are above expires.

Implemented in Cutelyst::SessionStoreMemcached, Cutelyst::MemcachedSessionStore, and Cutelyst::SessionStoreFile.

virtual bool Cutelyst::SessionStore::deleteSessionData ( Context c,
const QString &  sid,
const QString &  key 
)
pure virtual

Removes all session data for the given session id sid and key.

Implemented in Cutelyst::MemcachedSessionStore, Cutelyst::SessionStoreMemcached, and Cutelyst::SessionStoreFile.

virtual QVariant Cutelyst::SessionStore::getSessionData ( Context c,
const QString &  sid,
const QString &  key,
const QVariant &  defaultValue = QVariant() 
)
pure virtual

Returns the session data for the given session id sid and key, if key does not exist returns defaultValue.

Implemented in Cutelyst::MemcachedSessionStore, Cutelyst::SessionStoreMemcached, and Cutelyst::SessionStoreFile.

virtual bool Cutelyst::SessionStore::storeSessionData ( Context c,
const QString &  sid,
const QString &  key,
const QVariant &  value 
)
pure virtual

Stores the session data for the given session id sid and key to value.

Implemented in Cutelyst::MemcachedSessionStore, Cutelyst::SessionStoreMemcached, and Cutelyst::SessionStoreFile.

Referenced by Cutelyst::Session::isValid().