Public Member Functions | Friends | Related Functions

# HResourceUnavailable Class Reference
[Ssdp]

Class that represents the device unavailable (ssdp:byebye) message. More...

`#include <HResourceUnavailable>`

List of all members.

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

## Detailed Description

According to the UDA, When a device and its services are going to be removed from the network, the device SHOULD multicast an ssdp:byebye message corresponding to each of the ssdp:alive messages it multicasted that have not already expired. In HUPnP this class represents such a message.

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

HResourceUnavailable | ( |  | ) |

Constructs a new, empty instance.

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

See also:
  isValid()

HResourceUnavailable | ( | const HDiscoveryType & | usn,
|  | qint32 | bootId = `-1`,
|  | qint32 | configId = `-1` |
| ) |  |  |

Creates a new instance.

Parameters:

  | 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.

See also:
  isValid()

## Member Function Documentation

HResourceUnavailable & operator= | ( | const HResourceUnavailable & | 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.

HDiscoveryType usn | ( |  | ) | const

Returns the Unique Service Name.

The Unique Service Name identifies a unique device or service instance.

Returns:
  the Unique Service Name. The returned object is invalid if this object is invalid.

See also:
  isValid()

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.

HEndpoint location | ( |  | ) | const

Returns the IP endpoint of the device that went offline.

Returns:
  the IP endpoint of the device that went offline.

## Friends And Related Function Documentation

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

Compares the two objects for equality.

Returns:
  true in case the objects are logically equivalent.

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

Compares the two objects for inequality.

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