1 /* |
|
2 * Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Utility class that defines supported features for Psln. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 |
|
21 // Feature manager. |
|
22 #include <featmgr.h> |
|
23 |
|
24 // Central repository |
|
25 #include <centralrepository.h> |
|
26 #include "PslnVariationPrivateCRKeys.h" |
|
27 |
|
28 // Psln specific. |
|
29 #include "PslnVariant.hrh" |
|
30 #include "PslnFeatures.h" |
|
31 |
|
32 // ============================ MEMBER FUNCTIONS =============================== |
|
33 // ----------------------------------------------------------------------------- |
|
34 // PslnFeatures::IsHelpSupported |
|
35 // ----------------------------------------------------------------------------- |
|
36 // |
|
37 EXPORT_C TBool PslnFeatures::IsHelpSupported() |
|
38 { |
|
39 return FeatureManager::FeatureSupported( KFeatureIdHelp ); //lint !e40 Declared |
|
40 } |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // PslnFeatures::IsEnhancedEmbeddedLinksSupported |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 EXPORT_C TBool PslnFeatures::IsEnhancedEmbeddedLinksSupported() |
|
47 { |
|
48 TBool linkSupport = EFalse; |
|
49 if ( IsSupported( KPslnEnhancedEmbeddedLinks ) && |
|
50 IsSeamlessLinksSupported() ) |
|
51 { |
|
52 linkSupport = ETrue; |
|
53 } |
|
54 return linkSupport; |
|
55 } |
|
56 |
|
57 // ----------------------------------------------------------------------------- |
|
58 // PslnFeatures::IsSoundsInSkinsSupported |
|
59 // ----------------------------------------------------------------------------- |
|
60 // |
|
61 EXPORT_C TBool PslnFeatures::IsSoundsInSkinsSupported() |
|
62 { |
|
63 return IsSupported( KPslnSoundsInSkins ); |
|
64 } |
|
65 |
|
66 // ----------------------------------------------------------------------------- |
|
67 // PslnFeatures::IsMMCSupported |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 TBool PslnFeatures::IsMMCSupported() |
|
71 { |
|
72 return FeatureManager::FeatureSupported( KFeatureIdMmc ); |
|
73 } |
|
74 |
|
75 // ----------------------------------------------------------------------------- |
|
76 // PslnFeatures::IsAPACSupported |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 TBool PslnFeatures::IsAPACSupported() |
|
80 { |
|
81 return FeatureManager::FeatureSupported( KFeatureIdAvkonApac ); |
|
82 } |
|
83 |
|
84 // ----------------------------------------------------------------------------- |
|
85 // Checks if the given feature is currently supported. |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 EXPORT_C TBool PslnFeatures::IsSupported( TInt aLocalVariationID ) |
|
89 { |
|
90 TBool retVal = EFalse; |
|
91 TRAP_IGNORE( retVal = IsSupportedL( aLocalVariationID ) ); |
|
92 return retVal; |
|
93 } |
|
94 |
|
95 // ----------------------------------------------------------------------------- |
|
96 // PslnFeatures::IsSeamlessLinksSupported |
|
97 // ----------------------------------------------------------------------------- |
|
98 // |
|
99 TBool PslnFeatures::IsSeamlessLinksSupported() |
|
100 { |
|
101 // Note that this method must return ETrue for EEL as well |
|
102 return FeatureManager::FeatureSupported( KFeatureIdSeamlessLinks ); //lint !e40 Declared |
|
103 } |
|
104 |
|
105 // ----------------------------------------------------------------------------- |
|
106 // Checks if the given feature is currently supported. |
|
107 // ----------------------------------------------------------------------------- |
|
108 // |
|
109 TBool PslnFeatures::IsSupportedL( TInt aLocalVariationID ) |
|
110 { |
|
111 TInt value = KErrNone; |
|
112 CRepository* variationRepository = |
|
113 CRepository::NewL( KCRUidThemesVariation ); |
|
114 variationRepository->Get( KThemesLocalVariation, value ); |
|
115 delete variationRepository; |
|
116 variationRepository = NULL; |
|
117 return ( value & aLocalVariationID ); |
|
118 } |
|
119 |
|
120 // End of File |
|