RASCliSession Class Reference

class RASCliSession : public RSessionBase

The client-side interface to the Symbian OS alarm server.

Inherits from

Public Member Functions
RASCliSession ()
IMPORT_C TInt AlarmAdd ( TASShdAlarm &)
IMPORT_C TInt AlarmAdd ( TASShdAlarm &, const TDesC8 &)
IMPORT_C void AlarmAddWithNotification ( TRequestStatus &, TASShdAlarm &)
IMPORT_C void AlarmAddWithNotification ( TRequestStatus &, TASShdAlarm &, const TDesC8 &)
IMPORT_C TInt AlarmCountByState ( TAlarmState )
IMPORT_C TInt AlarmDataAttachL ( TAlarmId , const TDesC8 &)
IMPORT_C TInt AlarmDataDetach ( TAlarmId )
TInt AlarmDataDetatch ( TAlarmId )
IMPORT_C TInt AlarmDataSize ( TAlarmId )
IMPORT_C TInt AlarmDelete ( TAlarmId )
IMPORT_C TInt AlarmDeleteAllByCategory ( TAlarmCategory , TBool )
IMPORT_C TInt AlarmDeleteByCalendarFile (const TDesC &, TDeleteType )
IMPORT_C TInt AlarmDeleteByCategory ( TAlarmCategory , TDeleteType )
IMPORT_C void AlarmNotificationCancelAndDequeue ( TAlarmId )
IMPORT_C TBool AlarmSoundsTemporarilySilenced ()
IMPORT_C TInt CancelAlarmSilence ()
IMPORT_C TInt Connect ()
IMPORT_C TInt GetAlarmCategory ( TAlarmId , TAlarmCategory &)
IMPORT_C TInt GetAlarmCharacteristics ( TAlarmId , TAlarmCharacteristicsFlags &)
IMPORT_C TInt GetAlarmCountForCategory ( TAlarmCategory )
IMPORT_C TInt GetAlarmData ( TAlarmId , TDes8 &)
IMPORT_C TInt GetAlarmData ( TAlarmId , HBufC8 *&)
IMPORT_C TInt GetAlarmDayOrTimed ( TAlarmId , TAlarmDayOrTimed &)
IMPORT_C TInt GetAlarmDetails ( TAlarmId , TASShdAlarm &)
IMPORT_C void GetAlarmIdListByStateL ( TAlarmState , RArray < TAlarmId > &)
IMPORT_C void GetAlarmIdListForCategoryL ( TAlarmCategory , RArray < TAlarmId > &)
IMPORT_C void GetAlarmIdListL ( RArray < TAlarmId > &)
IMPORT_C TInt GetAlarmOwner ( TAlarmId , TFullName &)
IMPORT_C void GetAlarmPlayIntervalsL ( CArrayFix < TASCliSoundPlayDefinition > &)
IMPORT_C TInt GetAlarmSoundState ( TAlarmGlobalSoundState &)
IMPORT_C TInt GetAlarmSoundsSilentUntil ( TTime &)
IMPORT_C TInt GetAlarmStatus ( TAlarmId , TAlarmStatus &)
IMPORT_C void GetAvailableCategoryListL ( RArray < TAlarmCategory > &)
IMPORT_C TInt GetNextDueAlarmId ( TAlarmId &)
IMPORT_C void NotifyChange ( TRequestStatus &, TAlarmId &)
IMPORT_C void NotifyChangeCancel ()
IMPORT_C TInt NumberOfAlarmsActiveInQueue ()
IMPORT_C TInt SetAlarmCharacteristics ( TAlarmId , TAlarmCharacteristicsFlags )
IMPORT_C TInt SetAlarmDayOrTimed ( TAlarmId , TAlarmDayOrTimed )
IMPORT_C void SetAlarmPlayIntervalsL (const CArrayFix < TASCliSoundPlayDefinition > &)
IMPORT_C TInt SetAlarmSoundState ( TAlarmGlobalSoundState )
IMPORT_C TInt SetAlarmSoundsSilentFor ( TTimeIntervalMinutes )
IMPORT_C TInt SetAlarmSoundsSilentUntil (const TTime &)
IMPORT_C TInt SetAlarmStatus ( TAlarmId , TAlarmStatus )
IMPORT_C TInt SetAlarmStatusByCategory ( TAlarmCategory , TAlarmStatus )
IMPORT_C TInt SetAlarmStatusForCalendarFile (const TDesC &, TAlarmStatus )
IMPORT_C TInt SetClientData (const TASShdAlarm &)
IMPORT_C TVersion Version ()
IMPORT_C void __DbgFailAlloc ( TInt )
IMPORT_C void __DbgPreventUserNotify ( TBool )
IMPORT_C TInt __DbgSetEnvChgHandling ( TBool )
IMPORT_C void __DbgShutDownServer ()
IMPORT_C TInt __DbgSnoozeAlarm ( TAlarmId , const TTime &)
Private Member Functions
TInt DoAlarmAdd ( TASShdAlarm &, const TDesC8 &)
void DoAlarmAddWithNotification ( TRequestStatus &, TASShdAlarm &, const TDesC8 &)
void FetchAlarmIdsFromBufferL ( RArray < TAlarmId > &, TInt )
CBufBase * FetchTransferBufferLC ( TInt )
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::Close()
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Private Attributes
TPtr8 iAlarmIdPointer
TPtr8 iPackage
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RASCliSession()

