equal
deleted
inserted
replaced
318 |
318 |
319 iBitmaps.Compress(); |
319 iBitmaps.Compress(); |
320 iMasks.Compress(); |
320 iMasks.Compress(); |
321 } |
321 } |
322 |
322 |
323 void CAICalendarPlugin2::Resume( TAiTransitionReason aReason ) |
323 void CAICalendarPlugin2::Resume( TResumeReason aReason ) |
324 { |
324 { |
325 TRAP_IGNORE( DoResumeL( aReason ) ); |
325 TRAP_IGNORE( DoResumeL( aReason ) ); |
326 } |
326 } |
327 |
327 |
328 void CAICalendarPlugin2::DoResumeL( TAiTransitionReason aReason ) |
328 void CAICalendarPlugin2::DoResumeL( TResumeReason aReason ) |
329 { |
329 { |
330 if( aReason == EAiIdleForeground || |
330 if( aReason == EForeground ) |
331 aReason == EAiBacklightOn || |
331 { |
332 aReason == EAiSystemStartup || |
|
333 aReason == EAiGeneralThemeChanged ) |
|
334 { |
|
335 if( aReason == EAiGeneralThemeChanged ) |
|
336 { |
|
337 // Reset for republishing. Especially icons! |
|
338 iPublishedDataStore.Reset(); |
|
339 } |
|
340 if( !iEngine ) |
332 if( !iEngine ) |
341 { |
333 { |
342 iEngine = CAIAgendaPluginEngineIf::NewL( *this, ECalendarAndTodoObserver ); |
334 iEngine = CAIAgendaPluginEngineIf::NewL( *this, ECalendarAndTodoObserver ); |
343 } |
335 } |
344 else |
336 else |
346 iEngine->Refresh(); |
338 iEngine->Refresh(); |
347 } |
339 } |
348 } |
340 } |
349 } |
341 } |
350 |
342 |
351 void CAICalendarPlugin2::Suspend( TAiTransitionReason /*aReason*/ ) |
343 void CAICalendarPlugin2::Suspend( TSuspendReason aReason ) |
352 { |
344 { |
353 delete iEngine; |
345 if ( aReason == EGeneralThemeChange ) |
354 iEngine = NULL; |
346 { |
355 } |
347 // Reset for republishing. Especially icons! |
356 |
348 iPublishedDataStore.Reset(); |
357 void CAICalendarPlugin2::Stop( TAiTransitionReason /*aReason*/ ) |
349 } |
|
350 } |
|
351 |
|
352 void CAICalendarPlugin2::Start( TStartReason /*aReason*/ ) |
|
353 { |
|
354 } |
|
355 |
|
356 void CAICalendarPlugin2::Stop( TStopReason /*aReason*/ ) |
358 { |
357 { |
359 delete iEngine; |
358 delete iEngine; |
360 iEngine = NULL; |
359 iEngine = NULL; |
361 iPublishedDataStore.Reset(); |
360 iPublishedDataStore.Reset(); |
362 } |
361 } |
460 } |
459 } |
461 // Last op, free array and items |
460 // Last op, free array and items |
462 aSettings.ResetAndDestroy(); |
461 aSettings.ResetAndDestroy(); |
463 } |
462 } |
464 |
463 |
465 TAny* CAICalendarPlugin2::Extension( TUid aUid ) |
464 TAny* CAICalendarPlugin2::GetProperty( TProperty aProperty ) |
466 { |
465 { |
467 if (aUid == KExtensionUidProperty) |
466 TAny* result( NULL ); |
468 { |
467 |
469 return static_cast<MAiPropertyExtension*>(this); |
468 TRAP_IGNORE( result = iConstantData->GetPropertyL( aProperty ) ); |
470 } |
469 |
471 else if (aUid == KExtensionUidEventHandler) |
470 return result; |
472 { |
471 } |
473 return static_cast<MAiEventHandlerExtension*>(this); |
472 |
474 } |
|
475 return NULL; |
|
476 } |
|
477 |
|
478 TAny* CAICalendarPlugin2::GetPropertyL( TInt aProperty ) |
|
479 { |
|
480 return iConstantData->GetPropertyL( aProperty ); |
|
481 } |
|
482 |
|
483 void CAICalendarPlugin2::SetPropertyL( TInt aProperty, TAny* aValue ) |
|
484 { |
|
485 if( aValue ) |
|
486 { |
|
487 iConstantData->SetPropertyL( aProperty, aValue ); |
|
488 } |
|
489 } |
|
490 |
473 |
491 void CAICalendarPlugin2::HandleEvent( TInt aEvent, const TDesC& aParam ) |
474 void CAICalendarPlugin2::HandleEvent( TInt aEvent, const TDesC& aParam ) |
492 { |
475 { |
493 if( aEvent == EAICalendarPlugin2EventItemSelected ) |
476 if( aEvent == EAICalendarPlugin2EventItemSelected ) |
494 { |
477 { |