Public Member Functions

HServiceSetup Class Reference
[Device Model]

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

#include <HServiceSetup>

List of all members.

Public Member Functions

 HServiceSetup ()
 HServiceSetup (const HServiceId &id, const HResourceType &serviceType, HInclusionRequirement incReq=InclusionMandatory)
 HServiceSetup (const HServiceId &id, const HResourceType &serviceType, qint32 version, HInclusionRequirement incReq=InclusionMandatory)
 HServiceSetup (const HServiceId &id, const HResourceType &serviceType, HService *service, HInclusionRequirement incReq=InclusionMandatory)
 HServiceSetup (const HServiceId &id, const HResourceType &serviceType, HService *service, qint32 version, HInclusionRequirement incReq=InclusionMandatory)
 ~HServiceSetup ()
HInclusionRequirement inclusionRequirement () const
bool isValid (HValidityCheckLevel checkLevel) const
HServiceservice () const
const HServiceIdserviceId () const
const HResourceTypeserviceType () const
qint32 version () const
void setInclusionRequirement (HInclusionRequirement arg)
void setServiceId (const HServiceId &arg)
void setServiceType (const HResourceType &arg)
void setService (HService *arg)
void setVersion (qint32 version)
HServicetakeService ()

Detailed Description

See also:
HServicesSetupData, HService
Remarks:
this class is not thread-safe.

Constructor & Destructor Documentation

HServiceSetup (  ) 

Creates a new, invalid instance.

See also:
isValid()
HServiceSetup ( const HServiceId id,
const HResourceType serviceType,
HInclusionRequirement  incReq = InclusionMandatory 
)

Creates a new instance.

Parameters:
id specifies the service ID.
serviceType specifies the service type.
incReq specifies the inclusion requirement of the service.
See also:
isValid()
Remarks:
the version() is set to 1.
HServiceSetup ( const HServiceId id,
const HResourceType serviceType,
qint32  version,
HInclusionRequirement  incReq = InclusionMandatory 
)

Creates a new instance.

Parameters:
id specifies the service ID.
serviceType specifies the service type.
version specifies the version of the UPnP device, which first specified the service.
incReq specifies the inclusion requirement of the service.
See also:
isValid()
HServiceSetup ( const HServiceId id,
const HResourceType serviceType,
HService service,
HInclusionRequirement  incReq = InclusionMandatory 
)

Creates a new instance.

Parameters:
id specifies the service ID.
serviceType specifies the service type.
service specifies a pointer to a heap-allocated HService. This instance takes the ownership of the object.
incReq specifies the inclusion requirement of the service.
See also:
isValid()
Remarks:
the version() is set to 1.
HServiceSetup ( const HServiceId id,
const HResourceType serviceType,
HService service,
qint32  version,
HInclusionRequirement  incReq = InclusionMandatory 
)

Creates a new instance.

Parameters:
id specifies the service ID.
serviceType specifies the service type.
service specifies a pointer to a heap-allocated HService. This instance takes the ownership of the object.
version specifies the version of the UPnP device, which first specified the service.
incReq specifies the inclusion requirement of the service.
See also:
isValid()
~HServiceSetup (  ) 

Destroys the instance.


Member Function Documentation

HInclusionRequirement inclusionRequirement (  )  const

Returns the inclusion requirement.

Returns:
the inclusion requirement.
See also:
setInclusionRequirement()
bool isValid ( HValidityCheckLevel  checkLevel  )  const

Indicates if the object is valid.

Parameters:
checkLevel specifies whether the validity of the object should be checked strictly according to the UDA specification.
Returns:
true in case the object is valid, that is, the service ID, service type, version and inclusion requirement are all properly defined in respect to the specified checkLevel.
HService * service (  )  const

Returns the HService pointer associated with the instance.

Returns:
the HService pointer associated with the instance. The ownership of the HService is not transferred to the caller.
See also:
setService(), takeService()
const HServiceId & serviceId (  )  const

Returns the service ID.

Returns:
the service ID.
See also:
setServiceId()
const HResourceType & serviceType (  )  const

Returns the service type.

Returns:
the service type.
See also:
setServiceType()
qint32 version (  )  const

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

Returns:
the version of the UPnP device, which first specified the service.
See also:
setVersion()
void setInclusionRequirement ( HInclusionRequirement  arg  ) 

Sets the the inclusion requirement.

Parameters:
arg specifies the inclusion requirement.
See also:
inclusionRequirement()
void setServiceId ( const HServiceId arg  ) 

Sets the service ID.

Parameters:
arg specifies the service ID.
See also:
serviceId()
void setServiceType ( const HResourceType arg  ) 

Sets the service type.

Parameters:
arg specifies the service type.
See also:
serviceType()
void setService ( HService arg  ) 

Associates an HService pointer with this instance.

Parameters:
arg specifies the HService pointer to be associated with this instance. The instance takes the ownership of the provided HService.
Remarks:
if the instance already has an HService pointer associated with it, the old HService is first deleted, even if the provided HService is null.
See also:
service()
void setVersion ( qint32  version  ) 

Sets the version of the UPnP device, which first specified the service.

Parameters:
version defines the version of the UPnP device, which first specifies the service.
See also:
version()
HService * takeService (  ) 

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

Returns:
the HService pointer associated with the instance and passes the ownership of the object to the caller.
See also:
service()