|
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 __SSMSWPPOLICYRESOLVER_H__ |
|
17 #define __SSMSWPPOLICYRESOLVER_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include "ssmswppolicyresolverproxy.h" |
|
21 |
|
22 |
|
23 class TSsmSwp; |
|
24 class CSsmSwpPolicyFrame; |
|
25 class CSsmSwpPolicyMap; |
|
26 |
|
27 /** |
|
28 The CSsmSwpPolicyResolver is passed an swp value and uses this to create an swp policy |
|
29 frame that encapsulates the corresponding policy DLL |
|
30 The swp policy is resolved using a map of swp values to policy file names. |
|
31 The mapping of swp values to names is registered using the appropriate function. |
|
32 |
|
33 @internalComponent |
|
34 @released |
|
35 */ |
|
36 class CSsmSwpPolicyResolver : public CBase, public MSsmSwpPolicyResolverProxy |
|
37 { |
|
38 public: |
|
39 static CSsmSwpPolicyResolver* NewL(); |
|
40 void ConstructL(); |
|
41 void RegisterSwpMappingL(TUint aSwpKey, const TDesC& aFile); |
|
42 #ifdef _DEBUG |
|
43 void DeRegisterSwpMappingL(TUint aSwpKey, const TDesC& aFilename); |
|
44 #endif |
|
45 |
|
46 //from MSsmSwpPolicyResolverProxy |
|
47 CSsmSwpPolicyFrame* GetSwpPolicyL(const TSsmSwp& aSwp); |
|
48 |
|
49 ~CSsmSwpPolicyResolver(); |
|
50 |
|
51 private: // methods |
|
52 CSsmSwpPolicyResolver(); |
|
53 void GetFileNameForSwpL(const TSsmSwp& aSwp, TDes& aLibraryFilename) const; |
|
54 void LoadLibraryLC(RLibrary& aLibrary, const TDesC& aLibraryFilename) const; |
|
55 CSsmSwpPolicyFrame* CreatePolicyLC(const RLibrary& aLibrary) const; |
|
56 |
|
57 private: // members |
|
58 CSsmSwpPolicyMap* iSwpPolicyMap; |
|
59 }; |
|
60 |
|
61 #endif |