RASCliSession Class Reference

#include <mw/asclisession.h>

Link against: alarmclient.lib

class RASCliSession : public RSessionBase

Inherits from

Public Member Functions
RASCliSession()
IMPORT_C TIntAlarmAdd(TASShdAlarm &)
IMPORT_C TIntAlarmAdd(TASShdAlarm &, const TDesC8 &)
IMPORT_C voidAlarmAddWithNotification(TRequestStatus &, TASShdAlarm &)
IMPORT_C voidAlarmAddWithNotification(TRequestStatus &, TASShdAlarm &, const TDesC8 &)
IMPORT_C TIntAlarmCountByState(TAlarmState)
IMPORT_C TIntAlarmDataAttachL(TAlarmId, const TDesC8 &)
IMPORT_C TIntAlarmDataDetach(TAlarmId)
TInt AlarmDataDetatch(TAlarmId)
IMPORT_C TIntAlarmDataSize(TAlarmId)
IMPORT_C TIntAlarmDelete(TAlarmId)
IMPORT_C TIntAlarmDeleteAllByCategory(TAlarmCategory, TBool)
IMPORT_C TIntAlarmDeleteByCalendarFile(const TDesC &, TDeleteType)
IMPORT_C TIntAlarmDeleteByCategory(TAlarmCategory, TDeleteType)
IMPORT_C voidAlarmNotificationCancelAndDequeue(TAlarmId)
IMPORT_C TBoolAlarmSoundsTemporarilySilenced()
IMPORT_C TIntCancelAlarmSilence()
IMPORT_C TIntConnect()
IMPORT_C TIntGetAlarmCategory(TAlarmId, TAlarmCategory &)
IMPORT_C TIntGetAlarmCharacteristics(TAlarmId, TAlarmCharacteristicsFlags &)
IMPORT_C TIntGetAlarmCountForCategory(TAlarmCategory)
IMPORT_C TIntGetAlarmData(TAlarmId, TDes8 &)
IMPORT_C TIntGetAlarmData(TAlarmId, HBufC8 *&)
IMPORT_C TIntGetAlarmDayOrTimed(TAlarmId, TAlarmDayOrTimed &)
IMPORT_C TIntGetAlarmDetails(TAlarmId, TASShdAlarm &)
IMPORT_C voidGetAlarmIdListByStateL(TAlarmState, RArray< TAlarmId > &)
IMPORT_C voidGetAlarmIdListForCategoryL(TAlarmCategory, RArray< TAlarmId > &)
IMPORT_C voidGetAlarmIdListL(RArray< TAlarmId > &)
IMPORT_C TIntGetAlarmOwner(TAlarmId, TFullName &)
IMPORT_C voidGetAlarmPlayIntervalsL(CArrayFix< TASCliSoundPlayDefinition > &)
IMPORT_C TIntGetAlarmSoundState(TAlarmGlobalSoundState &)
IMPORT_C TIntGetAlarmSoundsSilentUntil(TTime &)
IMPORT_C TIntGetAlarmStatus(TAlarmId, TAlarmStatus &)
IMPORT_C voidGetAvailableCategoryListL(RArray< TAlarmCategory > &)
IMPORT_C TIntGetNextDueAlarmId(TAlarmId &)
IMPORT_C voidNotifyChange(TRequestStatus &, TAlarmId &)
IMPORT_C voidNotifyChangeCancel()
IMPORT_C TIntNumberOfAlarmsActiveInQueue()
IMPORT_C TIntSetAlarmCharacteristics(TAlarmId, TAlarmCharacteristicsFlags)
IMPORT_C TIntSetAlarmDayOrTimed(TAlarmId, TAlarmDayOrTimed)
IMPORT_C voidSetAlarmPlayIntervalsL(const CArrayFix< TASCliSoundPlayDefinition > &)
IMPORT_C TIntSetAlarmSoundState(TAlarmGlobalSoundState)
IMPORT_C TIntSetAlarmSoundsSilentFor(TTimeIntervalMinutes)
IMPORT_C TIntSetAlarmSoundsSilentUntil(const TTime &)
IMPORT_C TIntSetAlarmStatus(TAlarmId, TAlarmStatus)
IMPORT_C TIntSetAlarmStatusByCategory(TAlarmCategory, TAlarmStatus)
IMPORT_C TIntSetAlarmStatusForCalendarFile(const TDesC &, TAlarmStatus)
IMPORT_C TIntSetClientData(const TASShdAlarm &)
IMPORT_C TVersionVersion()
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 &)
Inherited Attributes
RHandleBase::iHandle
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
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()

