1 /* |
|
2 * Copyright (c) 2002-2004 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: Rsfw operational parameter config |
|
15 * (not for mount configurations) |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CRSFWCONFIG_H |
|
21 #define CRSFWCONFIG_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 // CONSTANTS |
|
27 const TUid KCRUidRsfwCtrl = { 0x101F9775 }; |
|
28 const TInt KMaxRsfwConfItemLength = 128; |
|
29 |
|
30 namespace RsfwConfigKeys |
|
31 { |
|
32 const TUint KRsfwDefaultDrive = 1; |
|
33 const TUint KCacheDirectoryPath = 2; |
|
34 const TUint KMaxEntryCount = 3; |
|
35 const TUint KMaxCacheSize = 4; |
|
36 const TUint KFileCacheValidity = 5; |
|
37 const TUint KDirCacheValidity = 6; |
|
38 const TUint KCachingMode = 7; |
|
39 const TUint KRecognizerLimit = 8; |
|
40 const TUint KAudMpegLimit = 9; |
|
41 const TUint KImgJpegLimit = 10; |
|
42 const TUint KRsfwReserved1 = 11; |
|
43 const TUint KLockTimeout = 12; |
|
44 const TUint KInactivityTimeout = 13; |
|
45 } |
|
46 |
|
47 // FORWARD DECLARATIONS |
|
48 class CRepository; |
|
49 |
|
50 // CLASS DECLARATION |
|
51 |
|
52 /** |
|
53 * Configuration API for Rsfw operation |
|
54 * |
|
55 * @lib rsfwconfig.lib |
|
56 * @since Series 60 3.1 |
|
57 */ |
|
58 |
|
59 class CRsfwConfig: public CBase |
|
60 { |
|
61 public: |
|
62 public: // Constructors and destructor |
|
63 /** |
|
64 * Two-phased constructor. |
|
65 */ |
|
66 IMPORT_C static CRsfwConfig* NewL(TUid aRepositoryUid); |
|
67 |
|
68 /** |
|
69 * Destructor. |
|
70 */ |
|
71 virtual ~CRsfwConfig(); |
|
72 |
|
73 public: // New functions |
|
74 /** |
|
75 Sets numeric value. |
|
76 @param aId parameter id |
|
77 @return error code |
|
78 */ |
|
79 IMPORT_C TInt Set(TUint aId, TInt& aValue); |
|
80 |
|
81 /** |
|
82 Sets string value. |
|
83 @param aId parameter id |
|
84 @return error code |
|
85 */ |
|
86 IMPORT_C TInt Set(TUint aId, TDes& aValue); |
|
87 |
|
88 /** |
|
89 Gets numeric value. |
|
90 @param aId parameter id |
|
91 @return error code |
|
92 */ |
|
93 IMPORT_C TInt Get(TUint aId, TInt& aValue); |
|
94 |
|
95 /** |
|
96 Gets string value. |
|
97 @param aId parameter id |
|
98 @return error code |
|
99 */ |
|
100 IMPORT_C TInt Get(TUint aId, TDes& aValue); |
|
101 |
|
102 /** |
|
103 Checks whether a string value is True. |
|
104 Gets boolean value: return true iff string starts with '1' | 'Y' | 'T' |
|
105 (case-insensitive). |
|
106 If the repository value is missing returns False. |
|
107 @param aId parameter id |
|
108 @return boolean |
|
109 */ |
|
110 IMPORT_C TBool IsTrue(TUint aId); |
|
111 |
|
112 /** |
|
113 Checks whether a string value is False. |
|
114 Gets boolean value: returns true iff string starts with '0' | 'N' | 'F' |
|
115 (case-insensitive) |
|
116 If the repository or value is missing returns False. |
|
117 @param aId parameter id |
|
118 @return boolean |
|
119 */ |
|
120 IMPORT_C TBool IsFalse(TUint aId); |
|
121 |
|
122 private: |
|
123 void ConstructL(TUid aRepositoryId); |
|
124 |
|
125 private: // Data |
|
126 CRepository* iRepository; |
|
127 }; |
|
128 |
|
129 #endif // CRSFWCONFIG_H |
|
130 |
|
131 // End of File |
|