Wexus2 0.20
wexus::FileApp Class Reference

#include <FileApp.h>

Inheritance diagram for wexus::FileApp:

List of all members.

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< DirFlagsdm_dirs

Detailed Description

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?

Author:
Aleksander Demko

Constructor & Destructor Documentation

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

Author:
Aleksander Demko

Member Function Documentation

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 /

Author:
Aleksander Demko

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.

Author:
Aleksander Demko

Reimplemented from wexus::Application.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Enumerator