Detailed Description

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

Constructor & Destructor Documentation

RASCliSession ( )

IMPORT_CRASCliSession()

Default constructor.

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

Member Function Documentation

AlarmAdd ( TASShdAlarm & )

IMPORT_C TIntAlarmAdd(TASShdAlarm &aAlarm)const

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

Parameters
aAlarmThe alarm object to add. On return, contains a unique identifier that the client can use to identify the alarm.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.
Capability
WriteUserData

AlarmAdd ( TASShdAlarm &, const TDesC8 & )

IMPORT_C TIntAlarmAdd(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.

Parameters
aAlarmThe alarm object to add. On return, contains a unique identifier that the client can use to identify the alarm.
aDataClient-specific data to associate with the alarm.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.
Capability
WriteUserData

AlarmAddWithNotification ( TRequestStatus &, TASShdAlarm & )

IMPORT_C voidAlarmAddWithNotification(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.

Parameters
aStatusOn completion of the request, this object holds the completion code.
aAlarmThe alarm to add. On return, contains the unique identifier. KNullAlarmId indicates failure.
Capability
WriteUserData

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

IMPORT_C voidAlarmAddWithNotification(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.

Parameters
aStatusOn completion of the request, this object holds the completion code.
aAlarmThe alarm to add. On return, contains the unique identifier. KNullAlarmId indicates failure.
aDataClient-specific data to associate with the alarm.
Capability
WriteUserData

AlarmCountByState ( TAlarmState )

IMPORT_C TIntAlarmCountByState(TAlarmStateaState)const

Returns the number of alarms in a specified state.

Parameters
aStateAlarm state of interest.
Return Value
Number of alarms in the specified state.
Capability
None

AlarmDataAttachL ( TAlarmId, const TDesC8 & )

IMPORT_C TIntAlarmDataAttachL(TAlarmIdaAlarmId,
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.

Parameters
aAlarmIdUnique identifier of the alarm.
aDataClient-specific data to associate with the alarm.
Return Value
KErrNone if successful, KErrInUse if the specified alarm already has data assigned to it, or one of the system-wide error codes.
Capability
NoteIf 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)

AlarmDataDetach ( TAlarmId )

IMPORT_C TIntAlarmDataDetach(TAlarmIdaAlarmId)const

Removes any previously attached alarm data from the specified alarm.

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

Parameters
aAlarmIdUnique identifier for the alarm.
Return Value
KErrNone if successful, KErrNotFound if the specified alarm does not exist (or the specified alarm does not have any data), or another of the system-wide error codes.
Capability
NoteIf 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)

AlarmDataDetatch ( TAlarmId )

TInt AlarmDataDetatch(TAlarmIdaAlarmId)const [inline]

Deprecated8.0

RASCliSession::AlarmDataDetach() should be used instead

AlarmDataSize ( TAlarmId )

IMPORT_C TIntAlarmDataSize(TAlarmIdaAlarmId)const

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

Parameters
aAlarmIdUnique identifier of the alarm under query.
Return Value
The size in bytes of the alarm's data, or an error. KErrNotFound is returned if the specified alarm does not have any associated data.
Capability
None

AlarmDelete ( TAlarmId )

IMPORT_C TIntAlarmDelete(TAlarmIdaAlarmId)const
Deletes an alarm from the alarm server.
Parameters
aAlarmIdThe unique identifier of the alarm to be deleted.
Return Value
KErrNone if successful, KErrNotFound if the specified alarm does not exist, KErrAccessDenied if the alarm has an outstanding notification, or else one of the system-wide error codes.
Capability
NoteIf 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)

AlarmDeleteAllByCategory ( TAlarmCategory, TBool )

IMPORT_C TIntAlarmDeleteAllByCategory(TAlarmCategoryaCategory,
TBoolaDeleteOnlyOrphanedAlarmsInCategory
)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.

Parameters
aCategoryCategory of alarms to be deleted.
aDeleteOnlyOrphanedAlarmsInCategoryETrue: delete only orphaned alarms within the category. EFalse: delete all alarms within the category.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.
Capability
NoteIf 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)

AlarmDeleteByCalendarFile ( const TDesC &, TDeleteType )

IMPORT_C TIntAlarmDeleteByCalendarFile(const TDesC &aFileName,
TDeleteTypeaWhatToDelete
)const

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

Parameters
aFileNamespecify the name of the Calendar file which alarms came from
aWhatToDeletespecify what type of alarms to delte within the category.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.
Capability
NoteIf 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)

AlarmDeleteByCategory ( TAlarmCategory, TDeleteType )

IMPORT_C TIntAlarmDeleteByCategory(TAlarmCategoryaCategory,
TDeleteTypeaWhatToDelete
)const

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

Parameters
aCategoryCategory of alarms to be deleted.
aWhatToDeletespecify what type of alarms to delte within the category.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.
Capability
NoteIf 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)

AlarmNotificationCancelAndDequeue ( TAlarmId )

IMPORT_C voidAlarmNotificationCancelAndDequeue(TAlarmIdaAlarmId)const
Cancels an outstanding notification for an alarm and removes it from the queue.
Parameters
aAlarmIdThe unique identifier of the alarm to be cancelled.
Capability
NoteIf 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)

AlarmSoundsTemporarilySilenced ( )

IMPORT_C TBoolAlarmSoundsTemporarilySilenced()const

Tests whether the alarm server has temporarily disabled sounds.

Return Value
ETrue: alarms are temporarily silent. EFalse: sounds are not silent.
Capability
None

CancelAlarmSilence ( )

IMPORT_C TIntCancelAlarmSilence()const

Cancels the silent period, turning the alarm sounds on.

Return Value
KErrNone if successful, otherwise one of the system-wide error codes.
Capability
WriteDeviceData

Connect ( )

IMPORT_C TIntConnect()
Connects the client process to the alarm server, starting the server if it is not already running.
Return Value
KErrNone if successful, otherwise one of the system-wide errors.
Capability
None

GetAlarmCategory ( TAlarmId, TAlarmCategory & )

IMPORT_C TIntGetAlarmCategory(TAlarmIdaAlarmId,
TAlarmCategory &aCategory
)const

Retrieves the category of an alarm.

Parameters
aAlarmIdThe unique identifier of the alarm under query.
aCategoryOn return, contains the category of the alarm.
Return Value
KErrNone if successful, KErrNotFound if the alarm does not exist, otherwise one of the system-wide error codes.
Capability
None

GetAlarmCharacteristics ( TAlarmId, TAlarmCharacteristicsFlags & )

IMPORT_C TIntGetAlarmCharacteristics(TAlarmIdaAlarmId,
TAlarmCharacteristicsFlags &aCharacteristics
)const

Gets the characteristics of an alarm.

Parameters
aAlarmIdUnique identifier of the alarm under query.
aCharacteristicsOn return, contains the charcteristics of the alarm specified.
Return Value
KErrNone if successful, otherwise one of the system-wide errors.
Capability
None

GetAlarmCountForCategory ( TAlarmCategory )

IMPORT_C TIntGetAlarmCountForCategory(TAlarmCategoryaCategory)const

Returns the number of alarms in a specified category.

Parameters
aCategoryCategory of alarm under query.
Return Value
Number of alarms in the specified category, or, if negative, one of the standard error codes..
Capability
None

