TASShdAlarm Class Reference

#include <mw/asshdalarm.h>

Link against: alarmshared.lib

class TASShdAlarm
Protected Attributes
TAlarmId iAlarmId
TAlarmCategory iCategory
TAlarmCharacteristicsFlags iCharacteristics
TInt iClientData1
TInt iClientData2
TBitFlags16 iClientFlags
TAlarmDayOrTimed iDayOrTimed
TBitFlags8 iFlags
TAlarmMessage iMessage
TTime iNextDueTime
TTime iOriginalExpiryTime
TAlarmRepeatDefinition iRepeatDefinition
TAlarmSoundName iSoundName
TAlarmState iState
TAlarmStatus iStatus
Protected Member Enumerations
enumTASShdAlarmFlags { EASShdAlarmFlagsHasAssociatedData, EASShdAlarmFlagsHasOwningSession, EASShdAlarmFlagsHasBecomeOrphaned, EASShdAlarmFlagsPermanentDisabled }
Public Member Functions
TASShdAlarm()
TAlarmCategory &Category()
TAlarmCategory Category()
TAlarmCharacteristicsFlags &Characteristics()
TAlarmCharacteristicsFlags Characteristics()
TInt ClientData1()
TInt &ClientData1()
TInt ClientData2()
TInt &ClientData2()
TBitFlags16 &ClientFlags()
TBitFlags16 ClientFlags()
TAlarmDayOrTimed DayOrTimed()
TAlarmDayOrTimed &DayOrTimed()
IMPORT_C voidExternalizeL(RWriteStream &)
TSecureId GetSid()
IMPORT_C TBoolHasAssociatedData()
IMPORT_C TBoolHasBecomeOrphaned()
IMPORT_C TBoolHasOwningSession()
TAlarmId &Id()
TAlarmId Id()
IMPORT_C voidInternalizeL(RReadStream &)
TBool IsFloating()
TAlarmMessage &Message()
const TAlarmMessage &Message()
TTime &NextDueTime()
const TTime &NextDueTime()
TTime &OriginalExpiryTime()
const TTime &OriginalExpiryTime()
TAlarmRepeatDefinition &RepeatDefinition()
TAlarmRepeatDefinition RepeatDefinition()
IMPORT_C voidReset()
IMPORT_C voidSetDeQueueIfDueTimeInPast()
voidSetSid(const TSecureId &)
IMPORT_C voidSetUtcNextDueTime(TTime)
TAlarmSoundName &SoundName()
const TAlarmSoundName &SoundName()
TAlarmState State()
TAlarmStatus Status()

Detailed Description

A client-side alarm object.

It contains all of the information needed to create an alarm in the Alarm Server.

Member Attribute Documentation

iAlarmId

TAlarmId iAlarmId[protected]

The unique identifier assoicated with each alarm maintained by the alarm world server.

iCategory

TAlarmCategory iCategory[protected]

This UID is supplied by the client and is used to indicate the category that this alarm is part of. The Alarm Server is category-agnostic, that is, this information is for the client's use only

iCharacteristics

TAlarmCharacteristicsFlags iCharacteristics[protected]

This represents the desired behaviour for a given alarm. The Alarm Server uses this information to control the behaviour of the alarm.

See also: TAlarmCharacteristics

iClientData1

TInt iClientData1[protected]

For arbitrary client data 1

iClientData2

TInt iClientData2[protected]

For arbitrary client data 2

iClientFlags

TBitFlags16 iClientFlags[protected]

Flags for use by any particular client. These will only be relevant to a client who can interpret them.

iDayOrTimed

TAlarmDayOrTimed iDayOrTimed[protected]

The type of this alarm (e.g. day, timed)

iFlags

TBitFlags8 iFlags[protected]

Various flags - used internally by the alarm object

iMessage

TAlarmMessage iMessage[protected]

The message associated with this alarm, typically used in an application UI to inform the user as to the reason for the alarm.

iNextDueTime

TTime iNextDueTime[protected]

The date and time at which this alarm is next due. For alarms that haven't been snoozed, then this is the original due time.