IMPORT_C RASCliSession ( )

Default constructor.

Creates an instance of the RASCliSession class, setting its pointers to null.

Member Functions Documentation

AlarmAdd(TASShdAlarm &)

IMPORT_C TInt AlarmAdd ( TASShdAlarm & aAlarm ) const

Validates an alarm object, allocates an unique identifier to it, and adds the object synchronously to the alarm server's queue.

capability
WriteUserData

Parameters

TASShdAlarm & aAlarm The alarm object to add. On return, contains a unique identifier that the client can use to identify the alarm.

AlarmAdd(TASShdAlarm &, const TDesC8 &)

IMPORT_C TInt AlarmAdd ( TASShdAlarm & aAlarm,
const TDesC8 & aData
) const

Validates an alarm object, allocates an unique identifier to it, and adds the object with data synchronously to the alarm server's queue.

capability
WriteUserData

Parameters

TASShdAlarm & aAlarm The alarm object to add. On return, contains a unique identifier that the client can use to identify the alarm.
const TDesC8 & aData Client-specific data to associate with the alarm.

AlarmAddWithNotification(TRequestStatus &, TASShdAlarm &)

IMPORT_C void AlarmAddWithNotification ( TRequestStatus & aStatus,
TASShdAlarm & aAlarm
)

Makes an asynchronous request to add an alarm object to the alarm server's queue.

It also allocates a unique identifier of type TAlarmId to the alarm object and adds the alarm object to the alarm server's queue.

When the alarm expires, or is cancelled, the alarm server notifies the client by completing the outstanding request.

capability
WriteUserData

Parameters

TRequestStatus & aStatus On completion of the request, this object holds the completion code.
TASShdAlarm & aAlarm The alarm to add. On return, contains the unique identifier. KNullAlarmId indicates failure.

AlarmAddWithNotification(TRequestStatus &, TASShdAlarm &, const TDesC8 &)

IMPORT_C void AlarmAddWithNotification ( TRequestStatus & aStatus,
TASShdAlarm & aAlarm,
const TDesC8 & aData
)

Makes an asynchronous request to add an alarm object with the agenda entry information attached to the alarm server's queue.

It also allocates a unique identifier of type TAlarmId to the alarm object and adds the alarm object to the alarm server's queue.

When the alarm expires, or is cancelled, the alarm server notifies the client by completing the outstanding request.

capability
WriteUserData

Parameters

TRequestStatus & aStatus On completion of the request, this object holds the completion code.
TASShdAlarm & aAlarm The alarm to add. On return, contains the unique identifier. KNullAlarmId indicates failure.
const TDesC8 & aData Client-specific data to associate with the alarm.

AlarmCountByState(TAlarmState)

IMPORT_C TInt AlarmCountByState ( TAlarmState aState ) const

Returns the number of alarms in a specified state.

capability
None

Parameters

TAlarmState aState Alarm state of interest.

