Public Member Functions | Protected Member Functions

HClientDeviceAdapter Class Reference
[Device Model]

This is an abstract base class for HUPnP A/V convenience device classes. More...

List of all members.

Public Member Functions

virtual ~HClientDeviceAdapter ()=0
bool setDevice (HClientDevice *device, ValidationType vt=FullValidation)
HClientDevicedevice () const
bool isReady () const
const HResourceTypedeviceType () const

Protected Member Functions

 HClientDeviceAdapter (const HResourceType &deviceType, QObject *parent=0)
virtual bool prepareDevice (HClientDevice *device)

Detailed Description

Remarks:
This class is not thread-safe.

Constructor & Destructor Documentation

HClientDeviceAdapter ( const HResourceType deviceType,
QObject *  parent = 0 
) [protected]

Creates a new instance.

Parameters:
parentspecifies the parent QObject.
~HClientDeviceAdapter (  ) [pure virtual]

Destroys the instance.


Member Function Documentation

bool prepareDevice ( HClientDevice device ) [protected, virtual]

Prepares the instance to be associated with the specified HClientDevice.

Parameters:
devicespecifies the device to be associated.
Returns:
true if the instance was successfully prepared to be used with the specified HClientDevice. If false is returned the specified HClientDevice will not be associated with this instance.
bool setDevice ( HClientDevice device,
ValidationType  vt = FullValidation 
)

Associates the specified HClientDevice with this instance.

Parameters:
devicespecifies the HClientDevice to be associated with this instance.
Returns:
true in case the device was successfully associated with this instance.
See also:
device()
HClientDevice * device (  ) const

Returns the HClientDevice associated with this instance.

Returns:
the HClientDevice associated with this instance, if any. A null pointer is returned in case setDevice() has not been called successfully.
See also:
setDevice()
bool isReady (  ) const

Indicates if the object is ready to be used.

Returns:
true if the object is ready to be used.
const HResourceType & deviceType (  ) const

Returns the device type this adapter abstracts.

Returns:
the device type this adapter abstracts.