The Alarm Server sends notifications to applications when alarm settings change; this includes indications when an alarm goes off. A client-side API for the alarm server is RASCliSession . It is a standard asynchronous service provider, and the client application should implement an active object to receive events.
To be able to use the Alarm Server services, client applications must first be connected to the server.
To receive events, the NotifyChange( TRequestStatus &aStatus, TAlarmId &aAlarmId ) function is called and the active object is set active.
Notifications are cancelled by calling the NotifyOnChangeCancel() function.
When alarm settings change, the RunL() function of the active object is called. Alarms in the alarm server database can be retrieved using the GetAlarmIdListL() function, which fills an array of alarm IDs.
When using RArray , remember to call Close() or Reset() on it when it is not needed anymore. The RASCliSession::GetAlarmDetails() function returns the TASShdAlarm structure for a specific alarm, which is identified by the alarm ID.
The TASShdAlarm structure contains information about an alarm, and information is accessed through simple inline functions. See the ASShdAlarm.h header file for further information.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.