For alarms that have been snoozed, this is the time at which the alarm will reawaken.

iOriginalExpiryTime

TTime iOriginalExpiryTime[protected]

This attribute is only used in the instance whereby an alarm is snoozed. It represents the time at which the alarm first expired.

iRepeatDefinition

TAlarmRepeatDefinition iRepeatDefinition[protected]

Controls how the alarm repeats after it has expired. Note that session alarms are not allowed to repeat (they must be "once only").

iSoundName

TAlarmSoundName iSoundName[protected]

A descriptor which holds the name of the sound file which should be played when the alarm expires.

iState

TAlarmState iState[protected]

The state of this alarm (e.g. queued, notifying, notified, snoozed etc)

iStatus

TAlarmStatus iStatus[protected]

The status of this alarm (e.g. enabled, disabled)

Member Enumeration Documentation

Enum TASShdAlarmFlags

EnumeratorValueDescription
EASShdAlarmFlagsHasAssociatedData0
EASShdAlarmFlagsHasOwningSession1
EASShdAlarmFlagsHasBecomeOrphaned2
EASShdAlarmFlagsPermanentDisabled4

Set if alarm is disabled manually so that can not be enabled when locale changes.

Constructor & Destructor Documentation

TASShdAlarm ( )

IMPORT_CTASShdAlarm()

Default constructor.

Initializes all member data to default values.

Member Function Documentation

Category ( )

TAlarmCategory &Category()[inline]

Returns a writable version of the alarm's category.

Clients can use the category to tag each alarm with a specific code. This allows clients to identify all related alarms, such as all alarms associated with a particular application or application engine.

Returns: Alarm category.

Category ( )

TAlarmCategory Category()const [inline]

Return this alarm's category.

Returns: Alarm category.

Characteristics ( )

TAlarmCharacteristicsFlags &Characteristics()[inline]

Returns a writable version of the alarm's characteristics.

Returns: Alarm characteristics bit flags.

Characteristics ( )

TAlarmCharacteristicsFlags Characteristics()const [inline]

Returns the alarm's characteristics

Returns: Alarm characteristics bit flags.

ClientData1 ( )

TInt ClientData1()const [inline]

Returns the client data from slot 1 for this alarm.

Returns: The first client-specific integer.

ClientData1 ( )

TInt &ClientData1()[inline]

Returns a writable version of the client data from slot 1 for this alarm.

Returns: Reference to the first client-specific integer.

ClientData2 ( )

TInt ClientData2()const [inline]

Returns the client data from slot 2 for this alarm.

Returns: The second client-specific integer.

ClientData2 ( )

TInt &ClientData2()[inline]

Returns the client data from slot 2 for this alarm.

Returns: The second client-specific integer.

ClientFlags ( )

TBitFlags16 &ClientFlags()[inline]

Returns a writable version of the alarm's client flags.

The client flags may be used for any client-specific data - the alarm server does not use them.

Returns: Reference to the alarm's bit flags.

ClientFlags ( )

TBitFlags16 ClientFlags()const [inline]

Returns this alarm's client flags.

Returns: Reference to the alarm's bit flags.

DayOrTimed ( )

TAlarmDayOrTimed DayOrTimed()const [inline]

Returns the alarm session type.

Returns: Alarm session type.

DayOrTimed ( )

TAlarmDayOrTimed &DayOrTimed()[inline]

Returns a writable version of the alarm type, i.e. day, timed

Returns: iDayOrTimed.

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Externalizes the alarm's member data to a write stream.

ParameterDescription
aStreamThe stream to write to.

GetSid ( )

TSecureId GetSid()const [inline]

HasAssociatedData ( )

IMPORT_C TBoolHasAssociatedData()const

Tests whether the alarm has any associated data.

Returns: True if the alarm has associated data.

HasBecomeOrphaned ( )

IMPORT_C TBoolHasBecomeOrphaned()const

Tests whether the alarm is orphaned.

An alarm is ophaned if it used to have an owning session, but no longer does. If an alarm is owned by a session, it is removed from the queue when the session disconnects. However, orphaned alarms stay in the queue.

