1 /* |
|
2 * Copyright (c) 2006-2007 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: CM Settings Engine main class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 #ifndef C_CCMSETTINGSENGINE_H |
|
25 #define C_CCMSETTINGSENGINE_H |
|
26 |
|
27 // INCLUDES |
|
28 #include <e32base.h> |
|
29 #include "cmcommon.h" |
|
30 #include "cmsettings.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CRepository; |
|
34 class CCmDriveInfo; |
|
35 class RFs; |
|
36 |
|
37 /** |
|
38 * Settings engine class for the cenrep keys |
|
39 * |
|
40 * Provides interface to get persistent settings information |
|
41 * for different ContentManager modules. |
|
42 * |
|
43 * @lib cmsettingsengine |
|
44 * @since S60 3.1 |
|
45 */ |
|
46 class CCmSettingsEngine : public CBase, |
|
47 public MCmSettings |
|
48 { |
|
49 |
|
50 public: // Constructors and destructor |
|
51 |
|
52 // 2-phase constructor |
|
53 static CCmSettingsEngine* NewL(); |
|
54 |
|
55 // 2-phase constructor |
|
56 static CCmSettingsEngine* NewLC(); |
|
57 |
|
58 // Destructor |
|
59 virtual ~CCmSettingsEngine(); |
|
60 |
|
61 public: // New functions |
|
62 |
|
63 /** |
|
64 * Gets the status for the Content Manager service |
|
65 * |
|
66 * @since S60 3.1 |
|
67 * @param aService indicates service |
|
68 * @param aState state enum is returned here |
|
69 * @return status of the operation |
|
70 */ |
|
71 TInt GetServiceState( const TCmService aService, |
|
72 TCmServiceState& aState ) const; |
|
73 |
|
74 /** |
|
75 * Sets Content Manager service state |
|
76 * |
|
77 * @since S60 3.1 |
|
78 * @param aState TCmServerState to indicate state |
|
79 * @return status of the operation |
|
80 */ |
|
81 TInt SetServiceState( const TCmService aService, |
|
82 const TCmServiceState aState ); |
|
83 |
|
84 /** |
|
85 * Gets defined IAP information. |
|
86 * |
|
87 * @since S60 3.1 |
|
88 * @param aIap access point info is stored here |
|
89 * @return status of the operation |
|
90 */ |
|
91 TInt GetIapL( TInt& aIap ) const; |
|
92 |
|
93 /** |
|
94 * Gets next runtime information for the specified service. |
|
95 * |
|
96 * @since S60 3.1 |
|
97 * @param aService content manager service |
|
98 * @param aRuntime the next date and time service is run. |
|
99 * @return status of the operation |
|
100 */ |
|
101 TInt GetNextRuntime( const TCmService aService, |
|
102 TTime& aRuntime ) const; |
|
103 |
|
104 |
|
105 /** |
|
106 * Sets next runtime information for the specified service. |
|
107 * |
|
108 * @since S60 3.1 |
|
109 * @param aService content manager service |
|
110 * @param aNextTime the next date and time service is run. |
|
111 * @return status of the operation |
|
112 */ |
|
113 TInt SetNextRuntime( const TCmService aService, |
|
114 const TTime aRuntime ); |
|
115 |
|
116 |
|
117 /** |
|
118 * Gets device discovery delay |
|
119 * |
|
120 * @since S60 3.1 |
|
121 * @param aDelay device discovery delay |
|
122 * @return status of the operation |
|
123 */ |
|
124 TInt GetDiscoveryDelay( TInt& aDelay ) const; |
|
125 |
|
126 |
|
127 /** |
|
128 * Sets device discovery delay |
|
129 * |
|
130 * @since S60 3.1 |
|
131 * @param aDelay device discovery delay |
|
132 * @return status of the operation |
|
133 */ |
|
134 TInt SetDiscoveryDelay( const TInt aDelay ); |
|
135 |
|
136 |
|
137 /** |
|
138 * Gets automatic sync settings |
|
139 * |
|
140 * @since S60 3.1 |
|
141 * @param aAutoSync automatic sync settings |
|
142 * @return status of the operation |
|
143 */ |
|
144 TInt GetAutoSync( TBool& aAutoSync ) const; |
|
145 |
|
146 |
|
147 /** |
|
148 * Sets automatic sync settings |
|
149 * |
|
150 * @since S60 3.1 |
|
151 * @param aAutoSync automatic sync settings |
|
152 * @return status of the operation |
|
153 */ |
|
154 TInt SetAutoSync( const TBool aAutoSync ); |
|
155 |
|
156 /** |
|
157 * Gets memory manager status |
|
158 * |
|
159 * @since S60 3.1 |
|
160 * @param aMmStatus memory manager status |
|
161 * @return status of the operation |
|
162 */ |
|
163 TInt GetMemoryManagerStatus( TBool& aMmStatus ) const; |
|
164 |
|
165 /** |
|
166 * Sets memory manager status |
|
167 * |
|
168 * @since S60 3.1 |
|
169 * @param aMmStatus memory manager status |
|
170 * @return status of the operation |
|
171 */ |
|
172 TInt SetMemoryManagerStatus( const TBool aMmStatus ); |
|
173 |
|
174 /** |
|
175 * Gets search item count |
|
176 * |
|
177 * @since S60 3.1 |
|
178 * @param aItemCount result item count |
|
179 * @return status of the operation |
|
180 */ |
|
181 TInt GetSearchCount( TInt& aItemCount ) const; |
|
182 |
|
183 /** |
|
184 * Gets add item count |
|
185 * |
|
186 * @since S60 3.1 |
|
187 * @param aItemCount result item count |
|
188 * @return status of the operation |
|
189 */ |
|
190 TInt GetAddCount( TInt& aItemCount ) const; |
|
191 |
|
192 /** |
|
193 * ??? |
|
194 * |
|
195 * @since S60 3.1 |
|
196 * @param aAppWizardState ?? |
|
197 * @return TInt ??? |
|
198 */ |
|
199 TInt GetAppWizardInformation( TInt& aAppWizardState ) const; |
|
200 |
|
201 /** |
|
202 * ??? |
|
203 * |
|
204 * @since S60 3.1 |
|
205 * @return TInt ??? |
|
206 */ |
|
207 TInt SetAppWizardInformation(); |
|
208 |
|
209 /** |
|
210 * ??? |
|
211 * |
|
212 * @since S60 3.1 |
|
213 * @param aFs ?? |
|
214 * @param aDrives ?? |
|
215 */ |
|
216 void DriveListL( RFs& aFs, |
|
217 RPointerArray<CCmDriveInfo>& aDrives ) const; |
|
218 |
|
219 /** |
|
220 * Deletes the object |
|
221 * |
|
222 * @since S60 3.1 |
|
223 */ |
|
224 void Close(); |
|
225 |
|
226 private: |
|
227 CCmSettingsEngine(); |
|
228 |
|
229 void ConstructL(); |
|
230 |
|
231 private: // data |
|
232 |
|
233 /** |
|
234 * Central Repository access |
|
235 */ |
|
236 CRepository* iRepository; // owned |
|
237 |
|
238 }; |
|
239 |
|
240 |
|
241 #endif // C_CCMSETTINGSENGINE_H |
|