Hobrasoft httpd server
Embedded HTTP server for Qt and C++
Classes | Public Member Functions | List of all members
HobrasoftHttpd::HttpSession Class Reference

Information about one session. More...

#include <httpsession.h>

Classes

struct  HttpSessionData
 Data of the session. More...
 

Public Member Functions

QByteArray id () const
 Returns session ID.
 
bool isNull () const
 Returns true if the session is valid (not null)
 
bool contains (const QString &key) const
 Returns true if the session contains key.
 
void add (const QString &key, const QVariant &value)
 Adds an item to the session.
 
void remove (const QString &key)
 Removes an item from the session.
 
QVariant value (const QString &key) const
 Returns an item from the session.
 
QDateTime lastAccess ()
 Return time of last access to the session.
 
void setLastAccess ()
 Sets time of last access to the session.
 
QStringList keys () const
 
QVariantHash variantHash () const
 
 HttpSession ()
 Constructor, should be private. Do not use in your code.
 
 HttpSession (const HttpSession &other)
 Copy constructor, should be private. Do not use in your code.
 
HttpSessionoperator= (const HttpSession &other)
 Operator=(), should be private. Do not use in your code.
 

Detailed Description

Information about one session.

Please, do not use constructors. The session should be created calling HttpSessionStore functions only, otherwise the session data will be never deleted.

It is complicated to make constructors private and there is no warranty that the private constructor will work accross Qt versions.

Definition at line 33 of file httpsession.h.


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