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

#include <libmythupnp/upnpsubscription.h>

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

Public Member Functions

 UPNPSubscription (const QString &share_path, int port)
 
 ~UPNPSubscription () override
 
QStringList GetBasePaths () override
 
bool ProcessRequest (HTTPRequest *pRequest) override
 
std::chrono::seconds Subscribe (const QString &usn, const QUrl &url, const QString &path)
 
void Unsubscribe (const QString &usn)
 
std::chrono::seconds Renew (const QString &usn)
 
void Remove (const QString &usn)
 
- Public Member Functions inherited from HttpServerExtension
 HttpServerExtension (QString sName, QString sSharePath)
 
 ~HttpServerExtension () override=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 std::chrono::seconds 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
 
QRecursiveMutex m_subscriptionLock
 
QString m_callback {"NOTSET"}
 

Additional Inherited Members

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

Detailed Description

Definition at line 10 of file upnpsubscription.h.

Constructor & Destructor Documentation

◆ UPNPSubscription()

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

Definition at line 43 of file upnpsubscription.cpp.

◆ ~UPNPSubscription()

UPNPSubscription::~UPNPSubscription ( )
override

Definition at line 63 of file upnpsubscription.cpp.

Member Function Documentation

◆ GetBasePaths()

QStringList UPNPSubscription::GetBasePaths ( )
inlineoverridevirtual

Implements HttpServerExtension.

Definition at line 16 of file upnpsubscription.h.

◆ ProcessRequest()

bool UPNPSubscription::ProcessRequest ( HTTPRequest pRequest)
overridevirtual

Implements HttpServerExtension.

Definition at line 178 of file upnpsubscription.cpp.

◆ Subscribe()

std::chrono::seconds UPNPSubscription::Subscribe ( const QString &  usn,
const QUrl &  url,
const QString &  path 
)

Definition at line 75 of file upnpsubscription.cpp.

Referenced by UPNPScanner::ParseDescription().

◆ Unsubscribe()

void UPNPSubscription::Unsubscribe ( const QString &  usn)

Definition at line 108 of file upnpsubscription.cpp.

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

◆ Renew()

std::chrono::seconds UPNPSubscription::Renew ( const QString &  usn)

Definition at line 128 of file upnpsubscription.cpp.

Referenced by UPNPScanner::timerEvent().

◆ Remove()

void UPNPSubscription::Remove ( const QString &  usn)

Definition at line 162 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 277 of file upnpsubscription.cpp.

Referenced by Unsubscribe().

◆ SendSubscribeRequest()

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

Definition at line 336 of file upnpsubscription.cpp.

Referenced by Renew(), and Subscribe().

Member Data Documentation

◆ m_subscriptions

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

Definition at line 34 of file upnpsubscription.h.

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

◆ m_subscriptionLock

QRecursiveMutex UPNPSubscription::m_subscriptionLock
private

Definition at line 35 of file upnpsubscription.h.

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

◆ m_callback

QString UPNPSubscription::m_callback {"NOTSET"}
private

Definition at line 36 of file upnpsubscription.h.

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


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