MythTV  master
Public Member Functions | Static Public Member Functions | Protected Slots | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
HttpServer Class Reference

#include <httpserver.h>

Inheritance diagram for HttpServer:
Inheritance graph
[legend]
Collaboration diagram for HttpServer:
Collaboration graph
[legend]

Public Member Functions

 HttpServer ()
 
virtual ~HttpServer ()
 
void RegisterExtension (HttpServerExtension *)
 
void UnregisterExtension (HttpServerExtension *)
 
void DelegateRequest (HTTPRequest *)
 
uint GetSocketTimeout (HTTPRequest *) const
 Get the idle socket timeout value for the relevant extension. More...
 
QString GetSharePath (void) const
 
bool IsRunning (void) const
 
- Public Member Functions inherited from ServerPool
 ServerPool (QObject *parent=nullptr)
 
 ~ServerPool (void)
 
bool listen (QList< QHostAddress > addrs, quint16 port, bool requireall=true, PoolServerType type=kTCPServer)
 
bool listen (QStringList addrs, quint16 port, bool requireall=true, PoolServerType type=kTCPServer)
 
bool listen (quint16 port, bool requireall=true, PoolServerType type=kTCPServer)
 
bool bind (QList< QHostAddress > addrs, quint16 port, bool requireall=true)
 
bool bind (QStringList addrs, quint16 port, bool requireall=true)
 
bool bind (quint16 port, bool requireall=true)
 
qint64 writeDatagram (const char *data, qint64 size, const QHostAddress &addr, quint16 port)
 
qint64 writeDatagram (const QByteArray &datagram, const QHostAddress &addr, quint16 port)
 
bool isListening (void)
 
int maxPendingConnections (void)
 
void setMaxPendingConnections (int n)
 
quint16 serverPort (void)
 
QNetworkProxy proxy (void)
 
void setProxy (const QNetworkProxy &proxy)
 
void close (void)
 
int tryListeningPort (int baseport, int range=1)
 tryListeningPort More...
 
int tryBindingPort (int baseport, int range=1)
 tryBindingPort More...
 

Static Public Member Functions

static QString GetPlatform (void)
 
static QString GetServerVersion (void)
 
- Static Public Member Functions inherited from ServerPool
static void RefreshDefaultListen (void)
 
static QList< QHostAddress > DefaultListen (void)
 
static QList< QHostAddress > DefaultListenIPv4 (void)
 
static QList< QHostAddress > DefaultListenIPv6 (void)
 
static QList< QHostAddress > DefaultBroadcast (void)
 
static QList< QHostAddress > DefaultBroadcastIPv4 (void)
 
static QList< QHostAddress > DefaultBroadcastIPv6 (void)
 
static int tryListeningPort (QTcpServer *server, int baseport, int range=1, bool *isipv6=nullptr)
 tryListeningPort More...
 
static int tryBindingPort (QUdpSocket *socket, int baseport, int range=1, bool *isipv6=nullptr)
 tryBindingPort More...
 

Protected Slots

void newTcpConnection (qt_socket_fd_t socket) override
 
- Protected Slots inherited from ServerPool
virtual void newUdpDatagram (void)
 
virtual void newTcpConnection (qt_socket_fd_t socket)
 

Protected Attributes

QReadWriteLock m_rwlock
 
HttpServerExtensionList m_extensions
 
QMultiMap< QString, HttpServerExtension * > m_basePaths
 
QString m_sSharePath
 
MThreadPool m_threadPool
 
bool m_running
 
QSslConfiguration m_sslConfig
 
const QString m_privateToken
 

Static Protected Attributes

static QMutex s_platformLock
 
static QString s_platform
 

Private Member Functions

void LoadSSLConfig ()
 

Additional Inherited Members

- Signals inherited from ServerPool
void newConnection (QTcpSocket *)
 
void newDatagram (QByteArray, QHostAddress, quint16)
 

Detailed Description

Definition at line 112 of file httpserver.h.

Constructor & Destructor Documentation

◆ HttpServer()

HttpServer::HttpServer ( )

Definition at line 116 of file httpserver.cpp.

◆ ~HttpServer()

HttpServer::~HttpServer ( )
virtual

Definition at line 170 of file httpserver.cpp.

Member Function Documentation

◆ RegisterExtension()

void HttpServer::RegisterExtension ( HttpServerExtension pExtension)

◆ UnregisterExtension()

void HttpServer::UnregisterExtension ( HttpServerExtension pExtension)

Definition at line 348 of file httpserver.cpp.

◆ DelegateRequest()

void HttpServer::DelegateRequest ( HTTPRequest pRequest)

Definition at line 371 of file httpserver.cpp.

Referenced by HttpWorker::run().

◆ GetSocketTimeout()

uint HttpServer::GetSocketTimeout ( HTTPRequest pRequest) const

Get the idle socket timeout value for the relevant extension.

Definition at line 428 of file httpserver.cpp.

Referenced by HttpWorker::run().

◆ GetSharePath()

QString HttpServer::GetSharePath ( void  ) const
inline

Definition at line 128 of file httpserver.h.

Referenced by UPnp::Initialize(), and MediaRenderer::MediaRenderer().

◆ IsRunning()

bool HttpServer::IsRunning ( void  ) const
inline

Definition at line 133 of file httpserver.h.

Referenced by HttpWorker::run().

◆ GetPlatform()

QString HttpServer::GetPlatform ( void  )
static

Definition at line 282 of file httpserver.cpp.

Referenced by GetServerVersion().

◆ GetServerVersion()

QString HttpServer::GetServerVersion ( void  )
static

◆ newTcpConnection

void HttpServer::newTcpConnection ( qt_socket_fd_t  socket)
overrideprotectedslot

Definition at line 305 of file httpserver.cpp.

◆ LoadSSLConfig()

void HttpServer::LoadSSLConfig ( )
private

Definition at line 184 of file httpserver.cpp.

Referenced by HttpServer().

Member Data Documentation

◆ m_rwlock

QReadWriteLock HttpServer::m_rwlock
mutableprotected

◆ m_extensions

HttpServerExtensionList HttpServer::m_extensions
protected

Definition at line 146 of file httpserver.h.

Referenced by DelegateRequest(), RegisterExtension(), UnregisterExtension(), and ~HttpServer().

◆ m_basePaths

QMultiMap< QString, HttpServerExtension* > HttpServer::m_basePaths
protected

◆ m_sSharePath

QString HttpServer::m_sSharePath
protected

Definition at line 149 of file httpserver.h.

Referenced by HttpServer().

◆ m_threadPool

MThreadPool HttpServer::m_threadPool
protected

Definition at line 150 of file httpserver.h.

Referenced by HttpServer(), newTcpConnection(), and ~HttpServer().

◆ m_running

bool HttpServer::m_running
protected

Definition at line 151 of file httpserver.h.

Referenced by ~HttpServer().

◆ s_platformLock

QMutex HttpServer::s_platformLock
staticprotected

Definition at line 153 of file httpserver.h.

Referenced by GetPlatform(), and HttpServer().

◆ s_platform

QString HttpServer::s_platform
staticprotected

Definition at line 154 of file httpserver.h.

Referenced by GetPlatform(), and HttpServer().

◆ m_sslConfig

QSslConfiguration HttpServer::m_sslConfig
protected

Definition at line 157 of file httpserver.h.

Referenced by LoadSSLConfig(), and newTcpConnection().

◆ m_privateToken

const QString HttpServer::m_privateToken
protected

Definition at line 160 of file httpserver.h.


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