MythTV master
mythhttpthread.cpp
Go to the documentation of this file.
1// MythTV
6
7#define LOC (QString("%1: ").arg(objectName()))
8
10 const QString& ThreadName, qintptr Socket, bool Ssl)
11 : MThread(ThreadName),
12 m_server(Server),
13 m_config(std::move(Config)),
14 m_socketFD(Socket),
15 m_ssl(Ssl)
16{
17}
18
20{
21 RunProlog();
29 exec();
30 delete m_socket;
31 m_socket = nullptr;
32 RunEpilog();
33}
34
43{
44 if (m_socket)
45 emit m_socket->Finish();
46}
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49
void RunProlog(void)
Sets up a thread, call this if you reimplement run().
Definition: mthread.cpp:196
int exec(void)
Enters the qt event loop. call exit or quit to exit thread.
Definition: mthread.cpp:325
void RunEpilog(void)
Cleans up a thread's resources, call this if you reimplement run().
Definition: mthread.cpp:209
void ServicesChanged(const HTTPServices &Services)
void HandlersChanged(const HTTPHandlers &Handlers)
void OriginsChanged(const QStringList &Origins)
void PathsChanged(const QStringList &Paths)
void HostsChanged(const QStringList &Hosts)
void ThreadUpgraded(QThread *Thread)
void PathsChanged(const QStringList &Paths)
Update our list of recognised file paths.
void HandlersChanged(const HTTPHandlers &Handlers)
void OriginsChanged(const QStringList &Origins)
Update the list of allowed Origins.
void ServicesChanged(const HTTPServices &Services)
void HostsChanged(const QStringList &Hosts)
void ThreadUpgraded(QThread *Thread)
MythHTTPConfig m_config
void Quit()
Tell the socket to complete and disconnect.
MythHTTPServer * m_server
MythHTTPThread(MythHTTPServer *Server, MythHTTPConfig Config, const QString &ThreadName, qintptr Socket, bool Ssl)
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
qintptr m_socketFD
MythHTTPSocket * m_socket
STL namespace.