GetAlarmData ( TAlarmId, TDes8 & )

IMPORT_C TIntGetAlarmData(TAlarmIdaAlarmId,
TDes8 &aSink
)const

Retrieves the data attached to the specified alarm.

This is data previously attached using AlarmDataAttachL().

Parameters
aAlarmIdUnique identifier of the alarm under query.
aSinkOn return, contains the data associated with the alarm. This buffer must be large enough to contain all the data or a panic occurs.
Return Value
KErrNone if successful, KErrNotFound if the specified alarm does not have any associated data, or a system-wide error.
Capability
NoteIf 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)

GetAlarmData ( TAlarmId, HBufC8 *& )

IMPORT_C TIntGetAlarmData(TAlarmIdaAlarmId,
HBufC8 *&aSink
)const

Retrieves the data attached to the specified alarm.

This is data previously attached using AlarmDataAttachL().

Parameters
aAlarmIdUnique identifier of the alarm under query.
aSinkOn 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.
Return Value
KErrNone if successful, KErrNotFound if the specified alarm does not have any associated data, or a system-wide error.
Capability
NoteIf 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)

GetAlarmDayOrTimed ( TAlarmId, TAlarmDayOrTimed & )

IMPORT_C TIntGetAlarmDayOrTimed(TAlarmIdaAlarmId,
TAlarmDayOrTimed &aDayOrTimed
)const

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

Parameters
aAlarmIdUnique identifier of the alarm under query.
aDayOrTimedOn return, whether an alarm is for a timed or untimed event.
Return Value
KErrNone if successful, otherwise one of the system-wide errors.
Capability
None

GetAlarmDetails ( TAlarmId, TASShdAlarm & )

IMPORT_C TIntGetAlarmDetails(TAlarmIdaAlarmId,
TASShdAlarm &aAlarm
)const

Retrieves information about a specified alarm.

Parameters
aAlarmIdThe unique identifier of the alarm under query.
aAlarmOn return, contains details of the alarm sought.
Return Value
KErrNone if successful, KErrCouldNotConnect if the time zone server is not available, otherwise one of the other system-wide error codes.
Capability
NoteIf 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)

GetAlarmIdListByStateL ( TAlarmState, RArray< TAlarmId > & )

IMPORT_C voidGetAlarmIdListByStateL(TAlarmStateaState,
RArray< TAlarmId > &aAlarmIds
)const

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

Parameters
aStateAlarm state that you are interested in.
aAlarmIdsOn return, contains the unique identifiers of the alarms in the specified state.
Capability
None

GetAlarmIdListForCategoryL ( TAlarmCategory, RArray< TAlarmId > & )

IMPORT_C voidGetAlarmIdListForCategoryL(TAlarmCategoryaCategory,
RArray< TAlarmId > &aAlarmIds
)const

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

Parameters
aCategoryCategory of alarms to find.
aAlarmIdsOn return, contains the list of alarms.
Capability
None

GetAlarmIdListL ( RArray< TAlarmId > & )

IMPORT_C voidGetAlarmIdListL(RArray< TAlarmId > &aAlarmIds)const

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

Parameters
aAlarmIdsOn return, contains a list of unique identifiers.
Capability
None

GetAlarmOwner ( TAlarmId, TFullName & )

IMPORT_C TIntGetAlarmOwner(TAlarmIdaAlarmId,
TFullName &aThreadName
)const

Deprecated8.0

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

Parameters
aAlarmIdThe unique identifier of the alarm under query.
aThreadNameOn return, contains the name of the owning session.
Return Value
KErrNone if successful, KErrNotFound if the alarm has no originating session ID or if the session is no longer connected, otherwise one of the system-wide errors.
Capability
None

GetAlarmPlayIntervalsL ( CArrayFix< TASCliSoundPlayDefinition > & )

IMPORT_C voidGetAlarmPlayIntervalsL(CArrayFix< TASCliSoundPlayDefinition > &aIntervals)const

Retrieves the list of alarm intervals.

They are stored in ascending order of offset.

