Public Member Functions

HDeviceModelInfoProvider Class Reference
[Device Model]

A protocol class for providing information that is used to validate components of UPnP's device architecture and to setup components of HUPnP's device model. More...

#include <HDeviceModelInfoProvider>

Inheritance diagram for HDeviceModelInfoProvider:
HClonable

List of all members.

Public Member Functions

 HDeviceModelInfoProvider ()
virtual ~HDeviceModelInfoProvider ()=0
virtual HServicesSetupData servicesSetupData (const HDeviceInfo &info) const
virtual HDevicesSetupData embedddedDevicesSetupData (const HDeviceInfo &info) const
virtual HActionsSetupData actionsSetupData (const HServiceInfo &serviceInfo, const HDeviceInfo &parentDeviceInfo) const
virtual HStateVariablesSetupData stateVariablesSetupData (const HServiceInfo &serviceInfo, const HDeviceInfo &parentDeviceInfo) const
virtual HDeviceModelInfoProviderclone () const

Detailed Description

The main purpose of this class is to define an interface that enables the users to provide information that HUPnP can use for verification and validation purposes. Although optional, this information can be especially useful when provided to HDeviceHost via HDeviceHostConfiguration. This enables HUPnP to use the information to verify that device and service descriptions are setup according to the specified information.

The benefit of this is that your custom device model components can rest assured that all the required state variables, actions, services and embedded devices are properly defined and initialized before the instantiation of the HUPnP's device model (device tree) is published for control points to use.

The benefits of this may be somewhat difficult to realize at first, since most of the time it is you, the user, who provides the implementation and the description documents. Apart from inadvertent mistakes, you usually get those right. However, when someone else provides the implementation of the HUPnP's device model or the description documents, mismatches can easily occur and this is where the benefits of this additional information are truly useful. Remember, in UPnP architecture the description documents are used to marshal device model information from servers to clients. If the description documents do not accurately reflect the server-side implementation, the client-side may not be able to correctly invoke the server-side.

See also:
Device Hosting, HDeviceHostConfiguration

Constructor & Destructor Documentation

Creates a new instance.

~HDeviceModelInfoProvider (  ) [pure virtual]

Destroys the instance.


Member Function Documentation

HServicesSetupData servicesSetupData ( const HDeviceInfo info ) const [virtual]

Returns information of the services contained or possibly contained by the specified device type.

Parameters:
infospecifies the device type.
Returns:
information of the services contained or possibly contained by the specified device type.
HDevicesSetupData embedddedDevicesSetupData ( const HDeviceInfo info ) const [virtual]

Returns information of the embedded devices contained or possibly contained by the specified device type.

Parameters:
infospecifies the device type.
Returns:
information of the embedded devices contained or possibly contained by the specified device type.
HActionsSetupData actionsSetupData ( const HServiceInfo serviceInfo,
const HDeviceInfo parentDeviceInfo 
) const [virtual]

Returns information of the actions contained or possibly contained by the specified service type.

Parameters:
serviceInfospecifies the service type.
parentDeviceInfospecifies information about the parent UPnP device that contains this service.
Returns:
information of the actions contained or possibly contained by the specified service type.
HStateVariablesSetupData stateVariablesSetupData ( const HServiceInfo serviceInfo,
const HDeviceInfo parentDeviceInfo 
) const [virtual]

Returns information of the state variables contained or possibly contained by the specified service type.

Parameters:
serviceInfospecifies the service type.
parentDeviceInfospecifies information about the parent UPnP device that contains this service.
Returns:
information of the state variables contained or possibly contained by the specified service type.
HDeviceModelInfoProvider * clone (  ) const [virtual]

Returns a deep copy of the instance.

Returns:
a deep copy of the instance.
Remarks:
  • the ownership of the returned object is transferred to the caller.

Reimplemented from HClonable.