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

#include <upnpsubscription.h>

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

Public Member Functions

 UPNPSubscription (const QString &share_path, int port)
 
virtual ~UPNPSubscription ()
 
QStringList GetBasePaths () override
 
bool ProcessRequest (HTTPRequest *pRequest) override
 
int Subscribe (const QString &usn, const QUrl &url, const QString &path)
 
void Unsubscribe (const QString &usn)
 
int Renew (const QString &usn)
 
void Remove (const QString &usn)
 
- Public Member Functions inherited from HttpServerExtension
 HttpServerExtension (const QString &sName, const QString &sSharePath)
 
virtual ~HttpServerExtension ()=default
 
virtual bool ProcessOptions (HTTPRequest *pRequest)
 Handle an OPTIONS request. More...
 
virtual int GetSocketTimeout () const
 
- Public Member Functions inherited from MythObservable
 MythObservable ()
 
virtual ~MythObservable ()
 
void addListener (QObject *listener)
 Add a listener to the observable. More...
 
void removeListener (QObject *listener)
 Remove a listener to the observable. More...
 
void dispatch (const MythEvent &event)
 Dispatch an event to all listeners. More...
 
bool hasListeners (void)
 

Static Private Member Functions

static bool SendUnsubscribeRequest (const QString &usn, const QUrl &url, const QString &path, const QString &uuid)
 
static int SendSubscribeRequest (const QString &callback, const QString &usn, const QUrl &url, const QString &path, const QString &uuidin, QString &uuidout)
 

Private Attributes

QHash< QString, Subscription * > m_subscriptions
 
QMutex m_subscriptionLock {QMutex::Recursive}
 
QString m_callback {"NOTSET"}
 

Additional Inherited Members

- Public Attributes inherited from HttpServerExtension
QString m_sName
 
QString m_sSharePath
 
int m_nSocketTimeout
 
uint m_nSupportedMethods
 
- Protected Attributes inherited from MythObservable
QMutex * m_lock {nullptr}
 
QSet< QObject * > m_listeners
 

Detailed Description

Definition at line 9 of file upnpsubscription.h.

Constructor & Destructor Documentation

◆ UPNPSubscription()

UPNPSubscription::UPNPSubscription ( const QString &  share_path,
int  port 
)

Definition at line 38 of file upnpsubscription.cpp.

◆ ~UPNPSubscription()

UPNPSubscription::~UPNPSubscription ( )
virtual

Definition at line 58 of file upnpsubscription.cpp.

Member Function Documentation

◆ GetBasePaths()

QStringList UPNPSubscription::GetBasePaths ( )
inlineoverridevirtual

Implements HttpServerExtension.

Definition at line 15 of file upnpsubscription.h.

◆ ProcessRequest()

bool UPNPSubscription::ProcessRequest ( HTTPRequest pRequest)
overridevirtual

Implements HttpServerExtension.

Definition at line 173 of file upnpsubscription.cpp.

◆ Subscribe()

int UPNPSubscription::Subscribe ( const QString &  usn,
const QUrl &  url,
const QString &  path 
)

Definition at line 70 of file upnpsubscription.cpp.

Referenced by UPNPScanner::ParseDescription().

◆ Unsubscribe()

void UPNPSubscription::Unsubscribe ( const QString &  usn)

Definition at line 103 of file upnpsubscription.cpp.

Referenced by UPNPScanner::Stop(), and ~UPNPSubscription().

◆ Renew()

int UPNPSubscription::Renew ( const QString &  usn)

Definition at line 123 of file upnpsubscription.cpp.

Referenced by UPNPScanner::timerEvent().

◆ Remove()

void UPNPSubscription::Remove ( const QString &  usn)

Definition at line 157 of file upnpsubscription.cpp.

Referenced by UPNPScanner::RemoveServer().

◆ SendUnsubscribeRequest()

bool UPNPSubscription::SendUnsubscribeRequest ( const QString &  usn,
const QUrl &  url,
const QString &  path,
const QString &  uuid 
)
staticprivate

Definition at line 272 of file upnpsubscription.cpp.

Referenced by Unsubscribe().

◆ SendSubscribeRequest()

int UPNPSubscription::SendSubscribeRequest ( const QString &  callback,
const QString &  usn,
const QUrl &  url,
const QString &  path,
const QString &  uuidin,
QString &  uuidout 
)
staticprivate

Definition at line 327 of file upnpsubscription.cpp.

Referenced by Renew(), and Subscribe().

Member Data Documentation

◆ m_subscriptions

QHash<QString, Subscription*> UPNPSubscription::m_subscriptions
private

Definition at line 33 of file upnpsubscription.h.

Referenced by Remove(), Renew(), Subscribe(), Unsubscribe(), and ~UPNPSubscription().

◆ m_subscriptionLock

QMutex UPNPSubscription::m_subscriptionLock {QMutex::Recursive}
private

Definition at line 34 of file upnpsubscription.h.

Referenced by Remove(), Renew(), Subscribe(), Unsubscribe(), and ~UPNPSubscription().

◆ m_callback

QString UPNPSubscription::m_callback {"NOTSET"}
private

Definition at line 35 of file upnpsubscription.h.

Referenced by Renew(), Subscribe(), and UPNPSubscription().


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