#include <DeviceControl.h>

Inheritance diagram for UPnP::DeviceControl:
Collaboration diagram for UPnP::DeviceControl:

Classes

struct  Description
 
struct  RootConfig
 

Public Types

using List = ObjectList< DeviceControl >
 
using OwnedList = OwnedObjectList< DeviceControl >
 
- Public Types inherited from UPnP::Device
enum class  Field { XX , customStart = domain , MAX }
 
using List = ObjectList< Device >
 
using OwnedList = OwnedObjectList< Device >
 
- Public Types inherited from UPnP::Object
using Version = ObjectClass::Version
 

Public Member Functions

 DeviceControl (DeviceControl &parent)
 
 DeviceControl (DeviceControl *parent=nullptr)
 
bool configureRoot (ControlPoint &controlPoint, const String &location, XML::Node *device)
 Called on root device only during discovery. More...
 
DeviceControlroot ()
 Get the root device. More...
 
const DeviceControlroot () const
 
String getUrl (const String &path) const override
 Get fully-qualified URL given a relative path. More...
 
String getUrlBasePath () const override
 Get relative path for this device. More...
 
ControlPointcontrolPoint () const
 Get managing control point for this device. More...
 
template<typename T >
ServiceControlgetService (const T &serviceType)
 Find a service for this device given its class. More...
 
template<typename T >
DeviceControlgetDevice (const T &deviceType)
 Find a child device given its class. More...
 
String getField (Field desc) const override
 
const String udn () const
 Get UDN for this device. More...
 
bool configure (XML::Node *device)
 Configure device using information from description document. More...
 
virtual void onConnected (HttpConnection &connection)
 Inherited classes may override this to pull out any additional information from received response headers, etc. Invoked after description has been processed. More...
 
DeviceControlgetNext ()
 
DeviceControlparent ()
 
const Descriptiondescription ()
 Get device description. More...
 
- Public Member Functions inherited from UPnP::Device
 Device (Device &parent)
 
 Device (Device *parent=nullptr)
 
String caption () const
 
String resolvePath (const String &path) const
 Resolve a path (relative or absolute) into an absolute path. More...
 
Deviceroot ()
 
const Deviceroot () const
 
bool isRoot () const
 
template<class S , typename T >
S * getService (const T &serviceType)
 
template<typename T >
ServicegetService (const T &serviceType)
 
template<class D , typename T >
D * getDevice (const T &deviceType)
 
template<typename T >
DevicegetDevice (const T &deviceType)
 
void search (const SearchFilter &filter) override
 Called during SSDP search operation. More...
 
bool formatMessage (Message &msg, MessageSpec &ms) override
 Standard fields have been completed. More...
 
Urn objectType () const override
 
String friendlyName () const
 
bool onHttpRequest (HttpServerConnection &connection) override
 Called by framework to handle an incoming HTTP request. More...
 
void addDevice (Device *device)
 
void addService (Service *service)
 
XML::NodegetDescription (XML::Document &doc, DescType descType) const override
 
IDataSourceStreamcreateDescription () override
 Called by framework to construct a device description response stream. More...
 
ItemEnumeratorgetList (unsigned index, String &name) override
 
void sendXml (HttpResponse &response, IDataSourceStream *content)
 
Deviceparent ()
 
Service::OwnedListservices ()
 
OwnedListdevices ()
 
- Public Member Functions inherited from UPnP::ObjectTemplate< Device, Object >
DevicegetNext () const
 
Iterator begin () const
 
Iterator end () const
 
- Public Member Functions inherited from UPnP::Object
virtual const ObjectClassgetClass () const =0
 
ObjectgetNext () const
 
bool typeIs (const Urn &objectType) const
 
bool typeIs (const String &objectType) const
 
bool typeIs (const ObjectClass &objectClass) const
 
virtual Version version () const
 
- Public Member Functions inherited from UPnP::BaseObject
virtual void sendMessage (Message &msg, MessageSpec &ms)
 Called by framework to construct then send a message. More...
 
- Public Member Functions inherited from UPnP::LinkedItem
Itemnext () const override
 
LinkedItemgetNext () const
 
- Public Member Functions inherited from UPnP::Item
virtual ~Item ()
 
bool operator== (const Item &other) const
 

Protected Attributes

Description description_
 
std::unique_ptr< RootConfigrootConfig
 

Member Typedef Documentation

◆ List

◆ OwnedList

Constructor & Destructor Documentation

◆ DeviceControl() [1/2]

UPnP::DeviceControl::DeviceControl ( DeviceControl parent)
inline

◆ DeviceControl() [2/2]

UPnP::DeviceControl::DeviceControl ( DeviceControl parent = nullptr)
inline

Member Function Documentation

◆ configure()

bool UPnP::DeviceControl::configure ( XML::Node device)

Configure device using information from description document.

◆ configureRoot()

bool UPnP::DeviceControl::configureRoot ( ControlPoint controlPoint,
const String location,
XML::Node device 
)

Called on root device only during discovery.

◆ controlPoint()

ControlPoint& UPnP::DeviceControl::controlPoint ( ) const
inline

Get managing control point for this device.

◆ description()

const Description& UPnP::DeviceControl::description ( )
inline

Get device description.

◆ getDevice()

template<typename T >
DeviceControl* UPnP::DeviceControl::getDevice ( const T &  deviceType)
inline

Find a child device given its class.

Template Parameters
deviceTypeObjectClass or Urn of device to locate
Return values
DeviceControl*May be nullptr if not found

◆ getField()

String UPnP::DeviceControl::getField ( Field  desc) const
overridevirtual

Reimplemented from UPnP::Device.

◆ getNext()

DeviceControl* UPnP::DeviceControl::getNext ( )
inline

◆ getService()

template<typename T >
ServiceControl* UPnP::DeviceControl::getService ( const T &  serviceType)
inline

Find a service for this device given its class.

Template Parameters
serviceTypeObjectClass or Urn of service to locate
Return values
ServiceControl*May be nullptr if not found

◆ getUrl()

String UPnP::DeviceControl::getUrl ( const String path) const
inlineoverridevirtual

Get fully-qualified URL given a relative path.

Reimplemented from UPnP::Device.

◆ getUrlBasePath()

String UPnP::DeviceControl::getUrlBasePath ( ) const
inlineoverridevirtual

Get relative path for this device.

Reimplemented from UPnP::Device.

◆ onConnected()

virtual void UPnP::DeviceControl::onConnected ( HttpConnection connection)
inlinevirtual

Inherited classes may override this to pull out any additional information from received response headers, etc. Invoked after description has been processed.

Reimplemented in Dial::Client.

◆ parent()

DeviceControl& UPnP::DeviceControl::parent ( )
inline

◆ root() [1/2]

DeviceControl& UPnP::DeviceControl::root ( )
inline

Get the root device.

◆ root() [2/2]

const DeviceControl& UPnP::DeviceControl::root ( ) const
inline

◆ udn()

const String UPnP::DeviceControl::udn ( ) const
inline

Get UDN for this device.

Member Data Documentation

◆ description_

Description UPnP::DeviceControl::description_
protected

◆ rootConfig

std::unique_ptr<RootConfig> UPnP::DeviceControl::rootConfig
protected

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