23 #ifndef TUFAO_SESSION_H
24 #define TUFAO_SESSION_H
26 #include "sessionstore.h"
27 #include <QtCore/QVariant>
89 session.setValue(key, value);
96 QVariant operator ()()
98 return session.value(key);
103 const QByteArray key;
128 return store.hasProperty(request, response, key);
138 QVariant
value(
const QByteArray &key)
const
140 return store.property(request, response, key);
149 void setValue(
const QByteArray &key,
const QVariant &value)
151 store.setProperty(request, response, key, value);
171 #endif // TUFAO_SESSION_H
PropertyWrapper(Session &session, const QByteArray &key)
Constructs a new PropertyWrappe object.
Definition: session.h:71
The Tufao::HttpServerResponse is used to respond to a Tufao::HttpServerRequest.
Definition: httpserverresponse.h:57
The Tufao::HttpServer represents a HTTP request received by Tufao::HttpServer.
Definition: httpserverrequest.h:47
This class provides easier access to the session's properties.
Definition: session.h:48
Provides a object that give less verbose access to a session property.
Definition: session.h:60
QVariant value(const QByteArray &key) const
Returns the value of the property referenced by key, or a null QVariant if the property isn't found...
Definition: session.h:138
bool hasValue(const QByteArray &key) const
Returns true if the session has a property accessible through key.
Definition: session.h:126
Session(SessionStore &store, const HttpServerRequest &request, HttpServerResponse &response)
Constructs a new Session object.
Definition: session.h:113
void setValue(const QByteArray &key, const QVariant &value)
Sets the property's value referenced by key to value.
Definition: session.h:149
SessionStore class can be used to store data that must persist among different requests.
Definition: sessionstore.h:220