equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
20 #define CMCSPLUGINSETTINGSMODEL_H |
20 #define CMCSPLUGINSETTINGSMODEL_H |
21 |
21 |
22 // External includes |
22 // External includes |
23 #include <e32base.h> |
23 #include <e32base.h> |
24 #include <bamdesca.h> // For MDesCArray |
24 #include <bamdesca.h> // For MDesCArray |
25 #include <badesca.h> |
|
26 #include <hspluginsettings.h> |
25 #include <hspluginsettings.h> |
27 #include <propertymap.h> |
26 #include <propertymap.h> |
28 |
27 |
29 // Internal includes |
|
30 #include "mcspluginsettingsapplist.h" |
|
31 #include "mcspluginsettingsbkmlist.h" |
|
32 |
|
33 // Forward declaration |
28 // Forward declaration |
34 class CCoeEnv; |
29 class CCoeEnv; |
|
30 class CMenuItem; |
|
31 class CMCSPluginSettingsAppList; |
|
32 class CMCSPluginSettingsBkmList; |
|
33 class CMCSPluginSettings; |
35 class CMCSPluginSettingsContainer; |
34 class CMCSPluginSettingsContainer; |
36 class CMCSPluginSettings; |
|
37 class HSPluginSettingsIf::CItemMap; |
35 class HSPluginSettingsIf::CItemMap; |
38 |
36 |
39 /** |
37 /** |
40 * TSettingType |
38 * TSettingType |
41 */ |
39 */ |
42 enum TSettingType |
40 enum TSettingType |
43 { |
41 { |
44 EApplication, |
42 EApplication, |
45 EBookmark |
43 EBookmark, |
|
44 EMailbox |
46 }; |
45 }; |
47 |
46 |
48 /** |
47 /** |
49 * TSettingItem |
48 * TSettingItem |
50 */ |
49 */ |
163 /** |
162 /** |
164 * Update settings container |
163 * Update settings container |
165 * |
164 * |
166 * @param aPluginId |
165 * @param aPluginId |
167 */ |
166 */ |
168 void UpdateSettingsContainerL( const TDesC8& aPluginId ); |
167 void SetPluginIdL( const TDesC8& aPluginId ); |
169 |
168 |
170 /** |
169 /** |
171 * Update settings model |
170 * Read settings from HSPS and update settings list |
172 * |
171 */ |
173 * @param aPluginId |
172 void UpdateSettingsL(); |
174 */ |
|
175 void UpdateSettingModelL( const TDesC8& aPluginId ); |
|
176 |
173 |
177 private: |
174 private: |
178 |
175 |
179 /** |
176 /** |
180 * Private constructor |
177 * Private constructor |
188 * Leaving constructor |
185 * Leaving constructor |
189 */ |
186 */ |
190 void ConstructL(); |
187 void ConstructL(); |
191 |
188 |
192 /** |
189 /** |
193 * ListBoxLineL |
190 * ListBoxLine for list |
194 * |
191 * |
195 * @param aCaption |
192 * @param aCaption |
196 * @param aIndex |
193 * @param aIndex |
197 * @return TPtrC |
194 * @return TPtrC |
198 */ |
195 */ |
199 TPtrC ListBoxLineL( const TDesC& aCaption, TInt aIndex ) const; |
196 TPtrC ListBoxLineL( const TDesC& aCaption, TInt aIndex ) const; |
200 |
197 |
201 /** |
198 /** |
202 * ItemL |
199 * Returns setting item based on properties. |
203 * |
200 * |
204 * @param aProperties |
201 * @param aProperties |
205 * @return TSettingItem |
202 * @return TSettingItem |
206 */ |
203 */ |
207 TSettingItem ItemL( |
204 TSettingItem ItemL( |
223 * @return TBool |
220 * @return TBool |
224 */ |
221 */ |
225 TBool SettingLockedL( |
222 TBool SettingLockedL( |
226 RPointerArray<HSPluginSettingsIf::CPropertyMap>& aProperties ); |
223 RPointerArray<HSPluginSettingsIf::CPropertyMap>& aProperties ); |
227 |
224 |
228 /** |
225 |
229 * Update settings |
226 |
230 * |
227 /** |
231 * @param aPluginId |
228 * Save settings into HSPS |
232 */ |
|
233 void UpdateSettingsL( const TDesC8& aPluginId ); |
|
234 |
|
235 /** |
|
236 * Save settings |
|
237 * |
229 * |
238 * @param aIndex |
230 * @param aIndex |
239 * @param aMenuItem |
231 * @param aMenuItem |
240 */ |
232 */ |
241 void SaveSettingsL( const TInt& aIndex, CMenuItem& aMenuItem ); |
233 void SaveSettingsL( const TInt& aIndex, CMenuItem& aMenuItem ); |
246 * Array of setting items. |
238 * Array of setting items. |
247 * Own. |
239 * Own. |
248 */ |
240 */ |
249 RArray<TSettingItem> iSettings; |
241 RArray<TSettingItem> iSettings; |
250 |
242 |
251 // Homescreen settings API. NOT OWNED! |
243 /** |
|
244 * Homescreen settings API. Not owned. |
|
245 */ |
252 HSPluginSettingsIf::CHomescreenSettings* iPluginSettings; |
246 HSPluginSettingsIf::CHomescreenSettings* iPluginSettings; |
253 |
247 |
|
248 /** |
|
249 * HSPS settings id. |
|
250 */ |
254 HBufC8* iPluginId; |
251 HBufC8* iPluginId; |
255 |
252 |
256 // Stores the text which is drawn by listbox |
253 /** |
257 // Listbox takes only reference |
254 * Stores the text which is drawn by listbox |
|
255 * Listbox takes only reference, own. |
|
256 */ |
258 mutable HBufC* iListBoxLine; |
257 mutable HBufC* iListBoxLine; |
259 |
258 |
260 /** |
259 /** |
261 * Settings plugin |
260 * Settings plugin |
262 * Not own. |
261 * Not own. |