Public Member Functions

# HDeviceSetup Class Reference
[Device Model]

This class is used to specify information that is required to setup an HDevice. More...

`#include <HDeviceSetup>`

List of all members.

## Public Member Functions
| HDeviceSetup ()
| HDeviceSetup (const HResourceType &type, HInclusionRequirement incReq=InclusionMandatory)
| HDeviceSetup (const HResourceType &type, qint32 version, HInclusionRequirement incReq=InclusionMandatory)
| HDeviceSetup (const HResourceType &type, HDevice *device, HInclusionRequirement incReq=InclusionMandatory)
| HDeviceSetup (const HResourceType &type, HDevice *device, qint32 version, HInclusionRequirement incReq=InclusionMandatory)
| ~HDeviceSetup ()
const HResourceType & | deviceType () const
HDevice * | device () const
HInclusionRequirement | inclusionRequirement () const
bool | isValid () const
qint32 | version () const
void | setInclusionRequirement (HInclusionRequirement arg)
void | setDeviceType (const HResourceType &arg)
void | setDevice (HDevice *arg)
void | setVersion (qint32 version)
HDevice * | takeDevice ()

## Detailed Description

See also:
  HDevicesSetupData, HDevice

Remarks:
  this class is not thread-safe.

## Constructor & Destructor Documentation

HDeviceSetup | ( |  | ) |

Creates a new, invalid instance.

See also:
  isValid()

HDeviceSetup | ( | const HResourceType & | type,
|  | HInclusionRequirement | incReq = `InclusionMandatory` |
| ) |  |  |

Creates a new instance.

Parameters:

  | type | specifies the device type.
  | incReq | specifies inclusion requirement of the device.

See also:
  isValid()

Remarks:
  the version() is set to 1.

HDeviceSetup | ( | const HResourceType & | type,
|  | qint32 | version,
|  | HInclusionRequirement | incReq = `InclusionMandatory` |
| ) |  |  |

Creates a new instance.

Parameters:

  | type | specifies the device type.
  | version | specifies the version of the UPnP device, which first specified the embedded device.
  | incReq | specifies inclusion requirement of the device.

See also:
  isValid()

HDeviceSetup | ( | const HResourceType & | type,
|  | HDevice * | device,
|  | HInclusionRequirement | incReq = `InclusionMandatory` |
| ) |  |  |

Creates a new instance.

Parameters:

  | type | specifies the device type.
  | device | specifies a pointer to a heap-allocated HDevice. This instance takes the ownership of the device.
  | incReq | specifies inclusion requirement of the device.

See also:
  isValid()

Remarks:
  the version() is set to 1.

HDeviceSetup | ( | const HResourceType & | type,
|  | HDevice * | device,
|  | qint32 | version,
|  | HInclusionRequirement | incReq = `InclusionMandatory` |
| ) |  |  |

Creates a new instance.

Parameters:

  | type | specifies the device type.
  | device | specifies a pointer to a heap-allocated HDevice. This instance takes the ownership of the device.
  | version | specifies the version of the UPnP device, which first specified the embedded device.
  | incReq | specifies inclusion requirement of the device.

See also:
  isValid()

~HDeviceSetup | ( |  | ) |

Destroys the instance.

## Member Function Documentation

const HResourceType & deviceType | ( |  | ) | const

Returns the device type.

Returns:
  the device type.

See also:
  setDeviceType()

HDevice * device | ( |  | ) | const

Returns the HDevice pointer associated with the instance.

Returns:
  the HDevice pointer associated with the instance. The ownership of the HDevice is not transferred to the caller.

See also:
  takeDevice()

HInclusionRequirement inclusionRequirement | ( |  | ) | const

Returns the inclusion requirement.

Returns:
  the inclusion requirement.

See also:
  setInclusionRequirement()

bool isValid | ( |  | ) | const

Indicates if the object is valid.

Returns:
  true in case the object is valid, that is, the device type, version and inclusion requirement are properly defined.

See also:
  version(), deviceType(), inclusionRequirement()

qint32 version | ( |  | ) | const

Returns the version of the UPnP device, which first specified the embedded device.

Returns:
  the version of the UPnP device, which first specified the embedded device.

See also:
  setVersion()

void setInclusionRequirement | ( | HInclusionRequirement | arg | ) |

Sets the the inclusion requirement.

Parameters:

  | arg | specifies the inclusion requirement.

See also:
  inclusionRequirement()

void setDeviceType | ( | const HResourceType & | arg | ) |

Sets the device type.

Parameters:

  | arg | specifies the device type.

See also:
  deviceType()

void setDevice | ( | HDevice * | arg | ) |

Associates an HDevice pointer with this instance.

Parameters:

  | arg | specifies the HDevice pointer to be associated with this instance. The instance takes the ownership of the provided HDevice.

Remarks:
  if the instance already has an HDevice pointer associated with it, the old HDevice is first deleted, even if the provided HDevice is null.

See also:
  device(), takeDevice()

void setVersion | ( | qint32 | version | ) |

Specifies the version of the UPnP device, which first specified the embedded device.

Parameters:

  | version | specifies the version of the UPnP device, which first specified the embedded device.

See also:
  version()

HDevice * takeDevice | ( |  | ) |

Returns the HDevice pointer associated with the instance and passes the ownership of the object to the caller.

Returns:
  the HDevice pointer associated with the instance and passes the ownership of the object to the caller.

See also:
  device(), setDevice()