libupnpp 0.16.0
A C++ wrapper for the Portable UPnP reference library
Public Member Functions | Public Attributes | List of all members
UPnPClient::UPnPDeviceDesc Class Reference

Data holder for a UPnP device, parsed from the XML description obtained during discovery. More...

#include <description.hxx>

Public Member Functions

 UPnPDeviceDesc (const std::string &url, const std::string &description)
 Build device from the XML description downloaded during discovery.
 
void clear ()
 
std::string dump () const
 

Public Attributes

bool ok {false}
 Parse success status.
 
std::string deviceType
 Device Type: e.g. urn:schemas-upnp-org:device:MediaServer:1.
 
std::string friendlyName
 User-configurable name (usually), e.g. Lounge-streamer.
 
std::string UDN
 Unique Device Number.
 
std::string descURL
 URL the device description XML was downloaded from.
 
std::string URLBase
 scheme:authority/ part of the descURL above, e.g.
 
std::string manufacturer
 Manufacturer: e.g. D-Link, PacketVideo.
 
std::string modelName
 Model name: e.g. MediaTomb, DNS-327L.
 
std::string XMLText
 Raw downloaded document.
 
std::vector< UPnPServiceDescservices
 Services provided by this device.
 
std::vector< UPnPDeviceDescembedded
 Embedded devices.
 

Detailed Description

Data holder for a UPnP device, parsed from the XML description obtained during discovery.

The object is built by the discovery code. User-level code gets access to the data by using the device directory traversal methods.

Constructor & Destructor Documentation

◆ UPnPDeviceDesc()

UPnPClient::UPnPDeviceDesc::UPnPDeviceDesc ( const std::string &  url,
const std::string &  description 
)

Build device from the XML description downloaded during discovery.

This is an internal library call, used from the discovery module. The user code gets access to an initialized Device Description object through the device directory traversal methods.

Parameters
urlwhere the description came from
descriptionthe xml device description

Member Data Documentation

◆ embedded

std::vector<UPnPDeviceDesc> UPnPClient::UPnPDeviceDesc::embedded

Embedded devices.

We use UPnPDeviceDesc for convenience, but they can't recursively have embedded devices (and they just get a copy of the root URLBase).

◆ UDN

std::string UPnPClient::UPnPDeviceDesc::UDN

Unique Device Number.

This is the same as the deviceID in the discovery message. e.g. uuid:a7bdcd12-e6c1-4c7e-b588-3bbc959eda8d

◆ URLBase

std::string UPnPClient::UPnPDeviceDesc::URLBase

scheme:authority/ part of the descURL above, e.g.

http://192.168.4.4:49152/ Note: we make internally the possibly buggy assumption that all relative URLs (service descriptions etc.) will be absolute paths. There is actually nothing in the standard which prevents them from being relative paths to be resolved against the download absolute path instead (in which case the above descURL would have to be used instead of this field).


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