Public Member Functions | Friends | Related Functions

# HResourceUpdate Class Reference
[Ssdp]

Class representing the device update (ssdp:update) message. More...

`#include <HResourceUpdate>`

List of all members.

## Public Member Functions
| HResourceUpdate ()
| HResourceUpdate (const QUrl &location, const HDiscoveryType &usn, qint32 bootId=-1, qint32 configId=-1, qint32 nextBootId=-1, qint32 searchPort=-1)
HResourceUpdate & | operator= (const HResourceUpdate &)
bool | isValid (HValidityCheckLevel level) const
QUrl | location () const
HDiscoveryType | usn () const
qint32 | bootId () const
qint32 | configId () const
qint32 | nextBootId () const
qint32 | searchPort () const
## Friends
H_UPNP_CORE_EXPORT bool | operator== (const HResourceUpdate &, const HResourceUpdate &)
## Related Functions
(Note that these are not member functions.)
H_UPNP_CORE_EXPORT bool | operator!= (const HResourceUpdate &, const HResourceUpdate &)

## Detailed Description

Usually, you create instances of this class to be sent by the Herqq::Upnp::HSsdp, or you receive instances of this class from the Herqq::Upnp::HSsdp.

Remarks:
  the class provides an assignment operator, which is not thread-safe.

See also:
  HSsdp

## Constructor & Destructor Documentation

HResourceUpdate | ( |  | ) |

Constructs a new, empty instance.

The constructed object is not valid, i.e isValid() returns false.

See also:
  isValid()

HResourceUpdate | ( | const QUrl & | location,
|  | const HDiscoveryType & | usn,
|  | qint32 | bootId = `-1`,
|  | qint32 | configId = `-1`,
|  | qint32 | nextBootId = `-1`,
|  | qint32 | searchPort = `-1` |
| ) |  |  |

Constructs a new instance using the specified parameters.

Parameters:

  | location | specifies the URL to the UPnP description of the root device. If the location is invalid or empty the created object will be invalid.
  | usn | specifies the Unique Service Name. The created object is invalid if the provided USN is invalid.
  | bootId | specifies the `BOOTID.UPNP.ORG` header value. Note that this is mandatory in UDA v1.1, whereas it is not specified at all in UDA v1.0.
  | configId | specifies the `CONFIGID.UPNP.ORG` header value. Note that this is mandatory in UDA v1.1, whereas it is not specified at all in UDA v1.0
  | nextBootId |
  | searchPort | specifies the `SEARCHPORT.UPNP.ORG` header value. Note that this is optional in UDA v1.1, whereas it is not specified at all in UDA v1.0. If specified, this is the port at which the device must listen for unicast `M-SEARCH` messages. Otherwise the port is by default `1900`. This parameter is optional.

Remarks:
  if searchPort is smaller than 49152 or larger than 65535 it is set to -1. This is specified in the UDA v1.1.

## Member Function Documentation

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

Assigns the contents of the other to this.

Returns:
  a reference to this object.

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

Indicates whether or not the object contains valid announcement information.

Parameters:

  | level | indicates whether the check should be strictly according to the UDA specification. If set to false some checks are omitted that are known to be poorly implemented in some UPnP software.

Returns:
  true in case the objects contains valid announcement information in terms of the requested strictness.

QUrl location | ( |  | ) | const

Returns the location of the announced device.

Returns:
  the location of the announced device. This is the URL where the device description can be retrieved. The returned object will be empty if this object is invalid.

See also:
  isValid()

HDiscoveryType usn | ( |  | ) | const

Returns the Unique Service Name.

Returns:
  the Unique Service Name.

qint32 bootId | ( |  | ) | const

Returns the value of `BOOTID.UPNP.ORG`.

Returns:
  the value of `BOOTID.UPNP.ORG`. If the value is not specified -1 is returned.

qint32 configId | ( |  | ) | const

Returns the value of `CONFIGID.UPNP.ORG`.

Returns:
  the value of `CONFIGID.UPNP.ORG`. If the value is not specified -1 is returned.

qint32 nextBootId | ( |  | ) | const

Returns:
  If the value is not specified -1 is returned.

qint32 searchPort | ( |  | ) | const

Returns the value of `SEARCHPORT.UPNP.ORG` header field.

Returns:
  the value of `SEARCHPORT.UPNP.ORG` header field. If the value is not specified -1 is returned.

## Friends And Related Function Documentation

H_UPNP_CORE_EXPORT bool operator== | ( | const HResourceUpdate & | ,
|  | const HResourceUpdate & |  |
| ) |  |  | `[friend]`

Compares the two objects for equality.

Returns:
  true in case the objects are logically equivalent.

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

Compares the two objects for inequality.

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