apengine/apsettingshandlerui/inc/apsettingsui.h
changeset 61 8b0c979bbe8c
parent 59 2709c04a4af5
child 70 ac5daea24fb0
equal deleted inserted replaced
59:2709c04a4af5 61:8b0c979bbe8c
     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 handler, CApSettingsHandler and public API for the 
       
    16 *     Access Point settings.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef APSETTINGS_UI_H
       
    22 #define APSETTINGS_UI_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <ApSettingsHandlerCommons.h>
       
    26 #include <ApEngineConsts.h>
       
    27 #include <ApSelect.h>
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CActiveApDb;
       
    34 class CTextOverrides;
       
    35 
       
    36 class CApSettingsHandlerImpl;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 /**
       
    40 * CApSettingsUi class: It is the main handler for the Access Point 
       
    41 * settings. It contains the only public API for other (sub)systems.
       
    42 *
       
    43 */
       
    44 class CApSettingsUi : public CBase
       
    45     {
       
    46 
       
    47     public: // Constructors and destructor
       
    48 
       
    49 
       
    50 
       
    51         /**
       
    52         * Two-phased constructor. Leaves on failure.
       
    53         * This function shall be used to create the access point 
       
    54         * settings/selection handling UI object.It is customizable through the
       
    55         * parameters. This object is a small layer above the UI part and
       
    56         * it provides a standard interface to select, edit, create access 
       
    57         * points. It has two main parts, Select and Edit. The first parameter, 
       
    58         * aStartWithSelection gives whether we would like to select or edit.
       
    59         * In case of selection, there is the possibility to use this module in
       
    60         * many applications. For this, two layouts are implemented, one is 
       
    61         * list pane used by General Settings which provides the list in a 
       
    62         * list-pane. The other layout is for the other applications requiring 
       
    63         * access point selection, a popup-list style as the decision was that 
       
    64         * General Settings will use list-pane and all other apps. popup-list 
       
    65         * style. It is the caller who selects the style so if spec. says 
       
    66         * otherwise, this module still can be used.
       
    67         * It is also possible to start the UI without selection, so if any 
       
    68         * module has a 'linked/default/etc.' access point and stored it's UID,
       
    69         * the module can simply call the editor part of the UI without having
       
    70         * to select the AP once more.
       
    71         * In case of editing only, (aStartWithSelection is EFalse), all other 
       
    72         * construction parameters are ignored and after construction caller 
       
    73         * can simply call DoRunSettingsL(..).
       
    74         * In case of selection, a lot of other parameters can be specified to
       
    75         * fulfil all requirements. There are three types of Options menu 
       
    76         * available: EApSettingsSelMenuNormal, EApSettingsSelMenuSelectOnly,
       
    77         * EApSettingsSelMenuSelectNormal.
       
    78         * <br>
       
    79         *-EApSettingsSelMenuSelectOnly: Only Select is visible, no way to edit,
       
    80         *   delete, create, etc.
       
    81         * <br>
       
    82         * -EApSettingsSelMenuNormal:Options menu specified in General Settings,
       
    83         *   contains Edit, Delete, Create new, etc. menu items.
       
    84         * <br>
       
    85         * -EApSettingsSelMenuSelectNormal: Same as in EApSettingsSelMenuNormal 
       
    86         *   BUT the first item is Select. This one makes it possible to select 
       
    87         *   an access point and also possible to edit, create, delete, etc.
       
    88         * <br>
       
    89         * The following three parameters specify the filtering and ordering 
       
    90         * criteria for the selection list creation. First, it is possible to 
       
    91         * specify which ISP-type we are looking for. The possible values are:
       
    92         * <br>
       
    93         * KEApIspTypeInternetOnly: Filter allows only access points that are 
       
    94         *   capable of only internet access.
       
    95         * <br>
       
    96         * KEApIspTypeWAPOnly: Filter allows only access points that are 
       
    97         *   capable of only WAP access.
       
    98         * <br>
       
    99         * KEApIspTypeInternetAndWAP: Filter allows only access points that are 
       
   100         *   capable of internet AND WAP access.
       
   101         * <br>
       
   102         * KEApIspTypeWAPMandatory: Filter allows only access points that are 
       
   103         *   capable of WAP access AND contain mandatory WAP settings.
       
   104         * <br>
       
   105         * KEApIspTypeAll: No filtering is done for the isp-type, all types of
       
   106         *   access points are shown.
       
   107         * <br>
       
   108         * It is possible to combine them by simply adding/or-ing together the 
       
   109         * values, filtering will be done in such a way that only access points 
       
   110         * with the listed ISP-types will be shown.
       
   111         * Second filtering possibility (aBearerFilter) is the desired bearer 
       
   112         * type. The possible values are the values of the TApBearerType enum 
       
   113         * type and their combinations, as in case of the ISP type.
       
   114         * The ordering of the list can be specified with the aSortType 
       
   115         * parameter. It can have the following values:
       
   116         * KEApSortUidAscending: The sorting is done according to the ID of 
       
   117         *   the access points in ascending order.
       
   118         * KEApSortUidDescending: The sorting is done according to the ID of 
       
   119         *   the access points in descending order.
       
   120         * KEApSortNameAscending: The sorting is done according to the name of 
       
   121         *   the access points in ascending order.
       
   122         * KEApSortNameDescending: The sorting is done according to the name of 
       
   123         *   the access points in descending order.
       
   124         * Caution! The ordering values can not be combined!
       
   125         * @param aStartWithSelection A boolean value indicating whether to 
       
   126         *   select or edit an ap.
       
   127         * @param aListType A TSelectionListType enum indicating the desired
       
   128         *   list type.
       
   129         * @param aSelMenuType A TSelectionMenuType enum indicating the desired
       
   130         *   menu type.
       
   131         * @param aIspTypeFilter Filtering criteria on ISP type
       
   132         * @param aBearerFilter Filtering criteria on bearer type
       
   133         * @param aSortType Specifies the sort order to use.
       
   134         * @param aReqIpvType Specifies whether the caller would like to 
       
   135         *   have IPv4, IPv6 or both access points. If it is IPv6 or Both, 
       
   136         *   in case of IPv6 support is available as a feature, it will be 
       
   137         *   supported. If IPv6 feature is not supported by the phone, it 
       
   138         *   simply defaults to the normal IPv4 version.
       
   139         *   If it is IPv4, it uses the default IPv4 version independently 
       
   140         *   from IPv6 feature beeing available or not.
       
   141         * @param aVpnFilterType a TVpnFilterType representing the possible 
       
   142         *   additional VPN filtering.
       
   143         * @return The constructed CApSettingsUi object.
       
   144         *
       
   145         * @deprecated
       
   146         */
       
   147         IMPORT_C static CApSettingsUi* NewLC(
       
   148                         TBool aStartWithSelection,
       
   149                         TSelectionListType aListType,
       
   150                         TSelectionMenuType aSelMenuType,
       
   151                         TInt aIspFilter,
       
   152                         TInt aBearerFilter,
       
   153                         TInt aSortType,
       
   154                         TInt aReqIpvType,
       
   155                         TVpnFilterType aVpnFilterType );
       
   156 
       
   157 
       
   158         /**
       
   159         * Destructor.
       
   160         *
       
   161         * @deprecated
       
   162         */
       
   163         IMPORT_C ~CApSettingsUi();
       
   164 
       
   165 
       
   166     protected:
       
   167 
       
   168         /**
       
   169         * Constructor.
       
   170         * @param aStartWithSelection A boolean value indicating whether to 
       
   171         *   select or edit an ap.
       
   172         * @param aListType A TSelectionListType enum indicating the desired
       
   173         *   list type.
       
   174         * @param aSelMenuType A TSelectionMenuType enum indicating the desired
       
   175         *   menu type.
       
   176         * @param aNeedIpv6Support Whether IPv6 is supported or not
       
   177         */
       
   178         CApSettingsUi( TBool aStartWithSelection,
       
   179                        TSelectionListType aListType,
       
   180                        TSelectionMenuType aSelMenuType,
       
   181                        TBool aNeedIpv6Support );
       
   182 
       
   183 
       
   184 
       
   185         /**
       
   186         * Second-phase constructor.
       
   187         * @param aIspTypeFilter Filtering criteria on ISP type
       
   188         * @param aBearerFilter Filtering criteria on bearer type
       
   189         * @param aSortType Specifies the sort order to use.
       
   190         * @param aVpnFilterType a TVpnFilterType representing the possible 
       
   191         *   additional VPN filtering.
       
   192         *
       
   193         * @deprecated
       
   194         */
       
   195         IMPORT_C void ConstructL(
       
   196                                 TInt aIspFilter,
       
   197                                 TInt aBearerFilter,
       
   198                                 TInt aSortType,
       
   199                                 TVpnFilterType aVpnFilterType
       
   200                                 );
       
   201 
       
   202 
       
   203     public: // New functions
       
   204 
       
   205         /**
       
   206         * Starts the settings component.
       
   207         * Creates dialog(s) from scratch, launches and executes them.
       
   208         * Can leave with error codes.
       
   209         * @param TUint32 aHighlight The UID of the AP to highlight by default
       
   210         * @param TUint32 aSelected The UID of the access point selected 
       
   211         * by the user.
       
   212         * @return The accomplished task's flag-codes:
       
   213         * <br>
       
   214         * KApUiEventNone,
       
   215         * <br>
       
   216         * KApUiEventSelected,
       
   217         * <br>
       
   218         * KApUiEventCreatedBlank,
       
   219         * <br>
       
   220         * KApUiEventCreatedUsedOld,
       
   221         * <br>
       
   222         * KApUiEventEdited,
       
   223         * <br>
       
   224         * KApUiEventDeleted,
       
   225         * <br>
       
   226         * KApUiEventExitRequested
       
   227         * <br>and their combinations. ( Bitwise OR )
       
   228         * <br>
       
   229         * aSelected will be modified only if KApUiEventSelected is included 
       
   230         * in the flags.
       
   231         * <br>
       
   232         * In case it returns KApUiEventExitRequested, the user had choosen
       
   233         * the Exit option from the Options menu which means
       
   234         * that the caller application MUST exit!
       
   235         * <br>
       
   236         * Returns after completion!
       
   237         *
       
   238         * @deprecated
       
   239         */
       
   240         IMPORT_C TInt RunSettingsL( TUint32 aHighLight, TUint32& aSelected );
       
   241 
       
   242 
       
   243     private: //data
       
   244         TBool                   iStartWithSelection;
       
   245         TSelectionListType      iListType;
       
   246         TSelectionMenuType      iSelMenuType;
       
   247 
       
   248         TInt                    iReqIpvType;    // Default is IPv4
       
   249 
       
   250         CApSettingsHandlerImpl* iImpl;          // owned
       
   251         
       
   252 
       
   253     };
       
   254 
       
   255 #endif
       
   256 
       
   257 // End of File