Herqq
|
This class is used to contain information of a UPnP device found in a UPnP device description document. More...
#include <HDeviceInfo>
Public Member Functions | |
HDeviceInfo () | |
HDeviceInfo (const HResourceType &deviceType, const QString &friendlyName, const QString &manufacturer, const QString &modelName, const HUdn &udn, HValidityCheckLevel checkLevel=StrictChecks, QString *err=0) | |
HDeviceInfo (const HResourceType &deviceType, const QString &friendlyName, const QString &manufacturer, const QUrl &manufacturerUrl, const QString &modelDescription, const QString &modelName, const QString &modelNumber, const QUrl &modelUrl, const QString &serialNumber, const HUdn &udn, const QString &upc, const QList< QUrl > &icons, const QUrl &presentationUrl, HValidityCheckLevel checkLevel=StrictChecks, QString *err=0) | |
~HDeviceInfo () | |
HDeviceInfo (const HDeviceInfo &other) | |
HDeviceInfo & | operator= (const HDeviceInfo &other) |
bool | isValid (HValidityCheckLevel level) const |
void | setManufacturerUrl (const QUrl &arg) |
void | setModelDescription (const QString &arg) |
void | setModelNumber (const QString &arg) |
void | setModelUrl (const QUrl &arg) |
void | setSerialNumber (const QString &arg) |
void | setUpc (const QString &arg) |
void | setIcons (const QList< QUrl > &arg) |
void | setPresentationUrl (const QUrl &arg) |
const HResourceType & | deviceType () const |
QString | friendlyName () const |
QString | manufacturer () const |
QUrl | manufacturerUrl () const |
QString | modelDescription () const |
QString | modelName () const |
QString | modelNumber () const |
QUrl | modelUrl () const |
QString | serialNumber () const |
const HUdn & | udn () const |
QString | upc () const |
QList< QUrl > | icons () const |
QUrl | presentationUrl () const |
Friends | |
H_UPNP_CORE_EXPORT bool | operator== (const HDeviceInfo &obj1, const HDeviceInfo &obj2) |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator!= (const HDeviceInfo &obj1, const HDeviceInfo &obj2) |
This class is used to contain information of a UPnP device found in a UPnP device description document.
A device description specifies a UPnP device. A device description specifies the services of a device, the embedded devices of a device and other information, such as the manufacturer, model name, serial number and the Unique Device Name that uniquely identifies a device. Instances of this class contain the previously mentioned "other" information found in device description documents.
HDeviceInfo | ( | ) |
Creates a new, empty instance.
HDeviceInfo | ( | const HResourceType & | deviceType, |
const QString & | friendlyName, | ||
const QString & | manufacturer, | ||
const QString & | modelName, | ||
const HUdn & | udn, | ||
HValidityCheckLevel | checkLevel = StrictChecks , |
||
QString * | err = 0 |
||
) |
Constructs a new instance from the specified parameters that the UDA specification mandates for a UPnP device.
The parameters the constructor expects are arguments defined in the device description file and they are all mandatory for a valid UPnP device.
deviceType | specifies the device type. |
friendlyName | specifies a short description for the end-user. This cannot be empty and should be less than 64 characters. |
manufacturer | specifies the name of the manufacturer. This cannot be empty and should be less than 64 characters. |
modelName | specifies the model name. This cannot be empty and should be less than 32 characters. |
udn | specifies the unique device name. This is a universally unique identifier for the device, regardless if the device is root or embedded. The specified UDN has to be valid. |
checkLevel | specifies the level of strictness used in validating the specified arguments. This parameter is optional. |
err | specifies a pointer to a QString that contains an error description in case the construction failed. This parameter is optional. |
HDeviceInfo | ( | const HResourceType & | deviceType, |
const QString & | friendlyName, | ||
const QString & | manufacturer, | ||
const QUrl & | manufacturerUrl, | ||
const QString & | modelDescription, | ||
const QString & | modelName, | ||
const QString & | modelNumber, | ||
const QUrl & | modelUrl, | ||
const QString & | serialNumber, | ||
const HUdn & | udn, | ||
const QString & | upc, | ||
const QList< QUrl > & | icons, | ||
const QUrl & | presentationUrl, | ||
HValidityCheckLevel | checkLevel = StrictChecks , |
||
QString * | err = 0 |
||
) |
Constructs a new instance from the specified parameters.
These are all the arguments found in the device description file.
deviceType | specifies the device type. |
friendlyName | specifies a short description for the end-user. This cannot be empty and should be less than 64 characters. |
manufacturer | specifies the name of the manufacturer. This cannot be empty and should be less than 64 characters. |
manufacturerUrl | specifies the web site for the manufacturer. |
modelDescription | specifies the long description for the end user. This can be empty and should be less than 128 characters. |
modelName | specifies the model name. This cannot be empty and should be less than 32 characters. |
modelNumber | specifies the model number of the device. There is no format specified. This should be less than 32 characters. |
modelUrl | specifies the web site for the device model. |
serialNumber | specifies the serial number of the device. No format specified. This should be less than 64 characters. |
udn | specifies the unique device name. This is a universally unique identifier for the device, regardless if the device is root or embedded. The specified UDN has to be valid. |
upc | specifies the Universal Product Code, which is 12-digit, all-numeric code that identifies the consumer package. Managed by the Uniform Code Council. |
icons | specifies the icons of the device, if any. |
presentationUrl | specifies the URL for HTML-based user interface for controlling and/or viewing device status. |
checkLevel | specifies the level of strictness used in validating the specified arguments. This parameter is optional. |
err | specifies a pointer to a QString that contains an error description in case the construction failed. This is optional. |
~HDeviceInfo | ( | ) |
Destroys the instance.
HDeviceInfo | ( | const HDeviceInfo & | other | ) |
Copies the contents of the other to this.
other | specifies the object to be copied. |
HDeviceInfo& operator= | ( | const HDeviceInfo & | other | ) |
Assigns the contents of the other to this.
other | specifies the object to be copied. |
bool isValid | ( | HValidityCheckLevel | level | ) | const |
Indicates if the object is valid.
A valid object contains the mandatory data of a device description.
level | specifies the level of strictness used in validating the object. This parameter is optional and the default level is strict. |
void setManufacturerUrl | ( | const QUrl & | arg | ) |
Sets the URL for the web site of the manufacturer.
arg | specifies the URL for the web site of the manufacturer. |
void setModelDescription | ( | const QString & | arg | ) |
Sets the model description.
A model description is used to display a long description for end user. Should be < 128 characters.
arg | specifies the model description. |
void setModelNumber | ( | const QString & | arg | ) |
Sets the model number.
There is no format specified for the model number, other than it should be < 32 characters.
arg | specifies the model number. |
void setModelUrl | ( | const QUrl & | arg | ) |
Sets the URL for the web site of the model.
arg | specifies the model URL. |
void setSerialNumber | ( | const QString & | arg | ) |
Sets the serial number of the device.
There is no format specified for the serial number, other than it should be < 64 characters.
arg | specifies the serial number. |
void setUpc | ( | const QString & | arg | ) |
Sets the Universal Product Code.
UPC is a 12-digit, all-numeric code that identifies the consumer package. Managed by the Uniform Code Council.
arg | specifies the UPC. |
void setIcons | ( | const QList< QUrl > & | arg | ) |
void setPresentationUrl | ( | const QUrl & | arg | ) |
Sets the presentation URL.
Presentation URL specifies the URL for HTML-based user interface for controlling and/or viewing device status.
arg | specifies the presentation URL. |
const HResourceType& deviceType | ( | ) | const |
Returns the type of the device found in the device description file.
QString friendlyName | ( | ) | const |
Returns short description for end user.
QString manufacturer | ( | ) | const |
Returns manufacturer's name.
QUrl manufacturerUrl | ( | ) | const |
Returns the manufacturer's web site.
QString modelDescription | ( | ) | const |
Returns long description for end user.
QString modelName | ( | ) | const |
Returns the model name.
QString modelNumber | ( | ) | const |
QUrl modelUrl | ( | ) | const |
Returns the web site for the device model.
QString serialNumber | ( | ) | const |
const HUdn& udn | ( | ) | const |
Returns the Unique Device Name.
QString upc | ( | ) | const |
QList< QUrl > icons | ( | ) | const |
QUrl presentationUrl | ( | ) | const |
Returns the location of the device's presentation page.
H_UPNP_CORE_EXPORT bool operator== | ( | const HDeviceInfo & | obj1, |
const HDeviceInfo & | obj2 | ||
) | [friend] |
Compares the two objects for equality.
bool operator!= | ( | const HDeviceInfo & | obj1, |
const HDeviceInfo & | obj2 | ||
) | [related] |
Compares the two objects for inequality.