Herqq

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Friends | Related Functions

# HDeviceInfo Class Reference
Common

This class is used to contain information of a UPnP device found in a UPnP device description document. More...

`#include <HDeviceInfo>`

List of all members.

## 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)

## Detailed Description

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.

Remarks:
  This class is not thread-safe.

See also:
  HServiceInfo, HActionInfo and HStateVariableInfo.

## Constructor & Destructor Documentation

HDeviceInfo | ( |  | ) |

Creates a new, empty instance.

See also:
  isValid()

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.

Parameters:

  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.

Remarks:
  in case any of the provided arguments does not meet the specified requirements, the created object is invalid.

See also:
  isValid()

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.

Parameters:

  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.

Remarks:
  in case any of the provided arguments does not meet the specified requirements, the created object is invalid.

See also:
  isValid()

~HDeviceInfo | ( |  | ) |

Destroys the instance.

HDeviceInfo | ( | const HDeviceInfo & | other | ) |

Copies the contents of the other to this.

Parameters:

  other | specifies the object to be copied.

## Member Function Documentation

HDeviceInfo& operator= | ( | const HDeviceInfo & | other | ) |

Assigns the contents of the other to this.

Parameters:

  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.

Parameters:

  level | specifies the level of strictness used in validating the object. This parameter is optional and the default level is strict.

Returns:
  true in case the object is valid.

void setManufacturerUrl | ( | const QUrl & | arg | ) |

Sets the URL for the web site of the manufacturer.

Parameters:

  arg | specifies the URL for the web site of the manufacturer.

See also:
  manufacturerUrl()

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.

Parameters:

  arg | specifies the model description.

See also:
  modelDescription()

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.

Parameters:

  arg | specifies the model number.

See also:
  modelNumber()

void setModelUrl | ( | const QUrl & | arg | ) |

Sets the URL for the web site of the model.

Parameters:

  arg | specifies the model URL.

See also:
  modelUrl()

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.

Parameters:

  arg | specifies the serial number.

See also:
  serialNumber()

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.

Parameters:

  arg | specifies the UPC.

See also:
  upc()

void setIcons | ( | const QList< QUrl > & | arg | ) |

Sets the icons of the device.

Parameters:

  arg | specifies the icons of the device.

See also:
  icons()

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.

Parameters:

  arg | specifies the presentation URL.

See also:
  presentationUrl()

const HResourceType& deviceType | ( |  | ) | const

Returns the type of the device found in the device description file.

Returns:
  The type of the device found in the device description file.

QString friendlyName | ( |  | ) | const

Returns short description for end user.

Returns:
  short description for end user.

QString manufacturer | ( |  | ) | const

Returns manufacturer's name.

Returns:
  manufacturer's name.

QUrl manufacturerUrl | ( |  | ) | const

Returns the manufacturer's web site.

Returns:
  The manufacturer's web site.

See also:
  setManufacturerUrl()

QString modelDescription | ( |  | ) | const

Returns long description for end user.

Returns:
  long description for end user.

See also:
  setModelDescription()

QString modelName | ( |  | ) | const

Returns the model name.

Returns:
  The model name.

QString modelNumber | ( |  | ) | const

Returns the model number.

Returns:
  The model number.

See also:
  setModelNumber()

QUrl modelUrl | ( |  | ) | const

Returns the web site for the device model.

Returns:
  The web site for the device model.

See also:
  setModelUrl()

QString serialNumber | ( |  | ) | const

Returns the serial number.

Returns:
  The serial number.

See also:
  setSerialNumber()

const HUdn& udn | ( |  | ) | const

Returns the Unique Device Name.

Returns:
  Universally-unique identifier for the device, whether root or embedded.

Remarks:
  the UDN is same over time for a specific device instance.

QString upc | ( |  | ) | const

Returns the Universal Product Code.

Returns:
  The Universal Product Code.

See also:
  setUpc()

QList< QUrl > icons | ( |  | ) | const

Returns the icons of the device, if any.

Returns:
  The icons of the device.

See also:
  setIcons()

QUrl presentationUrl | ( |  | ) | const

Returns the location of the device's presentation page.

Returns:
  The location of the device's presentation page.

See also:
  setPresentationUrl()

## Friends And Related Function Documentation

H_UPNP_CORE_EXPORT bool operator== | ( | const HDeviceInfo & | obj1,
|  | const HDeviceInfo & | obj2
| ) |  | `[friend]`

Compares the two objects for equality.

Returns:
  true in case the objects are logically equivalent.

bool operator!= | ( | const HDeviceInfo & | obj1,
|  | const HDeviceInfo & | obj2
| ) |  | `[related]`

Compares the two objects for inequality.

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