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
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.
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..
The program capabilities are defined in HWRMTestApp.mmp file: CAPABILITY NONE.
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.
At build time there exists following module dependencies:
- HWRMTestApp requires HWRMLightClient.lib and HWRMVibraClient.lib.
In addition, several UI related libraries provided by SDK are required: euser, apparc, cone, eikcore, eikcoctl, avkon, efsrv, bafl, eikdlg.
In the following is described a typical use case scenario for the HWRMTestApp application. The scenario is as follows:
- User starts the application
- User changes vibra settings
- User changes light settings
- User exits from the application
The rest of the sub sections describe how individual scenario steps are performed.
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.
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.
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.
By selecting Options > Exit in the current settings view, the user exits the application.
Here are the classes, structs, unions and interfaces with brief descriptions:
This inheritance list is sorted roughly, but not completely, alphabetically:
|
© Nokia 2006 |

|