1 /* |
1 /* |
2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
432 resIndex = KTrustSettingsResourceIndexOCSPCheck; |
429 resIndex = KTrustSettingsResourceIndexOCSPCheck; |
433 } |
430 } |
434 else if ( aTrusterUid == KCertManUIViewTrustVPNId ) |
431 else if ( aTrusterUid == KCertManUIViewTrustVPNId ) |
435 { |
432 { |
436 resIndex = KTrustSettingsResourceIndexVPN; |
433 resIndex = KTrustSettingsResourceIndexVPN; |
|
434 } |
|
435 else if ( aTrusterUid == KCertManUIViewTrustWidgetInstallingId ) |
|
436 { |
|
437 resIndex = KTrustSettingsResourceIndexWidget; |
437 } |
438 } |
438 else |
439 else |
439 { |
440 { |
440 resIndex = KErrNotFound; |
441 resIndex = KErrNotFound; |
441 } |
442 } |
593 { |
594 { |
594 item = (*iTrustedClients)[ KTrustSettingsResourceIndexAppCtrl ]; |
595 item = (*iTrustedClients)[ KTrustSettingsResourceIndexAppCtrl ]; |
595 } |
596 } |
596 else if ( id == KCertManUIViewTrustMailAndImageConnId ) |
597 else if ( id == KCertManUIViewTrustMailAndImageConnId ) |
597 { |
598 { |
598 item = |
599 item = (*iTrustedClients)[ KTrustSettingsResourceIndexMailAndImageConn ]; |
599 (*iTrustedClients)[ KTrustSettingsResourceIndexMailAndImageConn ]; |
|
600 } |
600 } |
601 else if ( id == KCertManUIViewTrustJavaInstallingId ) |
601 else if ( id == KCertManUIViewTrustJavaInstallingId ) |
602 { |
602 { |
603 item = |
603 item = (*iTrustedClients)[ KTrustSettingsResourceIndexJavaInstall ]; |
604 (*iTrustedClients)[ KTrustSettingsResourceIndexJavaInstall ]; |
|
605 } |
604 } |
606 else if ( id == KCertManUIViewOCSPCheckInstallingId ) |
605 else if ( id == KCertManUIViewOCSPCheckInstallingId ) |
607 { |
606 { |
608 item = |
607 item = (*iTrustedClients)[ KTrustSettingsResourceIndexOCSPCheck ]; |
609 (*iTrustedClients)[ KTrustSettingsResourceIndexOCSPCheck ]; |
|
610 } |
608 } |
611 else if ( id == KCertManUIViewTrustVPNId ) |
609 else if ( id == KCertManUIViewTrustVPNId ) |
612 { |
610 { |
613 item = |
611 item = (*iTrustedClients)[ KTrustSettingsResourceIndexVPN ]; |
614 (*iTrustedClients)[ KTrustSettingsResourceIndexVPN ]; |
612 } |
|
613 else if ( id == KCertManUIViewTrustWidgetInstallingId ) |
|
614 { |
|
615 item = (*iTrustedClients)[ KTrustSettingsResourceIndexWidget ]; |
615 } |
616 } |
616 else |
617 else |
617 { |
618 { |
618 if ( iApps.Count() > 0 ) |
619 if ( iApps.Count() > 0 ) |
619 { |
620 { |
695 |
696 |
696 CERTMANUILOGGER_LEAVEFN( " CCertManUIContainerTrust::ShowTrustChangeSettingPageL" ); |
697 CERTMANUILOGGER_LEAVEFN( " CCertManUIContainerTrust::ShowTrustChangeSettingPageL" ); |
697 } |
698 } |
698 |
699 |
699 // --------------------------------------------------------------------------- |
700 // --------------------------------------------------------------------------- |
|
701 // CCertManUIContainerTrust::ChangeTrustChangeSettingSingleClickL() |
|
702 // --------------------------------------------------------------------------- |
|
703 // |
|
704 void CCertManUIContainerTrust::ChangeTrustChangeSettingSingleClickL() |
|
705 { |
|
706 if( !iKeeper.iWrapper->IsActive() ) |
|
707 { |
|
708 TInt certIndex = iKeeper.iCurrentCACertForTrustSettings; |
|
709 |
|
710 if( certIndex >= 0 && certIndex < iKeeper.iCALabelEntries.Count() ) |
|
711 { |
|
712 CCTCertInfo* entry = iKeeper.iCALabelEntries[ certIndex ]->iCAEntry; |
|
713 if( entry && entry->IsDeletable() ) |
|
714 { |
|
715 TInt currentTrustSetting = iListBox->CurrentItemIndex(); |
|
716 if( currentTrustSetting >= 0 && currentTrustSetting < iClientUids.Count() ) |
|
717 { |
|
718 TUid uid = iClientUids[ currentTrustSetting ]; |
|
719 ChangeTrustValueL( *entry, uid ); |
|
720 UpdateTrustListboxItemL( *entry, currentTrustSetting ); |
|
721 } |
|
722 } |
|
723 } |
|
724 } |
|
725 } |
|
726 |
|
727 // --------------------------------------------------------------------------- |
700 // CCertManUIContainerTrust::PopupTrustChangeSettingPageL( |
728 // CCertManUIContainerTrust::PopupTrustChangeSettingPageL( |
701 // TInt aCertificateIndex) |
729 // TInt aCertificateIndex) |
702 // Finds out which client was focused in Trust Settings view and calls |
730 // Finds out which client was focused in Trust Settings view and calls |
703 // ShowTrustChangeSettingPageL This is accessed only by X509S |
731 // ShowTrustChangeSettingPageL This is accessed only by X509S |
704 // certificates, located in CertMan and having one or more clients |
732 // certificates, located in CertMan and having one or more clients |
718 if( !entry->IsDeletable() ) |
746 if( !entry->IsDeletable() ) |
719 { |
747 { |
720 CERTMANUILOGGER_LEAVEFN( "- PopupTrustChangeSettingPageL - read-only" ); |
748 CERTMANUILOGGER_LEAVEFN( "- PopupTrustChangeSettingPageL - read-only" ); |
721 return; |
749 return; |
722 } |
750 } |
723 |
751 |
724 TUid id = KCertManUINullId; |
752 TUid id = KCertManUINullId; |
725 TInt poppableItems = 0; |
753 TInt poppableItems = 0; |
726 |
754 |
727 TBuf<KMaxLengthTextSettListOne> clientName; |
755 TBuf<KMaxLengthTextSettListOne> clientName; |
728 |
756 |