Location:
agmcomon.h
Link against: agnmodel.lib
TAgnAlarmDefaults
Supported from 5.0
Default alarm settings. An instance of this class is owned by a
TAgnTodoDefaults
object. Use
TAgnTodoDefaults::AlarmDefaults()
to get the default alarm
settings for a to-do entry and use SetAlarmDefaults()
to set them.
The settings are: a “has alarm” flag, the number of days
warning, the time of day (in minutes from midnight) and the name of the sound
to play as the alarm.
Defined in TAgnAlarmDefaults
:
AlarmDaysWarning()
, AlarmSoundName()
, AlarmTime()
, ExternalizeL()
, HasAlarm()
, InternalizeL()
, SetAlarmDateTime()
, SetAlarmSoundName()
, SetHasAlarm()
, TAgnAlarmDefaults()
, operator==()
TAgnAlarmDefaults();
The default C++ constructor is used to construct the default alarm settings object. The settings are initialised as follows:
"has alarm" flag = EFalse
number of days warning = zero
time of day = 525 minutes (8:45am)
sound name = “Chimes”
void SetHasAlarm(TBool aHasAlarm);
Sets or unsets the "has alarm" flag.
|
void SetAlarmDateTime(TTimeIntervalDays aDaysWarning,TTimeIntervalMinutes aTime);
Sets the alarm's date and time as a number of days before the entry’s due date and an offset in minutes from midnight on the day of the alarm.
|
void SetAlarmSoundName(const TDesC& aAlarmSoundName);
Sets the name of the alarm sound.
|
TBool HasAlarm() const;
Returns the state of the "has alarm" flag.
|
TTimeIntervalMinutes AlarmTime() const;
Gets the time of the alarm, as a number of minutes from midnight.
|
TTimeIntervalDays AlarmDaysWarning() const;
Gets the number of days warning for the alarm, as set by
SetAlarmDateTime()
.
|
TPtrC AlarmSoundName() const;
Gets the alarm sound name.
|
TBool operator==(const TAgnAlarmDefaults& aOther) const;
Compares two default alarm settings for equality of their four properties.
|
|
void ExternalizeL(RWriteStream& aStream) const;
Externalises the default alarm settings to a write stream. The alarm time must be valid (either NULL or less than 1440) or a panic occurs. The number of days warning must be between 0 and 1000 inclusive or a panic occurs.
|
void InternalizeL(RReadStream& aStream);
Internalises the default alarm settings from a read stream.
|
|