Herqq
|
This is a class that represents the resource available (ssdp:alive) message. More...
#include <HResourceAvailable>
Public Member Functions | |
HResourceAvailable () | |
HResourceAvailable (qint32 cacheControlMaxAge, const QUrl &location, const HProductTokens &serverTokens, const HDiscoveryType &usn, qint32 bootId=-1, qint32 configId=-1, qint32 searchPort=-1) | |
~HResourceAvailable () | |
HResourceAvailable (const HResourceAvailable &) | |
HResourceAvailable & | operator= (const HResourceAvailable &) |
bool | isValid (HValidityCheckLevel level) const |
const HProductTokens & | serverTokens () const |
QUrl | location () const |
const HDiscoveryType & | usn () const |
qint32 | cacheControlMaxAge () const |
qint32 | bootId () const |
qint32 | configId () const |
qint32 | searchPort () const |
Friends | |
H_UPNP_CORE_EXPORT bool | operator== (const HResourceAvailable &, const HResourceAvailable &) |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator!= (const HResourceAvailable &obj1, const HResourceAvailable &obj2) |
This is a class that represents the resource available (ssdp:alive) message.
According to the UDA, When a device is added to the network, it MUST multicast discovery messages to advertise its root device, any embedded devices, and any services. In HUPnP this class represents such an advertisement.
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.
HResourceAvailable | ( | qint32 | cacheControlMaxAge, |
const QUrl & | location, | ||
const HProductTokens & | serverTokens, | ||
const HDiscoveryType & | usn, | ||
qint32 | bootId = -1 , |
||
qint32 | configId = -1 , |
||
qint32 | searchPort = -1 |
||
) |
Constructs a new instance using the specified parameters.
cacheControlMaxAge | specifies the number of seconds the advertisement is valid. |
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 by default 1900 . This parameter is optional. |
~HResourceAvailable | ( | ) |
Destroys the instance.
HResourceAvailable | ( | const HResourceAvailable & | other | ) |
Copy constructor.
Copies the contents of the other object instance to this.
HResourceAvailable & operator= | ( | const HResourceAvailable & | other | ) |
Assigns the contents of the other object instance 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 HProductTokens & serverTokens | ( | ) | const |
Returns the server tokens.
QUrl location | ( | ) | const |
Returns the location of the announced device.
const HDiscoveryType & usn | ( | ) | const |
Returns the Unique Service Name.
The Unique Service Name identifies a unique device or service instance.
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 HResourceAvailable & | , |
const HResourceAvailable & | |||
) | [friend] |
Compares the two objects for equality.
bool operator!= | ( | const HResourceAvailable & | obj1, |
const HResourceAvailable & | obj2 | ||
) | [related] |
Compares the two objects for inequality.