equal
deleted
inserted
replaced
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
47 // ----------------------------------------------------------------------------- |
47 // ----------------------------------------------------------------------------- |
48 // |
48 // |
49 CFeatMgrServer::CFeatMgrServer( const TInt aPriority, const TServerType aType ) |
49 CFeatMgrServer::CFeatMgrServer( const TInt aPriority, const TServerType aType ) |
50 : |
50 : |
51 CPolicyServer( aPriority, KFeatMgrPlatSecPolicy, aType ), iBurState(this), |
51 CPolicyServer( aPriority, KFeatMgrPlatSecPolicy, aType ), iBurState(this), |
|
52 iBackupInProgress(EFalse), |
52 iPluginsReady(EFalse), |
53 iPluginsReady(EFalse), |
53 iPluginsDeleted( EFalse ), |
54 iPluginsDeleted( EFalse ), |
54 iPendingRequests( ETrue ), |
55 iPendingRequests( ETrue ), |
55 iFeaturesReady(EFalse) |
56 iFeaturesReady(EFalse) |
56 |
57 |
437 TBool CFeatMgrServer::PluginsReady() const |
438 TBool CFeatMgrServer::PluginsReady() const |
438 { |
439 { |
439 FUNC_LOG |
440 FUNC_LOG |
440 return(iPluginsReady); |
441 return(iPluginsReady); |
441 } |
442 } |
|
443 |
|
444 // ----------------------------------------------------------------------------- |
|
445 // CFeatMgrServer::BackupIsInProgress() |
|
446 // ----------------------------------------------------------------------------- |
|
447 TBool CFeatMgrServer::BackupIsInProgress() const |
|
448 { |
|
449 FUNC_LOG |
|
450 return(iBackupInProgress); |
|
451 } |
442 |
452 |
443 // ----------------------------------------------------------------------------- |
453 // ----------------------------------------------------------------------------- |
444 // CFeatMgrServer::ServicePendingRequests() |
454 // CFeatMgrServer::ServicePendingRequests() |
445 // ----------------------------------------------------------------------------- |
455 // ----------------------------------------------------------------------------- |
446 |
456 |
669 TInt err( KErrNone ); |
679 TInt err( KErrNone ); |
670 |
680 |
671 switch( aCurrent ) |
681 switch( aCurrent ) |
672 { |
682 { |
673 case( EFeatMgrBURState_BackupStarted ) : |
683 case( EFeatMgrBURState_BackupStarted ) : |
674 iPluginsReady = ETrue; |
684 iBackupInProgress = EFalse; |
675 ServicePendingRequests(); |
685 ServicePendingRequests(); |
676 break; |
686 break; |
677 case( EFeatMgrBURState_RestoreStarted ) : |
687 case( EFeatMgrBURState_RestoreStarted ) : |
678 iPluginsReady = EFalse; |
688 iPluginsReady = EFalse; |
679 iPluginsDeleted = EFalse; |
689 iPluginsDeleted = EFalse; |
699 } |
709 } |
700 |
710 |
701 BURStatus CFeatMgrServer::Goto_StartBackupState( BURStatus /* aCurrent */ ) |
711 BURStatus CFeatMgrServer::Goto_StartBackupState( BURStatus /* aCurrent */ ) |
702 { |
712 { |
703 BURStatus aNewState = EFeatMgrBURState_BackupStarted; // state++ |
713 BURStatus aNewState = EFeatMgrBURState_BackupStarted; // state++ |
704 iPluginsReady = EFalse; |
714 iBackupInProgress = ETrue; |
705 return aNewState; |
715 return aNewState; |
706 } |
716 } |
707 |
717 |
708 BURStatus CFeatMgrServer::Goto_EndBackupState( BURStatus /* aCurrent */ ) |
718 BURStatus CFeatMgrServer::Goto_EndBackupState( BURStatus /* aCurrent */ ) |
709 { |
719 { |
710 BURStatus aNewState = EFeatMgrBURState_BackupEnded; // state++ |
720 BURStatus aNewState = EFeatMgrBURState_BackupEnded; // state++ |
711 |
721 |
712 iPluginsReady = ETrue; |
722 iBackupInProgress = EFalse; |
713 ServicePendingRequests(); |
723 ServicePendingRequests(); |
714 // no error from ServicePendingRequests() is possible |
724 // no error from ServicePendingRequests() is possible |
715 |
725 |
716 return aNewState; |
726 return aNewState; |
717 } |
727 } |
726 |
736 |
727 BURStatus CFeatMgrServer::Goto_EndRestoreState( BURStatus /* aCurrent */ ) |
737 BURStatus CFeatMgrServer::Goto_EndRestoreState( BURStatus /* aCurrent */ ) |
728 { |
738 { |
729 BURStatus aNewState = EFeatMgrBURState_Error; // fail safe |
739 BURStatus aNewState = EFeatMgrBURState_Error; // fail safe |
730 TInt err( KErrNone ); |
740 TInt err( KErrNone ); |
731 |
741 iPluginsReady = EFalse; |
732 iPluginsReady = EFalse; |
|
733 iPluginsDeleted = EFalse; |
742 iPluginsDeleted = EFalse; |
734 iPendingRequests = ETrue; |
743 iPendingRequests = ETrue; |
735 iFeaturesReady = EFalse; |
744 iFeaturesReady = EFalse; |
736 |
745 |
737 // re-read the new features |
746 // re-read the new features |