lowlevellibsandfws/pluginfw/Framework/frame/ServerStartupManager.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 
       
     2 /**
       
     3 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 * All rights reserved.
       
     5 * This component and the accompanying materials are made available
       
     6 * under the terms of "Eclipse Public License v1.0"
       
     7 * which accompanies this distribution, and is available
       
     8 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 *
       
    10 * Initial Contributors:
       
    11 * Nokia Corporation - initial contribution.
       
    12 *
       
    13 * Contributors:
       
    14 *
       
    15 * Description:
       
    16 * The definitions of CServerStartupMgr.
       
    17 * This file contains all the APIs to implement CServerStartrupMgr.  
       
    18 * 
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @file
       
    26  @internalComponent
       
    27 */
       
    28 #ifndef __SERVERSTARTUPMANAGER_H__
       
    29 #define __SERVERSTARTUPMANAGER_H__
       
    30 
       
    31 #include <f32file.h>
       
    32 #include <e32base.h>
       
    33 #include <startup.hrh>
       
    34 #include <domaindefs.h>
       
    35 
       
    36 #ifdef __ECOM_SERVER_TESTABILITY__
       
    37 	// use the TestHarnessDomainMember.h file for the testing purpose.
       
    38 	#include "TestHarnessDomainMember.h"
       
    39 #else
       
    40 	// use the real domainmember.h for the production code.
       
    41 	#include <domainmember.h>
       
    42 #endif
       
    43 #include "StartupStateObserver.h"
       
    44 	
       
    45 /**
       
    46 This class interacts with the Domain Manager to be kept aware of the current
       
    47 system startup state. It also contains a list of MStartupStateObserver objects.
       
    48 It will distribute the startup state changes to the 
       
    49 MStartupStateObserver objects in ECOM. 
       
    50 
       
    51 @internalComponent 
       
    52 */
       
    53 #ifdef __ECOM_SERVER_TESTABILITY__
       
    54 class CServerStartupMgr: public CDmDomainTestHarness
       
    55 #else
       
    56 class CServerStartupMgr: public CDmDomain
       
    57 #endif
       
    58 	{
       
    59 public:
       
    60 	CServerStartupMgr(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId, RFs& aFs);
       
    61 	virtual ~CServerStartupMgr();
       
    62 	void InitialiseL(TBool aSsaEnabled);
       
    63 	void RegisterObserverL(const MStartupStateObserver* aObs);
       
    64 	TStartupStateIdentifier CurrentStartupState();
       
    65 #ifdef __ECOM_SERVER_TESTABILITY__
       
    66 public:
       
    67 #else
       
    68 protected:
       
    69 #endif 
       
    70 	//inherited from CActive
       
    71 	void RunL();
       
    72 protected:
       
    73 	TInt RunError(TInt aError);
       
    74 private:
       
    75 
       
    76 	void UpdateStateAwareObjectsL(TStartupStateIdentifier aKnownState);
       
    77 	TStartupStateIdentifier GetKnownStartupState(TDmDomainState aStartupState);
       
    78 	
       
    79 private:
       
    80     /**Final startup state  */
       
    81 	TStartupStateIdentifier EKFinalStartupState;
       
    82 	
       
    83 	/** A list of MStartup StateObserver objects */
       
    84 	RPointerArray<MStartupStateObserver> iObserverList;
       
    85 	
       
    86 	/** Current startup state*/
       
    87 	TStartupStateIdentifier iCurrentStartupState;
       
    88 	
       
    89 	/** A reference to a connected file session */
       
    90 	RFs& iFs;
       
    91 	
       
    92 	/** Required for test code to have access to internal state */
       
    93 	friend class TServerStartupManager_StateAccessor;
       
    94 	};
       
    95 #endif // __SERVERSTARTUPMANAGER_H__
       
    96 
       
    97