220 { |
220 { |
221 case CAlarmUtils::EAlarmTypeClock: |
221 case CAlarmUtils::EAlarmTypeClock: |
222 { |
222 { |
223 SetupClockAlarmL( aAlarm ); |
223 SetupClockAlarmL( aAlarm ); |
224 // Set the alarm type |
224 // Set the alarm type |
225 iAlarmInfo->iIsClockAlarm = ETrue; |
225 iAlarmInfo->iAlarmAlertType = CAlarmUtils::EAlarmTypeClock; |
226 } |
226 } |
227 break; |
227 break; |
228 |
228 |
229 case CAlarmUtils::EAlarmTypeOther: |
229 case CAlarmUtils::EAlarmTypeOther: |
230 { |
230 { |
231 // TODO: Handle this case |
231 // TODO: Handle this case |
232 SetupUnknownAlarmL( aAlarm ); |
232 SetupUnknownAlarmL( aAlarm ); |
233 iAlarmInfo->iIsClockAlarm = ETrue; |
233 iAlarmInfo->iAlarmAlertType = CAlarmUtils::EAlarmTypeOther; |
234 } |
234 } |
235 break; |
235 break; |
236 |
236 |
237 case CAlarmUtils::EAlarmTypeCalendar: |
237 case CAlarmUtils::EAlarmTypeCalendar: |
238 { |
238 { |
240 if( iAlarmUtils->IsPhoneInRestoreMode() ) |
240 if( iAlarmUtils->IsPhoneInRestoreMode() ) |
241 { |
241 { |
242 User::Leave( KErrCancel ); |
242 User::Leave( KErrCancel ); |
243 } |
243 } |
244 // Set the alarm type |
244 // Set the alarm type |
245 iAlarmInfo->iIsClockAlarm = EFalse; |
245 iAlarmInfo->iAlarmAlertType = CAlarmUtils::EAlarmTypeCalendar; |
246 |
246 |
247 // Fetch the calendar entry and instance time |
247 // Fetch the calendar entry and instance time |
248 CCalEntry* entry = NULL; |
248 CCalEntry* entry = NULL; |
249 |
249 |
250 // TODO: Use agenda interface to fetch the entry details |
250 // TODO: Use agenda interface to fetch the entry details |
276 case CCalEntry::EReminder: |
276 case CCalEntry::EReminder: |
277 { |
277 { |
278 // TODO : Format text based on type of entry |
278 // TODO : Format text based on type of entry |
279 // SetupAppointmentAlarmL( aAlarm ); |
279 // SetupAppointmentAlarmL( aAlarm ); |
280 iAlarmInfo->iTime = instanceTime; |
280 iAlarmInfo->iTime = instanceTime; |
|
281 iAlarmInfo->iIsTimed = ETrue; |
281 } |
282 } |
282 break; |
283 break; |
283 |
284 |
284 case CCalEntry::ETodo: |
285 case CCalEntry::ETodo: |
285 { |
286 { |
286 // TODO : Format text based on type of entry |
287 // TODO : Format text based on type of entry |
287 // SetupToDoAlarmL( aAlarm ); |
288 //SetupToDoAlarmL( aAlarm ); |
|
289 iAlarmInfo->iAlarmAlertType = CAlarmUtils::EAlarmTypeTodo; |
288 iAlarmInfo->iTime = TTime( 0 ); |
290 iAlarmInfo->iTime = TTime( 0 ); |
|
291 iAlarmInfo->iIsTimed = EFalse; |
|
292 // No Location is there for todo alarms |
|
293 iAlarmInfo->iLocation = HBufC::NewL( 0 ); |
289 } |
294 } |
290 break; |
295 break; |
291 |
296 |
|
297 case CCalEntry::EEvent: |
|
298 { |
|
299 // No time information for an all day event |
|
300 iAlarmInfo->iTime = TTime( 0 ); |
|
301 iAlarmInfo->iIsTimed = EFalse; |
|
302 } |
|
303 break; |
|
304 |
292 default: |
305 default: |
293 { |
306 { |
294 // TODO : Format text based on type of entry |
307 // TODO : Format text based on type of entry |
295 // SetupAnniversaryAlarmL( aAlarm ); |
308 // SetupAnniversaryAlarmL( aAlarm ); |
296 iAlarmInfo->iTime = TTime( 0 ); |
309 iAlarmInfo->iTime = TTime( 0 ); |