diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-59D2B677-63D7-5FE7-98F4-549D9C235E56.dita --- a/Symbian3/PDK/Source/GUID-59D2B677-63D7-5FE7-98F4-549D9C235E56.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-59D2B677-63D7-5FE7-98F4-549D9C235E56.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,73 +1,73 @@ - - - - - -Alarm -Play Tutorials -

This tutorial assists the device creators in customizing the Alarm Server -behavior for playing an alarm continuously.

-

The RASCliSession class provides -functions to set and get the continuous state for a previously created alarm.

-
Introduction

It is possible to customize or disable -the UI application’s control of alarm sound intervals and durations. In certain -scenarios, it may be preferable for the alarm sound to have an infinite duration. -For more information on intervals and durations, refer to Sound -Control.

-
Procedure

To play an alarm continuously, or to -disable alarm play control, refer the following respective sections:

    -
  • Playing an alarm -continuously - A continuous alarm is one that does not follow the pattern -of sound play defined as a series of intervals and durations in the alarmserver.rsc file. -Instead, the alarm sound is played once and has an infinite interval and duration. -

    Follow the steps given below to create a continuous alarm:

      -
    1. Connect to the Alarm -Server using RASCliSession.

    2. -
    3. Add a new TASShdAlarm alarm.

    4. -
    5. Use the SetContinuous() function -to set the alarm as a continuous alarm.

      The EAlarmRepeatDefintionRepeatDaily value -makes the alarm repeat daily.

    6. -
    7. Add the alarm to the -Alarm Server by using the AlarmAdd() function.

    8. -

    The following code snippet explains how to play an alarm continuously:

    #include <ASCliSession.h> // For RASCliSession. -#include <ASShdAlarm.h> // For TASShdAlarm. - -… - -// Connect to Alarm Server. -RASCliSession alarmSession; -User::LeaveIfError( alarmSession.Connect() ); -CleanupClosePushL( alarmSession ); - -// Create a daily alarm that once activated is continuous. -TASShdAlarm alarm; -alarm.RepeatDefinition() = EAlarmRepeatDefintionRepeatDaily; -alarm.SetContinuous( ETrue ); - -// Add the alarm to Alarm Server. -User::LeaveIfError( alarmSession.AlarmAdd( alarm ) ); - -CleanupStack::PopAndDestroy(); -

  • -
  • Disable alarm play -control - This is a special case of Alarm Play Interval configuration -described in Sound -Control section. Disabling the Alarm Play control requires an empty -interval list as shown in the following code snippet:

    RESOURCE sound_controller - { - // disable alarm server control of alarm intervals - intervals = {}; - }

    This configuration cannot be overridden at runtime. RASCliSession::SetAlarmPlayIntervalsL() cannot -be used to change this option, that is, the function can neither turn OFF -the alarm sound control by specifying an empty sequence, nor turn ON the alarm -sound control by overriding an empty sequence in the resource file.

    Durations -that extend into the next interval cause the whole sequence to revert to the -default hard-coded values.

  • -
+ + + + + +Alarm +Play Tutorials +

This tutorial assists the device creators in customizing the Alarm Server +behavior for playing an alarm continuously.

+

The RASCliSession class provides +functions to set and get the continuous state for a previously created alarm.

+
Introduction

It is possible to customize or disable +the UI application’s control of alarm sound intervals and durations. In certain +scenarios, it may be preferable for the alarm sound to have an infinite duration. +For more information on intervals and durations, refer to Sound +Control.

+
Procedure

To play an alarm continuously, or to +disable alarm play control, refer the following respective sections:

    +
  • Playing an alarm +continuously - A continuous alarm is one that does not follow the pattern +of sound play defined as a series of intervals and durations in the alarmserver.rsc file. +Instead, the alarm sound is played once and has an infinite interval and duration. +

    Follow the steps given below to create a continuous alarm:

      +
    1. Connect to the Alarm +Server using RASCliSession.

    2. +
    3. Add a new TASShdAlarm alarm.

    4. +
    5. Use the SetContinuous() function +to set the alarm as a continuous alarm.

      The EAlarmRepeatDefintionRepeatDaily value +makes the alarm repeat daily.

    6. +
    7. Add the alarm to the +Alarm Server by using the AlarmAdd() function.

    8. +

    The following code snippet explains how to play an alarm continuously:

    #include <ASCliSession.h> // For RASCliSession. +#include <ASShdAlarm.h> // For TASShdAlarm. + +… + +// Connect to Alarm Server. +RASCliSession alarmSession; +User::LeaveIfError( alarmSession.Connect() ); +CleanupClosePushL( alarmSession ); + +// Create a daily alarm that once activated is continuous. +TASShdAlarm alarm; +alarm.RepeatDefinition() = EAlarmRepeatDefintionRepeatDaily; +alarm.SetContinuous( ETrue ); + +// Add the alarm to Alarm Server. +User::LeaveIfError( alarmSession.AlarmAdd( alarm ) ); + +CleanupStack::PopAndDestroy(); +

  • +
  • Disable alarm play +control - This is a special case of Alarm Play Interval configuration +described in Sound +Control section. Disabling the Alarm Play control requires an empty +interval list as shown in the following code snippet:

    RESOURCE sound_controller + { + // disable alarm server control of alarm intervals + intervals = {}; + }

    This configuration cannot be overridden at runtime. RASCliSession::SetAlarmPlayIntervalsL() cannot +be used to change this option, that is, the function can neither turn OFF +the alarm sound control by specifying an empty sequence, nor turn ON the alarm +sound control by overriding an empty sequence in the resource file.

    Durations +that extend into the next interval cause the whole sequence to revert to the +default hard-coded values.

  • +
\ No newline at end of file