AlarmDataAttachL(TAlarmId, const TDesC8 &)

IMPORT_C TInt AlarmDataAttachL ( TAlarmId aAlarmId,
const TDesC8 & aData
) const

Associates the specified data with an alarm.

This is arbitrary client-specific data, for which the alarm server simply acts as a router.

capability
Note If the user does not have WriteDeviceData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmId aAlarmId Unique identifier of the alarm.
const TDesC8 & aData Client-specific data to associate with the alarm.

AlarmDataDetach(TAlarmId)

IMPORT_C TInt AlarmDataDetach ( TAlarmId aAlarmId ) const

Removes any previously attached alarm data from the specified alarm.

This releases any resources allocated by the alarm server for this alarm.

capability
Note If the user does not have WriteDeviceData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmId aAlarmId Unique identifier for the alarm.

AlarmDataDetatch(TAlarmId)

TInt AlarmDataDetatch ( TAlarmId aAlarmId ) const [inline]

8.0

RASCliSession::AlarmDataDetach() should be used instead

Parameters

TAlarmId aAlarmId

AlarmDataSize(TAlarmId)

IMPORT_C TInt AlarmDataSize ( TAlarmId aAlarmId ) const

Returns the size in bytes of any data associated with the specified alarm.

capability
None

Parameters

TAlarmId aAlarmId Unique identifier of the alarm under query.

AlarmDelete(TAlarmId)

IMPORT_C TInt AlarmDelete ( TAlarmId aAlarmId ) const
Deletes an alarm from the alarm server.
capability
Note If the user does not have WriteDeviceData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmId aAlarmId The unique identifier of the alarm to be deleted.

AlarmDeleteAllByCategory(TAlarmCategory, TBool)

IMPORT_C TInt AlarmDeleteAllByCategory ( TAlarmCategory aCategory,
TBool aDeleteOnlyOrphanedAlarmsInCategory
) const

Deletes all alarms in the queue corresponding to a specified category.

You can also specify that only the orphaned alarms of that category be deleted.

capability
Note If the user does not have WriteDeviceData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmCategory aCategory Category of alarms to be deleted.
TBool aDeleteOnlyOrphanedAlarmsInCategory ETrue: delete only orphaned alarms within the category. EFalse: delete all alarms within the category.

AlarmDeleteByCalendarFile(const TDesC &, TDeleteType)

IMPORT_C TInt AlarmDeleteByCalendarFile ( const TDesC & aFileName,
TDeleteType aWhatToDelete
) const

Delete alarms based on their type and the Calendar filename to which alarms belong

capability
Note If the user does not have WriteDeviceData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

const TDesC & aFileName specify the name of the Calendar file which alarms came from
TDeleteType aWhatToDelete specify what type of alarms to delte within the category.

AlarmDeleteByCategory(TAlarmCategory, TDeleteType)

IMPORT_C TInt AlarmDeleteByCategory ( TAlarmCategory aCategory,
TDeleteType aWhatToDelete
) const

Deletes alarms in the queue corresponding to a specified category and type.

capability
Note If the user does not have WriteDeviceData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmCategory aCategory Category of alarms to be deleted.
TDeleteType aWhatToDelete specify what type of alarms to delte within the category.

AlarmNotificationCancelAndDequeue(TAlarmId)

IMPORT_C void AlarmNotificationCancelAndDequeue ( TAlarmId aAlarmId ) const
Cancels an outstanding notification for an alarm and removes it from the queue.
capability
Note If the user does not have WriteDeviceData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmId aAlarmId The unique identifier of the alarm to be cancelled.

AlarmSoundsTemporarilySilenced()

IMPORT_C TBool AlarmSoundsTemporarilySilenced ( ) const

Tests whether the alarm server has temporarily disabled sounds.

capability
None

CancelAlarmSilence()

IMPORT_C TInt CancelAlarmSilence ( ) const

Cancels the silent period, turning the alarm sounds on.

capability
WriteDeviceData

Connect()

IMPORT_C TInt Connect ( )
Connects the client process to the alarm server, starting the server if it is not already running.
capability
None

DoAlarmAdd(TASShdAlarm &, const TDesC8 &)

TInt DoAlarmAdd ( TASShdAlarm & aAlarm,
const TDesC8 & aData
) const [private]
capability
WriteUserData

Parameters

TASShdAlarm & aAlarm
const TDesC8 & aData

DoAlarmAddWithNotification(TRequestStatus &, TASShdAlarm &, const TDesC8 &)

void DoAlarmAddWithNotification ( TRequestStatus & aStatus,
TASShdAlarm & aAlarm,
const TDesC8 & aData
) [private]
capability
WriteUserData

Parameters

TRequestStatus & aStatus
TASShdAlarm & aAlarm
const TDesC8 & aData

FetchAlarmIdsFromBufferL(RArray< TAlarmId > &, TInt)

void FetchAlarmIdsFromBufferL ( RArray < TAlarmId > & aAlarmIds,
TInt aBufferSize
) const [private]
capability
None

Parameters

RArray < TAlarmId > & aAlarmIds
TInt aBufferSize

FetchTransferBufferLC(TInt)

CBufBase * FetchTransferBufferLC ( TInt aBufferSize ) const [private]

Create a buffer of sufficient size in order to fetch the buffer from the server

capability
None

Parameters

TInt aBufferSize

GetAlarmCategory(TAlarmId, TAlarmCategory &)

IMPORT_C TInt GetAlarmCategory ( TAlarmId aAlarmId,
TAlarmCategory & aCategory
) const

Retrieves the category of an alarm.

capability
None

Parameters

TAlarmId aAlarmId The unique identifier of the alarm under query.
TAlarmCategory & aCategory On return, contains the category of the alarm.

GetAlarmCharacteristics(TAlarmId, TAlarmCharacteristicsFlags &)

IMPORT_C TInt GetAlarmCharacteristics ( TAlarmId aAlarmId,
TAlarmCharacteristicsFlags & aCharacteristics
) const

Gets the characteristics of an alarm.

capability
None

Parameters

TAlarmId aAlarmId Unique identifier of the alarm under query.
TAlarmCharacteristicsFlags & aCharacteristics On return, contains the charcteristics of the alarm specified.

GetAlarmCountForCategory(TAlarmCategory)

IMPORT_C TInt GetAlarmCountForCategory ( TAlarmCategory aCategory ) const

Returns the number of alarms in a specified category.

capability
None

Parameters

TAlarmCategory aCategory Category of alarm under query.

GetAlarmData(TAlarmId, TDes8 &)

IMPORT_C TInt GetAlarmData ( TAlarmId aAlarmId,
TDes8 & aSink
) const

Retrieves the data attached to the specified alarm.

This is data previously attached using AlarmDataAttachL() .

capability
Note If the user does not have ReadUserData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmId aAlarmId Unique identifier of the alarm under query.
TDes8 & aSink On return, contains the data associated with the alarm. This buffer must be large enough to contain all the data or a panic occurs.

GetAlarmData(TAlarmId, HBufC8 *&)

IMPORT_C TInt GetAlarmData ( TAlarmId aAlarmId,
HBufC8 *& aSink
) const

Retrieves the data attached to the specified alarm.

This is data previously attached using AlarmDataAttachL() .

capability
Note If the user does not have ReadUserData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmId aAlarmId Unique identifier of the alarm under query.
HBufC8 *& aSink On return, contains the data associated with the alarm, or NULL if the specified alarm does not have any associated data, or an error was returned.

GetAlarmDayOrTimed(TAlarmId, TAlarmDayOrTimed &)

IMPORT_C TInt GetAlarmDayOrTimed ( TAlarmId aAlarmId,
TAlarmDayOrTimed & aDayOrTimed
) const

Tests whether the specified alarm is for a timed or untimed event.

capability
None

Parameters

TAlarmId aAlarmId Unique identifier of the alarm under query.
TAlarmDayOrTimed & aDayOrTimed On return, whether an alarm is for a timed or untimed event.

GetAlarmDetails(TAlarmId, TASShdAlarm &)

IMPORT_C TInt GetAlarmDetails ( TAlarmId aAlarmId,
TASShdAlarm & aAlarm
) const

Retrieves information about a specified alarm.

capability
Note If the user does not have ReadUserData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmId aAlarmId The unique identifier of the alarm under query.
TASShdAlarm & aAlarm On return, contains details of the alarm sought.

GetAlarmIdListByStateL(TAlarmState, RArray< TAlarmId > &)

IMPORT_C void GetAlarmIdListByStateL ( TAlarmState aState,
RArray < TAlarmId > & aAlarmIds
) const

Retrieves a list of the unique identifiers of all alarms in a specified state.

capability
None

Parameters

TAlarmState aState Alarm state that you are interested in.
RArray < TAlarmId > & aAlarmIds On return, contains the unique identifiers of the alarms in the specified state.

GetAlarmIdListForCategoryL(TAlarmCategory, RArray< TAlarmId > &)

IMPORT_C void GetAlarmIdListForCategoryL ( TAlarmCategory aCategory,
RArray < TAlarmId > & aAlarmIds
) const

Retrieves a list of all alarm identifiers for alarms within the server of a specified category.

capability
None

Parameters

TAlarmCategory aCategory Category of alarms to find.
RArray < TAlarmId > & aAlarmIds On return, contains the list of alarms.

GetAlarmIdListL(RArray< TAlarmId > &)

IMPORT_C void GetAlarmIdListL ( RArray < TAlarmId > & aAlarmIds ) const

Retrieves a list of the unique identifiers of all the alarms in the alarm server.

capability
None

Parameters

RArray < TAlarmId > & aAlarmIds On return, contains a list of unique identifiers.

GetAlarmOwner(TAlarmId, TFullName &)

IMPORT_C TInt GetAlarmOwner ( TAlarmId aAlarmId,
TFullName & aThreadName
) const

8.0

Retrieves the full name of the thread that owns the specified alarm.

capability
None

Parameters

TAlarmId aAlarmId The unique identifier of the alarm under query.
TFullName & aThreadName On return, contains the name of the owning session.

GetAlarmPlayIntervalsL(CArrayFix< TASCliSoundPlayDefinition > &)

IMPORT_C void GetAlarmPlayIntervalsL ( CArrayFix < TASCliSoundPlayDefinition > & aIntervals ) const

Retrieves the list of alarm intervals.

They are stored in ascending order of offset.

capability
None

Parameters

CArrayFix < TASCliSoundPlayDefinition > & aIntervals On return, contains the list of alarm intervals.

GetAlarmSoundState(TAlarmGlobalSoundState &)

IMPORT_C TInt GetAlarmSoundState ( TAlarmGlobalSoundState & aState ) const

Retrieves the alarm sound state. The alarm sound can be on or off.

capability
None

Parameters

TAlarmGlobalSoundState & aState On return, contains the alarm sound state.

GetAlarmSoundsSilentUntil(TTime &)

IMPORT_C TInt GetAlarmSoundsSilentUntil ( TTime & aLocalTime ) const

Retrieves the time at which all alarm sounds resume.

capability
None

Parameters

TTime & aLocalTime On return, contains the time, in local time, when sounds resume.

GetAlarmStatus(TAlarmId, TAlarmStatus &)

IMPORT_C TInt GetAlarmStatus ( TAlarmId aAlarmId,
TAlarmStatus & aStatus
) const

Retrieves the status of the alarm.

capability
None

Parameters

TAlarmId aAlarmId The unique identifier of an alarm under query.
TAlarmStatus & aStatus On return, the alarm status.

GetAvailableCategoryListL(RArray< TAlarmCategory > &)

IMPORT_C void GetAvailableCategoryListL ( RArray < TAlarmCategory > & aCategories ) const

Retrieves a list of all alarm categories in use within the alarm server.

capability
None

Parameters

RArray < TAlarmCategory > & aCategories On return, contains the list of available categories.

GetNextDueAlarmId(TAlarmId &)

IMPORT_C TInt GetNextDueAlarmId ( TAlarmId & aAlarmId ) const

Retrieves the unique identifier of the next alarm in the alarm server queue.

capability
None

Parameters

TAlarmId & aAlarmId On return, contains the unique identifier of the next alarm due.

NotifyChange(TRequestStatus &, TAlarmId &)

IMPORT_C void NotifyChange ( TRequestStatus & aStatus,
TAlarmId & aAlarmId
)

Enables client notification when alarm settings change, and when the next alarm time is calculated.

A panic occurs if notification is already active.

capability
None
TAlarmChangeEvent

Parameters

TRequestStatus & aStatus The request status object that is to be signalled. On return, contains one of the TAlarmChangeEvent enumeration values. If an error occurs, the TRequestStatus object contains one of the standard system-wide error codes.
TAlarmId & aAlarmId An alarm identifier relating to the type of event that took place. If the type of event that occurred relates to a particular alarm, this object is populated with that alarm's identiifer. Otherwise it contains an undefined value.

NotifyChangeCancel()

IMPORT_C void NotifyChangeCancel ( ) const

Cancels any previous change notification request.

capability
None
panic
Panics with AlarmClientUtils::EAlarmClientPanicNotificationCancel if the notification fails to occur.

NumberOfAlarmsActiveInQueue()

IMPORT_C TInt NumberOfAlarmsActiveInQueue ( ) const

Returns the number of alarms that are currently active within the alarm queue. Active alarms are:

Alarms that have not yet notified.

Alarms that are in the queued or snoozed state, and are enabled.

capability
None

SetAlarmCharacteristics(TAlarmId, TAlarmCharacteristicsFlags)

IMPORT_C TInt SetAlarmCharacteristics ( TAlarmId aAlarmId,
TAlarmCharacteristicsFlags aCharacteristics
) const

Sets the characteristics of a specified alarm.

If the session-specific flag is removed, the outstanding notification is completed.

capability
Note If the user does not have WriteDeviceData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmId aAlarmId Unique identifier of the alarm.
TAlarmCharacteristicsFlags aCharacteristics Alarm characteristics to apply.

SetAlarmDayOrTimed(TAlarmId, TAlarmDayOrTimed)

IMPORT_C TInt SetAlarmDayOrTimed ( TAlarmId aAlarmId,
TAlarmDayOrTimed aDayOrTimed
) const

Specifies whether an alarm belongs to a timed or untimed event.

capability
Note If the user does not have WriteDeviceData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmId aAlarmId Unique identifier of the alarm.
TAlarmDayOrTimed aDayOrTimed Whether an alarm is for a timed or untimed event.

SetAlarmPlayIntervalsL(const CArrayFix< TASCliSoundPlayDefinition > &)

IMPORT_C void SetAlarmPlayIntervalsL ( const CArrayFix < TASCliSoundPlayDefinition > & aIntervals ) const

Sets the list of alarm intervals.

Alarm intervals consist of a duration and an offset.

capability
WriteDeviceData
leave
KErrGeneral If the array is inappropriate, for example, if intervals overlap or has no elements. Also, from v9.2 onwards, if the array has only one element and the Repeat Setting is set to RepeatLast.
leave
KErrArgument If no interval has an offset of zero.
leave
KErrNotSupported The Alarm Play Intervals cannot be set because Alarm Play Intervals is disabled by resource file. (from v9.2 onwards)

Parameters

const CArrayFix < TASCliSoundPlayDefinition > & aIntervals Contains one or more alarm intervals. There must be one interval in the array with an offset of zero.

SetAlarmSoundState(TAlarmGlobalSoundState)

IMPORT_C TInt SetAlarmSoundState ( TAlarmGlobalSoundState aState ) const

Sets the alarm sound state to on or off.

capability
WriteDeviceData

Parameters

TAlarmGlobalSoundState aState The alarm sound state.

SetAlarmSoundsSilentFor(TTimeIntervalMinutes)

IMPORT_C TInt SetAlarmSoundsSilentFor ( TTimeIntervalMinutes aTimeToRemainSilentFor ) const

Disables alarm sounds for a specified interval.

Alarms still expire and clients are notified during this period, but no sound is played.

NOTE: If user or some application changes system time or UTC offset (for example by using User::SetUTCOffset() , User::SetHomeTime() , User::SetUTCTimeAndOffset() etc) the silent periond will be cancelled.

capability
WriteDeviceData

Parameters

TTimeIntervalMinutes aTimeToRemainSilentFor Time interval in minutes, during which no sound is to be played.

