MythTV  master
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
UPnpDeviceDesc Class Reference

#include <upnpdevice.h>

Collaboration diagram for UPnpDeviceDesc:
Collaboration graph
[legend]

Public Member Functions

 UPnpDeviceDesc ()=default
 
virtual ~UPnpDeviceDesc ()=default
 
bool Load (const QString &sFileName)
 
bool Load (const QDomDocument &xmlDevDesc)
 
void GetValidXML (const QString &sBaseAddress, int nPort, QTextStream &os, const QString &sUserAgent="")
 
QString GetValidXML (const QString &sBaseAddress, int nPort)
 
QString FindDeviceUDN (UPnpDevice *pDevice, QString sST)
 
UPnpDeviceFindDevice (const QString &sURI)
 
void toMap (InfoMap &map) const
 

Static Public Member Functions

static UPnpDeviceFindDevice (UPnpDevice *pDevice, const QString &sURI)
 
static UPnpDeviceDescRetrieve (QString &sURL)
 

Public Attributes

UPnpDevice m_rootDevice
 
QString m_sHostName
 
QUrl m_hostUrl
 

Protected Member Functions

void InternalLoad (QDomNode oNode, UPnpDevice *pCurDevice)
 
void ProcessDeviceList (const QDomNode &oListNode, UPnpDevice *pDevice)
 
void OutputDevice (QTextStream &os, UPnpDevice *pDevice, const QString &sUserAgent="")
 
QString GetHostName () const
 

Static Protected Member Functions

static void ProcessIconList (const QDomNode &oListNode, UPnpDevice *pDevice)
 
static void ProcessServiceList (const QDomNode &oListNode, UPnpDevice *pDevice)
 
static void SetStrValue (const QDomNode &n, QString &sValue)
 Sets sValue param to n.firstChild().toText().nodeValue(), iff neither n.isNull() nor n.firstChild().toText().isNull() is true. More...
 
static void SetNumValue (const QDomNode &n, int &nValue)
 Sets nValue param to n.firstChild().toText().nodeValue(), iff neither n.isNull() nor n.firstChild().toText().isNull() is true. More...
 
static void SetBoolValue (const QDomNode &n, bool &nValue)
 
static QString FormatValue (const NameValue &node)
 
static QString FormatValue (const QString &sName, const QString &sValue)
 
static QString FormatValue (const QString &sName, int nValue)
 

Detailed Description

Definition at line 151 of file upnpdevice.h.

Constructor & Destructor Documentation

◆ UPnpDeviceDesc()

UPnpDeviceDesc::UPnpDeviceDesc ( )
default

Referenced by Retrieve().

◆ ~UPnpDeviceDesc()

virtual UPnpDeviceDesc::~UPnpDeviceDesc ( )
virtualdefault

Member Function Documentation

◆ InternalLoad()

void UPnpDeviceDesc::InternalLoad ( QDomNode  oNode,
UPnpDevice pCurDevice 
)
protected

Definition at line 105 of file upnpdevice.cpp.

Referenced by Load(), and ProcessDeviceList().

◆ ProcessIconList()

void UPnpDeviceDesc::ProcessIconList ( const QDomNode &  oListNode,
UPnpDevice pDevice 
)
staticprotected

Definition at line 176 of file upnpdevice.cpp.

Referenced by InternalLoad().

◆ ProcessServiceList()

void UPnpDeviceDesc::ProcessServiceList ( const QDomNode &  oListNode,
UPnpDevice pDevice 
)
staticprotected

Definition at line 205 of file upnpdevice.cpp.

Referenced by InternalLoad().

◆ ProcessDeviceList()

void UPnpDeviceDesc::ProcessDeviceList ( const QDomNode &  oListNode,
UPnpDevice pDevice 
)
protected

Definition at line 239 of file upnpdevice.cpp.

Referenced by InternalLoad().

◆ OutputDevice()

void UPnpDeviceDesc::OutputDevice ( QTextStream &  os,
UPnpDevice pDevice,
const QString &  sUserAgent = "" 
)
protected

Definition at line 343 of file upnpdevice.cpp.

Referenced by GetValidXML().

◆ SetStrValue()

void UPnpDeviceDesc::SetStrValue ( const QDomNode &  n,
QString &  sValue 
)
staticprotected

