MythTV master
mythhttpinstance.h
Go to the documentation of this file.
1#ifndef MYTHHTTPINSTANCE_H
2#define MYTHHTTPINSTANCE_H
3
4// MythTV
7
8class MThread;
10
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();
30
31 MythHTTPServer* m_httpServer { nullptr };
32 MThread* m_httpServerThread { nullptr };
33};
34
36{
37 public:
38 explicit MythHTTPScopedInstance(const HTTPHandlers& Handlers);
40};
41
42#endif
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49
#define MBASE_PUBLIC
Definition: mythbaseexp.h:15
std::vector< HTTPHandler > HTTPHandlers
Definition: mythhttptypes.h:48
std::vector< HTTPService > HTTPServices
Definition: mythhttptypes.h:55
std::pair< QString, HTTPFunction > HTTPHandler
Definition: mythhttptypes.h:47