Wexus2 0.20
|
#include <FileApp.h>
Classes | |
struct | DirFlags |
Public Member Functions | |
FileApp (void) | |
normal ctor | |
FileApp (const QString &docdir) | |
virtual void | init (const QVariantMap &settings) |
virtual void | handleApplicationRequest (QString &filteredRequest, wexus::HTTPRequest &req, wexus::HTTPReply &reply) |
Protected Attributes | |
QVector< DirFlags > | dm_dirs |
An application that just servers files from one or more directories.
INI parameters: dirX = "." dirX = "dir" dirX = "dir/subdir" X is a number, 1, 2, etc The directory to serve. If none are given then a dir1="." is assumed. All directotories will be relative to the app dir. for any dirX, you can have a optionX. this string can contain a space delimeted list any of the following (case insenstive): optionsX = "IndexHtml AutoDirIndex AllowAllMimeTypes" TODO future allow full absolute dirs?
wexus::FileApp::FileApp | ( | const QString & | docdir | ) |
Specific ctor called by the mainline.
Do not call init if you use this ctor.
docdir will have some flags set, like auto indexing and loading all files. careful. TODO future, add flags parameter
virtual void wexus::FileApp::handleApplicationRequest | ( | QString & | filteredRequest, |
wexus::HTTPRequest & | req, | ||
wexus::HTTPReply & | reply | ||
) | [virtual] |
A enhanced handleApplicationRequest() call from the wexus::Site to wexus::Application. This implements the controll-handler system. This method is not typically overriden, but can be if you want to layer over the default controller-handler system.
filteredRequest contains just the action call. It always starts with atleast a /
Reimplemented from wexus::Application.
virtual void wexus::FileApp::init | ( | const QVariantMap & | settings | ) | [virtual] |
Called shortly after creation. This saves a copy of the settings reference (acceisble via settings()) and also opens the database.
Decendants may overide this to add additional functionality. They should call this version, first, however.
Reimplemented from wexus::Application.