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.
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).
An alarm can optionally have an associated sound file. Get the name of the sound file using CAgnEntry::AlarmSoundName()
.
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.