S60 3rd Edition SDK for Symbian OS
Example Applications Guide

HWRMTestApp Example

1. About this Example
2. Prerequisites
3. Design and Implementation
4. Class List


1. About this Example

HWRMTestApp is an example application that demonstrates HW Resource Manager API functionality. HW Resource Manager provides client APIs for controlling lights and vibra of the device. It also has additional responsibillty of publishing certain power state related Publish & Subscribe properties.


2. Prerequisites


3. Design and Implementation

HWRMTestApp is a simple Symbian Series 60 based UI application. HandleCommandL method of CHWRMTestAppAppUI class handles commands entered by user and directs the service requests to the right method that handles them.

CHWRMTestAppAppUi::ConstructL() creates instances to CHWRMLight, CHWRMVibra, CHWRMTestAppPropertyObserver

Light functions can be used calling instance of iLight. for e.g iLight->LightOnL( target, duration, intensity, fade );

Vibra function works similar way: for e.g. iVibra->StartVibraL( duration, intensity );

CHWRMTestAppPropertyObserver observes the status of the Battery panel and writes a message to the screen if the battery status is changed.

The following sections explain the capabilities of the application, the current state of scalableUI support, the module dependencies and finally, steps required to build and use the application..

3.1 Capabilities

The program capabilities are defined in HWRMTestApp.mmp file: CAPABILITY NONE.

3.2 ScalableUI

The program takes screen parameters in the start of the application. The program does not support changing the screen layout while the program is running.

3.3 Module dependencies

At build time there exists following module dependencies:

In addition, several UI related libraries provided by SDK are required: euser, apparc, cone, eikcore, eikcoctl, avkon, efsrv, bafl, eikdlg.

3.4 Using the application

In the following is described a typical use case scenario for the HWRMTestApp application. The scenario is as follows:

The rest of the sub sections describe how individual scenario steps are performed.

3.4.1 Selecting which settings to change

After starting the application, the current settings are displayed on the screen. Select Options > Vibra / Light to select which setting you want to change.
By selecting Cancel, the user returns to current settings view.

3.4.2 Starting vibra

Select Options > Vibra > Start to start the vibra and enter values for duration and intensity.
By selecting Cancel, the user returns to the current settings view.

3.4.3 Light on/off

Select Options > Light > On to turn the light on, select the target and enter values for duration and intensity.
By selecting Cancel, the user returns to the current settings view.

3.4.4 Exiting from the application

By selecting Options > Exit in the current settings view, the user exits the application.


4. Class List

Here are the classes, structs, unions and interfaces with brief descriptions:

This inheritance list is sorted roughly, but not completely, alphabetically:


© Nokia 2006

Back to top