Public Member Functions | Friends | Related Functions

# HServiceInfo Class Reference
[Common]

This class is used to contain information of a UPnP service found in a UPnP device description document. More...

`#include <HServiceInfo>`

List of all members.

## Public Member Functions
| HServiceInfo ()
| HServiceInfo (const HServiceId &serviceId, const HResourceType &serviceType, const QUrl &controlUrl, const QUrl &eventSubUrl, const QUrl &scpdUrl, HInclusionRequirement incReq=InclusionMandatory, HValidityCheckLevel checkLevel=StrictChecks, QString *err=0)
| ~HServiceInfo ()
| HServiceInfo (const HServiceInfo &other)
HServiceInfo & | operator= (const HServiceInfo &other)
bool | isValid (HValidityCheckLevel level) const
const HServiceId & | serviceId () const
const HResourceType & | serviceType () const
QUrl | scpdUrl () const
QUrl | controlUrl () const
QUrl | eventSubUrl () const
HInclusionRequirement | inclusionRequirement () const
## Friends
H_UPNP_CORE_EXPORT bool | operator== (const HServiceInfo &obj1, const HServiceInfo &obj2)
## Related Functions
(Note that these are not member functions.)
H_UPNP_CORE_EXPORT bool | operator!= (const HServiceInfo &, const HServiceInfo &)

## Detailed Description

A device description defines a UPnP device and among other things, the definition includes the declarations of the services the device contains. This class contains the service declaration information.

Remarks:
  this class is not thread-safe.

See also:
  HService, HDeviceInfo, HActionInfo and HStateVariableInfo.

## Constructor & Destructor Documentation

HServiceInfo | ( |  | ) |

Creates a new, empty instance.

See also:
  isValid()

HServiceInfo | ( | const HServiceId & | serviceId,
|  | const HResourceType & | serviceType,
|  | const QUrl & | controlUrl,
|  | const QUrl & | eventSubUrl,
|  | const QUrl & | scpdUrl,
|  | HInclusionRequirement | incReq = `InclusionMandatory`,
|  | HValidityCheckLevel | checkLevel = `StrictChecks`,
|  | QString * | err = `0` |
| ) |  |  |

Constructs a new instance from the specified parameters that the UDA specification mandates for a UPnP service.

The parameters the constructor expects are arguments defined in the device description document and they are all mandatory for a valid UPnP service.

Parameters:

  | serviceId | specifies the identifier of the service.
  | serviceType | specifies the type of the service.
  | controlUrl | specifies the URL for control.
  | eventSubUrl | specifies the URL for eventing.
  | scpdUrl | specifies the URL for service description.
  | incReq | specifies whether the service is required or optional. This parameter is optional.
  | checkLevel | specifies the level of strictness used in validating the specified arguments. This parameter is optional.
  | err | specifies a pointer to a `QString` that will contain an error description in case the construction failed. This is optional.

Remarks:
  in case any of the provided arguments does not meet the specified requirements, the created object is invalid.

See also:
  isValid()

~HServiceInfo | ( |  | ) |

Destroys the instance.

HServiceInfo | ( | const HServiceInfo & | other | ) |

Copy constructor.

Copies the contents of the `other` to this.

Parameters:

  | other | specifies the object to be copied.

## Member Function Documentation

HServiceInfo & operator= | ( | const HServiceInfo & | other | ) |

Assignment operator.

Assigns the contents of the other to this.

Parameters:

  | other | specifies the object to be copied.

bool isValid | ( | HValidityCheckLevel | level | ) | const

Indicates if the object is valid.

A valid object contains the mandatory data of a UPnP service.

Parameters:

  | level | specifies the level of strictness used in validating the object. This parameter is optional and the default level is strict.

Returns:
  true in case the object is valid.

const HServiceId & serviceId | ( |  | ) | const

Returns the service identifier found in the device description file.

Returns:
  the service identifier found in the device description file.

const HResourceType & serviceType | ( |  | ) | const

Returns the type of the service found in the device description file.

Returns:
  the type of the service found in the device description file.

QUrl scpdUrl | ( |  | ) | const

Returns the URL for service description.

This is the URL where the service description can be retrieved. This is defined in the device description.

Returns:
  the URL for service description.

QUrl controlUrl | ( |  | ) | const

Returns the URL for control.

This is the URL to which the action invocations must be sent. This is defined in the device description.

Returns:
  the URL for control.

QUrl eventSubUrl | ( |  | ) | const

Returns the URL for eventing.

This is the URL to which subscriptions and un-subscriptions are sent. This is defined in the device description.

Returns:
  the URL for eventing.

HInclusionRequirement inclusionRequirement | ( |  | ) | const

Indicates whether the service is required or optional.

Returns:
  value indicating whether the service is required or optional.

## Friends And Related Function Documentation

H_UPNP_CORE_EXPORT bool operator== | ( | const HServiceInfo & | obj1,
|  | const HServiceInfo & | obj2 |
| ) |  |  | `[friend]`

Compares the two objects for equality.

Returns:
  true in case the objects are logically equivalent.

H_UPNP_CORE_EXPORT bool operator!= | ( | const HServiceInfo & | ,
|  | const HServiceInfo & |  |
| ) |  |  | `[related]`

Compares the two objects for inequality.

Returns:
  true in case the objects are not logically equivalent.