Herqq

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# HDeviceModelCreator Class Reference
Device Model

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

`#include <HDeviceModelCreator>`

Inheritance diagram for HDeviceModelCreator:

List of all members.

## Public Member Functions
| HDeviceModelCreator ()
virtual | ~HDeviceModelCreator ()
virtual HServerDevice * | createDevice (const HDeviceInfo &info) const
virtual HServerService * | createService (const HServiceInfo &serviceInfo, const HDeviceInfo &parentDeviceInfo) const =0
virtual HDeviceModelCreator * | clone () const

## Detailed Description

A protocol class for creating HServerDevice and HServerService instances.

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

HDeviceModelCreator | ( |  | ) |

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:

  info | specifies 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:

  serviceInfo | specifies information of the service type the creator is asked to create.
  parentDeviceInfo | specifies 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.