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: |
|
15 * Declares the main implementation, CApSettingsHandlerImpl for the |
|
16 * Access Point settings. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef APSETTINGS_HANDLER_IMPL_H |
|
22 #define APSETTINGS_HANDLER_IMPL_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <ApSettingsHandlerCommons.h> |
|
26 #include <ApEngineConsts.h> |
|
27 #include <ApSelect.h> |
|
28 |
|
29 // CONSTANTS |
|
30 /* |
|
31 const TUid KUidApSettingsHandler = { 0x10008d3B }; |
|
32 */ |
|
33 |
|
34 typedef struct ///< Extra data holder |
|
35 { |
|
36 TInt iResOffset; |
|
37 TBool iIsIpv6Supported; // Default is NO |
|
38 TBool iIsFeatureManagerInitialised; |
|
39 TInt iExtra; |
|
40 TInt iSortType; |
|
41 TVpnFilterType iVpnFilterType; |
|
42 TInt iVariant; /// Local variant value |
|
43 TBool iIncludeEasyWlan; |
|
44 }TApSetHandlerImplExtra; |
|
45 |
|
46 |
|
47 // FORWARD DECLARATIONS |
|
48 class CActiveApDb; |
|
49 class CApSelector; |
|
50 class CApSettingsModel; |
|
51 class CApSettings; |
|
52 class CTextOverrides; |
|
53 class CApAccessPointItem; |
|
54 |
|
55 |
|
56 // CLASS DECLARATION |
|
57 /** |
|
58 * CApSettingsHandlerImpl class: It is the main handler for the Access Point |
|
59 * settings. It contains the implementation of the Access Point Settings for |
|
60 * the public API to be used by other (sub)systems. |
|
61 * |
|
62 */ |
|
63 NONSHARABLE_CLASS( CApSettingsHandlerImpl ): public CBase |
|
64 { |
|
65 |
|
66 public: // Constructors and destructor |
|
67 |
|
68 |
|
69 /** |
|
70 * Two-phased constructor. Leaves on failure. |
|
71 * This function shall be used to create the access point |
|
72 * settings/selection handling UI object. It is customizable through |
|
73 * the parameters. This object is a small layer above the UI part and |
|
74 * it provides a standard interface to select, edit, create access |
|
75 * points. It has two main parts, Select and Edit. The first parameter, |
|
76 * aStartWithSelection gives whether we would like to select or edit. |
|
77 * In case of selection, there is the possibility to use this module in |
|
78 * many applications. For this, two layouts are implemented, |
|
79 * one is list pane used by General Settings which provides the list in |
|
80 * a list-pane. The other layout is for the other applications |
|
81 * requiring access point selection, a popup-list style as the decision |
|
82 * I know about was that General Settings will use list-pane and all |
|
83 * other apps. popup-list style. It is the caller who selects the style |
|
84 * so if spec. says otherwise, this module still can be used. |
|
85 * It is also possible to start the UI without selection, so if any |
|
86 * module has a 'linked/default/etc.' access point and stored it's UID, |
|
87 * the module can simply call the editor part of the UI without having |
|
88 * to select the AP once more. In case of editing only, |
|
89 * (aStartWithSelection is EFalse), all other construction parameters |
|
90 * are ignored and after construction caller can simply call |
|
91 * DoRunSettingsL(..). In case of selection, a lot of other parameters |
|
92 * can be specified to fulfil all requirements. There are three types |
|
93 * of Options menu available: |
|
94 * EApSettingsSelMenuNormal, |
|
95 * EApSettingsSelMenuSelectOnly, |
|
96 * EApSettingsSelMenuSelectNormal. |
|
97 * <br> |
|
98 *-EApSettingsSelMenuSelectOnly: Only Select is visible, |
|
99 * no way to edit, delete, create, etc. |
|
100 * <br> |
|
101 * -EApSettingsSelMenuNormal: Options menu specified in General |
|
102 * Settings, contains Edit, Delete, |
|
103 * Create new, etc. menu items. |
|
104 * <br> |
|
105 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal |
|
106 * BUT the first item is Select. |
|
107 * This one makes it possible to select |
|
108 * an access point and also possible to |
|
109 * edit, create, delete, etc. |
|
110 * <br> |
|
111 * The following three parameters specify the filtering and ordering |
|
112 * criteria for the selection list creation. First, it is possible to |
|
113 * specify which ISP-type we are looking for. The possible values are: |
|
114 * <br> |
|
115 * KEApIspTypeInternetOnly: Filter allows only access points that are |
|
116 * capable of only internet access. |
|
117 * <br> |
|
118 * KEApIspTypeWAPOnly: Filter allows only access points that are |
|
119 * capable of only WAP access. |
|
120 * <br> |
|
121 * KEApIspTypeInternetAndWAP: Filter allows only access points that are |
|
122 * capable of internet AND WAP access. |
|
123 * <br> |
|
124 * KEApIspTypeWAPMandatory: Filter allows only access points that are |
|
125 * capable of WAP access AND contain |
|
126 * mandatory WAP settings. |
|
127 * <br> |
|
128 * KEApIspTypeAll: No filtering is done for the isp-type, |
|
129 * all types of access points are shown. |
|
130 * <br> |
|
131 * It is possible to combine them by simply adding/or-ing together |
|
132 * the values, filtering will be done in such a way that only access |
|
133 * points with the listed ISP-types will be shown. Second filtering |
|
134 * possibility (aBearerFilter) is the desired bearer type. The possible |
|
135 * values are the values of the TApBearerType enum type and their |
|
136 * combinations, as in case of the ISP type. The ordering of the list |
|
137 * can be specified with the aSortType parameter. It can have the |
|
138 * following values: |
|
139 * KEApSortUidAscending: The sorting is done according to the ID |
|
140 * of the access points in ascending order. |
|
141 * KEApSortUidDescending: The sorting is done according to the ID |
|
142 * of the access points in descending order. |
|
143 * KEApSortNameAscending: The sorting is done according to the name |
|
144 * of the access points in ascending order. |
|
145 * KEApSortNameDescending: The sorting is done according to the name |
|
146 * of the access points in descending order. |
|
147 * Caution! The ordering values can not be combined! |
|
148 * @param aStartWithSelection A boolean value indicating whether to |
|
149 * select or edit an ap. |
|
150 * @param aListType A TSelectionListType enum indicating the |
|
151 * desired list type. |
|
152 * @param aSelMenuType A TSelectionMenuType enum indicating the |
|
153 * desired menu type. |
|
154 * @param aIspTypeFilter Filtering criteria on ISP type |
|
155 * @param aBearerFilter Filtering criteria on bearer type |
|
156 * @param aSortType Specifies the sort order to use. |
|
157 * @param aNoEdit Gives wether editing is allowed or not |
|
158 * @return The constructed CApSettingsHandlerImpl object. |
|
159 */ |
|
160 static CApSettingsHandlerImpl* NewLC( |
|
161 TBool aStartWithSelection, |
|
162 TSelectionListType aListType, |
|
163 TSelectionMenuType aSelMenuType, |
|
164 TInt aIspFilter, |
|
165 TInt aBearerFilter, |
|
166 TInt aSortType, |
|
167 TBool aNoEdit |
|
168 ); |
|
169 |
|
170 |
|
171 |
|
172 /** |
|
173 * Two-phased constructor. Leaves on failure. |
|
174 * This function shall be used to create the access point |
|
175 * settings/selection handling UI object. It is customizable through |
|
176 * the parameters. This object is a small layer above the UI part and |
|
177 * it provides a standard interface to select, edit, create |
|
178 * access points. It has two main parts, Select and Edit. The first |
|
179 * parameter, aStartWithSelection gives whether we would like to select |
|
180 * or edit. In case of selection, there is the possibility to use this |
|
181 * module in many applications. For this, two layouts are implemented, |
|
182 * one is list pane used by General Settings which provides the list |
|
183 * in a list-pane. The other layout is for the other applications |
|
184 * requiring access point selection, a popup-list style as the |
|
185 * decision I know about was that General Settings will use list-pane |
|
186 * and all other apps. popup-list style. It is the caller who selects |
|
187 * the style so if spec. says otherwise, this module still can be used. |
|
188 * It is also possible to start the UI without selection, so if any |
|
189 * module has a 'linked/default/etc.' access point and stored it's UID, |
|
190 * the module can simply call the editor part of the UI without having |
|
191 * to select the AP once more. |
|
192 * In case of editing only, (aStartWithSelection is EFalse), all other |
|
193 * construction parameters are ignored and after construction caller |
|
194 * can simply call DoRunSettingsL(..). |
|
195 * In case of selection, a lot of other parameters can be specified |
|
196 * to fulfil all requirements. There are three types of Options menu |
|
197 * available: |
|
198 * EApSettingsSelMenuNormal, |
|
199 * EApSettingsSelMenuSelectOnly, |
|
200 * EApSettingsSelMenuSelectNormal. |
|
201 * <br> |
|
202 *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to |
|
203 * edit, delete, create, etc. |
|
204 * <br> |
|
205 * -EApSettingsSelMenuNormal: Options menu specified in General |
|
206 * Settings, contains Edit, Delete, |
|
207 * Create new, etc. menu items. |
|
208 * <br> |
|
209 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal |
|
210 * BUT the first item is Select. |
|
211 * This one makes it possible to |
|
212 * select an access point and also |
|
213 * possible to edit, create, |
|
214 * delete, etc. |
|
215 * <br> |
|
216 * The following three parameters specify the filtering and ordering |
|
217 * criteria for the selection list creation. First, it is possible to |
|
218 * specify which ISP-type we are looking for. The possible values are: |
|
219 * <br> |
|
220 * KEApIspTypeInternetOnly: Filter allows only access points that |
|
221 * are capable of only internet access. |
|
222 * <br> |
|
223 * KEApIspTypeWAPOnly: Filter allows only access points that |
|
224 * are capable of only WAP access. |
|
225 * <br> |
|
226 * KEApIspTypeInternetAndWAP: Filter allows only access points that |
|
227 * are capable of internet AND WAP access. |
|
228 * <br> |
|
229 * KEApIspTypeWAPMandatory: Filter allows only access points that |
|
230 * are capable of WAP access AND contain |
|
231 * mandatory WAP settings. |
|
232 * <br> |
|
233 * KEApIspTypeAll: No filtering is done for the isp-type, |
|
234 * all types of access points are shown. |
|
235 * <br> |
|
236 * It is possible to combine them by simply adding/or-ing together the |
|
237 * values, filtering will be done in such a way that only access points |
|
238 * with the listed ISP-types will be shown. |
|
239 * Second filtering possibility (aBearerFilter) is the desired bearer |
|
240 * type. The possible values are the values of the TApBearerType enum |
|
241 * type and their combinations, as in case of the ISP type. |
|
242 * The ordering of the list can be specified with the aSortType |
|
243 * parameter. It can have the following values: |
|
244 * KEApSortUidAscending: The sorting is done according to the ID |
|
245 * of the access points in ascending order. |
|
246 * KEApSortUidDescending: The sorting is done according to the ID |
|
247 * of the access points in descending order. |
|
248 * KEApSortNameAscending: The sorting is done according to the name |
|
249 * of the access points in ascending order. |
|
250 * KEApSortNameDescending: The sorting is done according to the name |
|
251 * of the access points in descending order. |
|
252 * Caution! The ordering values can not be combined! |
|
253 * @param aDb A database to work on |
|
254 * @param aStartWithSelection A boolean value indicating whether to |
|
255 * select or edit an ap. |
|
256 * @param aListType A TSelectionListType enum indicating the desired |
|
257 * list type. |
|
258 * @param aSelMenuType A TSelectionMenuType enum indicating the desired |
|
259 * menu type. |
|
260 * @param aIspTypeFilter Filtering criteria on ISP type |
|
261 * @param aBearerFilter Filtering criteria on bearer type |
|
262 * @param aSortType Specifies the sort order to use. |
|
263 * @param aNoEdit Gives wether editing is allowed or not |
|
264 * @return The constructed CApSettingsHandlerImpl object. |
|
265 */ |
|
266 static CApSettingsHandlerImpl* NewLC( |
|
267 CActiveApDb& aDb, |
|
268 TBool aStartWithSelection, |
|
269 TSelectionListType aListType, |
|
270 TSelectionMenuType aSelMenuType, |
|
271 TInt aIspFilter, |
|
272 TInt aBearerFilter, |
|
273 TInt aSortType, |
|
274 TBool aNoEdit |
|
275 ); |
|
276 |
|
277 |
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 /** |
|
285 * Two-phased constructor. Leaves on failure. |
|
286 * This function shall be used to create the access point |
|
287 * settings/selection handling UI object.It is customizable through the |
|
288 * parameters. This object is a small layer above the UI part and |
|
289 * it provides a standard interface to select, edit, create access |
|
290 * points. It has two main parts, Select and Edit. The first parameter, |
|
291 * aStartWithSelection gives whether we would like to select or edit. |
|
292 * In case of selection, there is the possibility to use this module in |
|
293 * many applications. For this, two layouts are implemented, one is |
|
294 * list pane used by General Settings which provides the list in a |
|
295 * list-pane. The other layout is for the other applications requiring |
|
296 * access point selection, a popup-list style as the decision was that |
|
297 * General Settings will use list-pane and all other apps. popup-list |
|
298 * style. It is the caller who selects the style so if spec. says |
|
299 * otherwise, this module still can be used. |
|
300 * It is also possible to start the UI without selection, so if any |
|
301 * module has a 'linked/default/etc.' access point and stored it's UID, |
|
302 * the module can simply call the editor part of the UI without having |
|
303 * to select the AP once more. |
|
304 * In case of editing only, (aStartWithSelection is EFalse), all other |
|
305 * construction parameters are ignored and after construction caller |
|
306 * can simply call DoRunSettingsL(..). |
|
307 * In case of selection, a lot of other parameters can be specified to |
|
308 * fulfil all requirements. There are three types of Options menu |
|
309 * available: EApSettingsSelMenuNormal, EApSettingsSelMenuSelectOnly, |
|
310 * EApSettingsSelMenuSelectNormal. |
|
311 * <br> |
|
312 *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, |
|
313 * delete, create, etc. |
|
314 * <br> |
|
315 * -EApSettingsSelMenuNormal:Options menu specified in General Settings, |
|
316 * contains Edit, Delete, Create new, etc. menu items. |
|
317 * <br> |
|
318 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal |
|
319 * BUT the first item is Select. This one makes it possible to select |
|
320 * an access point and also possible to edit, create, delete, etc. |
|
321 * <br> |
|
322 * The following three parameters specify the filtering and ordering |
|
323 * criteria for the selection list creation. First, it is possible to |
|
324 * specify which ISP-type we are looking for. The possible values are: |
|
325 * <br> |
|
326 * KEApIspTypeInternetOnly: Filter allows only access points that are |
|
327 * capable of only internet access. |
|
328 * <br> |
|
329 * KEApIspTypeWAPOnly: Filter allows only access points that are |
|
330 * capable of only WAP access. |
|
331 * <br> |
|
332 * KEApIspTypeInternetAndWAP: Filter allows only access points that are |
|
333 * capable of internet AND WAP access. |
|
334 * <br> |
|
335 * KEApIspTypeWAPMandatory: Filter allows only access points that are |
|
336 * capable of WAP access AND contain mandatory WAP settings. |
|
337 * <br> |
|
338 * KEApIspTypeAll: No filtering is done for the isp-type, all types of |
|
339 * access points are shown. |
|
340 * <br> |
|
341 * It is possible to combine them by simply adding/or-ing together the |
|
342 * values, filtering will be done in such a way that only access points |
|
343 * with the listed ISP-types will be shown. |
|
344 * Second filtering possibility (aBearerFilter) is the desired bearer |
|
345 * type. The possible values are the values of the TApBearerType enum |
|
346 * type and their combinations, as in case of the ISP type. |
|
347 * The ordering of the list can be specified with the aSortType |
|
348 * parameter. It can have the following values: |
|
349 * KEApSortUidAscending: The sorting is done according to the ID of |
|
350 * the access points in ascending order. |
|
351 * KEApSortUidDescending: The sorting is done according to the ID of |
|
352 * the access points in descending order. |
|
353 * KEApSortNameAscending: The sorting is done according to the name of |
|
354 * the access points in ascending order. |
|
355 * KEApSortNameDescending: The sorting is done according to the name of |
|
356 * the access points in descending order. |
|
357 * Caution! The ordering values can not be combined! |
|
358 * @param aStartWithSelection A boolean value indicating whether to |
|
359 * select or edit an ap. |
|
360 * @param aListType A TSelectionListType enum indicating the desired |
|
361 * list type. |
|
362 * @param aSelMenuType A TSelectionMenuType enum indicating the desired |
|
363 * menu type. |
|
364 * @param aIspTypeFilter Filtering criteria on ISP type |
|
365 * @param aBearerFilter Filtering criteria on bearer type |
|
366 * @param aSortType Specifies the sort order to use. |
|
367 * @param aReqIpvType Specifies whether the caller would like to |
|
368 * have IPv4, IPv6 or both access points. If it is IPv6 or Both, |
|
369 * in case of IPv6 support is available as a feature, it will be |
|
370 * supported. If IPv6 feature is not supported by the phone, it |
|
371 * simply defaults to the normal IPv4 version. |
|
372 * If it is IPv4, it uses the default IPv4 version independently |
|
373 * from IPv6 feature beeing available or not. |
|
374 * @param aNoEdit Gives wether editing is allowed or not |
|
375 * @return The constructed CApSettingsHandlerImpl object. |
|
376 */ |
|
377 static CApSettingsHandlerImpl* NewLC( |
|
378 TBool aStartWithSelection, |
|
379 TSelectionListType aListType, |
|
380 TSelectionMenuType aSelMenuType, |
|
381 TInt aIspFilter, |
|
382 TInt aBearerFilter, |
|
383 TInt aSortType, |
|
384 TInt aReqIpvType, |
|
385 TBool aNoEdit |
|
386 ); |
|
387 |
|
388 |
|
389 |
|
390 /** |
|
391 * Two-phased constructor. Leaves on failure. |
|
392 * This function shall be used to create the access point |
|
393 * settings/selection handling UI object. It is customizable through |
|
394 * the parameters. This object is a small layer above the UI part and |
|
395 * it provides a standard interface to select, edit, create access |
|
396 * points. It has two main parts, Select and Edit. The first parameter, |
|
397 * aStartWithSelection gives whether we would like to select or edit. |
|
398 * In case of selection, there is the possibility to use this module in |
|
399 * many applications. For this, two layouts are implemented, one is list |
|
400 * pane used by General Settings which provides the list in a list-pane. |
|
401 * The other layout is for the other applications requiring access point |
|
402 * selection, a popup-list style as the decision was that General |
|
403 * Settings will use list-pane and all other apps. popup-list style. |
|
404 * It is the caller who selects the style so if spec. says otherwise, |
|
405 * this module still can be used. It is also possible to start the UI |
|
406 * without selection, so if any module has a 'linked/default/etc.' |
|
407 * access point and stored it's UID, the module can simply call the |
|
408 * editor part of the UI without having to select the AP once more. |
|
409 * In case of editing only, (aStartWithSelection is EFalse), all other |
|
410 * construction parameters are ignored and after construction caller can |
|
411 * simply call DoRunSettingsL(..). In case of selection, a lot of other |
|
412 * parameters can be specified to fulfil all requirements. There are |
|
413 * three types of Options menu available: EApSettingsSelMenuNormal, |
|
414 * EApSettingsSelMenuSelectOnly, EApSettingsSelMenuSelectNormal. |
|
415 * <br> |
|
416 *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, |
|
417 * delete, create, etc. |
|
418 * <br> |
|
419 * -EApSettingsSelMenuNormal:Options menu specified in General Settings, |
|
420 * contains Edit, Delete, Create new, etc. menu items. |
|
421 * <br> |
|
422 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal |
|
423 * BUT the first item is Select. This one makes it possible to select |
|
424 * an access point and also possible to edit, create, delete, etc. |
|
425 * <br> |
|
426 * The following three parameters specify the filtering and ordering |
|
427 * criteria for the selection list creation. First, it is possible to |
|
428 * specify which ISP-type we are looking for. The possible values are: |
|
429 * <br> |
|
430 * KEApIspTypeInternetOnly: Filter allows only access points that are |
|
431 * capable of only internet access. |
|
432 * <br> |
|
433 * KEApIspTypeWAPOnly: Filter allows only access points that are |
|
434 * capable of only WAP access. |
|
435 * <br> |
|
436 * KEApIspTypeInternetAndWAP: Filter allows only access points that are |
|
437 * capable of internet AND WAP access. |
|
438 * <br> |
|
439 * KEApIspTypeWAPMandatory: Filter allows only access points that are |
|
440 * capable of WAP access AND contain mandatory WAP settings. |
|
441 * <br> |
|
442 * KEApIspTypeAll: No filtering is done for the isp-type, all types of |
|
443 * access points are shown. |
|
444 * <br> |
|
445 * It is possible to combine them by simply adding/or-ing together the |
|
446 * values, filtering will be done in such a way that only access points |
|
447 * with the listed ISP-types will be shown. Second filtering possibility |
|
448 * (aBearerFilter) is the desired bearer type. The possible values are |
|
449 * the values of the TApBearerType enum type and their combinations, as |
|
450 * in case of the ISP type. The ordering of the list can be specified |
|
451 * with the aSortType parameter. It can have the following values: |
|
452 * KEApSortUidAscending: The sorting is done according to the ID of |
|
453 * the access points in ascending order. |
|
454 * KEApSortUidDescending: The sorting is done according to the ID of |
|
455 * the access points in descending order. |
|
456 * KEApSortNameAscending: The sorting is done according to the name of |
|
457 * the access points in ascending order. |
|
458 * KEApSortNameDescending: The sorting is done according to the name of |
|
459 * the access points in descending order. |
|
460 * Caution! The ordering values can not be combined! |
|
461 * @param aDb A database to work on |
|
462 * @param aStartWithSelection A boolean value indicating whether to |
|
463 * select or edit an ap. |
|
464 * @param aListType A TSelectionListType enum indicating the desired |
|
465 * list type. |
|
466 * @param aSelMenuType A TSelectionMenuType enum indicating the desired |
|
467 * menu type. |
|
468 * @param aIspTypeFilter Filtering criteria on ISP type |
|
469 * @param aBearerFilter Filtering criteria on bearer type |
|
470 * @param aSortType Specifies the sort order to use. |
|
471 * @param aReqIpvType Specifies whether the caller would like to |
|
472 * have IPv4, IPv6 or both access points. If it is IPv6 or Both, |
|
473 * in case of IPv6 support is available as a feature, it will be |
|
474 * supported. If IPv6 feature is not supported by the phone, it |
|
475 * simply defaults to the normal IPv4 version. |
|
476 * If it is IPv4, it uses the default IPv4 version independently |
|
477 * from IPv6 feature beeing available or not. |
|
478 * @param aNoEdit Gives wether editing is allowed or not |
|
479 * @return The constructed CApSettingsHandlerImpl object. |
|
480 */ |
|
481 static CApSettingsHandlerImpl* NewLC( |
|
482 CActiveApDb& aDb, |
|
483 TBool aStartWithSelection, |
|
484 TSelectionListType aListType, |
|
485 TSelectionMenuType aSelMenuType, |
|
486 TInt aIspFilter, |
|
487 TInt aBearerFilter, |
|
488 TInt aSortType, |
|
489 TInt aReqIpvType, |
|
490 TBool aNoEdit |
|
491 ); |
|
492 |
|
493 |
|
494 |
|
495 |
|
496 /** |
|
497 * Two-phased constructor. Leaves on failure. |
|
498 * This function shall be used to create the access point |
|
499 * settings/selection handling UI object.It is customizable through the |
|
500 * parameters. This object is a small layer above the UI part and |
|
501 * it provides a standard interface to select, edit, create access |
|
502 * points. It has two main parts, Select and Edit. The first parameter, |
|
503 * aStartWithSelection gives whether we would like to select or edit. |
|
504 * In case of selection, there is the possibility to use this module in |
|
505 * many applications. For this, two layouts are implemented, one is |
|
506 * list pane used by General Settings which provides the list in a |
|
507 * list-pane. The other layout is for the other applications requiring |
|
508 * access point selection, a popup-list style as the decision was that |
|
509 * General Settings will use list-pane and all other apps. popup-list |
|
510 * style. It is the caller who selects the style so if spec. says |
|
511 * otherwise, this module still can be used. |
|
512 * It is also possible to start the UI without selection, so if any |
|
513 * module has a 'linked/default/etc.' access point and stored it's UID, |
|
514 * the module can simply call the editor part of the UI without having |
|
515 * to select the AP once more. |
|
516 * In case of editing only, (aStartWithSelection is EFalse), all other |
|
517 * construction parameters are ignored and after construction caller |
|
518 * can simply call DoRunSettingsL(..). |
|
519 * In case of selection, a lot of other parameters can be specified to |
|
520 * fulfil all requirements. There are three types of Options menu |
|
521 * available: EApSettingsSelMenuNormal, EApSettingsSelMenuSelectOnly, |
|
522 * EApSettingsSelMenuSelectNormal. |
|
523 * <br> |
|
524 *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, |
|
525 * delete, create, etc. |
|
526 * <br> |
|
527 * -EApSettingsSelMenuNormal:Options menu specified in General Settings, |
|
528 * contains Edit, Delete, Create new, etc. menu items. |
|
529 * <br> |
|
530 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal |
|
531 * BUT the first item is Select. This one makes it possible to select |
|
532 * an access point and also possible to edit, create, delete, etc. |
|
533 * <br> |
|
534 * The following three parameters specify the filtering and ordering |
|
535 * criteria for the selection list creation. First, it is possible to |
|
536 * specify which ISP-type we are looking for. The possible values are: |
|
537 * <br> |
|
538 * KEApIspTypeInternetOnly: Filter allows only access points that are |
|
539 * capable of only internet access. |
|
540 * <br> |
|
541 * KEApIspTypeWAPOnly: Filter allows only access points that are |
|
542 * capable of only WAP access. |
|
543 * <br> |
|
544 * KEApIspTypeInternetAndWAP: Filter allows only access points that are |
|
545 * capable of internet AND WAP access. |
|
546 * <br> |
|
547 * KEApIspTypeWAPMandatory: Filter allows only access points that are |
|
548 * capable of WAP access AND contain mandatory WAP settings. |
|
549 * <br> |
|
550 * KEApIspTypeAll: No filtering is done for the isp-type, all types of |
|
551 * access points are shown. |
|
552 * <br> |
|
553 * It is possible to combine them by simply adding/or-ing together the |
|
554 * values, filtering will be done in such a way that only access points |
|
555 * with the listed ISP-types will be shown. |
|
556 * Second filtering possibility (aBearerFilter) is the desired bearer |
|
557 * type. The possible values are the values of the TApBearerType enum |
|
558 * type and their combinations, as in case of the ISP type. |
|
559 * The ordering of the list can be specified with the aSortType |
|
560 * parameter. It can have the following values: |
|
561 * KEApSortUidAscending: The sorting is done according to the ID of |
|
562 * the access points in ascending order. |
|
563 * KEApSortUidDescending: The sorting is done according to the ID of |
|
564 * the access points in descending order. |
|
565 * KEApSortNameAscending: The sorting is done according to the name of |
|
566 * the access points in ascending order. |
|
567 * KEApSortNameDescending: The sorting is done according to the name of |
|
568 * the access points in descending order. |
|
569 * Caution! The ordering values can not be combined! |
|
570 * @param aStartWithSelection A boolean value indicating whether to |
|
571 * select or edit an ap. |
|
572 * @param aListType A TSelectionListType enum indicating the desired |
|
573 * list type. |
|
574 * @param aSelMenuType A TSelectionMenuType enum indicating the desired |
|
575 * menu type. |
|
576 * @param aIspTypeFilter Filtering criteria on ISP type |
|
577 * @param aBearerFilter Filtering criteria on bearer type |
|
578 * @param aSortType Specifies the sort order to use. |
|
579 * @param aReqIpvType Specifies whether the caller would like to |
|
580 * have IPv4, IPv6 or both access points. If it is IPv6 or Both, |
|
581 * in case of IPv6 support is available as a feature, it will be |
|
582 * supported. If IPv6 feature is not supported by the phone, it |
|
583 * simply defaults to the normal IPv4 version. |
|
584 * If it is IPv4, it uses the default IPv4 version independently |
|
585 * from IPv6 feature beeing available or not. |
|
586 * @param aVpnFilterType a TVpnFilterType representing the possible |
|
587 * additional VPN filtering. |
|
588 * @param aNoEdit Gives wether editing is allowed or not |
|
589 * @return The constructed CApSettingsHandlerImpl object. |
|
590 */ |
|
591 static CApSettingsHandlerImpl* NewLC( |
|
592 TBool aStartWithSelection, |
|
593 TSelectionListType aListType, |
|
594 TSelectionMenuType aSelMenuType, |
|
595 TInt aIspFilter, |
|
596 TInt aBearerFilter, |
|
597 TInt aSortType, |
|
598 TInt aReqIpvType, |
|
599 TVpnFilterType aVpnFilterType, |
|
600 TBool aNoEdit |
|
601 ); |
|
602 |
|
603 |
|
604 |
|
605 /** |
|
606 * Two-phased constructor. Leaves on failure. |
|
607 * This function shall be used to create the access point |
|
608 * settings/selection handling UI object. It is customizable through |
|
609 * the parameters. This object is a small layer above the UI part and |
|
610 * it provides a standard interface to select, edit, create access |
|
611 * points. It has two main parts, Select and Edit. The first parameter, |
|
612 * aStartWithSelection gives whether we would like to select or edit. |
|
613 * In case of selection, there is the possibility to use this module in |
|
614 * many applications. For this, two layouts are implemented, one is list |
|
615 * pane used by General Settings which provides the list in a list-pane. |
|
616 * The other layout is for the other applications requiring access point |
|
617 * selection, a popup-list style as the decision was that General |
|
618 * Settings will use list-pane and all other apps. popup-list style. |
|
619 * It is the caller who selects the style so if spec. says otherwise, |
|
620 * this module still can be used. It is also possible to start the UI |
|
621 * without selection, so if any module has a 'linked/default/etc.' |
|
622 * access point and stored it's UID, the module can simply call the |
|
623 * editor part of the UI without having to select the AP once more. |
|
624 * In case of editing only, (aStartWithSelection is EFalse), all other |
|
625 * construction parameters are ignored and after construction caller can |
|
626 * simply call DoRunSettingsL(..). In case of selection, a lot of other |
|
627 * parameters can be specified to fulfil all requirements. There are |
|
628 * three types of Options menu available: EApSettingsSelMenuNormal, |
|
629 * EApSettingsSelMenuSelectOnly, EApSettingsSelMenuSelectNormal. |
|
630 * <br> |
|
631 *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, |
|
632 * delete, create, etc. |
|
633 * <br> |
|
634 * -EApSettingsSelMenuNormal:Options menu specified in General Settings, |
|
635 * contains Edit, Delete, Create new, etc. menu items. |
|
636 * <br> |
|
637 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal |
|
638 * BUT the first item is Select. This one makes it possible to select |
|
639 * an access point and also possible to edit, create, delete, etc. |
|
640 * <br> |
|
641 * The following three parameters specify the filtering and ordering |
|
642 * criteria for the selection list creation. First, it is possible to |
|
643 * specify which ISP-type we are looking for. The possible values are: |
|
644 * <br> |
|
645 * KEApIspTypeInternetOnly: Filter allows only access points that are |
|
646 * capable of only internet access. |
|
647 * <br> |
|
648 * KEApIspTypeWAPOnly: Filter allows only access points that are |
|
649 * capable of only WAP access. |
|
650 * <br> |
|
651 * KEApIspTypeInternetAndWAP: Filter allows only access points that are |
|
652 * capable of internet AND WAP access. |
|
653 * <br> |
|
654 * KEApIspTypeWAPMandatory: Filter allows only access points that are |
|
655 * capable of WAP access AND contain mandatory WAP settings. |
|
656 * <br> |
|
657 * KEApIspTypeAll: No filtering is done for the isp-type, all types of |
|
658 * access points are shown. |
|
659 * <br> |
|
660 * It is possible to combine them by simply adding/or-ing together the |
|
661 * values, filtering will be done in such a way that only access points |
|
662 * with the listed ISP-types will be shown. Second filtering possibility |
|
663 * (aBearerFilter) is the desired bearer type. The possible values are |
|
664 * the values of the TApBearerType enum type and their combinations, as |
|
665 * in case of the ISP type. The ordering of the list can be specified |
|
666 * with the aSortType parameter. It can have the following values: |
|
667 * KEApSortUidAscending: The sorting is done according to the ID of |
|
668 * the access points in ascending order. |
|
669 * KEApSortUidDescending: The sorting is done according to the ID of |
|
670 * the access points in descending order. |
|
671 * KEApSortNameAscending: The sorting is done according to the name of |
|
672 * the access points in ascending order. |
|
673 * KEApSortNameDescending: The sorting is done according to the name of |
|
674 * the access points in descending order. |
|
675 * Caution! The ordering values can not be combined! |
|
676 * @param aDb A database to work on |
|
677 * @param aStartWithSelection A boolean value indicating whether to |
|
678 * select or edit an ap. |
|
679 * @param aListType A TSelectionListType enum indicating the desired |
|
680 * list type. |
|
681 * @param aSelMenuType A TSelectionMenuType enum indicating the desired |
|
682 * menu type. |
|
683 * @param aIspTypeFilter Filtering criteria on ISP type |
|
684 * @param aBearerFilter Filtering criteria on bearer type |
|
685 * @param aSortType Specifies the sort order to use. |
|
686 * @param aReqIpvType Specifies whether the caller would like to |
|
687 * have IPv4, IPv6 or both access points. If it is IPv6 or Both, |
|
688 * in case of IPv6 support is available as a feature, it will be |
|
689 * supported. If IPv6 feature is not supported by the phone, it |
|
690 * simply defaults to the normal IPv4 version. |
|
691 * If it is IPv4, it uses the default IPv4 version independently |
|
692 * from IPv6 feature beeing available or not. |
|
693 * @param aVpnFilterType a TVpnFilterType representing the possible |
|
694 * additional VPN filtering. |
|
695 * @param aNoEdit Gives wether editing is allowed or not |
|
696 * @return The constructed CApSettingsHandlerImpl object. |
|
697 */ |
|
698 static CApSettingsHandlerImpl* NewLC( |
|
699 CActiveApDb& aDb, |
|
700 TBool aStartWithSelection, |
|
701 TSelectionListType aListType, |
|
702 TSelectionMenuType aSelMenuType, |
|
703 TInt aIspFilter, |
|
704 TInt aBearerFilter, |
|
705 TInt aSortType, |
|
706 TInt aReqIpvType, |
|
707 TVpnFilterType aVpnFilterType, |
|
708 TBool aNoEdit |
|
709 ); |
|
710 |
|
711 |
|
712 |
|
713 |
|
714 |
|
715 /** |
|
716 * Two-phased constructor. Leaves on failure. |
|
717 * This function shall be used to create the access point |
|
718 * settings/selection handling UI object. It is customizable through |
|
719 * the parameters. This object is a small layer above the UI part and |
|
720 * it provides a standard interface to select, edit, create access |
|
721 * points. It has two main parts, Select and Edit. The first parameter, |
|
722 * aStartWithSelection gives whether we would like to select or edit. |
|
723 * In case of selection, there is the possibility to use this module in |
|
724 * many applications. For this, two layouts are implemented, one is list |
|
725 * pane used by General Settings which provides the list in a list-pane. |
|
726 * The other layout is for the other applications requiring access point |
|
727 * selection, a popup-list style as the decision was that General |
|
728 * Settings will use list-pane and all other apps. popup-list style. |
|
729 * It is the caller who selects the style so if spec. says otherwise, |
|
730 * this module still can be used. It is also possible to start the UI |
|
731 * without selection, so if any module has a 'linked/default/etc.' |
|
732 * access point and stored it's UID, the module can simply call the |
|
733 * editor part of the UI without having to select the AP once more. |
|
734 * In case of editing only, (aStartWithSelection is EFalse), all other |
|
735 * construction parameters are ignored and after construction caller can |
|
736 * simply call DoRunSettingsL(..). In case of selection, a lot of other |
|
737 * parameters can be specified to fulfil all requirements. There are |
|
738 * three types of Options menu available: EApSettingsSelMenuNormal, |
|
739 * EApSettingsSelMenuSelectOnly, EApSettingsSelMenuSelectNormal. |
|
740 * <br> |
|
741 *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit, |
|
742 * delete, create, etc. |
|
743 * <br> |
|
744 * -EApSettingsSelMenuNormal:Options menu specified in General Settings, |
|
745 * contains Edit, Delete, Create new, etc. menu items. |
|
746 * <br> |
|
747 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal |
|
748 * BUT the first item is Select. This one makes it possible to select |
|
749 * an access point and also possible to edit, create, delete, etc. |
|
750 * <br> |
|
751 * The following three parameters specify the filtering and ordering |
|
752 * criteria for the selection list creation. First, it is possible to |
|
753 * specify which ISP-type we are looking for. The possible values are: |
|
754 * <br> |
|
755 * KEApIspTypeInternetOnly: Filter allows only access points that are |
|
756 * capable of only internet access. |
|
757 * <br> |
|
758 * KEApIspTypeWAPOnly: Filter allows only access points that are |
|
759 * capable of only WAP access. |
|
760 * <br> |
|
761 * KEApIspTypeInternetAndWAP: Filter allows only access points that are |
|
762 * capable of internet AND WAP access. |
|
763 * <br> |
|
764 * KEApIspTypeWAPMandatory: Filter allows only access points that are |
|
765 * capable of WAP access AND contain mandatory WAP settings. |
|
766 * <br> |
|
767 * KEApIspTypeAll: No filtering is done for the isp-type, all types of |
|
768 * access points are shown. |
|
769 * <br> |
|
770 * It is possible to combine them by simply adding/or-ing together the |
|
771 * values, filtering will be done in such a way that only access points |
|
772 * with the listed ISP-types will be shown. Second filtering possibility |
|
773 * (aBearerFilter) is the desired bearer type. The possible values are |
|
774 * the values of the TApBearerType enum type and their combinations, as |
|
775 * in case of the ISP type. The ordering of the list can be specified |
|
776 * with the aSortType parameter. It can have the following values: |
|
777 * KEApSortUidAscending: The sorting is done according to the ID of |
|
778 * the access points in ascending order. |
|
779 * KEApSortUidDescending: The sorting is done according to the ID of |
|
780 * the access points in descending order. |
|
781 * KEApSortNameAscending: The sorting is done according to the name of |
|
782 * the access points in ascending order. |
|
783 * KEApSortNameDescending: The sorting is done according to the name of |
|
784 * the access points in descending order. |
|
785 * Caution! The ordering values can not be combined! |
|
786 * @param aDb A database to work on |
|
787 * @param aStartWithSelection A boolean value indicating whether to |
|
788 * select or edit an ap. |
|
789 * @param aListType A TSelectionListType enum indicating the desired |
|
790 * list type. |
|
791 * @param aSelMenuType A TSelectionMenuType enum indicating the desired |
|
792 * menu type. |
|
793 * @param aIspTypeFilter Filtering criteria on ISP type |
|
794 * @param aBearerFilter Filtering criteria on bearer type |
|
795 * @param aSortType Specifies the sort order to use. |
|
796 * @param aReqIpvType Specifies whether the caller would like to |
|
797 * have IPv4, IPv6 or both access points. If it is IPv6 or Both, |
|
798 * in case of IPv6 support is available as a feature, it will be |
|
799 * supported. If IPv6 feature is not supported by the phone, it |
|
800 * simply defaults to the normal IPv4 version. |
|
801 * If it is IPv4, it uses the default IPv4 version independently |
|
802 * from IPv6 feature beeing available or not. |
|
803 * @param aVpnFilterType a TVpnFilterType representing the possible |
|
804 * additional VPN filtering. |
|
805 * @param aIncludeEasyWlan a TBool indicating whether it should |
|
806 * include the easy wlan AP in the list or not. |
|
807 * @param aNoEdit Gives wether editing is allowed or not |
|
808 * @return The constructed CApSettingsHandlerImpl object. |
|
809 */ |
|
810 static CApSettingsHandlerImpl* NewLC( |
|
811 CActiveApDb& aDb, |
|
812 TBool aStartWithSelection, |
|
813 TSelectionListType aListType, |
|
814 TSelectionMenuType aSelMenuType, |
|
815 TInt aIspFilter, |
|
816 TInt aBearerFilter, |
|
817 TInt aSortType, |
|
818 TInt aReqIpvType, |
|
819 TVpnFilterType aVpnFilterType, |
|
820 TBool aIncludeEasyWlan, |
|
821 TBool aNoEdit |
|
822 ); |
|
823 |
|
824 |
|
825 |
|
826 |
|
827 /** |
|
828 * Destructor. |
|
829 */ |
|
830 ~CApSettingsHandlerImpl(); |
|
831 |
|
832 |
|
833 protected: |
|
834 /** |
|
835 * Constructor. |
|
836 * @param aStartWithSelection A boolean value indicating whether to |
|
837 * select or edit an ap. |
|
838 * @param aListType A TSelectionListType enum indicating the desired |
|
839 * list type. |
|
840 * @param aSelMenuType A TSelectionMenuType enum indicating the desired |
|
841 * menu type. |
|
842 * @param aNoEdit Gives wether editing is allowed or not |
|
843 */ |
|
844 CApSettingsHandlerImpl( |
|
845 TBool aStartWithSelection, |
|
846 TSelectionListType aListType, |
|
847 TSelectionMenuType aSelMenuType, |
|
848 TBool aNoEdit |
|
849 ); |
|
850 |
|
851 /** |
|
852 * Constructor. |
|
853 * @param aStartWithSelection A boolean value indicating whether to |
|
854 * select or edit an ap. |
|
855 * @param aListType A TSelectionListType enum indicating the desired |
|
856 * list type. |
|
857 * @param aSelMenuType A TSelectionMenuType enum indicating the desired |
|
858 * menu type. |
|
859 * @param aHelpMajor Major help ID |
|
860 * @param aNoEdit Gives wether editing is allowed or not |
|
861 */ |
|
862 CApSettingsHandlerImpl( |
|
863 TBool aStartWithSelection, |
|
864 TSelectionListType aListType, |
|
865 TSelectionMenuType aSelMenuType, |
|
866 TUid aHelpMajor, |
|
867 TBool aNoEdit |
|
868 ); |
|
869 |
|
870 |
|
871 /** |
|
872 * Constructor. |
|
873 * @param aStartWithSelection A boolean value indicating whether to |
|
874 * select or edit an ap. |
|
875 * @param aListType A TSelectionListType enum indicating the desired |
|
876 * list type. |
|
877 * @param aSelMenuType A TSelectionMenuType enum indicating the desired |
|
878 * menu type. |
|
879 * @param aNeedIpv6Support Whether IPv6 is supported or not |
|
880 * @param aNoEdit Gives wether editing is allowed or not |
|
881 */ |
|
882 CApSettingsHandlerImpl( |
|
883 TBool aStartWithSelection, |
|
884 TSelectionListType aListType, |
|
885 TSelectionMenuType aSelMenuType, |
|
886 TBool aNeedIpv6Support, |
|
887 TBool aNoEdit |
|
888 ); |
|
889 |
|
890 |
|
891 |
|
892 /** |
|
893 * Second-phase constructor. |
|
894 * @param aIspTypeFilter Filtering criteria on ISP type |
|
895 * @param aBearerFilter Filtering criteria on bearer type |
|
896 * @param aSortType Specifies the sort order to use. |
|
897 */ |
|
898 void ConstructL( |
|
899 TInt aIspFilter, |
|
900 TInt aBearerFilter, |
|
901 TInt aSortType |
|
902 ); |
|
903 |
|
904 |
|
905 /** |
|
906 * Second-phase constructor. |
|
907 * @param aDb A database to work on |
|
908 * @param aIspTypeFilter Filtering criteria on ISP type |
|
909 * @param aBearerFilter Filtering criteria on bearer type |
|
910 * @param aSortType Specifies the sort order to use. |
|
911 */ |
|
912 void ConstructL( |
|
913 CActiveApDb& aDb, |
|
914 TInt aIspFilter, |
|
915 TInt aBearerFilter, |
|
916 TInt aSortType |
|
917 ); |
|
918 |
|
919 |
|
920 /** |
|
921 * Second-phase constructor. |
|
922 * @param aIspTypeFilter Filtering criteria on ISP type |
|
923 * @param aBearerFilter Filtering criteria on bearer type |
|
924 * @param aSortType Specifies the sort order to use. |
|
925 * @param aVpnFilterType a TVpnFilterType representing the possible |
|
926 * additional VPN filtering. |
|
927 */ |
|
928 void ConstructL( |
|
929 TInt aIspFilter, |
|
930 TInt aBearerFilter, |
|
931 TInt aSortType, |
|
932 TVpnFilterType aVpnFilterType |
|
933 ); |
|
934 |
|
935 |
|
936 /** |
|
937 * Second-phase constructor. |
|
938 * @param aDb A database to work on |
|
939 * @param aIspTypeFilter Filtering criteria on ISP type |
|
940 * @param aBearerFilter Filtering criteria on bearer type |
|
941 * @param aSortType Specifies the sort order to use. |
|
942 * @param aVpnFilterType a TVpnFilterType representing the possible |
|
943 * additional VPN filtering. |
|
944 */ |
|
945 void ConstructL( |
|
946 CActiveApDb& aDb, |
|
947 TInt aIspFilter, |
|
948 TInt aBearerFilter, |
|
949 TInt aSortType, |
|
950 TVpnFilterType aVpnFilterType |
|
951 ); |
|
952 |
|
953 |
|
954 |
|
955 |
|
956 /** |
|
957 * Second-phase constructor. |
|
958 * @param aDb A database to work on |
|
959 * @param aIspTypeFilter Filtering criteria on ISP type |
|
960 * @param aBearerFilter Filtering criteria on bearer type |
|
961 * @param aSortType Specifies the sort order to use. |
|
962 * @param aVpnFilterType a TVpnFilterType representing the possible |
|
963 * additional VPN filtering. |
|
964 * @param aIncludeEasyWlan a TBool indicating whether it should |
|
965 * include the easy wlan AP in the list or not. |
|
966 */ |
|
967 void ConstructL( |
|
968 CActiveApDb& aDb, |
|
969 TInt aIspFilter, |
|
970 TInt aBearerFilter, |
|
971 TInt aSortType, |
|
972 TVpnFilterType aVpnFilterType, |
|
973 TBool aIncludeEasyWlan |
|
974 ); |
|
975 |
|
976 |
|
977 public: // New functions |
|
978 /** |
|
979 * Sets the filtering used in the access point selection. |
|
980 * @param aIspTypeFilter Filtering criteria on ISP type |
|
981 * @param aBearerFilter Filtering criteria on bearer type |
|
982 * @param aSortType Specifies the sort order to use. |
|
983 * @return No return value. Leaves on error. |
|
984 */ |
|
985 void SetFilterL( |
|
986 TInt aIspFilter, |
|
987 TInt aBearerFilter, |
|
988 TInt aSortType |
|
989 ); |
|
990 |
|
991 |
|
992 /** |
|
993 * Sets possible overrides of some texts. |
|
994 * By default, text is read from resources. This provides a way to |
|
995 * change some of the text to a caller-supplied one. The text must |
|
996 * be read from resource and must be already localized. |
|
997 * More than one text can be substituted, they are stored internally |
|
998 * in an array. |
|
999 * Currently not supported and supporting it is under discussion. |
|
1000 * @param aText2Change TTextID to identify the text to be replaced with |
|
1001 * @param aNewText Reference to the substitute text. |
|
1002 */ |
|
1003 void SetTextOverrideL( TTextID aText2Change, |
|
1004 const TDesC& aNewText ); |
|
1005 |
|
1006 |
|
1007 /** |
|
1008 * Gets possible overrides of a text. |
|
1009 * By default, text is read from resources. This provides a way to |
|
1010 * change some of the text to a caller-supplied one. The text must |
|
1011 * be read from resource and must be already localized. |
|
1012 * More than one text can be substituted, they are stored internally |
|
1013 * in an array. |
|
1014 * Currently not supported and supporting it is under discussion |
|
1015 * @param aTextID TTextID type to identify the text to be replaced with |
|
1016 * @return Reference to the substitute text. |
|
1017 */ |
|
1018 const TDesC& TextOverrideL( TTextID aTextId ); |
|
1019 |
|
1020 |
|
1021 /** |
|
1022 * Starts the settings component. |
|
1023 * Creates dialog(s) from scratch, launches and executes them. |
|
1024 * Can leave with error codes. |
|
1025 * @param TUint32 aHighlight The UID of the AP to highlight by default |
|
1026 * @param TUint32 aSelected The UID of the access point selected |
|
1027 * by the user. |
|
1028 * @return The accomplished task's flag-codes: |
|
1029 * <br> |
|
1030 * KApUiEventNone, |
|
1031 * <br> |
|
1032 * KApUiEventSelected, |
|
1033 * <br> |
|
1034 * KApUiEventCreatedBlank, |
|
1035 * <br> |
|
1036 * KApUiEventCreatedUsedOld, |
|
1037 * <br> |
|
1038 * KApUiEventEdited, |
|
1039 * <br> |
|
1040 * KApUiEventDeleted, |
|
1041 * <br> |
|
1042 * KApUiEventExitRequested |
|
1043 * <br>and their combinations. ( Bitwise OR ) |
|
1044 * <br> |
|
1045 * aSelected will be modified only if KApUiEventSelected is included |
|
1046 * in the flags. |
|
1047 * <br> |
|
1048 * In case it returns KApUiEventExitRequested, the user had choosen |
|
1049 * the Exit option from the Options menu which means |
|
1050 * that the caller application MUST exit! |
|
1051 * <br> |
|
1052 * Returns after completion! |
|
1053 */ |
|
1054 TInt RunSettingsL( TUint32 aHighLight, TUint32& aSelected ); |
|
1055 |
|
1056 |
|
1057 /** |
|
1058 * Component Validation Test. |
|
1059 * @return KErrNone. |
|
1060 */ |
|
1061 static TInt Cvt(); |
|
1062 |
|
1063 |
|
1064 protected: // New functions |
|
1065 /** |
|
1066 * Starts the settings component. |
|
1067 * Creates dialog(s) from scratch, launches and executes them. |
|
1068 * In case of error, leaves with error codes. |
|
1069 * @param TUint32 aHighlight The UID of the AP to highlight by default |
|
1070 * @param TUint32 aSelected The UID of the AP selected by the user |
|
1071 * @return The accomplished task's flag-codes: |
|
1072 * <br> |
|
1073 * KApUiEventNone, |
|
1074 * <br> |
|
1075 * KApUiEventSelected, |
|
1076 * <br> |
|
1077 * KApUiEventCreatedBlank, |
|
1078 * <br> |
|
1079 * KApUiEventCreatedUsedOld, |
|
1080 * <br> |
|
1081 * KApUiEventEdited, |
|
1082 * <br> |
|
1083 * KApUiEventDeleted |
|
1084 * <br> |
|
1085 * and their combinations. ( Bitwise OR ) |
|
1086 * <br> |
|
1087 * aSelected will be modified only if KApUiEventSelected is included |
|
1088 * in the flags. |
|
1089 * <br> |
|
1090 * Returns after completion! |
|
1091 */ |
|
1092 TInt DoRunSettingsL( TUint32 aHighLight, TUint32& aSelected ); |
|
1093 |
|
1094 |
|
1095 /** |
|
1096 * Starts the viewer component. |
|
1097 * Creates dialog(s) from scratch, launches and executes it. |
|
1098 * In case of error, leaves with error codes. |
|
1099 * @param TUint32 aUid The UID of the AP to view/edit |
|
1100 * @return Returns the completed task's flags |
|
1101 * KApUiEventNone, KApUiEventSelected, KApUiEventCreatedBlank, |
|
1102 * KApUiEventCreatedUsedOld, KApUiEventEdited, KApUiEventDeleted, |
|
1103 * KApUiEventExitRequested and their combinations. ( Bitwise OR ) |
|
1104 * In case it returns KApUiEventExitRequested, the user had choosen |
|
1105 * the Exit option from the Options menu which means |
|
1106 * that the caller application MUST exit! |
|
1107 * <br> |
|
1108 * Returns after completion! |
|
1109 */ |
|
1110 TInt RunViewerL( TUint32 aUid ); |
|
1111 |
|
1112 |
|
1113 /** |
|
1114 * Starts the viewer component. |
|
1115 * Creates dialog(s) from scratch, launches and executes it. |
|
1116 * In case of error, leaves with error codes. |
|
1117 * @param TUint32 aUid The UID of the AP to view/edit |
|
1118 * @return Returns the completed task's flags |
|
1119 * KApUiEventNone, KApUiEventSelected, KApUiEventCreatedBlank, |
|
1120 * KApUiEventCreatedUsedOld, KApUiEventEdited, KApUiEventDeleted, |
|
1121 * KApUiEventExitRequested and their combinations. ( Bitwise OR ) |
|
1122 * Returns after completion! |
|
1123 */ |
|
1124 TInt DoRunViewerL( TUint32 aUid ); |
|
1125 |
|
1126 |
|
1127 // handles the Delete access Point command. |
|
1128 void HandleApDeleteCmdL( TUint32 aUid, TBool aIsLast ); |
|
1129 |
|
1130 |
|
1131 // handles the Create blank new access Point command. |
|
1132 TUint32 HandleApBlankNewL( TInt aBearers, TInt aIsps ); |
|
1133 |
|
1134 |
|
1135 // handles the Create new access Point by using existing one command. |
|
1136 TUint32 HandleApUseOldNewL(); |
|
1137 |
|
1138 |
|
1139 // handles the Editing of the newly created access Point. |
|
1140 TUint32 EditAfterCreateL( TUint32 aUid, |
|
1141 CApAccessPointItem* aItem = NULL ); |
|
1142 |
|
1143 |
|
1144 /** |
|
1145 * Second-phase internal constructor. |
|
1146 * @param aDb A database to work on |
|
1147 * @param aIspTypeFilter Filtering criteria on ISP type |
|
1148 * @param aBearerFilter Filtering criteria on bearer type |
|
1149 * @param aSortType Specifies the sort order to use. |
|
1150 * @param aVpnFilterType a TVpnFilterType representing the possible |
|
1151 * additional VPN filtering. |
|
1152 * @param aIncludeEasyWlan a TBool indicating whether it should |
|
1153 * include the easy wlan AP in the list or not. |
|
1154 */ |
|
1155 void DoConstructL( CActiveApDb* aDb, TInt aIspFilter, |
|
1156 TInt aBearerFilter, TInt aSortType, |
|
1157 TVpnFilterType aVpnFilterType, |
|
1158 TBool aIncludeEasyWlan ); |
|
1159 |
|
1160 |
|
1161 /** |
|
1162 * Starts the selector component as a list |
|
1163 * Creates dialog(s) from scratch, launches and executes them. |
|
1164 * In case of error, leaves with error codes. |
|
1165 * @param TUint32 aHighlight The UID of the AP to highlight by default |
|
1166 * @param TUint32 aSelected The UID of the AP selected by the user |
|
1167 * @return The accomplished task's flag-codes: |
|
1168 * <br> |
|
1169 * KApUiEventNone, |
|
1170 * <br> |
|
1171 * KApUiEventSelected, |
|
1172 * <br> |
|
1173 * KApUiEventCreatedBlank, |
|
1174 * <br> |
|
1175 * KApUiEventCreatedUsedOld, |
|
1176 * <br> |
|
1177 * KApUiEventEdited, |
|
1178 * <br> |
|
1179 * KApUiEventDeleted |
|
1180 * <br> |
|
1181 * and their combinations. ( Bitwise OR ) |
|
1182 * <br> |
|
1183 * aSelected will be modified only if KApUiEventSelected is included |
|
1184 * in the flags. |
|
1185 * <br> |
|
1186 * Returns after completion! |
|
1187 */ |
|
1188 void DoRunListSettingsL( TUint32 aHighLight, TUint32& aSelected ); |
|
1189 |
|
1190 |
|
1191 /** |
|
1192 * Starts the selector component in a setting page |
|
1193 * Creates dialog(s) from scratch, launches and executes them. |
|
1194 * In case of error, leaves with error codes. |
|
1195 * @param TUint32 aHighlight The UID of the AP to highlight by default |
|
1196 * @param TUint32 aSelected The UID of the AP selected by the user |
|
1197 * @return The accomplished task's flag-codes: |
|
1198 * <br> |
|
1199 * KApUiEventNone, |
|
1200 * <br> |
|
1201 * KApUiEventSelected, |
|
1202 * <br> |
|
1203 * KApUiEventCreatedBlank, |
|
1204 * <br> |
|
1205 * KApUiEventCreatedUsedOld, |
|
1206 * <br> |
|
1207 * KApUiEventEdited, |
|
1208 * <br> |
|
1209 * KApUiEventDeleted |
|
1210 * <br> |
|
1211 * and their combinations. ( Bitwise OR ) |
|
1212 * <br> |
|
1213 * aSelected will be modified only if KApUiEventSelected is included |
|
1214 * in the flags. |
|
1215 * <br> |
|
1216 * Returns after completion! |
|
1217 */ |
|
1218 void DoRunSetPageSettingsL( TUint32 aHighLight, TUint32& aSelected ); |
|
1219 |
|
1220 |
|
1221 /** |
|
1222 * handles the Create new access Point by using existing one command. |
|
1223 * Called after user has selected the AP to copy |
|
1224 * Creates the new Ap and offers it for editing. |
|
1225 * @param aSelected The UID of the AP to copy. Shall not be KErrNone. |
|
1226 * @return The UID of the newly created Ap |
|
1227 */ |
|
1228 TUint32 DoHandleApUseOldNewL( TUint32 aSelected ); |
|
1229 |
|
1230 /** |
|
1231 * Selects the Ap to Copy, returns its UID. |
|
1232 * If not selected, KErrNone is returned |
|
1233 */ |
|
1234 TUint32 SelectApToCopyL(); |
|
1235 |
|
1236 |
|
1237 /** |
|
1238 * handles the Create blank new access Point command. |
|
1239 */ |
|
1240 TUint32 DoHandleApBlankNewL( TInt aBearers, TInt aIsps ); |
|
1241 |
|
1242 |
|
1243 /** |
|
1244 * handles the Delete network group command. |
|
1245 * @param aUid The uid of the network to delete |
|
1246 */ |
|
1247 void HandleNetworkDeleteCmdL( TUint32 aUid ); |
|
1248 |
|
1249 |
|
1250 /** |
|
1251 * Gets the local variant value |
|
1252 * @return A TInt stating the variant |
|
1253 */ |
|
1254 TInt GetVariantL(); |
|
1255 |
|
1256 |
|
1257 /** |
|
1258 * Gets confirmation about deleting an access point |
|
1259 * @param aUid A TUint32 holding the WAP access point ID of the |
|
1260 * access point to be deleted. |
|
1261 * @param aIsLast A TBool specifying whether the access point to be |
|
1262 * deleted is the last one or not. |
|
1263 * @return A TInt stating the result |
|
1264 */ |
|
1265 TInt ConfirmDeleteL( TUint32 aUid, TBool aIsLast ); |
|
1266 |
|
1267 |
|
1268 /** |
|
1269 * Wrapper for the public API |
|
1270 */ |
|
1271 void HandleRunSettingsL( TUint32 aHighLight, TUint32& aSelected ); |
|
1272 |
|
1273 |
|
1274 protected: // Functions from base classes |
|
1275 |
|
1276 friend class CApSettingsDlg; |
|
1277 friend class CApSelectorDialog; |
|
1278 friend class CApSelPopupList; |
|
1279 friend class CApNetSelPopupList; |
|
1280 friend class CApSettingsHandler; |
|
1281 |
|
1282 private: |
|
1283 /** |
|
1284 * Selects an appropriate bearer type for a given item according to |
|
1285 * the current filtering criterias |
|
1286 * @param aBearers The current bearer filter set |
|
1287 * @param aItem The CApAccessPointItem whoose bearer type is to be set. |
|
1288 */ |
|
1289 void ChooseBearerTypeL( TInt aBearers, CApAccessPointItem& aItem ); |
|
1290 |
|
1291 /** |
|
1292 * Duplciates an existing access point identified by the passed WAP ID |
|
1293 * @param aUid The WAP Access Point ID of the access point to duplicate |
|
1294 * @return The WAP Access Point ID of the newly created access point. |
|
1295 */ |
|
1296 TUint32 HandleDuplicateL( TUint32 aUid ); |
|
1297 |
|
1298 |
|
1299 |
|
1300 public: |
|
1301 TUint32 EventStore() { return iEventStore; }; |
|
1302 |
|
1303 |
|
1304 |
|
1305 |
|
1306 private: //data |
|
1307 TBool iStartWithSelection; |
|
1308 TSelectionListType iListType; |
|
1309 TSelectionMenuType iSelMenuType; |
|
1310 |
|
1311 TInt iIspFilter; |
|
1312 TInt iBearerFilter; |
|
1313 TApSetHandlerImplExtra* iExt; // Extra data holder structure |
|
1314 |
|
1315 TInt iReqIpvType; // Default is IPv4 |
|
1316 |
|
1317 CApSettingsModel* iModel; |
|
1318 CTextOverrides* iTextOverrides; |
|
1319 TUint32 iEventStore; // to hold the events |
|
1320 TUid iHelpMajor; |
|
1321 TBool iNoEdit; |
|
1322 |
|
1323 #ifdef __TEST_OOMDEBUG |
|
1324 TBool iMemTestOn; |
|
1325 #endif // __TEST_OOMDEBUG |
|
1326 |
|
1327 }; |
|
1328 |
|
1329 #endif |
|
1330 |
|
1331 // End of File |
|