A client-side class that represents a server-side UPnP service. More...
#include <HClientService>
Inherited by HDefaultClientService.
Public Slots | |
void | notifyListeners () |
Signals | |
void | stateChanged (const Herqq::Upnp::HClientService *source) |
Public Member Functions | |
virtual | ~HClientService ()=0 |
HClientDevice * | parentDevice () const |
const HServiceInfo & | info () const |
QString | description () const |
const HClientActions & | actions () const |
const HClientStateVariables & | stateVariables () const |
bool | isEvented () const |
Protected Member Functions | |
HClientService (const HServiceInfo &info, HClientDevice *parentDevice) |
HClientService
is a core component of the HUPnP's client-side Device Model and it models a UPnP service. The UPnP Device Architecture specifies a UPnP service as "Logical functional unit. Smallest units of control. Exposes
actions and models the state of a physical device with state variables". In other words, a UPnP service is the entry point for accessing certain type of functionality and state of the containing device.
You can retrieve the containing device, the parent device, using parentDevice(). You can retrieve all the actions the service contains by calling actions(), Similarly, you can retrieve all the state variables of the service by calling stateVariables().
The class exposes all the details in the device description concerning a service through info(). From the returned HServiceInfo object you can retrieve the serviceId and serviceType along with various URLs found in the device description, such as the:
However, the above URLs usually provide informational value only, since HUPnP provides a simpler interface for everything those URLs expose:
HClientService | ( | const HServiceInfo & | info, |
HClientDevice * | parentDevice | ||
) | [protected] |
Creates a new instance.
info | specifies information of the service. |
parentDevice | specifies the device instance that contains this service. |
Default constructor for derived classes.
~HClientService | ( | ) | [pure virtual] |
Destroys the instance.
HClientDevice * parentDevice | ( | ) | const |
Returns the parent HClientDevice that contains this service instance.
const HServiceInfo & info | ( | ) | const |
Returns information about the service.
QString description | ( | ) | const |
Returns the full service description.
const HClientActions & actions | ( | ) | const |
Returns the actions the service supports.
const HClientStateVariables & stateVariables | ( | ) | const |
Returns the state variables of the service.
bool isEvented | ( | ) | const |
Indicates whether or not the service contains state variables that are evented.
void notifyListeners | ( | ) | [slot] |
Explicitly forces stateChanged() event to be emitted if the service is evented.
Otherwise this method does nothing.
void stateChanged | ( | const Herqq::Upnp::HClientService * | source ) | [signal] |
This signal is emitted when the state of one or more state variables has changed.
source | specifies the source of the event. |