--- a/featuremgmt/featuremgr/src/serverexe/featmgrserver.cpp Tue Jan 26 13:16:24 2010 +0200
+++ b/featuremgmt/featuremgr/src/serverexe/featmgrserver.cpp Fri Mar 19 10:00:55 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -35,9 +35,6 @@
_LIT( KPanicCategory, "FeatMgrServer" );
#endif // EXTENDED_FEATURE_MANAGER_TEST
-// LOCAL FUNCTION PROTOTYPES
-TInt E32Main(); // Process entry point
-
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
@@ -49,6 +46,7 @@
CFeatMgrServer::CFeatMgrServer( const TInt aPriority, const TServerType aType )
:
CPolicyServer( aPriority, KFeatMgrPlatSecPolicy, aType ), iBurState(this),
+ iBURInProgress(EFalse),
iPluginsReady(EFalse),
iPluginsDeleted( EFalse ),
iPendingRequests( ETrue ),
@@ -439,6 +437,15 @@
FUNC_LOG
return(iPluginsReady);
}
+
+// -----------------------------------------------------------------------------
+// CFeatMgrServer::BackupIsInProgress()
+// -----------------------------------------------------------------------------
+TBool CFeatMgrServer::BURIsInProgress() const
+ {
+ FUNC_LOG
+ return(iBURInProgress);
+ }
// -----------------------------------------------------------------------------
// CFeatMgrServer::ServicePendingRequests()
@@ -671,7 +678,7 @@
switch( aCurrent )
{
case( EFeatMgrBURState_BackupStarted ) :
- iPluginsReady = ETrue;
+ iBURInProgress = EFalse;
ServicePendingRequests();
break;
case( EFeatMgrBURState_RestoreStarted ) :
@@ -701,7 +708,7 @@
BURStatus CFeatMgrServer::Goto_StartBackupState( BURStatus /* aCurrent */ )
{
BURStatus aNewState = EFeatMgrBURState_BackupStarted; // state++
- iPluginsReady = EFalse;
+ iBURInProgress = ETrue;
return aNewState;
}
@@ -709,7 +716,7 @@
{
BURStatus aNewState = EFeatMgrBURState_BackupEnded; // state++
- iPluginsReady = ETrue;
+ iBURInProgress = EFalse;
ServicePendingRequests();
// no error from ServicePendingRequests() is possible
@@ -720,7 +727,7 @@
{
// remarkably like Goto_StartBackupState
BURStatus aNewState = EFeatMgrBURState_RestoreStarted; // state++
- iPluginsReady = EFalse;
+ iBURInProgress = ETrue;
return aNewState;
}
@@ -728,8 +735,8 @@
{
BURStatus aNewState = EFeatMgrBURState_Error; // fail safe
TInt err( KErrNone );
-
- iPluginsReady = EFalse;
+ iBURInProgress = EFalse;
+ iPluginsReady = EFalse;
iPluginsDeleted = EFalse;
iPendingRequests = ETrue;
iFeaturesReady = EFalse;
@@ -849,68 +856,4 @@
return;
}
-
-// ============================= LOCAL FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// Function that starts the FeatMgrServer.
-// -----------------------------------------------------------------------------
-//
-static void RunServerL()
- {
- FUNC_LOG
-
- // Naming the server thread after the startup helps to debug panics
- User::LeaveIfError( User::RenameProcess( KServerProcessName ) );
-
- User::LeaveIfError( User::RenameThread( KServerProcessName ) );
-
- // Create and install the active scheduler we need
- CActiveScheduler* scheduler = new(ELeave) CActiveScheduler;
- CleanupStack::PushL( scheduler );
-
- CActiveScheduler::Install( scheduler );
-
- // Now we are ready to instantiate the actual CServer2 instance
- CFeatMgrServer* server = CFeatMgrServer::NewLC( KServerCActivePriority );
-
- // Initialisation complete, now signal the client
- RProcess::Rendezvous(KErrNone);
-
- INFO_LOG( "RunServerL() - Starting scheduler..." );
-
- // Ready to run
- CActiveScheduler::Start();
-
- INFO_LOG( "RunServerL() - Scheduler stopped" );
-
- // Cleanup the server and scheduler
- CleanupStack::PopAndDestroy( server );
- CleanupStack::PopAndDestroy( scheduler );
- }
-
-// -----------------------------------------------------------------------------
-// Main function
-// -----------------------------------------------------------------------------
-//
-TInt E32Main()
- {
- FUNC_LOG
-
- __UHEAP_MARK;
-
- CTrapCleanup* cleanup = CTrapCleanup::New();
- TInt ret = KErrNoMemory;
-
- if ( cleanup )
- {
- TRAP( ret, RunServerL() );
- delete cleanup;
- }
-
- __UHEAP_MARKEND;
-
- return ret;
- }
-
// End of File