Parameters
aIntervalsOn return, contains the list of alarm intervals.
Capability
None

GetAlarmSoundState ( TAlarmGlobalSoundState & )

IMPORT_C TIntGetAlarmSoundState(TAlarmGlobalSoundState &aState)const

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

Parameters
aStateOn return, contains the alarm sound state.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.
Capability
None

GetAlarmSoundsSilentUntil ( TTime & )

IMPORT_C TIntGetAlarmSoundsSilentUntil(TTime &aLocalTime)const

Retrieves the time at which all alarm sounds resume.

Parameters
aLocalTimeOn return, contains the time, in local time, when sounds resume.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.
Capability
None

GetAlarmStatus ( TAlarmId, TAlarmStatus & )

IMPORT_C TIntGetAlarmStatus(TAlarmIdaAlarmId,
TAlarmStatus &aStatus
)const

Retrieves the status of the alarm.

Parameters
aAlarmIdThe unique identifier of an alarm under query.
aStatusOn return, the alarm status.
Return Value
KErrNone if successful, KErrNotFound if the alarm does not exist, otherwise one of the system-wide errors.
Capability
None

GetAvailableCategoryListL ( RArray< TAlarmCategory > & )

IMPORT_C voidGetAvailableCategoryListL(RArray< TAlarmCategory > &aCategories)const

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

Parameters
aCategoriesOn return, contains the list of available categories.
Capability
None

GetNextDueAlarmId ( TAlarmId & )

IMPORT_C TIntGetNextDueAlarmId(TAlarmId &aAlarmId)const

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

Parameters
aAlarmIdOn return, contains the unique identifier of the next alarm due.
Return Value
KErrNone if successful, KNullAlarmId if there are no alarms in the queue, otherwise another one of the system-wide error codes.
Capability
None

NotifyChange ( TRequestStatus &, TAlarmId & )

IMPORT_C voidNotifyChange(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.

See also: TAlarmChangeEvent

Parameters
aStatusThe 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.
aAlarmIdAn 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.
Capability
None

NotifyChangeCancel ( )

IMPORT_C voidNotifyChangeCancel()const

Cancels any previous change notification request.

Panic Codes
Panicswith
Capability
None

NumberOfAlarmsActiveInQueue ( )

IMPORT_C TIntNumberOfAlarmsActiveInQueue()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.

Return Value
Number of active alarms, or an error code.
Capability
None

SetAlarmCharacteristics ( TAlarmId, TAlarmCharacteristicsFlags )

IMPORT_C TIntSetAlarmCharacteristics(TAlarmIdaAlarmId,
TAlarmCharacteristicsFlagsaCharacteristics
)const

Sets the characteristics of a specified alarm.

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

Parameters
aAlarmIdUnique identifier of the alarm.
aCharacteristicsAlarm characteristics to apply.
Return Value
KErrNone if successful, otherwise one of the system-wide errors.
Capability
NoteIf 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)

SetAlarmDayOrTimed ( TAlarmId, TAlarmDayOrTimed )

IMPORT_C TIntSetAlarmDayOrTimed(TAlarmIdaAlarmId,
TAlarmDayOrTimedaDayOrTimed
)const

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

Parameters
aAlarmIdUnique identifier of the alarm.
aDayOrTimedWhether an alarm is for a timed or untimed event.
Return Value
KErrNone if successful, otherwise one of the system-wide errors.
Capability
NoteIf 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)

SetAlarmPlayIntervalsL ( const CArrayFix< TASCliSoundPlayDefinition > & )

IMPORT_C voidSetAlarmPlayIntervalsL(const CArrayFix< TASCliSoundPlayDefinition > &aIntervals)const

Sets the list of alarm intervals.

Alarm intervals consist of a duration and an offset.

Parameters
aIntervalsContains one or more alarm intervals. There must be one interval in the array with an offset of zero.
Leave Codes
KErrGeneralIf 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.
KErrArgumentIf no interval has an offset of zero.
KErrNotSupportedThe Alarm Play Intervals cannot be set because Alarm Play Intervals is disabled by resource file. (from v9.2 onwards)
Capability
WriteDeviceData

SetAlarmSoundState ( TAlarmGlobalSoundState )

IMPORT_C TIntSetAlarmSoundState(TAlarmGlobalSoundStateaState)const

Sets the alarm sound state to on or off.

Parameters
aStateThe alarm sound state.
Return Value
KErrNone if successful, otherwise one of the system-wide errors.
Capability
WriteDeviceData

SetAlarmSoundsSilentFor ( TTimeIntervalMinutes )

IMPORT_C TIntSetAlarmSoundsSilentFor(TTimeIntervalMinutesaTimeToRemainSilentFor)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.

Parameters
aTimeToRemainSilentForTime interval in minutes, during which no sound is to be played.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.
Capability
WriteDeviceData

SetAlarmSoundsSilentUntil ( const TTime & )

IMPORT_C TIntSetAlarmSoundsSilentUntil(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.

Parameters
aLocalTimeTime, in local time, when alarm sounds are to be played once more.
Return Value
KErrNone if successful, KErrArgument if the time is in the past, otherwise another one of the system-wide error codes.
Capability
WriteDeviceData

SetAlarmStatus ( TAlarmId, TAlarmStatus )

IMPORT_C TIntSetAlarmStatus(TAlarmIdaAlarmId,
TAlarmStatusaStatus
)const

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

Parameters
aAlarmIdUnique identifier of the alarm.
aStatusContains the status to be applied.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.
Capability
NoteIf 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)

SetAlarmStatusByCategory ( TAlarmCategory, TAlarmStatus )

IMPORT_C TIntSetAlarmStatusByCategory(TAlarmCategoryaCategory,
TAlarmStatusaStatus
)const

Set the status of all alarms in the specified category.

Parameters
aCategoryAn alarm category.
aStatusAn alarm status.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.
Capability
NoteIf 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)

SetAlarmStatusForCalendarFile ( const TDesC &, TAlarmStatus )

IMPORT_C TIntSetAlarmStatusForCalendarFile(const TDesC &aFileName,
TAlarmStatusaStatus
)const

Sets the alarm status for calendar file

Parameters
aFileNameCalendar file name
aStatusContains the status to be applied.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.

SetClientData ( const TASShdAlarm & )

IMPORT_C TIntSetClientData(const TASShdAlarm &aAlarm)

Sets if the alarm is a wakeup alarm

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.
Parameters
aAlarmThe client-side alarm, whose corresponding server-side alarm is to be updated.
Return Value
KErrNone if successful, otherwise one of the system-wide errors. Updates an alarm's client-specific data in the alarm server.KErrNone if successful, otherwise one of the system-wide error codes.
Capability
None
NoteIf 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)

Version ( )

IMPORT_C TVersionVersion()const
Provides the version number of the alarm server.
Return Value
The version number.
Capability
None

__DbgFailAlloc ( TInt )

IMPORT_C void__DbgFailAlloc(TIntaCount)const

In debug builds, this will fail a memory allocation.

Parameters
aCountSet this to the number of allocations to fail, or 0 to reset the failure tool.
Capability
None

__DbgPreventUserNotify ( TBool )

IMPORT_C void__DbgPreventUserNotify(TBoolaShouldStop)const

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

Parameters
aShouldStopETrue: Alarm Alert Server is not notified on alarm expiry EFalse: Alarm Alert Server is notified on alarm expiry
Capability
None

__DbgSetEnvChgHandling ( TBool )

IMPORT_C TInt__DbgSetEnvChgHandling(TBoolaFlag)const

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

Parameters
aFlagETrue to enable and EFalse to disable handling
Capability
None

__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(TAlarmIdaAlarmId,
const TTime &aNewTime
)const

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

Parameters
aAlarmIdUnique identifier of the alarm.
aNewTimeTime to reawaken alarm (as UTC time).
Return Value
Returns whether the alarm could be snoozed.
Capability
None