MythTV  master
mythhttpinstance.h
Go to the documentation of this file.
1 #ifndef MYTHHTTPINSTANCE_H
2 #define MYTHHTTPINSTANCE_H
3 
4 // MythTV
7 
8 class MThread;
9 class MythHTTPServer;
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
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