#include <mw/asclisession.h>
class RASCliSession : public RSessionBase |
Inherited Attributes | |
---|---|
RHandleBase::iHandle |
Inherited Enumerations | |
---|---|
RHandleBase:TAttributes | |
RSessionBase:TAttachMode |
The client-side interface to the Symbian OS alarm server.
IMPORT_C | RASCliSession | ( | ) |
Default constructor.
Creates an instance of the RASCliSession class, setting its pointers to null.
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.
Parameter | Description |
---|---|
aAlarm | The alarm object to add. On return, contains a unique identifier that the client can use to identify the alarm. |
Returns: KErrNone if successful, otherwise one of the system-wide error codes.
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.
Parameter | Description |
---|---|
aAlarm | The alarm object to add. On return, contains a unique identifier that the client can use to identify the alarm. |
aData | Client-specific data to associate with the alarm. |
Returns: KErrNone if successful, otherwise one of the system-wide error codes.
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.
Parameter | Description |
---|---|
aStatus | On completion of the request, this object holds the completion code. |
aAlarm | The alarm to add. On return, contains the unique identifier. KNullAlarmId indicates failure. |
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.
Parameter | Description |
---|---|
aStatus | On completion of the request, this object holds the completion code. |
aAlarm | The alarm to add. On return, contains the unique identifier. KNullAlarmId indicates failure. |
aData | Client-specific data to associate with the alarm. |
IMPORT_C TInt | AlarmCountByState | ( | TAlarmState | aState | ) | const |
Returns the number of alarms in a specified state.
Parameter | Description |
---|---|
aState | Alarm state of interest. |
Returns: Number of alarms in the specified state.
Associates the specified data with an alarm.
This is arbitrary client-specific data, for which the alarm server simply acts as a router.
Parameter | Description |
---|---|
aAlarmId | Unique identifier of the alarm. |
aData | Client-specific data to associate with the alarm. |
Returns: KErrNone if successful, KErrInUse if the specified alarm already has data assigned to it, or one of the system-wide error codes.
Removes any previously attached alarm data from the specified alarm.
This releases any resources allocated by the alarm server for this alarm.
Parameter | Description |
---|---|
aAlarmId | Unique identifier for the alarm. |
Returns: 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.
Returns the size in bytes of any data associated with the specified alarm.
Parameter | Description |
---|---|
aAlarmId | Unique identifier of the alarm under query. |
Returns: 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.
Parameter | Description |
---|---|
aAlarmId | The unique identifier of the alarm to be deleted. |
Returns: 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.
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.
Parameter | Description |
---|---|
aCategory | Category of alarms to be deleted. |
aDeleteOnlyOrphanedAlarmsInCategory | ETrue: delete only orphaned alarms within the category. EFalse: delete all alarms within the category. |
Returns: KErrNone if successful, otherwise one of the system-wide error codes.
IMPORT_C TInt | AlarmDeleteByCalendarFile | ( | const TDesC & | aFileName, |
TDeleteType | aWhatToDelete | |||
) | const |
Delete alarms based on their type and the Calendar filename to which alarms belong
Parameter | Description |
---|---|
aFileName | specify the name of the Calendar file which alarms came from |
aWhatToDelete | specify what type of alarms to delte within the category. |
Returns: KErrNone if successful, otherwise one of the system-wide error codes.
IMPORT_C TInt | AlarmDeleteByCategory | ( | TAlarmCategory | aCategory, |
TDeleteType | aWhatToDelete | |||
) | const |
Deletes alarms in the queue corresponding to a specified category and type.
Parameter | Description |
---|---|
aCategory | Category of alarms to be deleted. |
aWhatToDelete | specify what type of alarms to delte within the category. |
Returns: KErrNone if successful, otherwise one of the system-wide error codes.
IMPORT_C void | AlarmNotificationCancelAndDequeue | ( | TAlarmId | aAlarmId | ) | const |
Parameter | Description |
---|---|
aAlarmId | The unique identifier of the alarm to be cancelled. |
IMPORT_C TBool | AlarmSoundsTemporarilySilenced | ( | ) | const |
Tests whether the alarm server has temporarily disabled sounds.
Returns: ETrue: alarms are temporarily silent. EFalse: sounds are not silent.
IMPORT_C TInt | CancelAlarmSilence | ( | ) | const |
Cancels the silent period, turning the alarm sounds on.
Returns: KErrNone if successful, otherwise one of the system-wide error codes.
IMPORT_C TInt | Connect | ( | ) |
Returns: KErrNone if successful, otherwise one of the system-wide errors.
IMPORT_C TInt | GetAlarmCategory | ( | TAlarmId | aAlarmId, |
TAlarmCategory & | aCategory | |||
) | const |
Retrieves the category of an alarm.
Parameter | Description |
---|---|
aAlarmId | The unique identifier of the alarm under query. |
aCategory | On return, contains the category of the alarm. |
Returns: KErrNone if successful, KErrNotFound if the alarm does not exist, otherwise one of the system-wide error codes.
IMPORT_C TInt | GetAlarmCharacteristics | ( | TAlarmId | aAlarmId, |
TAlarmCharacteristicsFlags & | aCharacteristics | |||
) | const |
Gets the characteristics of an alarm.
Parameter | Description |
---|---|
aAlarmId | Unique identifier of the alarm under query. |
aCharacteristics | On return, contains the charcteristics of the alarm specified. |
Returns: KErrNone if successful, otherwise one of the system-wide errors.
IMPORT_C TInt | GetAlarmCountForCategory | ( | TAlarmCategory | aCategory | ) | const |
Returns the number of alarms in a specified category.
Parameter | Description |
---|---|
aCategory | Category of alarm under query. |
Returns: Number of alarms in the specified category, or, if negative, one of the standard error codes..
Retrieves the data attached to the specified alarm.
This is data previously attached using AlarmDataAttachL().
Parameter | Description |
---|---|
aAlarmId | Unique identifier of the alarm under query. |
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. |
Returns: KErrNone if successful, KErrNotFound if the specified alarm does not have any associated data, or a system-wide error.
Retrieves the data attached to the specified alarm.
This is data previously attached using AlarmDataAttachL().
Parameter | Description |
---|---|
aAlarmId | Unique identifier of the alarm under query. |
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. |
Returns: KErrNone if successful, KErrNotFound if the specified alarm does not have any associated data, or a system-wide error.
IMPORT_C TInt | GetAlarmDayOrTimed | ( | TAlarmId | aAlarmId, |
TAlarmDayOrTimed & | aDayOrTimed | |||
) | const |
Tests whether the specified alarm is for a timed or untimed event.
Parameter | Description |
---|---|
aAlarmId | Unique identifier of the alarm under query. |
aDayOrTimed | On return, whether an alarm is for a timed or untimed event. |
Returns: KErrNone if successful, otherwise one of the system-wide errors.
IMPORT_C TInt | GetAlarmDetails | ( | TAlarmId | aAlarmId, |
TASShdAlarm & | aAlarm | |||
) | const |
Retrieves information about a specified alarm.
Parameter | Description |
---|---|
aAlarmId | The unique identifier of the alarm under query. |
aAlarm | On return, contains details of the alarm sought. |
Returns: KErrNone if successful, KErrCouldNotConnect if the time zone server is not available, otherwise one of the other system-wide error codes.
IMPORT_C void | GetAlarmIdListByStateL | ( | TAlarmState | aState, |
RArray< TAlarmId > & | aAlarmIds | |||
) | const |
Retrieves a list of the unique identifiers of all alarms in a specified state.
Parameter | Description |
---|---|
aState | Alarm state that you are interested in. |
aAlarmIds | On return, contains the unique identifiers of the alarms in the specified state. |
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.
Parameter | Description |
---|---|
aCategory | Category of alarms to find. |
aAlarmIds | On return, contains the list of alarms. |
Parameter | Description |
---|---|
aAlarmId | The unique identifier of the alarm under query. |
aThreadName | On return, contains the name of the owning session. |
Returns: 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.
IMPORT_C void | GetAlarmPlayIntervalsL | ( | CArrayFix< TASCliSoundPlayDefinition > & | aIntervals | ) | const |
Retrieves the list of alarm intervals.
They are stored in ascending order of offset.
Parameter | Description |
---|---|
aIntervals | On return, contains the list of alarm intervals. |
IMPORT_C TInt | GetAlarmSoundState | ( | TAlarmGlobalSoundState & | aState | ) | const |
Retrieves the alarm sound state. The alarm sound can be on or off.
Parameter | Description |
---|---|
aState | On return, contains the alarm sound state. |
Returns: KErrNone if successful, otherwise one of the system-wide error codes.
Retrieves the time at which all alarm sounds resume.
Parameter | Description |
---|---|
aLocalTime | On return, contains the time, in local time, when sounds resume. |
Returns: KErrNone if successful, otherwise one of the system-wide error codes.
IMPORT_C TInt | GetAlarmStatus | ( | TAlarmId | aAlarmId, |
TAlarmStatus & | aStatus | |||
) | const |
Retrieves the status of the alarm.
Parameter | Description |
---|---|
aAlarmId | The unique identifier of an alarm under query. |
aStatus | On return, the alarm status. |
Returns: KErrNone if successful, KErrNotFound if the alarm does not exist, otherwise one of the system-wide errors.
IMPORT_C void | GetAvailableCategoryListL | ( | RArray< TAlarmCategory > & | aCategories | ) | const |
Retrieves a list of all alarm categories in use within the alarm server.
Parameter | Description |
---|---|
aCategories | On return, contains the list of available categories. |
Retrieves the unique identifier of the next alarm in the alarm server queue.
Parameter | Description |
---|---|
aAlarmId | On return, contains the unique identifier of the next alarm due. |
Returns: KErrNone if successful, KNullAlarmId if there are no alarms in the queue, otherwise another one of the system-wide error codes.
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.
See also: TAlarmChangeEvent
Parameter | Description |
---|---|
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. |
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. |
IMPORT_C void | NotifyChangeCancel | ( | ) | const |
Cancels any previous change notification request.
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.
Returns: Number of active alarms, or an error code.
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.
Parameter | Description |
---|---|
aAlarmId | Unique identifier of the alarm. |
aCharacteristics | Alarm characteristics to apply. |
Returns: KErrNone if successful, otherwise one of the system-wide errors.
IMPORT_C TInt | SetAlarmDayOrTimed | ( | TAlarmId | aAlarmId, |
TAlarmDayOrTimed | aDayOrTimed | |||
) | const |
Specifies whether an alarm belongs to a timed or untimed event.
Parameter | Description |
---|---|
aAlarmId | Unique identifier of the alarm. |
aDayOrTimed | Whether an alarm is for a timed or untimed event. |
Returns: KErrNone if successful, otherwise one of the system-wide errors.
IMPORT_C void | SetAlarmPlayIntervalsL | ( | const CArrayFix< TASCliSoundPlayDefinition > & | aIntervals | ) | const |
Sets the list of alarm intervals.
Alarm intervals consist of a duration and an offset.
Parameter | Description |
---|---|
aIntervals | Contains one or more alarm intervals. There must be one interval in the array with an offset of zero. |
IMPORT_C TInt | SetAlarmSoundState | ( | TAlarmGlobalSoundState | aState | ) | const |
Sets the alarm sound state to on or off.
Parameter | Description |
---|---|
aState | The alarm sound state. |
Returns: KErrNone if successful, otherwise one of the system-wide errors.
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.
Parameter | Description |
---|---|
aTimeToRemainSilentFor | Time interval in minutes, during which no sound is to be played. |
Returns: KErrNone if successful, otherwise one of the system-wide error codes.
Disables alarm sounds until a specified time.
Alarms still expire and clients are notified during this period, but no sound is played.
Parameter | Description |
---|---|
aLocalTime | Time, in local time, when alarm sounds are to be played once more. |
Returns: KErrNone if successful, KErrArgument if the time is in the past, otherwise another one of the system-wide error codes.
IMPORT_C TInt | SetAlarmStatus | ( | TAlarmId | aAlarmId, |
TAlarmStatus | aStatus | |||
) | const |
Sets an alarm's status to either enabled or disabled.
Parameter | Description |
---|---|
aAlarmId | Unique identifier of the alarm. |
aStatus | Contains the status to be applied. |
Returns: KErrNone if successful, otherwise one of the system-wide error codes.
IMPORT_C TInt | SetAlarmStatusByCategory | ( | TAlarmCategory | aCategory, |
TAlarmStatus | aStatus | |||
) | const |
Set the status of all alarms in the specified category.
Parameter | Description |
---|---|
aCategory | An alarm category. |
aStatus | An alarm status. |
Returns: KErrNone if successful, otherwise one of the system-wide error codes.
IMPORT_C TInt | SetAlarmStatusForCalendarFile | ( | const TDesC & | aFileName, |
TAlarmStatus | aStatus | |||
) | const |
Sets the alarm status for calendar file
Parameter | Description |
---|---|
aFileName | Calendar file name |
aStatus | Contains the status to be applied. |
Returns: KErrNone if successful, otherwise one of the system-wide error codes.
IMPORT_C TInt | SetClientData | ( | const TASShdAlarm & | aAlarm | ) |
Sets if the alarm is a wakeup alarm
Parameter | Description |
---|---|
aAlarm | The client-side alarm, whose corresponding server-side alarm is to be updated. |
Returns: 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.
IMPORT_C TVersion | Version | ( | ) | const |
Returns: The version number.
IMPORT_C void | __DbgFailAlloc | ( | TInt | aCount | ) | const |
In debug builds, this will fail a memory allocation.
Parameter | Description |
---|---|
aCount | Set this to the number of allocations to fail, or 0 to reset the failure tool. |
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.
Parameter | Description |
---|---|
aShouldStop | ETrue: Alarm Alert Server is not notified on alarm expiry EFalse: Alarm Alert Server is notified on alarm expiry |
IMPORT_C void | __DbgShutDownServer | ( | ) | const |
In debug builds, this will cause the Alarm Server to terminate.