diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-A87610FF-2FBC-4BA3-8F6B-0BBB441F8066.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-A87610FF-2FBC-4BA3-8F6B-0BBB441F8066.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,100 @@ + + + + + +Hardware +Resource Manager OverviewIntroduction to topic for overview page or search +

Hardware Resource Manager (HWRM) is a client-server solution, which utilizes +ECom plug-ins to achieve device independency. ECom plug-ins convert the client +requests into the hardware control commands.

+
Purpose

HWRM performs the following functions:

    +
  • Provide client APIs +to control lights, vibra.

  • +
  • Retrieve battery information +of the device.

  • +
  • Publish certain power-state +related Publish and Subscribe properties.

  • +
  • Enable clients to retrieve +status information on the hardware elements such as light, vibration, power.

  • +
+
Required background

Knowledge of the client-server +architecture, asynchronous processing, and active objects feature of the Symbian +system model architecture.

+
HWRM architecture

HWRM is made up of the following +components:

    +
  • Client APIs

  • +
  • HWRM Server

  • +
+ Hardware Resource Manager's Architectural Relationships + + +

Client APIs

HWRM provides client APIs that can control +various hardware elements. It also provides callback pointers, so that the +client applications can register to receive notification on the hardware status +changes. Refer to the tutorials for +information on how to use client APIs. Client APIs are useful for both application +developers and the handset manufacturers.

HWRM server

HWRM +server uses plug-in handlers to forward the client API requests to appropriate +plug-ins. The client application communicates with HWRM server through the +client APIs (Light API, Vibra API, and Power API). HWRM server defines the +observer classes, which provide the callback pointers.

The server +calls CHWRMPluginService::ProcessCommandL() function to +forward the client requests to plug-ins. An ongoing ProcessCommandL() is +cancelled by HWRM server using CHWRMPluginService::CancelCommandL(). +The plug-ins process the server's request and pass the response by calling CHWRMPluginCallback::ProcessResponseL() function. +The MHWRMPluginCallback::EventL() method is used to communicate +various events that takes place in the plug-ins.

HWRM uses the central +repository to store the various values and settings such as the light intensity, +duration and delays.

+
APIs

The HWRM provides the following client APIs +and plug-in APIs:

+ + + + + +Class +Description + + + + +

CHWRMLight

+

Abstract class defining Lights client API.

+
+ +

CHWRMExtendedLight

+

Abstract class defining Extended Lights client API.

+
+ +

CHWRMVibra

+

Abstract class defining Vibra client API.

+
+ +

CHWRMPower

+

Class defining Power client API.

+
+ + +
+
Typical use cases

HWRM is used for the following:

    +
  • Used to configure a plug-in.

  • +
  • Start/stop device vibra.

  • +
  • Release the reserved +lights

  • +
  • Retrieve the supported +light targets of the device, current light status, vibra settings and status.

  • +
  • Reserve light targets, +device vibra.

  • +
  • Switch ON/OFF the lights.

  • +
  • Request for tactile +vibration pulse.

  • +
+
\ No newline at end of file