Public Member Functions | Protected Member Functions

HClientServiceAdapter Class Reference

This is an abstract base class for HUPnP A/V helper service classes. More...

List of all members.

Public Member Functions

virtual ~HClientServiceAdapter ()=0
bool setService (HClientService *service, ValidationType vt=FullValidation)
HClientServiceservice () const
bool implementsAction (const QString &name) const
bool implementsStateVariable (const QString &name) const
bool isReady () const
const HResourceTypeserviceType () const

Protected Member Functions

 HClientServiceAdapter (const HResourceType &serviceType)
virtual bool prepareService (HClientService *service)

Detailed Description

Remarks:
This class is not thread-safe.

Constructor & Destructor Documentation

HClientServiceAdapter ( const HResourceType serviceType ) [protected]

Creates a new instance.

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

Destroys the instance.


Member Function Documentation

bool prepareService ( HClientService service ) [protected, virtual]

Prepares the instance to be associated with the specified HClientService.

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

Associates the specified HService with this instance.

Parameters:
servicespecifies the HService to be associated with this instance.
Returns:
true in case the service was successfully associated with this instance.
See also:
service()
HClientService * service (  ) const

Returns the HService associated with this instance.

Returns:
the HService associated with this instance, if any. A null pointer is returned in case setService() has not been called successfully.
See also:
setService()
bool implementsAction ( const QString &  name ) const

Indicates if the HService associated with this instance implements an action with the specified name.

Parameters:
namespecifies the name of the action to be checked.
Returns:
true in case the associated HService implements the specified action.
bool implementsStateVariable ( const QString &  name ) const

Indicates if the HService associated with this instance implements a state variable with the specified name.

Parameters:
namespecifies the name of the state variable to be checked.
Returns:
true in case the associated HService implements the specified state variable.
bool isReady (  ) const

Indicates if the object is ready to be used.

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

Returns the service type this adapter abstracts.

Returns:
the service type this adapter abstracts.