diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-387DB01C-EA48-5A10-A960-9706F3D2D0B1.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-387DB01C-EA48-5A10-A960-9706F3D2D0B1.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +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 +
\ No newline at end of file