MythTV
master
libs
libmythbase
http
mythhttpinstance.h
Go to the documentation of this file.
1
#ifndef MYTHHTTPINSTANCE_H
2
#define MYTHHTTPINSTANCE_H
3
4
// MythTV
5
#include "
libmythbase/http/mythhttpservice.h
"
6
#include "
libmythbase/http/mythhttptypes.h
"
7
8
class
MThread
;
9
class
MythHTTPServer
;
10
11
class
MBASE_PUBLIC
MythHTTPInstance
12
{
13
public
:
14
static
void
EnableHTTPService(
bool
Enable =
true
);
15
static
void
StopHTTPService ();
16
static
void
AddPaths (
const
QStringList& Paths);
17
static
void
RemovePaths (
const
QStringList& Paths);
18
static
void
AddHandlers (
const
HTTPHandlers
& Handlers);
19
static
void
RemoveHandlers (
const
HTTPHandlers
& Handlers);
20
static
void
Addservices (
const
HTTPServices
& Services);
21
static
void
RemoveServices (
const
HTTPServices
& Services);
22
static
void
AddErrorPageHandler (
const
HTTPHandler
& Handler);
23
24
private
:
25
Q_DISABLE_COPY(
MythHTTPInstance
)
26
27
static
MythHTTPInstance
& Instance();
28
MythHTTPInstance
();
29
~
MythHTTPInstance
();
30
31
MythHTTPServer
* m_httpServer {
nullptr
};
32
MThread
* m_httpServerThread {
nullptr
};
33
};
34
35
class
MBASE_PUBLIC
MythHTTPScopedInstance
36
{
37
public
:
38
explicit
MythHTTPScopedInstance
(
const
HTTPHandlers
& Handlers);
39
~
MythHTTPScopedInstance
();
40
};
41
42
#endif
MythHTTPScopedInstance
Definition:
mythhttpinstance.h:35
MythHTTPInstance
Definition:
mythhttpinstance.h:11
MBASE_PUBLIC
#define MBASE_PUBLIC
Definition:
mythbaseexp.h:15
mythhttptypes.h
mythhttpservice.h
MThread
This is a wrapper around QThread that does several additional things.
Definition:
mthread.h:48
MythHTTPServer
Definition:
mythhttpserver.h:12
HTTPServices
std::vector< HTTPService > HTTPServices
Definition:
mythhttptypes.h:54
HTTPHandler
std::pair< QString, HTTPFunction > HTTPHandler
Definition:
mythhttptypes.h:46
HTTPHandlers
std::vector< HTTPHandler > HTTPHandlers
Definition:
mythhttptypes.h:47
Generated on Fri Mar 31 2023 03:24:35 for MythTV by
1.8.17