UPnP::ServiceControl Class Reference
#include <ServiceControl.h>
Inheritance diagram for UPnP::ServiceControl:
Collaboration diagram for UPnP::ServiceControl:
Classes | |
struct | Description |
Public Types | |
using | List = ObjectList< ServiceControl > |
using | OwnedList = OwnedObjectList< ServiceControl > |
using | Field = Service::Field |
Public Types inherited from UPnP::Service | |
enum class | Field { XX , customStart = domain , MAX } |
using | List = ObjectList< Service > |
using | OwnedList = OwnedObjectList< Service > |
Public Types inherited from UPnP::Object | |
using | Version = ObjectClass::Version |
Public Member Functions | |
ServiceControl ()=delete | |
ServiceControl (const ServiceControl &)=delete | |
ServiceControl (DeviceControl &device) | |
DeviceControl & | root () |
Get the root device. More... | |
const DeviceControl & | root () const |
String | getField (Field desc) const override |
ServiceControl * | getNext () const |
bool | sendRequest (HttpRequest *request) const override |
Implemented in ServiceControl. More... | |
Error | handleAction (ActionRequest &req) override |
An action request has been received. More... | |
bool | configure (const XML::Node *service) |
Called during initialisation to configure this object. More... | |
DeviceControl & | device () const |
const Description & | description () |
Get service description. More... | |
Public Member Functions inherited from UPnP::Service | |
Service (Device &device) | |
Device & | root () |
String | caption () const |
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... | |
bool | onHttpRequest (HttpServerConnection &connection) override |
Called by framework to handle an incoming HTTP request. More... | |
Urn | objectType () const override |
String | serviceId () const |
XML::Node * | getDescription (XML::Document &doc, DescType descType) const override |
IDataSourceStream * | createDescription () override |
Called by framework to construct a device description response stream. More... | |
Device & | device () const |
Public Member Functions inherited from UPnP::ObjectTemplate< Service, Object > | |
Service * | 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 () |
virtual ItemEnumerator * | getList (unsigned index, String &name) |
bool | operator== (const Item &other) const |
Member Typedef Documentation
◆ Field
◆ List
◆ OwnedList
Constructor & Destructor Documentation
◆ ServiceControl() [1/3]
|
delete |
◆ ServiceControl() [2/3]
|
delete |
◆ ServiceControl() [3/3]
|
inline |
Member Function Documentation
◆ configure()
bool UPnP::ServiceControl::configure | ( | const XML::Node * | service | ) |
Called during initialisation to configure this object.
◆ description()
|
inline |
Get service description.
◆ device()
|
inline |
◆ getField()
Reimplemented from UPnP::Service.
◆ getNext()
|
inline |
◆ handleAction()
|
inlineoverridevirtual |
An action request has been received.
- Parameters
-
env Contains the action request
- Return values
-
ErrorCode Implementation should place response into env
after reading parameters, e.g.:if(env.actionName() == "MyAction") { String arg1; int arg2; env.getArg("arg1", arg1); env.getArg("arg2", arg2); auto& response = env.createResponse(); // Process command here int arg3 = processMyAction(arg1, arg2); response.setArg("arg3", arg3); return ErrorCode::Success; } return ErrorCode::InvalidAction;
This is usually handled by generated wrapper class templates.
Implements UPnP::Service.
◆ root() [1/2]
|
inline |
Get the root device.
◆ root() [2/2]
|
inline |
◆ sendRequest()
|
overridevirtual |
Implemented in ServiceControl.
Reimplemented from UPnP::Service.
The documentation for this class was generated from the following file: