equal
deleted
inserted
replaced
297 // The alarm sound. |
297 // The alarm sound. |
298 iAlarmInfo.iSound = KSoundName; |
298 iAlarmInfo.iSound = KSoundName; |
299 |
299 |
300 // Set the alarm, here we connect to the alarm server and set the alarm. |
300 // Set the alarm, here we connect to the alarm server and set the alarm. |
301 SetAlarmL(); |
301 SetAlarmL(); |
302 |
|
303 // Check if DST rule gets applied in 24hrs. If so we don't display the remaining time. |
|
304 TBool displayRemainingTime( ETrue ); |
|
305 if( !iAlarmForEditing ) |
|
306 { |
|
307 displayRemainingTime = CheckForDstChangesL(); |
|
308 } |
|
309 |
|
310 // Don't display the remaining time if dst changes are applicable. |
|
311 if( displayRemainingTime ) |
|
312 { |
|
313 DisplayRemainingTimeL(); |
|
314 } |
|
315 |
302 |
316 // Save the previous alarm time value. |
303 // Save the previous alarm time value. |
317 SetPreviousAlarmTimeL( iAlarmInfo.iAlarmTime ); |
304 SetPreviousAlarmTimeL( iAlarmInfo.iAlarmTime ); |
318 |
305 |
319 __PRINTS( "CClockAlarmEditorImpl::SaveFormDataL - Exit" ); |
306 __PRINTS( "CClockAlarmEditorImpl::SaveFormDataL - Exit" ); |
953 { |
940 { |
954 __PRINTS( "CClockAlarmEditorImpl::SetAlarmL - Entry" ); |
941 __PRINTS( "CClockAlarmEditorImpl::SetAlarmL - Entry" ); |
955 |
942 |
956 // Here we connect to the alarm server to set the alarm. We don't need to use the alarm model |
943 // Here we connect to the alarm server to set the alarm. We don't need to use the alarm model |
957 // as the alarm editor doesn't need any notification from the alarm server about changes. |
944 // as the alarm editor doesn't need any notification from the alarm server about changes. |
958 RASCliSession alarmSrvSes; |
|
959 TASShdAlarm newAlarm; |
945 TASShdAlarm newAlarm; |
960 // Connect to the alarm server. |
946 // Connect to the alarm server. |
961 User::LeaveIfError( alarmSrvSes.Connect() ); |
|
962 |
947 |
963 // Build the alarm properties from the info provided. |
948 // Build the alarm properties from the info provided. |
964 newAlarm.Category() = KAlarmClockOne; |
949 newAlarm.Category() = KAlarmClockOne; |
965 newAlarm.Message() = iAlarmInfo.iMessage; |
950 newAlarm.Message() = iAlarmInfo.iMessage; |
966 newAlarm.OriginalExpiryTime() = iAlarmInfo.iAlarmTime; |
951 newAlarm.OriginalExpiryTime() = iAlarmInfo.iAlarmTime; |
974 #else |
959 #else |
975 newAlarm.ClientFlags().Set( KWakeupAlarmFlagIndex ); |
960 newAlarm.ClientFlags().Set( KWakeupAlarmFlagIndex ); |
976 #endif |
961 #endif |
977 |
962 |
978 // This will add the alarm with the alarm server. |
963 // This will add the alarm with the alarm server. |
979 alarmSrvSes.AlarmAdd( newAlarm ); |
964 iAlarmSrvSes.AlarmAdd( newAlarm ); |
980 |
965 |
981 // Save the new alarm id. |
966 // Save the new alarm id. |
982 iAlarmId = newAlarm.Id(); |
967 iAlarmId = newAlarm.Id(); |
983 |
968 |
984 // Close the session with alarmserver. |
969 // Close the session with alarmserver. |
985 alarmSrvSes.Close(); |
|
986 |
970 |
987 // Update the alarm info. |
971 // Update the alarm info. |
988 GetAlarmInformationL( iAlarmId, iAlarmInfo ); |
972 GetAlarmInformationL( iAlarmId, iAlarmInfo ); |
989 |
973 |
990 __PRINTS( "CClockAlarmEditorImpl::SetAlarmL - Exit" ); |
974 __PRINTS( "CClockAlarmEditorImpl::SetAlarmL - Exit" ); |