Click on the following link to download the example: AlarmServerExample.zip
Click: browse to view the example code.
The repeat definition
is set to EAlarmRepeatDefintionRepeatOnce
using TASShdAlarm::RepeatDefinition()
. This enables the alarm
to occur only once.
The due time
(expiry time) for the floating alarm is set in local time using TASShdAlarm::NextDueTime()
.
The due time
(expiry time) for the fixed alarm is set in universal time using TASShdAlarm::SetUtcNextDueTime()
.
The floating
alarm is set to display a message on expiry using TASShdAlarm::Message()
.
The fixed alarm
is set to play a sound on expiry using TASShdAlarm::SoundName()
, along with displaying a message.
The alarm is added to the server queue using RASCliSession::AlarmAdd()
and change event notification is requested from the server using RASCliSession::NotifyChange()
.
The application
also demonstrates how to query the server for an alarm using its ID.
The category and details of an alarm can be retrieved using RASCliSession::GetAlarmCategory()
and RASCliSession::GetAlarmDetails()
respectively. Finally, the alarm is deleted from the server using RASCliSession::AlarmDelete()
.
This is a console application, which builds an executable called AlaramServerExample.exe
in the standard location (\epoc32\release\winscw\
<build_variant> for
CodeWarrior). After launching the executable, depending on the emulator
you are using, you may need to navigate from the app launcher/shell
screen to view the console.