MythTV
master
mythtv
libs
libmythupnp
htmlserver.h
Go to the documentation of this file.
1
// 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
29
class
UPNP_PUBLIC
HtmlServerExtension
:
public
HttpServerExtension
30
{
31
private
:
32
33
#if CONFIG_QTSCRIPT
34
ServerSideScripting
m_scripting;
35
#endif
36
QString
m_indexFilename
;
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
HTTPRequest
Definition:
httprequest.h:109
HtmlServerExtension::m_indexFilename
QString m_indexFilename
Definition:
htmlserver.h:36
ServerSideScripting::m_engine
QScriptEngine m_engine
Definition:
serverSideScripting.h:53
HtmlServerExtension::GetBasePaths
QStringList GetBasePaths() override
Definition:
htmlserver.h:46
serverSideScripting.h
HtmlServerExtension
Definition:
htmlserver.h:29
HttpServerExtension::ProcessRequest
virtual bool ProcessRequest(HTTPRequest *pRequest)=0
UPNP_PUBLIC
#define UPNP_PUBLIC
Definition:
upnpexp.h:9
httpserver.h
ServerSideScripting
Definition:
serverSideScripting.h:49
HttpServerExtension
Definition:
httpserver.h:71
Generated on Mon Nov 25 2024 03:16:15 for MythTV by
1.8.17