Represents any kind of device, including a root device. More...
#include <Device.h>
Public Types | |
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 | |
Device (Device &parent) | |
Device (Device *parent=nullptr) | |
String | caption () const |
virtual String | getUrl (const String &path) const |
Get fully qualified URL. More... | |
virtual String | getUrlBasePath () const |
Get the base URL path. More... | |
String | resolvePath (const String &path) const |
Resolve a path (relative or absolute) into an absolute path. More... | |
Device & | root () |
const Device & | root () const |
bool | isRoot () const |
template<class S , typename T > | |
S * | getService (const T &serviceType) |
template<typename T > | |
Service * | getService (const T &serviceType) |
template<class D , typename T > | |
D * | getDevice (const T &deviceType) |
template<typename T > | |
Device * | getDevice (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... | |
virtual String | getField (Field desc) const |
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::Node * | getDescription (XML::Document &doc, DescType descType) const override |
IDataSourceStream * | createDescription () override |
Called by framework to construct a device description response stream. More... | |
ItemEnumerator * | getList (unsigned index, String &name) override |
void | sendXml (HttpResponse &response, IDataSourceStream *content) |
Device & | parent () |
Service::OwnedList & | services () |
OwnedList & | devices () |
Public Member Functions inherited from UPnP::ObjectTemplate< Device, Object > | |
Device * | getNext () const |
Iterator | begin () const |
Iterator | end () const |
Public Member Functions inherited from UPnP::Object | |
virtual const ObjectClass & | getClass () const =0 |
Object * | getNext () 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 | |
Item * | next () const override |
LinkedItem * | getNext () const |
Public Member Functions inherited from UPnP::Item | |
virtual | ~Item () |
bool | operator== (const Item &other) const |
Detailed Description
Represents any kind of device, including a root device.
Member Typedef Documentation
◆ List
using UPnP::Device::List = ObjectList<Device> |
◆ OwnedList
using UPnP::Device::OwnedList = OwnedObjectList<Device> |
Member Enumeration Documentation
◆ Field
|
strong |
Constructor & Destructor Documentation
◆ Device() [1/2]
|
inline |
◆ Device() [2/2]
|
inline |
Member Function Documentation
◆ addDevice()
|
inline |
◆ addService()
|
inline |
◆ caption()
|
inline |
◆ createDescription()
|
overridevirtual |
Called by framework to construct a device description response stream.
- Return values
-
IDataSourceStream* The XML description content
By default, the framework generates a stream constructed from the device information fields, but this method may be overridden if, for example, a fixed description is stored in an .xml file.
Reimplemented from UPnP::Object.
◆ devices()
|
inline |
◆ formatMessage()
|
overridevirtual |
Standard fields have been completed.
- Note
- Fields can be modified typically by adding any custom fields before sending response.
- Parameters
-
msg The message being constructed ms Template spec. for message
- Return values
-
bool Return true to send message, false to cancel
Implements UPnP::BaseObject.
◆ friendlyName()
|
inline |
◆ getDescription()
|
overridevirtual |
Reimplemented from UPnP::Item.
◆ getDevice() [1/2]
|
inline |
◆ getDevice() [2/2]
|
inline |
◆ getField()
Reimplemented in UPnP::DeviceControl.
◆ getList()
|
overridevirtual |
Reimplemented from UPnP::Item.
◆ getService() [1/2]
|
inline |
◆ getService() [2/2]
|
inline |
◆ getUrl()
Get fully qualified URL.
Reimplemented in UPnP::DeviceControl.
◆ getUrlBasePath()
|
virtual |
Get the base URL path.
Reimplemented in UPnP::DeviceControl.
◆ isRoot()
|
inline |
◆ objectType()
|
inlineoverridevirtual |
Reimplemented from UPnP::Object.
◆ onHttpRequest()
|
overridevirtual |
Called by framework to handle an incoming HTTP request.
- Parameters
-
connection request response
- Return values
-
bool true if request was handled
Reimplemented from UPnP::Object.
◆ parent()
|
inline |
◆ resolvePath()
Resolve a path (relative or absolute) into an absolute path.
◆ root() [1/2]
Device& UPnP::Device::root | ( | ) |
◆ root() [2/2]
|
inline |
◆ search()
|
overridevirtual |
Called during SSDP search operation.
Implements UPnP::Object.
◆ sendXml()
void UPnP::Device::sendXml | ( | HttpResponse & | response, |
IDataSourceStream * | content | ||
) |
◆ services()
|
inline |
The documentation for this class was generated from the following file: