Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



How to set alarm data

Alarms can be set for any type of entry.


Basic alarm

The basic function to set an alarm is CAgnBasicEntry::SetAlarm(). This sets the time at which the alarm should go off, specified as a time interval, aTime, and a number of days warning, aDaysWarning. aDaysWarning is measured backwards from the entry's start date, and aTime is measured forwards from midnight on the day of the alarm.

[Top]


To-do entries

To-do entries may have their number of days warning set from the start date of the to-do as opposed to the due date — if this is required CAgnTodo::SetAlarmFromStartDate() should be called after calling SetAlarm(). This sets a flag, which can be also be changed using CAgnTodo::SetAlarmFromDueDate() to indicate that the number of days warning should be measured from the due date (the default).

[Top]


Sound file

An alarm can optionally have an associated sound file. Get the name of the sound file using CAgnEntry::AlarmSoundName().

[Top]


Clear alarm

An alarm can be cleared using CAgnEntry::ClearAlarm().

CAgnBasicEntry::AlarmInstanceDateTime() — returns the absolute date and time of the alarm for the current instance if the entry is repeating, or just its normal absolute date/time if its non-repeating.