MythTV  master
Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
MythHTTPInstance Class Reference

#include <mythhttpinstance.h>

Collaboration diagram for MythHTTPInstance:
Collaboration graph
[legend]

Static Public Member Functions

static void EnableHTTPService (bool Enable=true)
 Signals to the MythHTTPServer instance whether to start or stop listening. More...
 
static void StopHTTPService ()
 Stop and delete the MythHTTPServer instance. More...
 
static void AddPaths (const QStringList &Paths)
 Add path(s) for the MythHTTPServer instance to handle. More...
 
static void RemovePaths (const QStringList &Paths)
 Remove path(s) from the MythHTTPServer instance. More...
 
static void AddHandlers (const HTTPHandlers &Handlers)
 Add function handlers for specific paths. More...
 
static void RemoveHandlers (const HTTPHandlers &Handlers)
 
static void Addservices (const HTTPServices &Services)
 
static void RemoveServices (const HTTPServices &Services)
 
static void AddErrorPageHandler (const HTTPHandler &Handler)
 

Private Member Functions

 MythHTTPInstance ()
 
 ~MythHTTPInstance ()
 

Static Private Member Functions

static MythHTTPInstanceInstance ()
 

Private Attributes

MythHTTPServerm_httpServer { nullptr }
 
MThreadm_httpServerThread { nullptr }
 

Detailed Description

Definition at line 11 of file mythhttpinstance.h.

Constructor & Destructor Documentation

◆ MythHTTPInstance()

MythHTTPInstance::MythHTTPInstance ( )
private

Definition at line 13 of file mythhttpinstance.cpp.

◆ ~MythHTTPInstance()

MythHTTPInstance::~MythHTTPInstance ( )
private

Definition at line 31 of file mythhttpinstance.cpp.

Member Function Documentation

◆ EnableHTTPService()

void MythHTTPInstance::EnableHTTPService ( bool  Enable = true)
static

Signals to the MythHTTPServer instance whether to start or stop listening.

The server is not deleted.

Definition at line 65 of file mythhttpinstance.cpp.

Referenced by MythHTTPScopedInstance::MythHTTPScopedInstance().

◆ StopHTTPService()

void MythHTTPInstance::StopHTTPService ( )
static

Stop and delete the MythHTTPServer instance.

This should be used to cleanup the HTTP server when the application is terminating. To start or stop the server during the application lifetime use EnableHTTPService.

Definition at line 47 of file mythhttpinstance.cpp.

Referenced by MythHTTPScopedInstance::~MythHTTPScopedInstance().

◆ AddPaths()

void MythHTTPInstance::AddPaths ( const QStringList &  Paths)
static

Add path(s) for the MythHTTPServer instance to handle.

This is the default implementation. The server will serve any files in the given path(s) without limit (i.e. no authorisation etc)

Definition at line 75 of file mythhttpinstance.cpp.

◆ RemovePaths()

void MythHTTPInstance::RemovePaths ( const QStringList &  Paths)
static

Remove path(s) from the MythHTTPServer instance.

Definition at line 82 of file mythhttpinstance.cpp.

◆ AddHandlers()

void MythHTTPInstance::AddHandlers ( const HTTPHandlers Handlers)
static

Add function handlers for specific paths.

The functions will provide simple dynamic content, returning either a valid response to be processed or a null response to indicate that the path was not handled.

Definition at line 92 of file mythhttpinstance.cpp.

Referenced by MythHTTPScopedInstance::MythHTTPScopedInstance().

◆ RemoveHandlers()

void MythHTTPInstance::RemoveHandlers ( const HTTPHandlers Handlers)
static

Definition at line 97 of file mythhttpinstance.cpp.

◆ Addservices()

void MythHTTPInstance::Addservices ( const HTTPServices Services)
static

Definition at line 102 of file mythhttpinstance.cpp.

Referenced by main(), run_backend(), and run_setup_webserver().

◆ RemoveServices()

void MythHTTPInstance::RemoveServices ( const HTTPServices Services)
static

Definition at line 107 of file mythhttpinstance.cpp.

◆ AddErrorPageHandler()

void MythHTTPInstance::AddErrorPageHandler ( const HTTPHandler Handler)
static

Definition at line 112 of file mythhttpinstance.cpp.

Referenced by main(), run_backend(), and run_setup_webserver().

◆ Instance()

MythHTTPInstance & MythHTTPInstance::Instance ( )
staticprivate

Member Data Documentation

◆ m_httpServer

MythHTTPServer* MythHTTPInstance::m_httpServer { nullptr }
private

◆ m_httpServerThread

MThread* MythHTTPInstance::m_httpServerThread { nullptr }
private

Definition at line 32 of file mythhttpinstance.h.

Referenced by MythHTTPInstance(), StopHTTPService(), and ~MythHTTPInstance().


The documentation for this class was generated from the following files: