diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-387DB01C-EA48-5A10-A960-9706F3D2D0B1.dita --- a/Symbian3/PDK/Source/GUID-387DB01C-EA48-5A10-A960-9706F3D2D0B1.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-387DB01C-EA48-5A10-A960-9706F3D2D0B1.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,67 +1,67 @@ - - - - - -Activating -an Alarm on Given DaysThis tutorial explains the steps required to activate an alarm -that expires, or goes OFF on one or more days of the week. -
Introduction

The TASShdAlarm class -provides functions that enable an alarm to repeat on specified days of the -week. This alarm is known as a Daily On Given Days alarm. The alarm -can be repeated weekly on a single day or on multiple days. The alarms can -also be repeated at the same time on every specified day.

If the user -changes the system date or time, the alarm expires once. Unlike a Repeat -Once alarm, a Daily On Given Days alarm is not deleted but rescheduled -for the next available expiry time.

-
Procedure

Follow the steps given below to create -a Daily On Given Days alarm that is active on Monday and Wednesday -of every week:

    -
  1. Create an alarm with -the TASShdAlarm class.

  2. -
  3. Use theSetAlarmDays() API -to specify the required days. EAlarmDayMonday and EAlarmDayWednesday are -the parameters to specify that the alarm must repeat on Monday and Wednesday -as shown in the code fragment.

    NOTE: SetAlarmDays() must -be specifically used for EAlarmRepeatDefinitionRepeatDailyOnGivenDays repeat -definition only.

  4. -
  5. Use RASCliSession to -create a session with the Alarm Server.

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

  8. -

The following code fragment illustrates how to activate an alarm -on the given days:

-#include <ASCliSession.h> // For RASCliSession. -#include <ASShdAlarm.h> // For TASShdAlarm. - -… - -// Create an alarm that is active on Monday and Wednesday. -TASShdAlarm alarm; -alarm.RepeatDefinition() = EAlarmRepeatDefinitionRepeatDailyOnGivenDays; -alarm.SetAlarmDays( EAlarmDayMonday | EAlarmDayWednesday ); - -// Connect to Alarm Server. -RASCliSession alarmSession; -User::LeaveIfError( alarmSession.Connect() ); -CleanupClosePushL( alarmSession ); - -// Add the alarm to Alarm Server. -User::LeaveIfError( alarmSession.AlarmAdd( alarm ) ); - -CleanupStack::PopAndDestroy(); -
-
Results

The alarm is set to repeat every week on -Monday and Wednesday.

-
-Alarm Server -Overview -Alarm Server -Concepts + + + + + +Activating +an Alarm on Given DaysThis tutorial explains the steps required to activate an alarm +that expires, or goes OFF on one or more days of the week. +
Introduction

The TASShdAlarm class +provides functions that enable an alarm to repeat on specified days of the +week. This alarm is known as a Daily On Given Days alarm. The alarm +can be repeated weekly on a single day or on multiple days. The alarms can +also be repeated at the same time on every specified day.

If the user +changes the system date or time, the alarm expires once. Unlike a Repeat +Once alarm, a Daily On Given Days alarm is not deleted but rescheduled +for the next available expiry time.

+
Procedure

Follow the steps given below to create +a Daily On Given Days alarm that is active on Monday and Wednesday +of every week:

    +
  1. Create an alarm with +the TASShdAlarm class.

  2. +
  3. Use theSetAlarmDays() API +to specify the required days. EAlarmDayMonday and EAlarmDayWednesday are +the parameters to specify that the alarm must repeat on Monday and Wednesday +as shown in the code fragment.

    NOTE: SetAlarmDays() must +be specifically used for EAlarmRepeatDefinitionRepeatDailyOnGivenDays repeat +definition only.

  4. +
  5. Use RASCliSession to +create a session with the Alarm Server.

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

  8. +

The following code fragment illustrates how to activate an alarm +on the given days:

+#include <ASCliSession.h> // For RASCliSession. +#include <ASShdAlarm.h> // For TASShdAlarm. + +… + +// Create an alarm that is active on Monday and Wednesday. +TASShdAlarm alarm; +alarm.RepeatDefinition() = EAlarmRepeatDefinitionRepeatDailyOnGivenDays; +alarm.SetAlarmDays( EAlarmDayMonday | EAlarmDayWednesday ); + +// Connect to Alarm Server. +RASCliSession alarmSession; +User::LeaveIfError( alarmSession.Connect() ); +CleanupClosePushL( alarmSession ); + +// Add the alarm to Alarm Server. +User::LeaveIfError( alarmSession.AlarmAdd( alarm ) ); + +CleanupStack::PopAndDestroy(); +
+
Results

The alarm is set to repeat every week on +Monday and Wednesday.

+
+Alarm Server +Overview +Alarm Server +Concepts
\ No newline at end of file