author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:20:32 +0300 | |
branch | RCL_3 |
changeset 33 | 2989b291cac7 |
parent 28 | d38647835c2e |
permissions | -rw-r--r-- |
28 | 1 |
/* |
2 |
* Copyright (c) 2007-2010 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: Declarition of CSCSettingsUiMainContainer |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef C_CSCSETTINGSUIMAINCONTAINER_H |
|
20 |
#define C_CSCSETTINGSUIMAINCONTAINER_H |
|
21 |
||
22 |
#include "mcscengserviceobserver.h" |
|
23 |
#include "mcscengprovisioningobserver.h" |
|
24 |
||
25 |
class CCSCSettingsUiModel; |
|
26 |
class CAknSettingStyleListBox; |
|
27 |
class MCSCEngServiceObserver; |
|
28 |
class MCSCEngProvisioningObserver; |
|
29 |
||
30 |
/** |
|
31 |
* TListBoxItem class |
|
32 |
* |
|
33 |
* @lib CSCSettingsUi.lib |
|
34 |
* @since S60 v3.2 |
|
35 |
*/ |
|
36 |
NONSHARABLE_CLASS( TMainListBoxItem ) |
|
37 |
{ |
|
38 |
public: |
|
39 |
||
40 |
/** Enumeration of setting items **/ |
|
41 |
enum TSettingItems |
|
42 |
{ |
|
43 |
EUsername = 0, |
|
44 |
EPassword, |
|
45 |
EPreferredService, |
|
46 |
EVccPreferredService, |
|
47 |
EHandoverNotifTone, |
|
48 |
EImTone, |
|
49 |
EAutoacceptInv, |
|
50 |
EServiceConn |
|
51 |
}; |
|
52 |
||
53 |
/** |
|
54 |
* Constructor. |
|
55 |
* |
|
56 |
* @since S60 3.2 |
|
57 |
*/ |
|
58 |
TMainListBoxItem() |
|
59 |
: iItem( EUsername ) |
|
60 |
{} |
|
61 |
||
62 |
public: // data |
|
63 |
||
64 |
/** |
|
65 |
* Listbox item |
|
66 |
*/ |
|
67 |
TSettingItems iItem; |
|
68 |
}; |
|
69 |
||
70 |
/** |
|
71 |
* CCSCSettingsUiMainContainer class |
|
72 |
* Declarition of CCSCSettingsUiMainContainer. |
|
73 |
* |
|
74 |
* @lib CSCSettingsUi.lib |
|
75 |
* @since S60 v3.2 |
|
76 |
*/ |
|
77 |
NONSHARABLE_CLASS( CCSCSettingsUiMainContainer ) : public CCoeControl |
|
78 |
{ |
|
79 |
public: |
|
80 |
||
81 |
CCSCSettingsUiMainContainer( |
|
82 |
CCSCSettingsUiModel& aModel ); |
|
83 |
void ConstructL( const TRect& aRect ); |
|
84 |
virtual ~CCSCSettingsUiMainContainer(); |
|
85 |
||
86 |
/** |
|
87 |
* Updates container and redraws listbox items. |
|
88 |
* |
|
89 |
* @since S60 v3.2 |
|
90 |
*/ |
|
91 |
void UpdateContainerL(); |
|
92 |
||
93 |
/** |
|
94 |
* Shows a query which changes handover notification tone setting |
|
95 |
* |
|
96 |
* @since S60 v5.0 |
|
97 |
*/ |
|
98 |
void HandoverNotificationToneQueryL(); |
|
99 |
||
100 |
/** |
|
101 |
* Shows a query which changes presence request preference |
|
102 |
* |
|
103 |
* @since S60 v3.2 |
|
104 |
*/ |
|
105 |
void PresenceReqPrefQueryL(); |
|
106 |
||
107 |
/** |
|
108 |
* For saving IM tone path to service tab storage. |
|
109 |
* |
|
110 |
* @param aTonePath tone path to be saved. |
|
111 |
* @since S60 v5.0 |
|
112 |
*/ |
|
113 |
void SaveImTonePathL( const TDesC& aTonePath ); |
|
114 |
||
115 |
/** |
|
116 |
* Returns handle to the listbox. |
|
117 |
* |
|
118 |
* @since S60 v3.2 |
|
119 |
* @return handle to the listbox |
|
120 |
*/ |
|
121 |
CAknSettingStyleListBox* ListBox(); |
|
122 |
||
123 |
/** |
|
124 |
* Returns selected list box item |
|
125 |
* |
|
126 |
* @since S60 v3.2 |
|
127 |
* @return selected list box item |
|
128 |
*/ |
|
129 |
TMainListBoxItem CurrentItem() const; |
|
130 |
||
131 |
/** |
|
132 |
* Deletes the service in hand. |
|
133 |
* |
|
134 |
* @since S60 v5.2 |
|
33
2989b291cac7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
135 |
* @return ETrue if delete the service, EFalse if not delete the service. |
28 | 136 |
*/ |
137 |
TBool DeleteServiceL(); |
|
138 |
||
139 |
/** |
|
140 |
* Launches cleanup plugin to remove settings. |
|
141 |
* |
|
142 |
* @since S60 v5.2 |
|
143 |
* @param aServiceId ID of service to be removed. |
|
144 |
*/ |
|
145 |
void LaunchCleanupPluginL( TUint aServiceId ) const; |
|
146 |
||
147 |
// from base class CCoeControl |
|
148 |
||
149 |
/** |
|
150 |
* From CCoeControl. |
|
151 |
*/ |
|
152 |
CCoeControl* ComponentControl( TInt aIndex ) const; |
|
153 |
||
154 |
/** |
|
155 |
* From CCoeControl. |
|
156 |
*/ |
|
157 |
TKeyResponse OfferKeyEventL( |
|
158 |
const TKeyEvent& aKeyEvent, |
|
159 |
TEventCode aType ); |
|
160 |
||
161 |
/** |
|
162 |
* From CCoeControl. |
|
163 |
*/ |
|
164 |
void HandleResourceChange( TInt aType ); |
|
165 |
||
166 |
private: |
|
167 |
||
168 |
/** |
|
169 |
* Creates listbox item for setting items. |
|
170 |
* |
|
171 |
* @since S60 v3.2 |
|
172 |
*/ |
|
173 |
void ConstructListBoxL(); |
|
174 |
||
175 |
/** |
|
176 |
* Return caption for setting item. |
|
177 |
* |
|
178 |
* @since S60 v3.2 |
|
179 |
* @param aItem for setting list item to be constructed |
|
180 |
* @return setting item caption |
|
181 |
*/ |
|
182 |
HBufC* GetCaptionL( TMainListBoxItem::TSettingItems aItem ); |
|
183 |
||
184 |
/** |
|
185 |
* Get username. |
|
186 |
* |
|
187 |
* @since S60 v5.0 |
|
188 |
* @param aUsername username is set to this. |
|
189 |
*/ |
|
190 |
void GetUsernameL( RBuf& aUsername ); |
|
191 |
||
192 |
/** |
|
193 |
* Get preferred service setting. |
|
194 |
* |
|
195 |
* @since S60 v5.0 |
|
196 |
* @param aValue presence pref setting value is stored to this. |
|
197 |
*/ |
|
198 |
void GetPreferredServiceSettingL( RBuf& aValue ); |
|
199 |
||
200 |
/** |
|
201 |
* Get preferred service setting when VCC is supported. |
|
202 |
* |
|
203 |
* @since S60 v5.0 |
|
204 |
* @param aValue presence pref setting value is stored to this. |
|
205 |
*/ |
|
206 |
void GetVccPreferredServiceSettingL( RBuf& aValue ); |
|
207 |
||
208 |
/** |
|
209 |
* Get handover notification tone setting. |
|
210 |
* |
|
211 |
* @since S60 v5.0 |
|
212 |
* @param aValue handover notification tone setting value is stored |
|
213 |
* to this. |
|
214 |
*/ |
|
215 |
void GetHandoverNotificationTonePrefL( RBuf& aValue ); |
|
216 |
||
217 |
/** |
|
218 |
* Get precence preferred setting. |
|
219 |
* |
|
220 |
* @since S60 v5.0 |
|
221 |
* @param aValue presence pref setting value is stored to this. |
|
222 |
*/ |
|
223 |
void GetPresencePrefSettingL( RBuf& aValue ); |
|
224 |
||
225 |
/** |
|
226 |
* Get IM message tone setting. |
|
227 |
* |
|
228 |
* @since S60 v5.0 |
|
229 |
* @param aValue im tone setting value is stored to this. |
|
230 |
*/ |
|
231 |
void GetImToneSettingL( RBuf& aValue ); |
|
232 |
||
233 |
/** |
|
234 |
* Get SNAP settings. |
|
235 |
* |
|
236 |
* @since S60 v5.0 |
|
237 |
* @param aValue snap setting value is stored to this. |
|
238 |
*/ |
|
239 |
void GetSnapSettingL( RBuf& aValue ); |
|
240 |
||
241 |
/** |
|
242 |
* Draws setting items at the first time |
|
243 |
* after the initialization is completed. |
|
244 |
* |
|
245 |
* @since S60 v3.2 |
|
246 |
*/ |
|
247 |
void InitializeSettingItemsL(); |
|
248 |
||
249 |
/** |
|
250 |
* Constructs setting list items. |
|
251 |
* |
|
252 |
* @since S60 v3.2 |
|
253 |
* @param aItem for setting list item to be constructed |
|
254 |
*/ |
|
255 |
void MakeSettingItemL( TMainListBoxItem::TSettingItems aItem ); |
|
256 |
||
257 |
/** |
|
258 |
* Cleanup RImplInfoPtrArray |
|
259 |
* |
|
260 |
* @since S60 v5.2 |
|
261 |
* @param aArray Array to be destroyed. |
|
262 |
*/ |
|
263 |
static void ResetAndDestroy( TAny* aArray ); |
|
264 |
||
265 |
// from base class CCoeControl |
|
266 |
||
267 |
/** |
|
268 |
* From CCoeControl. |
|
269 |
*/ |
|
270 |
TInt CountComponentControls() const; |
|
271 |
||
272 |
/** |
|
273 |
* From CCoeControl |
|
274 |
*/ |
|
275 |
void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
276 |
||
277 |
/** |
|
278 |
* From CCoeControl. |
|
279 |
*/ |
|
280 |
void SizeChanged(); |
|
281 |
||
282 |
/** |
|
283 |
* From CoeControl. |
|
284 |
*/ |
|
285 |
void FocusChanged( TDrawNow aDrawNow ); |
|
286 |
||
287 |
private: // data |
|
288 |
||
289 |
/** |
|
290 |
* Reference to model class for settings handling. |
|
291 |
*/ |
|
292 |
CCSCSettingsUiModel& iModel; |
|
293 |
||
294 |
/** |
|
295 |
* Listbox for main view setting page items. |
|
296 |
* Own. |
|
297 |
*/ |
|
298 |
CAknSettingStyleListBox* iListBox; |
|
299 |
||
300 |
/** |
|
301 |
* Listbox item array |
|
302 |
*/ |
|
303 |
RArray<TMainListBoxItem> iListBoxItemArray; |
|
304 |
||
305 |
/** |
|
306 |
* Setting item caption |
|
307 |
*/ |
|
308 |
HBufC* iCaption; |
|
309 |
||
310 |
#ifdef _DEBUG |
|
311 |
friend class UT_cscsettingsui; |
|
312 |
#endif |
|
313 |
||
314 |
}; |
|
315 |
||
316 |
#endif // C_CSCSETTINGSUIMAINCONTAINER_H |
|
317 |