SSDP Class Reference

#include <ssdp.h>

Inheritance diagram for SSDP:
MThread

List of all members.

Public Member Functions

 ~SSDP ()
void RequestTerminate (void)
void PerformSearch (const QString &sST, uint timeout_secs=2)
void EnableNotifications (int nServicePort)
void DisableNotifications ()

Static Public Member Functions

static SSDPInstance ()
static void Shutdown ()
static void AddListener (QObject *listener)
static void RemoveListener (QObject *listener)
static SSDPCacheEntriesFind (const QString &sURI)
static DeviceLocationFind (const QString &sURI, const QString &sUSN)

Protected Member Functions

bool ProcessSearchRequest (const QStringMap &sHeaders, QHostAddress peerAddress, quint16 peerPort)
bool ProcessSearchResponse (const QStringMap &sHeaders)
bool ProcessNotify (const QStringMap &sHeaders)
bool IsTermRequested ()
QString GetHeaderValue (const QStringMap &headers, const QString &sKey, const QString &sDefault)
void ProcessData (MSocketDevice *pSocket)
SSDPRequestType ProcessRequestLine (const QString &sLine)
virtual void run ()
 Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.

Private Member Functions

 SSDP ()

Private Attributes

QRegExp m_procReqLineExp
MSocketDevicem_Sockets [3]
int m_nPort
int m_nSearchPort
int m_nServicePort
UPnpNotifyTaskm_pNotifyTask
bool m_bAnnouncementsEnabled
bool m_bTermRequested
QMutex m_lock

Static Private Attributes

static SSDPg_pSSDP = NULL

Detailed Description

Definition at line 61 of file ssdp.h.


Constructor & Destructor Documentation

SSDP::SSDP (  )  [private]

Definition at line 67 of file ssdp.cpp.

Referenced by Instance().

SSDP::~SSDP (  ) 

Definition at line 115 of file ssdp.cpp.


Member Function Documentation

bool SSDP::ProcessSearchRequest ( const QStringMap sHeaders,
QHostAddress  peerAddress,
quint16  peerPort 
) [protected]

Definition at line 455 of file ssdp.cpp.

Referenced by ProcessData().

bool SSDP::ProcessSearchResponse ( const QStringMap sHeaders  )  [protected]

Definition at line 542 of file ssdp.cpp.

Referenced by ProcessData().

bool SSDP::ProcessNotify ( const QStringMap sHeaders  )  [protected]

Definition at line 576 of file ssdp.cpp.

Referenced by ProcessData().

bool SSDP::IsTermRequested (  )  [protected]
QString SSDP::GetHeaderValue ( const QStringMap headers,
const QString &  sKey,
const QString &  sDefault 
) [protected]

Definition at line 440 of file ssdp.cpp.

Referenced by ProcessNotify(), ProcessSearchRequest(), and ProcessSearchResponse().

void SSDP::ProcessData ( MSocketDevice pSocket  )  [protected]

Definition at line 317 of file ssdp.cpp.

Referenced by run().

SSDPRequestType SSDP::ProcessRequestLine ( const QString &  sLine  )  [protected]

Definition at line 411 of file ssdp.cpp.

Referenced by ProcessData().

void SSDP::run ( void   )  [protected, virtual]

Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.

Note:
If you override this method you must call RunProlog before you do any work and RunEpilog before you exit the run method.

Reimplemented from MThread.

Definition at line 253 of file ssdp.cpp.

SSDP * SSDP::Instance (  )  [static]
void SSDP::Shutdown ( void   )  [static]

Definition at line 56 of file ssdp.cpp.

Referenced by MythContext::~MythContext().

void SSDP::RequestTerminate ( void   ) 

Definition at line 138 of file ssdp.cpp.

Referenced by cleanup().

void SSDP::PerformSearch ( const QString &  sST,
uint  timeout_secs = 2 
)
void SSDP::EnableNotifications ( int  nServicePort  ) 

Definition at line 147 of file ssdp.cpp.

Referenced by UPnp::Start().

void SSDP::DisableNotifications (  ) 

Definition at line 193 of file ssdp.cpp.

Referenced by UPnp::CleanUp(), and ~SSDP().

static void SSDP::AddListener ( QObject *  listener  )  [inline, static]

Definition at line 124 of file ssdp.h.

Referenced by BackendSelection::Load().

static void SSDP::RemoveListener ( QObject *  listener  )  [inline, static]

Definition at line 126 of file ssdp.h.

Referenced by BackendSelection::~BackendSelection().

static SSDPCacheEntries* SSDP::Find ( const QString &  sURI  )  [inline, static]
static DeviceLocation* SSDP::Find ( const QString &  sURI,
const QString &  sUSN 
) [inline, static]

Definition at line 131 of file ssdp.h.


Member Data Documentation

SSDP * SSDP::g_pSSDP = NULL [static, private]

Definition at line 65 of file ssdp.h.

Referenced by Instance(), and Shutdown().

QRegExp SSDP::m_procReqLineExp [private]

Definition at line 67 of file ssdp.h.

Referenced by ProcessRequestLine().

Definition at line 68 of file ssdp.h.

Referenced by PerformSearch(), run(), SSDP(), and ~SSDP().

int SSDP::m_nPort [private]

Definition at line 70 of file ssdp.h.

Referenced by SSDP().

int SSDP::m_nSearchPort [private]

Definition at line 71 of file ssdp.h.

Referenced by SSDP().

int SSDP::m_nServicePort [private]

Definition at line 72 of file ssdp.h.

Referenced by EnableNotifications(), and ProcessSearchRequest().

Definition at line 74 of file ssdp.h.

Referenced by DisableNotifications(), EnableNotifications(), ProcessData(), and ~SSDP().

Definition at line 75 of file ssdp.h.

Referenced by DisableNotifications(), and EnableNotifications().

Definition at line 77 of file ssdp.h.

Referenced by RequestTerminate(), run(), and ~SSDP().

QMutex SSDP::m_lock [private]

Definition at line 78 of file ssdp.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Fri May 25 06:42:26 2012 for MythTV by  doxygen 1.6.3