Herqq
|
This is a class that represents a response to a HDiscoveryRequest. More...
#include <HDiscoveryResponse>
Public Member Functions | |
HDiscoveryResponse () | |
HDiscoveryResponse (qint32 cacheControlMaxAge, const QDateTime &date, const QUrl &location, const HProductTokens &serverTokens, const HDiscoveryType &usn, qint32 bootId=-1, qint32 configId=0, qint32 searchPort=-1) | |
HDiscoveryResponse (const HDiscoveryResponse &) | |
HDiscoveryResponse & | operator= (const HDiscoveryResponse &) |
~HDiscoveryResponse () | |
bool | isValid (HValidityCheckLevel level) const |
const HProductTokens & | serverTokens () const |
QDateTime | date () const |
const HDiscoveryType & | usn () const |
QUrl | location () const |
qint32 | cacheControlMaxAge () const |
qint32 | bootId () const |
qint32 | configId () const |
qint32 | searchPort () const |
Friends | |
H_UPNP_CORE_EXPORT bool | operator== (const HDiscoveryResponse &, const HDiscoveryResponse &) |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator!= (const HDiscoveryResponse &obj1, const HDiscoveryResponse &obj2) |
This is a class that represents a response to a 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.
HDiscoveryResponse | ( | qint32 | cacheControlMaxAge, |
const QDateTime & | date, | ||
const QUrl & | location, | ||
const HProductTokens & | serverTokens, | ||
const HDiscoveryType & | usn, | ||
qint32 | bootId = -1 , |
||
qint32 | configId = 0 , |
||
qint32 | searchPort = -1 |
||
) |
Constructs a new instance using the specified parameters.
The constructed object will be invalid, i.e. isValid() returns false in case the provided information is invalid.
cacheControlMaxAge | specifies the number of seconds the advertisement is valid. |
date | |
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. |
serverTokens | specifies information about the host, the UPnP version used and of the product. Note that if this parameter specifies UPnP version 1.1 or later, bootId and configId have to be properly defined. Otherwise the created object will be invalid. |
usn | specifies the Unique Service Name. The created object is valid only if the provided USN is valid. |
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. Because of this the class requires a valid value (>= 0) only in case the serverTokens identify UPnP v1.1 or later. |
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. Because of this, the class requires a valid value (>= 0) only in case the serverTokens identify UPnP v1.1 or later. |
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 the default 1900 . This parameter is optional. |
HDiscoveryResponse | ( | const HDiscoveryResponse & | other | ) |
Copy constructor.
Copies the contents of other
to this.
~HDiscoveryResponse | ( | ) |
Destroys the instance.
HDiscoveryResponse & operator= | ( | const HDiscoveryResponse & | other | ) |
Assigns the contents of the other to this.
Makes a deep copy.
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 HProductTokens & serverTokens | ( | ) | const |
Returns the server tokens.
QDateTime date | ( | ) | const |
Returns the date when the response was generated.
const HDiscoveryType & usn | ( | ) | const |
Returns the Unique Service Name.
The Unique Service Name identifies a unique device or service instance.
QUrl location | ( | ) | const |
Returns the location of the announced device.
qint32 cacheControlMaxAge | ( | ) | const |
Returns the number of seconds the advertisement is valid.
qint32 bootId | ( | ) | const |
Returns the value of BOOTID.UPNP.ORG
.
BOOTID.UPNP.ORG
. If the value is not specified -1 is returned. qint32 configId | ( | ) | const |
Returns the value of CONFIGID.UPNP.ORG
.
CONFIGID.UPNP.ORG
. If the value is not specified -1 is returned. qint32 searchPort | ( | ) | const |
Returns the value of SEARCHPORT.UPNP.ORG
header field.
SEARCHPORT.UPNP.ORG
header field. If the value is not specified -1 is returned. H_UPNP_CORE_EXPORT bool operator== | ( | const HDiscoveryResponse & | , |
const HDiscoveryResponse & | |||
) | [friend] |
Compares the two objects for equality.
bool operator!= | ( | const HDiscoveryResponse & | obj1, |
const HDiscoveryResponse & | obj2 | ||
) | [related] |
Compares the two objects for inequality.