Public Member Functions

HDeviceModelCreator Class Reference
[Device Model]

A protocol class for creating HServerDevice and HServerService instances. More...

#include <HDeviceModelCreator>

Inheritance diagram for HDeviceModelCreator:
HClonable

List of all members.

Public Member Functions

 HDeviceModelCreator ()
virtual ~HDeviceModelCreator ()
virtual HServerDevicecreateDevice (const HDeviceInfo &info) const
virtual HServerServicecreateService (const HServiceInfo &serviceInfo, const HDeviceInfo &parentDeviceInfo) const =0
virtual HDeviceModelCreatorclone () const

Detailed Description

The primary purpose of this protocol class is to build instances of the HUPnP's Device Model at server-side. If you wish to host a device in an HDeviceHost you have to derive from this class and override its abstract methods.

See also:
Device Hosting, HServerDevice, HServerService

Constructor & Destructor Documentation

Creates a new instance.

~HDeviceModelCreator (  ) [virtual]

Destroys the instance.


Member Function Documentation

HServerDevice * createDevice ( const HDeviceInfo info ) const [virtual]

Creates a device matching the provided device information.

Parameters:
infospecifies information of the device type the creator is asked to create.
Returns:
a heap allocated device matching the provided device information or null in case the creator does not recognize the specified device type.
Remarks:
The ownership of the created device is transferred to the caller.
virtual HServerService* createService ( const HServiceInfo serviceInfo,
const HDeviceInfo parentDeviceInfo 
) const [pure virtual]

Creates a service matching the provided service information.

Parameters:
serviceInfospecifies information of the service type the creator is asked to create.
parentDeviceInfospecifies information about the parent UPnP device that contains this service.
Returns:
a heap allocated service matching the provided service information or null in case the creator does not recognize the specified service type.
Remarks:
The ownership of the created service is transferred to the caller.
HDeviceModelCreator * clone (  ) const [virtual]

Returns a deep copy of the instance.

Returns:
a deep copy of the instance.
Remarks:
  • the ownership of the returned object is transferred to the caller.

Reimplemented from HClonable.