sysstatemgmt/systemstatemgr/ssm/inc/ssmstatepolicyresolver.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SSMSTATEPOLICYRESOLVER_H__
       
    17 #define __SSMSTATEPOLICYRESOLVER_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include "ssmstatepolicyresolverproxy.h"
       
    21 
       
    22 
       
    23 class TSsmState;
       
    24 class TParsePtrC;
       
    25 class CSsmStatePolicyFrame;
       
    26 
       
    27 /**
       
    28 The CSsmStatePolicyResolver is passed a TSsmState and uses this to create a
       
    29 CSsmStatePolicyFrame that encapsulates the corresponding policy DLL
       
    30 The policy DLL is resolved using a naming standard described in @c MSsmStatePolicy.
       
    31 
       
    32 @internalComponent
       
    33 @released
       
    34 */
       
    35 class CSsmStatePolicyResolver : public CBase, public MSsmStatePolicyResolverProxy
       
    36 	{
       
    37 public:
       
    38 	static CSsmStatePolicyResolver* NewL();
       
    39 	static CSsmStatePolicyResolver* NewLC();
       
    40 	
       
    41 		//from MPolicyResolverProxy
       
    42 	void GetStatePolicyL(TSsmState aState);
       
    43 	CSsmStatePolicyFrame* Policy();
       
    44 	void ReleasePolicyResolver();
       
    45 
       
    46 	
       
    47 private:
       
    48 	CSsmStatePolicyResolver();
       
    49 	~CSsmStatePolicyResolver();
       
    50 	void GetFileNameForState(const TSsmState& aState, TDes& aLibraryFilename) const;
       
    51 	TBool NeedsLoading(const TParsePtrC& aLibraryFilename) const;
       
    52 	void LoadLibraryLC(RLibrary& aLibrary, const TDesC& aLibraryFilename) const;
       
    53 	CSsmStatePolicyFrame* CreatePolicyLC(const RLibrary& aLibrary) const;
       
    54 	
       
    55 private:
       
    56 	RLibrary iLibrary;
       
    57 	CSsmStatePolicyFrame* iPolicy;
       
    58 	};
       
    59 
       
    60 #endif