Sets sValue param to n.firstChild().toText().nodeValue(), iff neither n.isNull() nor n.firstChild().toText().isNull() is true.

Definition at line 262 of file upnpdevice.cpp.

Referenced by InternalLoad(), ProcessIconList(), and ProcessServiceList().

◆ SetNumValue()

void UPnpDeviceDesc::SetNumValue ( const QDomNode &  n,
int &  nValue 
)
staticprotected

Sets nValue param to n.firstChild().toText().nodeValue(), iff neither n.isNull() nor n.firstChild().toText().isNull() is true.

Definition at line 275 of file upnpdevice.cpp.

Referenced by ProcessIconList().

◆ SetBoolValue()

void UPnpDeviceDesc::SetBoolValue ( const QDomNode &  n,
bool nValue 
)
staticprotected

Definition at line 286 of file upnpdevice.cpp.

Referenced by InternalLoad().

◆ FormatValue() [1/3]

QString UPnpDeviceDesc::FormatValue ( const NameValue node)
staticprotected

Definition at line 501 of file upnpdevice.cpp.

Referenced by OutputDevice().

◆ FormatValue() [2/3]

QString UPnpDeviceDesc::FormatValue ( const QString &  sName,
const QString &  sValue 
)
staticprotected

Definition at line 520 of file upnpdevice.cpp.

◆ FormatValue() [3/3]

QString UPnpDeviceDesc::FormatValue ( const QString &  sName,
int  nValue 
)
staticprotected

Definition at line 533 of file upnpdevice.cpp.

◆ GetHostName()

QString UPnpDeviceDesc::GetHostName ( ) const
protected

Definition at line 661 of file upnpdevice.cpp.

Referenced by OutputDevice().

◆ Load() [1/2]

bool UPnpDeviceDesc::Load ( const QString &  sFileName)

Definition at line 45 of file upnpdevice.cpp.

Referenced by MediaServer::Init(), and Retrieve().

◆ Load() [2/2]

bool UPnpDeviceDesc::Load ( const QDomDocument &  xmlDevDesc)

Definition at line 88 of file upnpdevice.cpp.

◆ GetValidXML() [1/2]

void UPnpDeviceDesc::GetValidXML ( const QString &  sBaseAddress,
int  nPort,
QTextStream &  os,
const QString &  sUserAgent = "" 
)

Definition at line 318 of file upnpdevice.cpp.

Referenced by SSDPExtension::GetDeviceDesc(), and GetValidXML().

◆ GetValidXML() [2/2]

QString UPnpDeviceDesc::GetValidXML ( const QString &  sBaseAddress,
int  nPort 
)

Definition at line 304 of file upnpdevice.cpp.

◆ FindDeviceUDN()

QString UPnpDeviceDesc::FindDeviceUDN ( UPnpDevice pDevice,
QString  sST 
)

Definition at line 542 of file upnpdevice.cpp.

Referenced by SSDP::ProcessSearchRequest().

◆ FindDevice() [1/2]

UPnpDevice * UPnpDeviceDesc::FindDevice ( const QString &  sURI)

Definition at line 581 of file upnpdevice.cpp.

Referenced by FindDevice().

◆ FindDevice() [2/2]

UPnpDevice * UPnpDeviceDesc::FindDevice ( UPnpDevice pDevice,
const QString &  sURI 
)
static

Definition at line 590 of file upnpdevice.cpp.

◆ Retrieve()

UPnpDeviceDesc * UPnpDeviceDesc::Retrieve ( QString &  sURL)
static

Definition at line 616 of file upnpdevice.cpp.

Referenced by UPnp::GetDeviceDesc(), and DeviceLocation::GetDeviceDesc().

◆ toMap()

void UPnpDeviceDesc::toMap ( InfoMap map) const
inline

Definition at line 199 of file upnpdevice.h.

Referenced by DeviceLocation::GetDeviceDetail().

Member Data Documentation

◆ m_rootDevice

UPnpDevice UPnpDeviceDesc::m_rootDevice

◆ m_sHostName

QString UPnpDeviceDesc::m_sHostName

◆ m_hostUrl

QUrl UPnpDeviceDesc::m_hostUrl

Definition at line 157 of file upnpdevice.h.

Referenced by SatIP::doUPNPsearch(), and Retrieve().


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