Torc
0.1
|
Base HTML handler. More...
#include <torchtmlhandler.h>
Public Member Functions | |
TorcHTMLHandler (const QString &Path, const QString &Name) | |
virtual void | ProcessHTTPRequest (const QString &PeerAddress, int PeerPort, const QString &LocalAddress, int LocalPort, TorcHTTPRequest &Request) override |
Public Member Functions inherited from TorcHTTPHandler | |
TorcHTTPHandler (const QString &Signature, const QString &Name) | |
virtual | ~TorcHTTPHandler () |
QString | Signature (void) const |
bool | GetRecursive (void) const |
QString | Name (void) const |
virtual QVariantMap | ProcessRequest (const QString &Method, const QVariant &Parameters, QObject *Connection, bool Authenticated) |
Additional Inherited Members | |
Static Protected Member Functions inherited from TorcHTTPHandler | |
static bool | MethodIsAuthorised (TorcHTTPRequest &Request, int Allowed) |
Check the current request is authorised and set the authentication header if not. More... | |
static void | HandleOptions (TorcHTTPRequest &Request, int Allowed) |
static void | HandleFile (TorcHTTPRequest &Request, const QString &Filename, int Cache) |
Protected Attributes inherited from TorcHTTPHandler | |
QString | m_signature |
bool | m_recursive |
QString | m_name |
Base HTML handler.
Serves up the top level HTTP directory (i.e. "/").
As the interface is predominantly Javascript created and driven, the only HTML file is 'index.html'.
Other files present here are 'torc.xsd' (the configuration schema description) and 'manifest.json' and 'browserconfig.xml', both of which are used by clients for web app purposes. Certain clients also expect icons and web app images to be located in the root directort, so any request for 'png' or 'ico' files are 'redirected' to the '/img' directory.
All other files are blocked - purely to keep the root directory clean and enforce use of the directory structure.
Definition at line 13 of file torchtmlhandler.h.
TorcHTMLHandler::TorcHTMLHandler | ( | const QString & | Path, |
const QString & | Name | ||
) |
Definition at line 52 of file torchtmlhandler.cpp.
|
overridevirtual |
Implements TorcHTTPHandler.
Definition at line 65 of file torchtmlhandler.cpp.