445 CSCDEBUG( "CCSCServiceContainer::DeleteServiceL - begin" ); |
445 CSCDEBUG( "CCSCServiceContainer::DeleteServiceL - begin" ); |
446 |
446 |
447 if ( iListBoxItemArray.Count() ) |
447 if ( iListBoxItemArray.Count() ) |
448 { |
448 { |
449 TListBoxItem item = ListBoxItem(); |
449 TListBoxItem item = ListBoxItem(); |
450 TBool disabled = iCCHHandler.IsServiceDisabled( item.iServiceId ); |
|
451 |
|
452 // if enabled -> show unable to delete note |
|
453 if ( !disabled ) |
|
454 { |
|
455 CCSCNoteUtilities::ShowInformationNoteL( |
|
456 CCSCNoteUtilities::ECSCUnableToDeleteNote, |
|
457 iServiceHandler.ServiceNameL( item.iServiceId ) ); |
|
458 return; |
|
459 } |
|
460 |
450 |
461 // Show confirmation query for service deletion |
451 // Show confirmation query for service deletion |
462 if ( CCSCNoteUtilities::ShowCommonQueryL( |
452 if ( CCSCNoteUtilities::ShowCommonQueryL( |
463 CCSCNoteUtilities::ECSCDeleteServiceQuery, |
453 CCSCNoteUtilities::ECSCDeleteServiceQuery, |
464 iServiceHandler.ServiceNameL( item.iServiceId ) ) ) |
454 iServiceHandler.ServiceNameL( item.iServiceId ) ) ) |
465 { |
455 { |
|
456 TBool disabled = iCCHHandler.IsServiceDisabled( item.iServiceId ); |
|
457 |
|
458 // if enabled -> show unable to delete note |
|
459 if ( !disabled ) |
|
460 { |
|
461 CCSCNoteUtilities::ShowInformationNoteL( |
|
462 CCSCNoteUtilities::ECSCUnableToDeleteNote, |
|
463 iServiceHandler.ServiceNameL( item.iServiceId ) ); |
|
464 return; |
|
465 } |
|
466 |
466 // First check if there is a service plugin UID. |
467 // First check if there is a service plugin UID. |
467 TInt count = iServicePluginHandler.PluginCount( |
468 TInt count = iServicePluginHandler.PluginCount( |
468 CCSCEngServicePluginHandler::EInitialized ); |
469 CCSCEngServicePluginHandler::EInitialized ); |
469 TBool setupPlugin( EFalse ); |
470 TBool setupPlugin( EFalse ); |
470 for ( TInt i = 0; i < count && !setupPlugin; i++ ) |
471 for ( TInt i = 0; i < count && !setupPlugin; i++ ) |