Wexus2 0.20
|
#include <Context.h>
Public Types | |
typedef QMap< QString, QStringList > | Errors |
Public Member Functions | |
Context (wexus::Application *application, wexus::HTTPRequest &req, wexus::HTTPReply &reply) | |
constructor | |
~Context () | |
destructor | |
Static Public Member Functions | |
static Context * | threadInstance (void) |
static wexus::Application * | application (void) |
static wexus::HTTPRequest & | request (void) |
static wexus::HTTPReply & | reply (void) |
static QTextStream & | output (void) |
static QTextStream & | htmlOutput (void) |
Public Attributes | |
QVariantMap | params |
Cookies | cookies |
QVariantMap & | session |
const QVariantMap | flash |
QVariantMap | setFlash |
Errors | errors |
The context object sets up and maintains (during its lifetime) various thread-local storage variables necesary for the other global functions defined in this file.
Does header/footer sending too, over the HTTPReply
static wexus::Application* wexus::Context::application | ( | void | ) | [inline, static] |
The application instance that spawned this context.
static QTextStream& wexus::Context::htmlOutput | ( | void | ) | [static] |
Returns a stream that HTML escapes all output (except HTMLString).
static QTextStream& wexus::Context::output | ( | void | ) | [static] |
Returns the raw output stream.
static wexus::HTTPReply& wexus::Context::reply | ( | void | ) | [inline, static] |
The wexus::HTTPReply object that will be used to reply to the user.
static wexus::HTTPRequest& wexus::Context::request | ( | void | ) | [inline, static] |
The wexus::HTTPRequest object that started this request.
static Context* wexus::Context::threadInstance | ( | void | ) | [static] |
Returns the "static-like" instance for this thread.
The cookies.
Errors wexus::Context::errors |
Errors.
const QVariantMap wexus::Context::flash |
The incoming flash sent by the previous calls.
QVariantMap wexus::Context::params |
The form parameters. Object directly accessible so operator[] works.
QVariantMap& wexus::Context::session |
The session, if any
QVariantMap wexus::Context::setFlash |
The flash that will be preseved for the next calls. In the next call, this will be the contents of inFlash.