MythTV master
htmlserver.h
Go to the documentation of this file.
1
2// Program Name: htmlserver.h
3// Created : Mar. 9, 2011
4//
5// Purpose : Http server extension to serve up static html content
6//
7// Copyright (c) 2011 David Blain <dblain@mythtv.org>
8//
9// Licensed under the GPL v2 or later, see LICENSE for details
10//
12
13#ifndef HTMLSERVER_H
14#define HTMLSERVER_H
15
16#include "httpserver.h"
17#if CONFIG_QTSCRIPT
18#include "serverSideScripting.h"
19#endif
20
23//
24// HtmlExtension Class Definition
25//
28
30{
31 private:
32
33#if CONFIG_QTSCRIPT
34 ServerSideScripting m_scripting;
35#endif
37
38 public:
39 HtmlServerExtension( const QString &sSharePath,
40 const QString &sApplicationPrefix);
41 ~HtmlServerExtension( ) override = default;
42
43 // Special case, this extension is called if no other extension
44 // processes the request.
45
46 QStringList GetBasePaths() override // HttpServerExtension
47 { return {}; }
48
49 bool ProcessRequest( HTTPRequest *pRequest ) override; // HttpServerExtension
50
51#if CONFIG_QTSCRIPT
52 QScriptEngine* ScriptEngine()
53 {
54 return &(m_scripting.m_engine);
55 }
56#endif
57};
58
59#endif // HTMLSERVER_H
QString m_indexFilename
Definition: htmlserver.h:36
QStringList GetBasePaths() override
Definition: htmlserver.h:46
~HtmlServerExtension() override=default
virtual bool ProcessRequest(HTTPRequest *pRequest)=0
#define UPNP_PUBLIC
Definition: upnpexp.h:9