Returns: True if the alarm has becomed orphaned.

HasOwningSession ( )

IMPORT_C TBoolHasOwningSession()const

Tests whether the alarm has an active owning session.

Returns: True if the alarm has an active owning session.

Id ( )

TAlarmId &Id()[inline]

Returns a writable version of the alarm's unique identifier.

Returns: Reference to the unique identifier.

Id ( )

TAlarmId Id()const [inline]

Return the alarm's unique identifier.

Returns: The unique identifier.

InternalizeL ( RReadStream & )

IMPORT_C voidInternalizeL(RReadStream &aStream)

Internalizes the alarm's data from a read stream.

ParameterDescription
aStreamThe stream to read from.

IsFloating ( )

TBool IsFloating()const [inline]

Tests whether the alarm is floating.

Floating alarms expire at a given wall-clock time regardless of the current locale and whether any daylight saving time rules are in force.

Returns: True if the alarm is floating.

Message ( )

TAlarmMessage &Message()[inline]

Returns a writable version of the alarm's message.

The message is usually displayed in the application UI when the alarm expires.

Returns: Reference to the alarm's associated message.

Message ( )

const TAlarmMessage &Message()const [inline]

Returns the alarm's message.

The message is usually displayed in the application UI when the alarm expires.

Returns: Reference to the alarm's associated message.

NextDueTime ( )

TTime &NextDueTime()[inline]

Returns a writable version of the next time the alarm is scheduled to expire.

Returns: Next expiry time.

NextDueTime ( )

const TTime &NextDueTime()const [inline]

Returns the next time that the alarm is scheduled to expire.

Returns: Next expiry time.

OriginalExpiryTime ( )

TTime &OriginalExpiryTime()[inline]

Returns a writable version of the alarm's original expiry time.

Returns: Original expiry time.

OriginalExpiryTime ( )

const TTime &OriginalExpiryTime()const [inline]

Returns the alarm's original expiry time.

The original expiry time is the same as the next due time, unless the alarm has been snoozed. In that case, the original expiry time is the time when the alarm first expired, and the next due time is when it is to re-awaken after the snooze.

Returns: Original expiry time.

RepeatDefinition ( )

TAlarmRepeatDefinition &RepeatDefinition()[inline]

Returns a writable version of the alarm's repeat definition.

The repeat definition controls the alarm's behaviour after it has expired. For example, you can set the repeat definition so that the server automatically queues the alarm to expire again in exactly 24 hours time.

Returns: Alarm repeat definition.

RepeatDefinition ( )

TAlarmRepeatDefinition RepeatDefinition()const [inline]

Returns the repeat definition for the alarm.

Returns: The alarm's repeat definition.

Reset ( )

IMPORT_C voidReset()

Resets the alarm back to a default, uninitialized state.

SetDeQueueIfDueTimeInPast ( )

IMPORT_C voidSetDeQueueIfDueTimeInPast()

Using this API to tell the alarmserver not to notify the Agenda alarms if its due time is in the past after system time has been changed.

SetSid ( const TSecureId & )

voidSetSid(const TSecureId &aSecureID)[inline]

The Secure ID is only used in the secured platform

SetUtcNextDueTime ( TTime )

IMPORT_C voidSetUtcNextDueTime(TTimeaUtcTime)

Using this API to set the next due time of an alarm will make it a fixed alarm, that is going to expire at the given UTC time. The alarm will not be rescheduled when the UTC offset is changed.

ParameterDescription
aUtcTimeThe due time of the alarm should be given in UTC.

SoundName ( )

TAlarmSoundName &SoundName()[inline]

Return a writable version of the alarm sound's filename.

Returns: Reference to the alarm's sound filename.

SoundName ( )

const TAlarmSoundName &SoundName()const [inline]

Returns the alarm's sound filename.

Returns: Sound filename.

State ( )

TAlarmState State()const [inline]

Returns the alarm state.

Returns: Alarm state.

Status ( )

TAlarmStatus Status()const [inline]

Returns the alarm status.

Returns: Alarm status.