Herqq
Public Types | Public Member Functions

HStateVariablesSetupData Class Reference

This class is used to specify information that can be used to validate UPnP state variables. More...

#include <HStateVariablesSetupData>

List of all members.

Public Types

enum  DefaultInclusionPolicy { Accept, Deny }

Public Member Functions

 HStateVariablesSetupData (DefaultInclusionPolicy defIncPol=Accept)
DefaultInclusionPolicy defaultInclusionPolicy () const
bool contains (const QString &name) const
HStateVariableInfo get (const QString &name) const
bool isEmpty () const
QSet< QString > names () const
qint32 size () const
bool insert (const HStateVariableInfo &newItem)
bool remove (const QString &name)
bool setInclusionRequirement (const QString &name, HInclusionRequirement incReq)

Detailed Description

This class is used to specify information that can be used to validate UPnP state variables.

Remarks:
This class is not thread-safe.

Member Enumeration Documentation

This enumeration specifies the actions the HUPnP device model builder should take when it encounters an unknown state variable definition in a service description file.

Enumerator:
Accept 

The unknown state variable should be accepted.

Deny 

The unknown state variable should be rejected.

In this case the build of a device tree is aborted.


Constructor & Destructor Documentation

Creates a new, empty instance.

Parameters:
defIncPolspecifies the default inclusion policy for state variables that are not contained in this instance.
See also:
isEmpty(), defaultInclusionPolicy()

Member Function Documentation

HStateVariablesSetupData::DefaultInclusionPolicy defaultInclusionPolicy ( ) const

Returns the default inclusion policy.

The default inclusion policy specifies the action to take when a state variable definition in a service description file does not map to any HStateVariableInfo object contained within this instance.

Returns:
The default inclusion policy.
bool contains ( const QString &  name) const

Indicates if the instance contains an item that has the specified name.

Parameters:
namespecifies the name of the item.
Returns:
true when the instance contains an item that has the specified name.
See also:
get(), isEmpty()
HStateVariableInfo get ( const QString &  name) const

Retrieves an item.

Parameters:
namespecifies the name of the item to be retrieved.
Returns:
The item with the specified name. Note that the returned item is invalid, i.e. HStateVariableInfo::isValid() returns false in case no item with the specified name was found.
See also:
contains(), isEmpty()
bool isEmpty ( ) const

Indicates if the object is empty.

Returns:
true in case the instance has no items.
QSet< QString > names ( ) const

Returns the names of the contained items.

Returns:
The names of the contained items.
qint32 size ( ) const

Returns the number of contained items.

Returns:
The number of contained items.
bool insert ( const HStateVariableInfo newItem)

Inserts a new item.

Parameters:
newItemspecifies the item to be added.
Returns:
true in case the item was added. The item will not be added if the instance already contains an item that has the same name as the newItem.
See also:
remove()
bool remove ( const QString &  name)

Removes an existing item.

Parameters:
namespecifies the name of the item to be removed.
Returns:
true in case the item was found and removed.
See also:
insert()
bool setInclusionRequirement ( const QString &  name,
HInclusionRequirement  incReq 
)

Sets the inclusion requirement element of an item.

Parameters:
namespecifies the name of the item.
incReqspecifies the inclusion requirement value.
Returns:
true when the item was found and the inclusion requirement element was set.