Class representing an M-SEARCH (ssdp:discover) message. More...
#include <HDiscoveryRequest>
Public Member Functions | |
HDiscoveryRequest () | |
HDiscoveryRequest (qint32 mx, const HDiscoveryType &resource, const HProductTokens &userAgent) | |
~HDiscoveryRequest () | |
HDiscoveryRequest (const HDiscoveryRequest &) | |
HDiscoveryRequest & | operator= (const HDiscoveryRequest &) |
bool | isValid (HValidityCheckLevel level) const |
const HDiscoveryType & | searchTarget () const |
qint32 | mx () const |
const HProductTokens & | userAgent () const |
Friends | |
H_UPNP_CORE_EXPORT bool | operator== (const HDiscoveryRequest &, const HDiscoveryRequest &) |
Related Functions | |
(Note that these are not member functions.) | |
H_UPNP_CORE_EXPORT bool | operator!= (const HDiscoveryRequest &, const HDiscoveryRequest &) |
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.
HDiscoveryRequest | ( | qint32 | mx, |
const HDiscoveryType & | resource, | ||
const HProductTokens & | userAgent | ||
) |
Creates a new instance based on the provided parameters.
The constructed object will be invalid, i.e. isValid() returns false in case the provided information is invalid.
mx | specifies the maximum wait time in seconds. |
resource | specifies the Search Target (ST). If the object is invalid, the created object will be invalid. |
userAgent | specifies information about the requester. |
~HDiscoveryRequest | ( | ) |
Destroys the instance.
HDiscoveryRequest | ( | const HDiscoveryRequest & | other ) |
Copy constructor.
Copies the contents of other
to this.
HDiscoveryRequest & operator= | ( | const HDiscoveryRequest & | other ) |
Assigns the contents of the other to this.
bool isValid | ( | HValidityCheckLevel | level ) | const |
Indicates whether or not the object contains valid announcement information.
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. |
const HDiscoveryType & searchTarget | ( | ) | const |
Returns the Search Target of the request.
qint32 mx | ( | ) | const |
Returns the maximum wait time in seconds.
According to UDA, Device responses SHOULD be delayed a random duration between 0 and this many seconds to balance load for the control point when it processes responses.
const HProductTokens & userAgent | ( | ) | const |
Returns information about the maker of the request.
H_UPNP_CORE_EXPORT bool operator== | ( | const HDiscoveryRequest & | , |
const HDiscoveryRequest & | |||
) | [friend] |
Compares the two objects for equality.
H_UPNP_CORE_EXPORT bool operator!= | ( | const HDiscoveryRequest & | , |
const HDiscoveryRequest & | |||
) | [related] |
Compares the two objects for inequality.