Public Member Functions

HServicesSetupData Class Reference
[Device Model]

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

#include <HServicesSetupData>

List of all members.

Public Member Functions

 HServicesSetupData ()
 ~HServicesSetupData ()
HServiceSetup get (const HServiceId &id) const
bool contains (const HServiceId &id) const
bool isEmpty () const
int size () const
QSet< HServiceIdserviceIds () const
bool insert (const HServiceSetup &newItem, bool overWrite=false)
bool remove (const HServiceId &id)

Detailed Description

Remarks:
This class is not thread-safe.

Constructor & Destructor Documentation

Creates a new, empty instance.

See also:
isEmpty()

Destroys the instance.


Member Function Documentation

HServiceSetup get ( const HServiceId id ) const

Retrieves a service setup object.

Parameters:
idspecifies the service ID of the item.
Returns:
the item with the specified service ID. Note that the returned item is invalid, i.e. HServiceSetup::isValid() returns false in case no item with the specified service ID was found.
See also:
contains()
bool contains ( const HServiceId id ) const

Indicates if the instance contains a service setup item that has the specified service ID.

Parameters:
idspecifies the service ID of the item.
Returns:
true if the instance contains an item with the specified service ID.
See also:
get()
bool isEmpty (  ) const

Indicates if the object is empty.

Returns:
true in case the instance has no items.
int size (  ) const

Returns the number of contained items.

Returns:
the number of contained items.
QSet< HServiceId > serviceIds (  ) const

Returns the service IDs of the contained items.

Returns:
the service IDs of the contained items.
bool insert ( const HServiceSetup newItem,
bool  overWrite = false 
)

Inserts a new item.

Parameters:
newItemspecifies the item to be added.
overWritespecifies whether to replace an already existing item with the same service ID. The default is false.
Returns:
true in case the item was added. The newItem will not be added if the instance already contains an item that has the same HServiceSetup::serviceId() as the newItem and the overWrite is false, or the newItem is invalid.
bool remove ( const HServiceId id )

Removes an existing item.

Parameters:
idspecifies the service ID of the item to be removed.
Returns:
true in case the item was found and removed.