2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Declares the main handler, CApSettingsHandler and public API for the
16 * Access Point settings.
21 #ifndef APSETTINGS_HANDLER_H
22 #define APSETTINGS_HANDLER_H
24 // Deprecation warning
25 #warning This header file has been deprecated. Will be removed in one of the next SDK releases.
29 #include <ApSettingsHandlerCommons.h>
30 #include <ApEngineConsts.h>
34 const TUid KUidApSettingsHandler = { 0x10008d3B };
36 typedef struct ///< Extra data holder
39 TBool iIsIpv6Supported; // Default is NO
40 TBool iIsFeatureManagerInitialised;
43 TVpnFilterType iVpnFilterType;
44 TInt iVariant; /// Local variant value
45 TBool iIncludeEasyWlan;
48 // FORWARD DECLARATIONS
51 class CApSettingsModel;
54 class CApAccessPointItem;
56 class CApSettingsHandlerImpl;
60 * CApSettingsHandler class: It is the main handler for the Access Point
61 * settings. It contains the only public API for other (sub)systems.
64 class CApSettingsHandler : public CBase
67 public: // Constructors and destructor
71 * Two-phased constructor. Leaves on failure.
72 * This function shall be used to create the access point
73 * settings/selection handling UI object. It is customizable through
74 * the parameters. This object is a small layer above the UI part and
75 * it provides a standard interface to select, edit, create access
76 * points. It has two main parts, Select and Edit. The first parameter,
77 * aStartWithSelection gives whether we would like to select or edit.
78 * In case of selection, there is the possibility to use this module in
79 * many applications. For this, two layouts are implemented,
80 * one is list pane used by General Settings which provides the list in
81 * a list-pane. The other layout is for the other applications
82 * requiring access point selection, a popup-list style as the decision
83 * I know about was that General Settings will use list-pane and all
84 * other apps. popup-list style. It is the caller who selects the style
85 * so if spec. says otherwise, this module still can be used.
86 * It is also possible to start the UI without selection, so if any
87 * module has a 'linked/default/etc.' access point and stored it's UID,
88 * the module can simply call the editor part of the UI without having
89 * to select the AP once more. In case of editing only,
90 * (aStartWithSelection is EFalse), all other construction parameters
91 * are ignored and after construction caller can simply call
92 * RunSettingsL(..). In case of selection, a lot of other parameters
93 * can be specified to fulfil all requirements. There are three types
94 * of Options menu available:
95 * EApSettingsSelMenuNormal,
96 * EApSettingsSelMenuSelectOnly,
97 * EApSettingsSelMenuSelectNormal.
99 *-EApSettingsSelMenuSelectOnly: Only Select is visible,
100 * no way to edit, delete, create, etc.
102 * -EApSettingsSelMenuNormal: Options menu specified in General
103 * Settings, contains Edit, Delete,
104 * Create new, etc. menu items.
106 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal
107 * BUT the first item is Select.
108 * This one makes it possible to select
109 * an access point and also possible to
110 * edit, create, delete, etc.
112 * The following three parameters specify the filtering and ordering
113 * criteria for the selection list creation. First, it is possible to
114 * specify which ISP-type we are looking for. The possible values are:
116 * KEApIspTypeInternetOnly: Filter allows only access points that are
117 * capable of only internet access.
119 * KEApIspTypeWAPOnly: Filter allows only access points that are
120 * capable of only WAP access.
122 * KEApIspTypeInternetAndWAP: Filter allows only access points that are
123 * capable of internet AND WAP access.
125 * KEApIspTypeWAPMandatory: Filter allows only access points that are
126 * capable of WAP access AND contain
127 * mandatory WAP settings.
129 * KEApIspTypeAll: No filtering is done for the isp-type,
130 * all types of access points are shown.
132 * It is possible to combine them by simply adding/or-ing together
133 * the values, filtering will be done in such a way that only access
134 * points with the listed ISP-types will be shown. Second filtering
135 * possibility (aBearerFilter) is the desired bearer type. The possible
136 * values are the values of the TApBearerType enum type and their
137 * combinations, as in case of the ISP type. The ordering of the list
138 * can be specified with the aSortType parameter. It can have the
140 * KEApSortUidAscending: The sorting is done according to the ID
141 * of the access points in ascending order.
142 * KEApSortUidDescending: The sorting is done according to the ID
143 * of the access points in descending order.
144 * KEApSortNameAscending: The sorting is done according to the name
145 * of the access points in ascending order.
146 * KEApSortNameDescending: The sorting is done according to the name
147 * of the access points in descending order.
148 * Caution! The ordering values can not be combined!
149 * @param aStartWithSelection A boolean value indicating whether to
150 * select or edit an ap.
151 * @param aListType A TSelectionListType enum indicating the
153 * @param aSelMenuType A TSelectionMenuType enum indicating the
155 * @param aIspTypeFilter Filtering criteria on ISP type
156 * @param aBearerFilter Filtering criteria on bearer type
157 * @param aSortType Specifies the sort order to use.
158 * @return The constructed CApSettingsHandler object.
162 IMPORT_C static CApSettingsHandler* NewLC(
163 TBool aStartWithSelection,
164 TSelectionListType aListType,
165 TSelectionMenuType aSelMenuType,
174 * Two-phased constructor. Leaves on failure.
175 * This function shall be used to create the access point
176 * settings/selection handling UI object. It is customizable through
177 * the parameters. This object is a small layer above the UI part and
178 * it provides a standard interface to select, edit, create
179 * access points. It has two main parts, Select and Edit. The first
180 * parameter, aStartWithSelection gives whether we would like to select
181 * or edit. In case of selection, there is the possibility to use this
182 * module in many applications. For this, two layouts are implemented,
183 * one is list pane used by General Settings which provides the list
184 * in a list-pane. The other layout is for the other applications
185 * requiring access point selection, a popup-list style as the
186 * decision I know about was that General Settings will use list-pane
187 * and all other apps. popup-list style. It is the caller who selects
188 * the style so if spec. says otherwise, this module still can be used.
189 * It is also possible to start the UI without selection, so if any
190 * module has a 'linked/default/etc.' access point and stored it's UID,
191 * the module can simply call the editor part of the UI without having
192 * to select the AP once more.
193 * In case of editing only, (aStartWithSelection is EFalse), all other
194 * construction parameters are ignored and after construction caller
195 * can simply call RunSettingsL(..).
196 * In case of selection, a lot of other parameters can be specified
197 * to fulfil all requirements. There are three types of Options menu
199 * EApSettingsSelMenuNormal,
200 * EApSettingsSelMenuSelectOnly,
201 * EApSettingsSelMenuSelectNormal.
203 *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to
204 * edit, delete, create, etc.
206 * -EApSettingsSelMenuNormal: Options menu specified in General
207 * Settings, contains Edit, Delete,
208 * Create new, etc. menu items.
210 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal
211 * BUT the first item is Select.
212 * This one makes it possible to
213 * select an access point and also
214 * possible to edit, create,
217 * The following three parameters specify the filtering and ordering
218 * criteria for the selection list creation. First, it is possible to
219 * specify which ISP-type we are looking for. The possible values are:
221 * KEApIspTypeInternetOnly: Filter allows only access points that
222 * are capable of only internet access.
224 * KEApIspTypeWAPOnly: Filter allows only access points that
225 * are capable of only WAP access.
227 * KEApIspTypeInternetAndWAP: Filter allows only access points that
228 * are capable of internet AND WAP access.
230 * KEApIspTypeWAPMandatory: Filter allows only access points that
231 * are capable of WAP access AND contain
232 * mandatory WAP settings.
234 * KEApIspTypeAll: No filtering is done for the isp-type,
235 * all types of access points are shown.
237 * It is possible to combine them by simply adding/or-ing together the
238 * values, filtering will be done in such a way that only access points
239 * with the listed ISP-types will be shown.
240 * Second filtering possibility (aBearerFilter) is the desired bearer
241 * type. The possible values are the values of the TApBearerType enum
242 * type and their combinations, as in case of the ISP type.
243 * The ordering of the list can be specified with the aSortType
244 * parameter. It can have the following values:
245 * KEApSortUidAscending: The sorting is done according to the ID
246 * of the access points in ascending order.
247 * KEApSortUidDescending: The sorting is done according to the ID
248 * of the access points in descending order.
249 * KEApSortNameAscending: The sorting is done according to the name
250 * of the access points in ascending order.
251 * KEApSortNameDescending: The sorting is done according to the name
252 * of the access points in descending order.
253 * Caution! The ordering values can not be combined!
254 * @param aDb A database to work on
255 * @param aStartWithSelection A boolean value indicating whether to
256 * select or edit an ap.
257 * @param aListType A TSelectionListType enum indicating the desired
259 * @param aSelMenuType A TSelectionMenuType enum indicating the desired
261 * @param aIspTypeFilter Filtering criteria on ISP type
262 * @param aBearerFilter Filtering criteria on bearer type
263 * @param aSortType Specifies the sort order to use.
264 * @return The constructed CApSettingsHandler object.
268 IMPORT_C static CApSettingsHandler* NewLC(
270 TBool aStartWithSelection,
271 TSelectionListType aListType,
272 TSelectionMenuType aSelMenuType,
286 * Two-phased constructor. Leaves on failure.
287 * This function shall be used to create the access point
288 * settings/selection handling UI object.It is customizable through the
289 * parameters. This object is a small layer above the UI part and
290 * it provides a standard interface to select, edit, create access
291 * points. It has two main parts, Select and Edit. The first parameter,
292 * aStartWithSelection gives whether we would like to select or edit.
293 * In case of selection, there is the possibility to use this module in
294 * many applications. For this, two layouts are implemented, one is
295 * list pane used by General Settings which provides the list in a
296 * list-pane. The other layout is for the other applications requiring
297 * access point selection, a popup-list style as the decision was that
298 * General Settings will use list-pane and all other apps. popup-list
299 * style. It is the caller who selects the style so if spec. says
300 * otherwise, this module still can be used.
301 * It is also possible to start the UI without selection, so if any
302 * module has a 'linked/default/etc.' access point and stored it's UID,
303 * the module can simply call the editor part of the UI without having
304 * to select the AP once more.
305 * In case of editing only, (aStartWithSelection is EFalse), all other
306 * construction parameters are ignored and after construction caller
307 * can simply call RunSettingsL(..).
308 * In case of selection, a lot of other parameters can be specified to
309 * fulfil all requirements. There are three types of Options menu
310 * available: EApSettingsSelMenuNormal, EApSettingsSelMenuSelectOnly,
311 * EApSettingsSelMenuSelectNormal.
313 *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit,
314 * delete, create, etc.
316 * -EApSettingsSelMenuNormal:Options menu specified in General Settings,
317 * contains Edit, Delete, Create new, etc. menu items.
319 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal
320 * BUT the first item is Select. This one makes it possible to select
321 * an access point and also possible to edit, create, delete, etc.
323 * The following three parameters specify the filtering and ordering
324 * criteria for the selection list creation. First, it is possible to
325 * specify which ISP-type we are looking for. The possible values are:
327 * KEApIspTypeInternetOnly: Filter allows only access points that are
328 * capable of only internet access.
330 * KEApIspTypeWAPOnly: Filter allows only access points that are
331 * capable of only WAP access.
333 * KEApIspTypeInternetAndWAP: Filter allows only access points that are
334 * capable of internet AND WAP access.
336 * KEApIspTypeWAPMandatory: Filter allows only access points that are
337 * capable of WAP access AND contain mandatory WAP settings.
339 * KEApIspTypeAll: No filtering is done for the isp-type, all types of
340 * access points are shown.
342 * It is possible to combine them by simply adding/or-ing together the
343 * values, filtering will be done in such a way that only access points
344 * with the listed ISP-types will be shown.
345 * Second filtering possibility (aBearerFilter) is the desired bearer
346 * type. The possible values are the values of the TApBearerType enum
347 * type and their combinations, as in case of the ISP type.
348 * The ordering of the list can be specified with the aSortType
349 * parameter. It can have the following values:
350 * KEApSortUidAscending: The sorting is done according to the ID of
351 * the access points in ascending order.
352 * KEApSortUidDescending: The sorting is done according to the ID of
353 * the access points in descending order.
354 * KEApSortNameAscending: The sorting is done according to the name of
355 * the access points in ascending order.
356 * KEApSortNameDescending: The sorting is done according to the name of
357 * the access points in descending order.
358 * Caution! The ordering values can not be combined!
359 * @param aStartWithSelection A boolean value indicating whether to
360 * select or edit an ap.
361 * @param aListType A TSelectionListType enum indicating the desired
363 * @param aSelMenuType A TSelectionMenuType enum indicating the desired
365 * @param aIspTypeFilter Filtering criteria on ISP type
366 * @param aBearerFilter Filtering criteria on bearer type
367 * @param aSortType Specifies the sort order to use.
368 * @param aReqIpvType Specifies whether the caller would like to
369 * have IPv4, IPv6 or both access points. If it is IPv6 or Both,
370 * in case of IPv6 support is available as a feature, it will be
371 * supported. If IPv6 feature is not supported by the phone, it
372 * simply defaults to the normal IPv4 version.
373 * If it is IPv4, it uses the default IPv4 version independently
374 * from IPv6 feature beeing available or not.
375 * @return The constructed CApSettingsHandler object.
379 IMPORT_C static CApSettingsHandler* NewLC(
380 TBool aStartWithSelection,
381 TSelectionListType aListType,
382 TSelectionMenuType aSelMenuType,
392 * Two-phased constructor. Leaves on failure.
393 * This function shall be used to create the access point
394 * settings/selection handling UI object. It is customizable through
395 * the parameters. This object is a small layer above the UI part and
396 * it provides a standard interface to select, edit, create access
397 * points. It has two main parts, Select and Edit. The first parameter,
398 * aStartWithSelection gives whether we would like to select or edit.
399 * In case of selection, there is the possibility to use this module in
400 * many applications. For this, two layouts are implemented, one is list
401 * pane used by General Settings which provides the list in a list-pane.
402 * The other layout is for the other applications requiring access point
403 * selection, a popup-list style as the decision was that General
404 * Settings will use list-pane and all other apps. popup-list style.
405 * It is the caller who selects the style so if spec. says otherwise,
406 * this module still can be used. It is also possible to start the UI
407 * without selection, so if any module has a 'linked/default/etc.'
408 * access point and stored it's UID, the module can simply call the
409 * editor part of the UI without having to select the AP once more.
410 * In case of editing only, (aStartWithSelection is EFalse), all other
411 * construction parameters are ignored and after construction caller can
412 * simply call RunSettingsL(..). In case of selection, a lot of other
413 * parameters can be specified to fulfil all requirements. There are
414 * three types of Options menu available: EApSettingsSelMenuNormal,
415 * EApSettingsSelMenuSelectOnly, EApSettingsSelMenuSelectNormal.
417 *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit,
418 * delete, create, etc.
420 * -EApSettingsSelMenuNormal:Options menu specified in General Settings,
421 * contains Edit, Delete, Create new, etc. menu items.
423 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal
424 * BUT the first item is Select. This one makes it possible to select
425 * an access point and also possible to edit, create, delete, etc.
427 * The following three parameters specify the filtering and ordering
428 * criteria for the selection list creation. First, it is possible to
429 * specify which ISP-type we are looking for. The possible values are:
431 * KEApIspTypeInternetOnly: Filter allows only access points that are
432 * capable of only internet access.
434 * KEApIspTypeWAPOnly: Filter allows only access points that are
435 * capable of only WAP access.
437 * KEApIspTypeInternetAndWAP: Filter allows only access points that are
438 * capable of internet AND WAP access.
440 * KEApIspTypeWAPMandatory: Filter allows only access points that are
441 * capable of WAP access AND contain mandatory WAP settings.
443 * KEApIspTypeAll: No filtering is done for the isp-type, all types of
444 * access points are shown.
446 * It is possible to combine them by simply adding/or-ing together the
447 * values, filtering will be done in such a way that only access points
448 * with the listed ISP-types will be shown. Second filtering possibility
449 * (aBearerFilter) is the desired bearer type. The possible values are
450 * the values of the TApBearerType enum type and their combinations, as
451 * in case of the ISP type. The ordering of the list can be specified
452 * with the aSortType parameter. It can have the following values:
453 * KEApSortUidAscending: The sorting is done according to the ID of
454 * the access points in ascending order.
455 * KEApSortUidDescending: The sorting is done according to the ID of
456 * the access points in descending order.
457 * KEApSortNameAscending: The sorting is done according to the name of
458 * the access points in ascending order.
459 * KEApSortNameDescending: The sorting is done according to the name of
460 * the access points in descending order.
461 * Caution! The ordering values can not be combined!
462 * @param aDb A database to work on
463 * @param aStartWithSelection A boolean value indicating whether to
464 * select or edit an ap.
465 * @param aListType A TSelectionListType enum indicating the desired
467 * @param aSelMenuType A TSelectionMenuType enum indicating the desired
469 * @param aIspTypeFilter Filtering criteria on ISP type
470 * @param aBearerFilter Filtering criteria on bearer type
471 * @param aSortType Specifies the sort order to use.
472 * @param aReqIpvType Specifies whether the caller would like to
473 * have IPv4, IPv6 or both access points. If it is IPv6 or Both,
474 * in case of IPv6 support is available as a feature, it will be
475 * supported. If IPv6 feature is not supported by the phone, it
476 * simply defaults to the normal IPv4 version.
477 * If it is IPv4, it uses the default IPv4 version independently
478 * from IPv6 feature beeing available or not.
479 * @return The constructed CApSettingsHandler object.
483 IMPORT_C static CApSettingsHandler* NewLC(
485 TBool aStartWithSelection,
486 TSelectionListType aListType,
487 TSelectionMenuType aSelMenuType,
498 * Two-phased constructor. Leaves on failure.
499 * This function shall be used to create the access point
500 * settings/selection handling UI object.It is customizable through the
501 * parameters. This object is a small layer above the UI part and
502 * it provides a standard interface to select, edit, create access
503 * points. It has two main parts, Select and Edit. The first parameter,
504 * aStartWithSelection gives whether we would like to select or edit.
505 * In case of selection, there is the possibility to use this module in
506 * many applications. For this, two layouts are implemented, one is
507 * list pane used by General Settings which provides the list in a
508 * list-pane. The other layout is for the other applications requiring
509 * access point selection, a popup-list style as the decision was that
510 * General Settings will use list-pane and all other apps. popup-list
511 * style. It is the caller who selects the style so if spec. says
512 * otherwise, this module still can be used.
513 * It is also possible to start the UI without selection, so if any
514 * module has a 'linked/default/etc.' access point and stored it's UID,
515 * the module can simply call the editor part of the UI without having
516 * to select the AP once more.
517 * In case of editing only, (aStartWithSelection is EFalse), all other
518 * construction parameters are ignored and after construction caller
519 * can simply call RunSettingsL(..).
520 * In case of selection, a lot of other parameters can be specified to
521 * fulfil all requirements. There are three types of Options menu
522 * available: EApSettingsSelMenuNormal, EApSettingsSelMenuSelectOnly,
523 * EApSettingsSelMenuSelectNormal.
525 *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit,
526 * delete, create, etc.
528 * -EApSettingsSelMenuNormal:Options menu specified in General Settings,
529 * contains Edit, Delete, Create new, etc. menu items.
531 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal
532 * BUT the first item is Select. This one makes it possible to select
533 * an access point and also possible to edit, create, delete, etc.
535 * The following three parameters specify the filtering and ordering
536 * criteria for the selection list creation. First, it is possible to
537 * specify which ISP-type we are looking for. The possible values are:
539 * KEApIspTypeInternetOnly: Filter allows only access points that are
540 * capable of only internet access.
542 * KEApIspTypeWAPOnly: Filter allows only access points that are
543 * capable of only WAP access.
545 * KEApIspTypeInternetAndWAP: Filter allows only access points that are
546 * capable of internet AND WAP access.
548 * KEApIspTypeWAPMandatory: Filter allows only access points that are
549 * capable of WAP access AND contain mandatory WAP settings.
551 * KEApIspTypeAll: No filtering is done for the isp-type, all types of
552 * access points are shown.
554 * It is possible to combine them by simply adding/or-ing together the
555 * values, filtering will be done in such a way that only access points
556 * with the listed ISP-types will be shown.
557 * Second filtering possibility (aBearerFilter) is the desired bearer
558 * type. The possible values are the values of the TApBearerType enum
559 * type and their combinations, as in case of the ISP type.
560 * The ordering of the list can be specified with the aSortType
561 * parameter. It can have the following values:
562 * KEApSortUidAscending: The sorting is done according to the ID of
563 * the access points in ascending order.
564 * KEApSortUidDescending: The sorting is done according to the ID of
565 * the access points in descending order.
566 * KEApSortNameAscending: The sorting is done according to the name of
567 * the access points in ascending order.
568 * KEApSortNameDescending: The sorting is done according to the name of
569 * the access points in descending order.
570 * Caution! The ordering values can not be combined!
571 * @param aStartWithSelection A boolean value indicating whether to
572 * select or edit an ap.
573 * @param aListType A TSelectionListType enum indicating the desired
575 * @param aSelMenuType A TSelectionMenuType enum indicating the desired
577 * @param aIspTypeFilter Filtering criteria on ISP type
578 * @param aBearerFilter Filtering criteria on bearer type
579 * @param aSortType Specifies the sort order to use.
580 * @param aReqIpvType Specifies whether the caller would like to
581 * have IPv4, IPv6 or both access points. If it is IPv6 or Both,
582 * in case of IPv6 support is available as a feature, it will be
583 * supported. If IPv6 feature is not supported by the phone, it
584 * simply defaults to the normal IPv4 version.
585 * If it is IPv4, it uses the default IPv4 version independently
586 * from IPv6 feature beeing available or not.
587 * @param aVpnFilterType a TVpnFilterType representing the possible
588 * additional VPN filtering.
589 * @return The constructed CApSettingsHandler object.
593 IMPORT_C static CApSettingsHandler* NewLC(
594 TBool aStartWithSelection,
595 TSelectionListType aListType,
596 TSelectionMenuType aSelMenuType,
601 TVpnFilterType aVpnFilterType
607 * Two-phased constructor. Leaves on failure.
608 * This function shall be used to create the access point
609 * settings/selection handling UI object. It is customizable through
610 * the parameters. This object is a small layer above the UI part and
611 * it provides a standard interface to select, edit, create access
612 * points. It has two main parts, Select and Edit. The first parameter,
613 * aStartWithSelection gives whether we would like to select or edit.
614 * In case of selection, there is the possibility to use this module in
615 * many applications. For this, two layouts are implemented, one is list
616 * pane used by General Settings which provides the list in a list-pane.
617 * The other layout is for the other applications requiring access point
618 * selection, a popup-list style as the decision was that General
619 * Settings will use list-pane and all other apps. popup-list style.
620 * It is the caller who selects the style so if spec. says otherwise,
621 * this module still can be used. It is also possible to start the UI
622 * without selection, so if any module has a 'linked/default/etc.'
623 * access point and stored it's UID, the module can simply call the
624 * editor part of the UI without having to select the AP once more.
625 * In case of editing only, (aStartWithSelection is EFalse), all other
626 * construction parameters are ignored and after construction caller can
627 * simply call RunSettingsL(..). In case of selection, a lot of other
628 * parameters can be specified to fulfil all requirements. There are
629 * three types of Options menu available: EApSettingsSelMenuNormal,
630 * EApSettingsSelMenuSelectOnly, EApSettingsSelMenuSelectNormal.
632 *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit,
633 * delete, create, etc.
635 * -EApSettingsSelMenuNormal:Options menu specified in General Settings,
636 * contains Edit, Delete, Create new, etc. menu items.
638 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal
639 * BUT the first item is Select. This one makes it possible to select
640 * an access point and also possible to edit, create, delete, etc.
642 * The following three parameters specify the filtering and ordering
643 * criteria for the selection list creation. First, it is possible to
644 * specify which ISP-type we are looking for. The possible values are:
646 * KEApIspTypeInternetOnly: Filter allows only access points that are
647 * capable of only internet access.
649 * KEApIspTypeWAPOnly: Filter allows only access points that are
650 * capable of only WAP access.
652 * KEApIspTypeInternetAndWAP: Filter allows only access points that are
653 * capable of internet AND WAP access.
655 * KEApIspTypeWAPMandatory: Filter allows only access points that are
656 * capable of WAP access AND contain mandatory WAP settings.
658 * KEApIspTypeAll: No filtering is done for the isp-type, all types of
659 * access points are shown.
661 * It is possible to combine them by simply adding/or-ing together the
662 * values, filtering will be done in such a way that only access points
663 * with the listed ISP-types will be shown. Second filtering possibility
664 * (aBearerFilter) is the desired bearer type. The possible values are
665 * the values of the TApBearerType enum type and their combinations, as
666 * in case of the ISP type. The ordering of the list can be specified
667 * with the aSortType parameter. It can have the following values:
668 * KEApSortUidAscending: The sorting is done according to the ID of
669 * the access points in ascending order.
670 * KEApSortUidDescending: The sorting is done according to the ID of
671 * the access points in descending order.
672 * KEApSortNameAscending: The sorting is done according to the name of
673 * the access points in ascending order.
674 * KEApSortNameDescending: The sorting is done according to the name of
675 * the access points in descending order.
676 * Caution! The ordering values can not be combined!
677 * @param aDb A database to work on
678 * @param aStartWithSelection A boolean value indicating whether to
679 * select or edit an ap.
680 * @param aListType A TSelectionListType enum indicating the desired
682 * @param aSelMenuType A TSelectionMenuType enum indicating the desired
684 * @param aIspTypeFilter Filtering criteria on ISP type
685 * @param aBearerFilter Filtering criteria on bearer type
686 * @param aSortType Specifies the sort order to use.
687 * @param aReqIpvType Specifies whether the caller would like to
688 * have IPv4, IPv6 or both access points. If it is IPv6 or Both,
689 * in case of IPv6 support is available as a feature, it will be
690 * supported. If IPv6 feature is not supported by the phone, it
691 * simply defaults to the normal IPv4 version.
692 * If it is IPv4, it uses the default IPv4 version independently
693 * from IPv6 feature beeing available or not.
694 * @param aVpnFilterType a TVpnFilterType representing the possible
695 * additional VPN filtering.
696 * @return The constructed CApSettingsHandler object.
700 IMPORT_C static CApSettingsHandler* NewLC(
702 TBool aStartWithSelection,
703 TSelectionListType aListType,
704 TSelectionMenuType aSelMenuType,
709 TVpnFilterType aVpnFilterType
717 * Two-phased constructor. Leaves on failure.
718 * This function shall be used to create the access point
719 * settings/selection handling UI object. It is customizable through
720 * the parameters. This object is a small layer above the UI part and
721 * it provides a standard interface to select, edit, create access
722 * points. It has two main parts, Select and Edit. The first parameter,
723 * aStartWithSelection gives whether we would like to select or edit.
724 * In case of selection, there is the possibility to use this module in
725 * many applications. For this, two layouts are implemented, one is list
726 * pane used by General Settings which provides the list in a list-pane.
727 * The other layout is for the other applications requiring access point
728 * selection, a popup-list style as the decision was that General
729 * Settings will use list-pane and all other apps. popup-list style.
730 * It is the caller who selects the style so if spec. says otherwise,
731 * this module still can be used. It is also possible to start the UI
732 * without selection, so if any module has a 'linked/default/etc.'
733 * access point and stored it's UID, the module can simply call the
734 * editor part of the UI without having to select the AP once more.
735 * In case of editing only, (aStartWithSelection is EFalse), all other
736 * construction parameters are ignored and after construction caller can
737 * simply call RunSettingsL(..). In case of selection, a lot of other
738 * parameters can be specified to fulfil all requirements. There are
739 * three types of Options menu available: EApSettingsSelMenuNormal,
740 * EApSettingsSelMenuSelectOnly, EApSettingsSelMenuSelectNormal.
742 *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit,
743 * delete, create, etc.
745 * -EApSettingsSelMenuNormal:Options menu specified in General Settings,
746 * contains Edit, Delete, Create new, etc. menu items.
748 * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal
749 * BUT the first item is Select. This one makes it possible to select
750 * an access point and also possible to edit, create, delete, etc.
752 * The following three parameters specify the filtering and ordering
753 * criteria for the selection list creation. First, it is possible to
754 * specify which ISP-type we are looking for. The possible values are:
756 * KEApIspTypeInternetOnly: Filter allows only access points that are
757 * capable of only internet access.
759 * KEApIspTypeWAPOnly: Filter allows only access points that are
760 * capable of only WAP access.
762 * KEApIspTypeInternetAndWAP: Filter allows only access points that are
763 * capable of internet AND WAP access.
765 * KEApIspTypeWAPMandatory: Filter allows only access points that are
766 * capable of WAP access AND contain mandatory WAP settings.
768 * KEApIspTypeAll: No filtering is done for the isp-type, all types of
769 * access points are shown.
771 * It is possible to combine them by simply adding/or-ing together the
772 * values, filtering will be done in such a way that only access points
773 * with the listed ISP-types will be shown. Second filtering possibility
774 * (aBearerFilter) is the desired bearer type. The possible values are
775 * the values of the TApBearerType enum type and their combinations, as
776 * in case of the ISP type. The ordering of the list can be specified
777 * with the aSortType parameter. It can have the following values:
778 * KEApSortUidAscending: The sorting is done according to the ID of
779 * the access points in ascending order.
780 * KEApSortUidDescending: The sorting is done according to the ID of
781 * the access points in descending order.
782 * KEApSortNameAscending: The sorting is done according to the name of
783 * the access points in ascending order.
784 * KEApSortNameDescending: The sorting is done according to the name of
785 * the access points in descending order.
786 * Caution! The ordering values can not be combined!
787 * @param aDb A database to work on
788 * @param aStartWithSelection A boolean value indicating whether to
789 * select or edit an ap.
790 * @param aListType A TSelectionListType enum indicating the desired
792 * @param aSelMenuType A TSelectionMenuType enum indicating the desired
794 * @param aIspTypeFilter Filtering criteria on ISP type
795 * @param aBearerFilter Filtering criteria on bearer type
796 * @param aSortType Specifies the sort order to use.
797 * @param aReqIpvType Specifies whether the caller would like to
798 * have IPv4, IPv6 or both access points. If it is IPv6 or Both,
799 * in case of IPv6 support is available as a feature, it will be
800 * supported. If IPv6 feature is not supported by the phone, it
801 * simply defaults to the normal IPv4 version.
802 * If it is IPv4, it uses the default IPv4 version independently
803 * from IPv6 feature beeing available or not.
804 * @param aVpnFilterType a TVpnFilterType representing the possible
805 * additional VPN filtering.
806 * @param aIncludeEasyWlan a TBool indicating whether it should
807 * include the easy wlan AP in the list or not.
808 * @return The constructed CApSettingsHandler object.
812 IMPORT_C static CApSettingsHandler* NewLC(
814 TBool aStartWithSelection,
815 TSelectionListType aListType,
816 TSelectionMenuType aSelMenuType,
821 TVpnFilterType aVpnFilterType,
822 TBool aIncludeEasyWlan
833 IMPORT_C ~CApSettingsHandler();
839 * @param aStartWithSelection A boolean value indicating whether to
840 * select or edit an ap.
841 * @param aListType A TSelectionListType enum indicating the desired
843 * @param aSelMenuType A TSelectionMenuType enum indicating the desired
848 IMPORT_C CApSettingsHandler(
849 TBool aStartWithSelection,
850 TSelectionListType aListType,
851 TSelectionMenuType aSelMenuType
856 * @param aStartWithSelection A boolean value indicating whether to
857 * select or edit an ap.
858 * @param aListType A TSelectionListType enum indicating the desired
860 * @param aSelMenuType A TSelectionMenuType enum indicating the desired
862 * @param aHelpMajor Major help ID
866 IMPORT_C CApSettingsHandler(
867 TBool aStartWithSelection,
868 TSelectionListType aListType,
869 TSelectionMenuType aSelMenuType,
876 * @param aStartWithSelection A boolean value indicating whether to
877 * select or edit an ap.
878 * @param aListType A TSelectionListType enum indicating the desired
880 * @param aSelMenuType A TSelectionMenuType enum indicating the desired
882 * @param aNeedIpv6Support Whether IPv6 is supported or not
885 TBool aStartWithSelection,
886 TSelectionListType aListType,
887 TSelectionMenuType aSelMenuType,
888 TBool aNeedIpv6Support
894 * Second-phase constructor.
895 * @param aIspTypeFilter Filtering criteria on ISP type
896 * @param aBearerFilter Filtering criteria on bearer type
897 * @param aSortType Specifies the sort order to use.
901 IMPORT_C void ConstructL(
909 * Second-phase constructor.
910 * @param aDb A database to work on
911 * @param aIspTypeFilter Filtering criteria on ISP type
912 * @param aBearerFilter Filtering criteria on bearer type
913 * @param aSortType Specifies the sort order to use.
917 IMPORT_C void ConstructL(
926 * Second-phase constructor.
927 * @param aIspTypeFilter Filtering criteria on ISP type
928 * @param aBearerFilter Filtering criteria on bearer type
929 * @param aSortType Specifies the sort order to use.
930 * @param aVpnFilterType a TVpnFilterType representing the possible
931 * additional VPN filtering.
935 IMPORT_C void ConstructL(
939 TVpnFilterType aVpnFilterType
944 * Second-phase constructor.
945 * @param aDb A database to work on
946 * @param aIspTypeFilter Filtering criteria on ISP type
947 * @param aBearerFilter Filtering criteria on bearer type
948 * @param aSortType Specifies the sort order to use.
949 * @param aVpnFilterType a TVpnFilterType representing the possible
950 * additional VPN filtering.
954 IMPORT_C void ConstructL(
959 TVpnFilterType aVpnFilterType
966 * Second-phase constructor.
967 * @param aDb A database to work on
968 * @param aIspTypeFilter Filtering criteria on ISP type
969 * @param aBearerFilter Filtering criteria on bearer type
970 * @param aSortType Specifies the sort order to use.
971 * @param aVpnFilterType a TVpnFilterType representing the possible
972 * additional VPN filtering.
973 * @param aIncludeEasyWlan a TBool indicating whether it should
974 * include the easy wlan AP in the list or not.
978 IMPORT_C void ConstructL(
983 TVpnFilterType aVpnFilterType,
984 TBool aIncludeEasyWlan
988 public: // New functions
990 * Sets the filtering used in the access point selection.
991 * @param aIspTypeFilter Filtering criteria on ISP type
992 * @param aBearerFilter Filtering criteria on bearer type
993 * @param aSortType Specifies the sort order to use.
994 * @return No return value. Leaves on error.
998 IMPORT_C void SetFilterL(
1006 * Sets possible overrides of some texts.
1007 * By default, text is read from resources. This provides a way to
1008 * change some of the text to a caller-supplied one. The text must
1009 * be read from resource and must be already localized.
1010 * More than one text can be substituted, they are stored internally
1012 * Currently not supported and supporting it is under discussion.
1013 * @param aText2Change TTextID to identify the text to be replaced with
1014 * @param aNewText Reference to the substitute text.
1018 IMPORT_C void SetTextOverrideL( TTextID aText2Change,
1019 const TDesC& aNewText );
1023 * Gets possible overrides of a text.
1024 * By default, text is read from resources. This provides a way to
1025 * change some of the text to a caller-supplied one. The text must
1026 * be read from resource and must be already localized.
1027 * More than one text can be substituted, they are stored internally
1029 * Currently not supported and supporting it is under discussion
1030 * @param aTextID TTextID type to identify the text to be replaced with
1031 * @return Reference to the substitute text.
1035 IMPORT_C const TDesC& TextOverrideL( TTextID aTextId );
1039 * Starts the settings component.
1040 * Creates dialog(s) from scratch, launches and executes them.
1041 * Can leave with error codes.
1042 * @param TUint32 aHighlight The UID of the AP to highlight by default
1043 * @param TUint32 aSelected The UID of the access point selected
1045 * @return The accomplished task's flag-codes:
1049 * KApUiEventSelected,
1051 * KApUiEventCreatedBlank,
1053 * KApUiEventCreatedUsedOld,
1057 * KApUiEventDeleted,
1059 * KApUiEventExitRequested
1060 * <br>and their combinations. ( Bitwise OR )
1062 * aSelected will be modified only if KApUiEventSelected is included
1065 * In case it returns KApUiEventExitRequested, the user had choosen
1066 * the Exit option from the Options menu which means
1067 * that the caller application MUST exit!
1069 * Returns after completion!
1073 IMPORT_C TInt RunSettingsL( TUint32 aHighLight, TUint32& aSelected );
1077 * Component Validation Test.
1082 IMPORT_C static TInt Cvt();
1085 protected: // New functions
1088 * Starts the settings component.
1089 * Creates dialog(s) from scratch, launches and executes them.
1090 * In case of error, leaves with error codes.
1091 * @param TUint32 aHighlight The UID of the AP to highlight by default
1092 * @param TUint32 aSelected The UID of the AP selected by the user
1093 * @return The accomplished task's flag-codes:
1097 * KApUiEventSelected,
1099 * KApUiEventCreatedBlank,
1101 * KApUiEventCreatedUsedOld,
1107 * and their combinations. ( Bitwise OR )
1109 * aSelected will be modified only if KApUiEventSelected is included
1112 * Returns after completion!
1114 TInt DoRunSettingsL( TUint32 aHighLight, TUint32& aSelected );
1118 * Starts the viewer component.
1119 * Creates dialog(s) from scratch, launches and executes it.
1120 * In case of error, leaves with error codes.
1121 * @param TUint32 aUid The UID of the AP to view/edit
1122 * @return Returns the completed task's flags
1123 * KApUiEventNone, KApUiEventSelected, KApUiEventCreatedBlank,
1124 * KApUiEventCreatedUsedOld, KApUiEventEdited, KApUiEventDeleted,
1125 * KApUiEventExitRequested and their combinations. ( Bitwise OR )
1126 * In case it returns KApUiEventExitRequested, the user had choosen
1127 * the Exit option from the Options menu which means
1128 * that the caller application MUST exit!
1130 * Returns after completion!
1134 IMPORT_C TInt RunViewerL( TUint32 aUid );
1139 * Starts the viewer component.
1140 * Creates dialog(s) from scratch, launches and executes it.
1141 * In case of error, leaves with error codes.
1142 * @param TUint32 aUid The UID of the AP to view/edit
1143 * @return Returns the completed task's flags
1144 * KApUiEventNone, KApUiEventSelected, KApUiEventCreatedBlank,
1145 * KApUiEventCreatedUsedOld, KApUiEventEdited, KApUiEventDeleted,
1146 * KApUiEventExitRequested and their combinations. ( Bitwise OR )
1147 * Returns after completion!
1149 TInt DoRunViewerL( TUint32 aUid );
1152 // handles the Delete access Point command.
1154 void HandleApDeleteCmdL( TUint32 aUid, TBool aIsLast );
1157 // handles the Create blank new access Point command.
1159 TUint32 HandleApBlankNewL( TInt aBearers, TInt aIsps );
1162 // handles the Create new access Point by using existing one command.
1164 TUint32 HandleApUseOldNewL();
1167 // handles the Editing of the newly created access Point.
1169 TUint32 EditAfterCreateL( TUint32 aUid,
1170 CApAccessPointItem* aItem = NULL );
1174 * Second-phase internal constructor.
1175 * @param aDb A database to work on
1176 * @param aIspTypeFilter Filtering criteria on ISP type
1177 * @param aBearerFilter Filtering criteria on bearer type
1178 * @param aSortType Specifies the sort order to use.
1179 * @param aVpnFilterType a TVpnFilterType representing the possible
1180 * additional VPN filtering.
1181 * @param aIncludeEasyWlan a TBool indicating whether it should
1182 * include the easy wlan AP in the list or not.
1184 void DoConstructL( CActiveApDb* aDb, TInt aIspFilter,
1185 TInt aBearerFilter, TInt aSortType,
1186 TVpnFilterType aVpnFilterType,
1187 TBool aIncludeEasyWlan );
1192 * Starts the selector component as a list
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:
1201 * KApUiEventSelected,
1203 * KApUiEventCreatedBlank,
1205 * KApUiEventCreatedUsedOld,
1211 * and their combinations. ( Bitwise OR )
1213 * aSelected will be modified only if KApUiEventSelected is included
1216 * Returns after completion!
1218 void DoRunListSettingsL( TUint32 aHighLight, TUint32& aSelected );
1223 * Starts the selector component in a setting page
1224 * Creates dialog(s) from scratch, launches and executes them.
1225 * In case of error, leaves with error codes.
1226 * @param TUint32 aHighlight The UID of the AP to highlight by default
1227 * @param TUint32 aSelected The UID of the AP selected by the user
1228 * @return The accomplished task's flag-codes:
1232 * KApUiEventSelected,
1234 * KApUiEventCreatedBlank,
1236 * KApUiEventCreatedUsedOld,
1242 * and their combinations. ( Bitwise OR )
1244 * aSelected will be modified only if KApUiEventSelected is included
1247 * Returns after completion!
1249 void DoRunSetPageSettingsL( TUint32 aHighLight, TUint32& aSelected );
1254 * handles the Create new access Point by using existing one command.
1255 * Called after user has selected the AP to copy
1256 * Creates the new Ap and offers it for editing.
1257 * @param aSelected The UID of the AP to copy. Shall not be KErrNone.
1258 * @return The UID of the newly created Ap
1260 TUint32 DoHandleApUseOldNewL( TUint32 aSelected );
1264 * Selects the Ap to Copy, returns its UID.
1265 * If not selected, KErrNone is returned
1267 TUint32 SelectApToCopyL();
1272 * handles the Create blank new access Point command.
1274 TUint32 DoHandleApBlankNewL( TInt aBearers, TInt aIsps );
1279 * handles the Delete network group command.
1280 * @param aUid The uid of the network to delete
1282 void HandleNetworkDeleteCmdL( TUint32 aUid );
1287 * Gets the local variant value
1288 * @return A TInt stating the variant
1295 * Gets confirmation about deleting an access point
1296 * @param aUid A TUint32 holding the WAP access point ID of the
1297 * access point to be deleted.
1298 * @param aIsLast A TBool specifying whether the access point to be
1299 * deleted is the last one or not.
1300 * @return A TInt stating the result
1302 TInt ConfirmDeleteL( TUint32 aUid, TBool aIsLast );
1307 * Wrapper for the public API
1309 void HandleRunSettingsL( TUint32 aHighLight, TUint32& aSelected );
1312 protected: // Functions from base classes
1314 friend class CApSettingsDlg;
1315 friend class CApSelectorDialog;
1316 friend class CApSelPopupList;
1317 friend class CApNetSelPopupList;
1322 * Selects an appropriate bearer type for a given item according to
1323 * the current filtering criterias
1324 * @param aBearers The current bearer filter set
1325 * @param aItem The CApAccessPointItem whoose bearer type is to be set.
1327 void ChooseBearerTypeL( TInt aBearers, CApAccessPointItem& aItem );
1331 * Duplciates an existing access point identified by the passed WAP ID
1332 * @param aUid The WAP Access Point ID of the access point to duplicate
1333 * @return The WAP Access Point ID of the newly created access point.
1335 TUint32 HandleDuplicateL( TUint32 aUid );
1339 TBool iStartWithSelection;
1340 TSelectionListType iListType;
1341 TSelectionMenuType iSelMenuType;
1345 TApSetHandlerExtra* iExt; // Extra data holder structure
1347 TInt iReqIpvType; // Default is IPv4
1349 // replacing iModel with iImpl, no size change
1350 // CApSettingsModel* iModel;
1351 CApSettingsHandlerImpl* iImpl; // owned
1353 CTextOverrides* iTextOverrides;
1354 TUint32 iEventStore; // to hold the events
1357 #ifdef __TEST_OOMDEBUG
1359 #endif // __TEST_OOMDEBUG