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

Thread to process NetStream requests. More...

#include <libmythtv/mheg/netstream.h>

Inheritance diagram for NAMThread:
[legend]
Collaboration diagram for NAMThread:
[legend]

Signals

void requestStarted (int, QNetworkReply *)
 

Public Member Functions

 ~NAMThread () override
 
void Post (QEvent *event)
 

Static Public Member Functions

static NAMThreadmanager ()
 NetworkAccessManager event loop thread. More...
 
static void PostEvent (QEvent *e)
 
static QRecursiveMutex * GetMutex ()
 
static bool isAvailable ()
 
static QDateTime GetLastModified (const QUrl &url)
 

Protected Member Functions

void run () override
 
bool NewRequest (QEvent *event)
 
bool StartRequest (NetStreamRequest *p)
 

Static Protected Member Functions

static bool AbortRequest (NetStreamAbort *p)
 

Private Slots

void quit ()
 

Private Member Functions

 NAMThread ()
 

Private Attributes

volatile bool m_bQuit {false}
 
QSemaphore m_running
 
QRecursiveMutex m_mutexNAM
 
QNetworkAccessManager * m_nam {nullptr}
 
QMutex m_mutex
 
QQueue< QEvent * > m_workQ
 
QWaitCondition m_work
 

Detailed Description

Thread to process NetStream requests.

Definition at line 115 of file netstream.h.

Constructor & Destructor Documentation

◆ NAMThread()

NAMThread::NAMThread ( )
private

Definition at line 755 of file netstream.cpp.

◆ ~NAMThread()

NAMThread::~NAMThread ( )
override

Definition at line 767 of file netstream.cpp.

Member Function Documentation

◆ manager()

NAMThread & NAMThread::manager ( )
static

NetworkAccessManager event loop thread.

Definition at line 745 of file netstream.cpp.

Referenced by GetLastModified(), GetMutex(), MHInteractionChannel::MHInteractionChannel(), NetStream::NetStream(), PostEvent(), and NetStream::~NetStream().

◆ PostEvent()

static void NAMThread::PostEvent ( QEvent *  e)
inlinestatic

Definition at line 126 of file netstream.h.

Referenced by NetStream::Abort(), and NetStream::Request().

◆ Post()

void NAMThread::Post ( QEvent *  event)

Definition at line 863 of file netstream.cpp.

Referenced by PostEvent().

◆ GetMutex()

static QRecursiveMutex* NAMThread::GetMutex ( )
inlinestatic

Definition at line 129 of file netstream.h.

Referenced by NetStream::safe_read().

◆ isAvailable()

bool NAMThread::isAvailable ( )
static

Definition at line 925 of file netstream.cpp.

Referenced by NetStream::isAvailable().

◆ GetLastModified()

QDateTime NAMThread::GetLastModified ( const QUrl &  url)
static

Definition at line 940 of file netstream.cpp.

Referenced by NetStream::GetLastModified().

◆ requestStarted

void NAMThread::requestStarted ( int  ,
QNetworkReply *   
)
signal

◆ run()

void NAMThread::run ( )
overrideprotected

Definition at line 774 of file netstream.cpp.

◆ NewRequest()

bool NAMThread::NewRequest ( QEvent *  event)
protected

Definition at line 869 of file netstream.cpp.

Referenced by run().

◆ StartRequest()

bool NAMThread::StartRequest ( NetStreamRequest p)
protected

Definition at line 886 of file netstream.cpp.

Referenced by NewRequest().

◆ AbortRequest()

bool NAMThread::AbortRequest ( NetStreamAbort p)
staticprotected

Definition at line 908 of file netstream.cpp.

Referenced by NewRequest().

◆ quit

void NAMThread::quit ( )
privateslot

Definition at line 857 of file netstream.cpp.

Referenced by run().

Member Data Documentation

◆ m_bQuit

volatile bool NAMThread::m_bQuit {false}
private

Definition at line 150 of file netstream.h.

Referenced by quit(), and run().

◆ m_running

QSemaphore NAMThread::m_running
private

Definition at line 151 of file netstream.h.

Referenced by run().

◆ m_mutexNAM

QRecursiveMutex NAMThread::m_mutexNAM
mutableprivate

Definition at line 152 of file netstream.h.

Referenced by GetMutex(), and run().

◆ m_nam

QNetworkAccessManager* NAMThread::m_nam {nullptr}
private

Definition at line 153 of file netstream.h.

Referenced by GetLastModified(), run(), StartRequest(), and ~NAMThread().

◆ m_mutex

QMutex NAMThread::m_mutex
mutableprivate

Definition at line 154 of file netstream.h.

Referenced by GetLastModified(), Post(), run(), and ~NAMThread().

◆ m_workQ

QQueue< QEvent * > NAMThread::m_workQ
private

Definition at line 155 of file netstream.h.

Referenced by Post(), and run().

◆ m_work

QWaitCondition NAMThread::m_work
private

Definition at line 156 of file netstream.h.

Referenced by run().


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