|
1 /* |
|
2 * Copyright (c) 2002 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: This class encapsulates the locally variated settings of |
|
15 * Profiles. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __CPROFILESLOCALFEATURES_H__ |
|
22 #define __CPROFILESLOCALFEATURES_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include "MProfilesLocalFeatures.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CRepository; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Implementation of MProfilesLocalFeatures. |
|
35 */ |
|
36 NONSHARABLE_CLASS(CProfilesLocalFeatures) : public CBase, public MProfilesLocalFeatures |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 static CProfilesLocalFeatures* NewL(); |
|
41 |
|
42 static CProfilesLocalFeatures* NewL( |
|
43 CProfilesLocalFeatures& aLocalFeatures ); |
|
44 |
|
45 ~CProfilesLocalFeatures(); |
|
46 |
|
47 public: // Functions from base classes |
|
48 |
|
49 /** |
|
50 * From MProfilesLocalFeatures |
|
51 */ |
|
52 TBool IsFeatureSupported( TInt aLocalFeatureId ) const; |
|
53 |
|
54 /** |
|
55 * From MProfilesLocalFeatures |
|
56 */ |
|
57 TBool IsBlockedType( const TDesC& aMimeType ); |
|
58 |
|
59 /** |
|
60 * From MProfilesLocalFeatures |
|
61 */ |
|
62 TBool IsBlockedUnprotectedType( const TDesC& aMimeType ); |
|
63 |
|
64 /** |
|
65 * From MProfilesLocalFeatures |
|
66 */ |
|
67 TBool IsBlockedProtectedType( const TDesC& aMimeType ); |
|
68 |
|
69 /** |
|
70 * From MProfilesLocalFeatures |
|
71 */ |
|
72 TBool IsBlockedDemoPlayType( const TDesC& aMimeType ); |
|
73 |
|
74 /** |
|
75 * From MProfilesLocalFeatures |
|
76 */ |
|
77 TBool IsExcludedType( const TDesC& aMimeType ); |
|
78 |
|
79 private: // New methods: |
|
80 |
|
81 void ReadListKeyL( CRepository& aCenRep, |
|
82 TUint32 aKey, |
|
83 RBuf& aValue ); |
|
84 |
|
85 TBool ContainsMimeType( const TDesC& aList, |
|
86 const TDesC& aMimeType ); |
|
87 |
|
88 private: // By default symbian default constructor is private: |
|
89 |
|
90 void ConstructL(); |
|
91 |
|
92 private: // Constructors: |
|
93 |
|
94 CProfilesLocalFeatures(); |
|
95 |
|
96 CProfilesLocalFeatures( TInt aFeatureBitMask ); |
|
97 |
|
98 private: // data |
|
99 |
|
100 // the key containing boolean type features |
|
101 TInt iFeatureBitMask; |
|
102 |
|
103 // Own: contains space separated list of blocked MIME-types |
|
104 RBuf iBlockedTones; |
|
105 |
|
106 // Own: contains space separated list of blocked unprotected MIME-types |
|
107 RBuf iBlockedUnprotectedTones; |
|
108 |
|
109 // Own: contains space separated list of blocked protected MIME-types |
|
110 RBuf iBlockedProtectedTones; |
|
111 |
|
112 // Own: contains space separated list of blocked demo-play MIME-types |
|
113 RBuf iBlockedDemoPlayTones; |
|
114 |
|
115 // Own: contains space separated list of excluded MIME-types |
|
116 RBuf iExcludedTones; |
|
117 |
|
118 // Own: helper buffer for mime-type matching |
|
119 RBuf iMimeBuf; |
|
120 }; |
|
121 |
|
122 #endif // __CPROFILESLOCALFEATURES_H__ |
|
123 |
|
124 // End of File |
|
125 |
|
126 |