SetAlarmSoundsSilentUntil(const TTime &)

IMPORT_C TInt SetAlarmSoundsSilentUntil ( const TTime & aLocalTime ) const

Disables alarm sounds until a specified time.

Alarms still expire and clients are notified during this period, but no sound is played.

capability
WriteDeviceData

Parameters

const TTime & aLocalTime Time, in local time, when alarm sounds are to be played once more.

SetAlarmStatus(TAlarmId, TAlarmStatus)

IMPORT_C TInt SetAlarmStatus ( TAlarmId aAlarmId,
TAlarmStatus aStatus
) const

Sets an alarm's status to either enabled or disabled.

capability
Note If the user does not have WriteDeviceData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmId aAlarmId Unique identifier of the alarm.
TAlarmStatus aStatus Contains the status to be applied.

SetAlarmStatusByCategory(TAlarmCategory, TAlarmStatus)

IMPORT_C TInt SetAlarmStatusByCategory ( TAlarmCategory aCategory,
TAlarmStatus aStatus
) const

Set the status of all alarms in the specified category.

capability
Note If the user does not have WriteDeviceData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

TAlarmCategory aCategory An alarm category.
TAlarmStatus aStatus An alarm status.

SetAlarmStatusForCalendarFile(const TDesC &, TAlarmStatus)

IMPORT_C TInt SetAlarmStatusForCalendarFile ( const TDesC & aFileName,
TAlarmStatus aStatus
) const

Sets the alarm status for calendar file

Parameters

const TDesC & aFileName Calendar file name
TAlarmStatus aStatus Contains the status to be applied.

SetClientData(const TASShdAlarm &)

IMPORT_C TInt SetClientData ( const TASShdAlarm & aAlarm )

Sets if the alarm is a wakeup alarm

capability
None
The TASShdAlarm class contains a number of client-specific fields. These fields are for use by clients of the alarm server to hold any data associated with an alarm. Although this data is not used in any way by the alarm server itself, clients can ensure that the alarm server keeps its own copy of the specified alarm up to date with that of the client.
capability
Note If the user does not have WriteDeviceData capability then we need to check that the alarm belongs to the user SID (The SID is stored as part of the alarm)

Parameters

const TASShdAlarm & aAlarm The client-side alarm, whose corresponding server-side alarm is to be updated.

Version()

IMPORT_C TVersion Version ( ) const
Provides the version number of the alarm server.
capability
None

__DbgFailAlloc(TInt)

IMPORT_C void __DbgFailAlloc ( TInt aCount ) const

In debug builds, this will fail a memory allocation.

capability
None

Parameters

TInt aCount Set this to the number of allocations to fail, or 0 to reset the failure tool.

__DbgPreventUserNotify(TBool)

IMPORT_C void __DbgPreventUserNotify ( TBool aShouldStop ) const

In debug builds, this will prevent the Alarm Server from notifying the Alarm Alert Server about the expiry of an alarm.

capability
None

Parameters

TBool aShouldStop ETrue: Alarm Alert Server is not notified on alarm expiry EFalse: Alarm Alert Server is notified on alarm expiry

__DbgSetEnvChgHandling(TBool)

IMPORT_C TInt __DbgSetEnvChgHandling ( TBool aFlag ) const

In debug builds, this will switch handling of time/date changes by CASSrvEnvironmentChangeManager

capability
None

Parameters

TBool aFlag ETrue to enable and EFalse to disable handling

__DbgShutDownServer()

IMPORT_C void __DbgShutDownServer ( ) const

In debug builds, this will cause the Alarm Server to terminate.

capability
None

__DbgSnoozeAlarm(TAlarmId, const TTime &)

IMPORT_C TInt __DbgSnoozeAlarm ( TAlarmId aAlarmId,
const TTime & aNewTime
) const

In debug builds, this will cause the specified alarm to be snoozed.

capability
None

Parameters

TAlarmId aAlarmId Unique identifier of the alarm.
const TTime & aNewTime Time to reawaken alarm (as UTC time).

Member Data Documentation

TPtr8 iAlarmIdPointer

TPtr8 iAlarmIdPointer [private]

TPtr8 iPackage

TPtr8 iPackage [private]