apengine/apsettingshandlerui/inc/ApSettingsModel.h
changeset 0 5a93021fdf25
child 23 7ec726f93df1
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     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:  Declaration of class CApSettingsModel.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef APSETTINGS_MODEL_H
       
    20 #define APSETTINGS_MODEL_H
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <ApDataHandler.h>
       
    24 #include <ApUtils.h>
       
    25 #include <ApSelect.h>
       
    26 
       
    27 #include <ApSettingsHandlerCommons.h>
       
    28 
       
    29 #include <ApProtHandler.h> //for protection of settings
       
    30 
       
    31 
       
    32 // FORWARD DECLARATION
       
    33 class CActiveApDb;
       
    34 class CApListItem;
       
    35 class CApListItemList;
       
    36 class CApAccessPointItem;
       
    37 class CApDataHandler;
       
    38 class CApSelect;
       
    39 class CAknWaitDialog;
       
    40 class CApSettingsDeleteOperation;
       
    41 class CApNetworkItemList;
       
    42 class CFeatureManagerWrapper;
       
    43 class CVpnApEngine;
       
    44 class CEikonEnv;
       
    45 
       
    46 class CWEPSecuritySettings;
       
    47 class CWEPSecuritySettingsUi;
       
    48 
       
    49 class CWPASecuritySettings;
       
    50 class CWPASecuritySettingsUi;
       
    51 
       
    52 
       
    53 
       
    54 /**
       
    55 * A structure to hold filtering parameters
       
    56 * First, it is possible to specify which ISP-type we are looking for. 
       
    57 * The possible values are:
       
    58 * <br>
       
    59 * KEApIspTypeInternetOnly:  Filter allows only access points that are 
       
    60 *                           capable of only internet access.
       
    61 * <br>
       
    62 * KEApIspTypeWAPOnly:       Filter allows only access points that are 
       
    63 *                           capable of only WAP access.
       
    64 * <br>
       
    65 * KEApIspTypeInternetAndWAP:Filter allows only access points that are 
       
    66 *                           capable of internet AND WAP access.
       
    67 * <br>
       
    68 * KEApIspTypeWAPMandatory:  Filter allows only access points that are 
       
    69 *                           capable of WAP access AND contain mandatory
       
    70 *                           WAP settings.
       
    71 * <br>
       
    72 * KEApIspTypeAll:           No filtering is done for the isp-type, 
       
    73 *                           all types of access points are shown.
       
    74 * <br>
       
    75 * It is possible to combine them by simply adding/or-ing together the values,
       
    76 * filtering will be done in such a way that only access points with the 
       
    77 * listed ISP-types will be shown.
       
    78 * Second filtering possibility (aBearerFilter) is the desired bearer type.
       
    79 * The possible values are the values of the TApBearerType enum type and their 
       
    80 * combinations, as in case of the ISP type.
       
    81 * The ordering of the list can be specified with the aSortType parameter. 
       
    82 * It can have the following values:
       
    83 * KEApSortUidAscending:     The sorting is done according to the ID 
       
    84 *                           of the access points in ascending order.
       
    85 * KEApSortUidDescending:    The sorting is done according to the ID 
       
    86 *                           of the access points in descending order.
       
    87 * KEApSortNameAscending:    The sorting is done according to the name 
       
    88 *                           of the access points in ascending order.
       
    89 * KEApSortNameDescending:   The sorting is done according to the name 
       
    90 *                           of the access points in descending order.
       
    91 */
       
    92 typedef struct
       
    93     {
       
    94         TInt                iIspFilter;
       
    95         TInt                iBearerFilter;
       
    96         TInt                iSortType;
       
    97     }TApSettingsParams;
       
    98 
       
    99 
       
   100 
       
   101 
       
   102 
       
   103 
       
   104 
       
   105 // CLASS DECLARATION
       
   106 
       
   107 /**
       
   108 * Model for the access point settings ui.
       
   109 */
       
   110 NONSHARABLE_CLASS( CApSettingsModel ) : public CBase
       
   111     {
       
   112     public:     // Construct / destruct
       
   113 
       
   114         /**
       
   115         * Two-phased constructor. Leaves on failure.
       
   116         * The following three parameters specify the filtering and ordering 
       
   117         * criteria for the selection list creation. First, it is possible to 
       
   118         * specify which ISP-type we are looking for. The possible values are:
       
   119         * <br>
       
   120         * KEApIspTypeInternetOnly:  Filter allows only access points that are
       
   121         *                           capable of only internet access.
       
   122         * <br>
       
   123         * KEApIspTypeWAPOnly:       Filter allows only access points that are 
       
   124         *                           capable of only WAP access.
       
   125         * <br>
       
   126         * KEApIspTypeInternetAndWAP:Filter allows only access points that are
       
   127         *                           capable of internet AND WAP access.
       
   128         * <br>
       
   129         * KEApIspTypeWAPMandatory:  Filter allows only access points that are 
       
   130         *                           capable of WAP access AND contain 
       
   131         *                           mandatory WAP settings.
       
   132         * <br>
       
   133         * KEApIspTypeAll:           No filtering is done for the isp-type, all
       
   134         *                           types of access points are shown.
       
   135         * <br>
       
   136         * It is possible to combine them by simply adding/or-ing together the 
       
   137         * values, filtering will be done in such a way that only access points 
       
   138         * with the listed ISP-types will be shown.
       
   139         * Second filtering possibility (aBearerFilter) is the desired bearer 
       
   140         * type. The possible values are the values of the TApBearerType enum 
       
   141         * type and their combinations, as in case of the ISP type.
       
   142         * The ordering of the list can be specified with the aSortType 
       
   143         * parameter. It can have the following values:
       
   144         * KEApSortUidAscending:     The sorting is done according to the ID 
       
   145         *                           of the access points in ascending order.
       
   146         * KEApSortUidDescending:    The sorting is done according to the ID 
       
   147         *                           of the access points in descending order.
       
   148         * KEApSortNameAscending:    The sorting is done according to the name 
       
   149         *                           of the access points in ascending order.
       
   150         * KEApSortNameDescending:   The sorting is done according to the name 
       
   151         *                           of the access points in descending order.
       
   152         * Caution! The ordering values can not be combined!
       
   153         * @param aIspTypeFilter Filtering criteria on ISP type
       
   154         * @param aBearerFilter Filtering criteria on bearer type
       
   155         * @param aSortType Specifies the sort order to use.
       
   156         * @param aReqIpvType Specifies whether the caller would like to 
       
   157         *   have IPv4, IPv6 or both access points. If it is IPv6 or Both, 
       
   158         *   in case of IPv6 support is available as a feature, it will be 
       
   159         *   supported. If IPv6 feature is not supported by the phone, it 
       
   160         *   simply defaults to the normal IPv4 version.
       
   161         *   If it is IPv4, it uses the default IPv4 version independently 
       
   162         *   from IPv6 feature beeing available or not.
       
   163         * @param aVpnFilterType a TVpnFilterType representing the possible 
       
   164         *   additional VPN filtering.
       
   165         * @param aVariant The local variant value
       
   166         * @param aIncludeEasyWlan a TBool indicating whether to include the
       
   167         *   EasyWlan AP in the list or not
       
   168         * @param aNoEdit Gives wether editing is allowed or not
       
   169         * @return The constructed listbox.
       
   170         */
       
   171         static CApSettingsModel* NewL(
       
   172                                       TInt aIspFilter,
       
   173                                       TInt aBearerFilter,
       
   174                                       TInt aSortType,
       
   175                                       TInt aReqIpvType,
       
   176                                       TVpnFilterType aVpnFilterType,
       
   177                                       TInt aVariant,
       
   178                                       TBool aIncludeEasyWlan,
       
   179                                       TBool aNoEdit
       
   180                                      );
       
   181 
       
   182 
       
   183         /**
       
   184         * Two-phased constructor. Leaves on failure.
       
   185         * The following three parameters specify the filtering and ordering 
       
   186         * criteria for the selection list creation. First, it is possible to 
       
   187         * specify which ISP-type we are looking for. The possible values are:
       
   188         * <br>
       
   189         * KEApIspTypeInternetOnly:  Filter allows only access points that are
       
   190         *                           capable of only internet access.
       
   191         * <br>
       
   192         * KEApIspTypeWAPOnly:       Filter allows only access points that are 
       
   193         *                           capable of only WAP access.
       
   194         * <br>
       
   195         * KEApIspTypeInternetAndWAP:Filter allows only access points that are
       
   196         *                           capable of internet AND WAP access.
       
   197         * <br>
       
   198         * KEApIspTypeWAPMandatory:  Filter allows only access points that are 
       
   199         *                           capable of WAP access AND contain 
       
   200         *                           mandatory WAP settings.
       
   201         * <br>
       
   202         * KEApIspTypeAll:           No filtering is done for the isp-type, all
       
   203         *                           types of access points are shown.
       
   204         * <br>
       
   205         * It is possible to combine them by simply adding/or-ing together the 
       
   206         * values, filtering will be done in such a way that only access points 
       
   207         * with the listed ISP-types will be shown.
       
   208         * Second filtering possibility (aBearerFilter) is the desired bearer 
       
   209         * type. The possible values are the values of the TApBearerType enum 
       
   210         * type and their combinations, as in case of the ISP type.
       
   211         * The ordering of the list can be specified with the aSortType 
       
   212         * parameter. It can have the following values:
       
   213         * KEApSortUidAscending:     The sorting is done according to the ID 
       
   214         *                           of the access points in ascending order.
       
   215         * KEApSortUidDescending:    The sorting is done according to the ID 
       
   216         *                           of the access points in descending order.
       
   217         * KEApSortNameAscending:    The sorting is done according to the name 
       
   218         *                           of the access points in ascending order.
       
   219         * KEApSortNameDescending:   The sorting is done according to the name 
       
   220         *                           of the access points in descending order.
       
   221         * Caution! The ordering values can not be combined!
       
   222         * @param aDb The database to work on
       
   223         * @param aIspTypeFilter Filtering criteria on ISP type
       
   224         * @param aBearerFilter Filtering criteria on bearer type
       
   225         * @param aSortType Specifies the sort order to use.
       
   226         * @param aReqIpvType Specifies whether the caller would like to 
       
   227         *   have IPv4, IPv6 or both access points. If it is IPv6 or Both, 
       
   228         *   in case of IPv6 support is available as a feature, it will be 
       
   229         *   supported. If IPv6 feature is not supported by the phone, it 
       
   230         *   simply defaults to the normal IPv4 version.
       
   231         *   If it is IPv4, it uses the default IPv4 version independently 
       
   232         *   from IPv6 feature beeing available or not.
       
   233         * @param aVpnFilterType a TVpnFilterType representing the possible 
       
   234         *   additional VPN filtering.
       
   235         * @param aVariant The local variant value
       
   236         * @param aIncludeEasyWlan a TBool indicating whether to include the
       
   237         *   EasyWlan AP in the list or not
       
   238         * @param aNoEdit Gives wether editing is allowed or not        
       
   239         * @return The constructed listbox model.
       
   240         */
       
   241         static CApSettingsModel* NewL(
       
   242                                       CActiveApDb& aDb,
       
   243                                       TInt aIspFilter,
       
   244                                       TInt aBearerFilter,
       
   245                                       TInt aSortType,
       
   246                                       TInt aReqIpvType,
       
   247                                       TVpnFilterType aVpnFilterType,
       
   248                                       TInt aVariant,
       
   249                                       TBool aIncludeEasyWlan,
       
   250                                       TBool aNoEdit
       
   251                                      );
       
   252 
       
   253         /**
       
   254         * Destructor.
       
   255         */
       
   256         virtual ~CApSettingsModel();
       
   257 
       
   258 
       
   259     protected:
       
   260         /**
       
   261         * Constructor.
       
   262         * @param aIspTypeFilter Filtering criteria on ISP type
       
   263         * @param aBearerFilter Filtering criteria on bearer type
       
   264         * @param aSortType Specifies the sort order to use.
       
   265         * @param aReqIpvType Specifies whether the caller would like to 
       
   266         *   have IPv4, IPv6 or both access points. If it is IPv6 or Both, 
       
   267         *   in case of IPv6 support is available as a feature, it will be 
       
   268         *   supported. If IPv6 feature is not supported by the phone, it 
       
   269         *   simply defaults to the normal IPv4 version.
       
   270         *   If it is IPv4, it uses the default IPv4 version independently 
       
   271         *   from IPv6 feature beeing available or not.
       
   272         * @param aVariant   The variant
       
   273         * @param aVpnFilterType a TVpnFilterType representing the possible 
       
   274         *   additional VPN filtering.
       
   275         * @param aVariant The local variant value
       
   276         * @param aIncludeEasyWlan a TBool indicating whether to include the
       
   277         *   EasyWlan AP in the list or not
       
   278         * @param aNoEdit Gives wether editing is allowed or not
       
   279         */
       
   280         CApSettingsModel(
       
   281                         TInt aIspFilter,
       
   282                         TInt aBearerFilter,
       
   283                         TInt aSortType,
       
   284                         TInt aReqIpvType,
       
   285                         TInt aVariant,
       
   286                         TVpnFilterType aVpnFilterType,
       
   287                         TBool aIncludeEasyWlan,
       
   288                         TBool aNoEdit
       
   289                         );
       
   290 
       
   291 
       
   292         /**
       
   293         * Second phase constructor. Leaves on failure.
       
   294         * @param aDb Database to use if any, NULL otherwise.
       
   295         */
       
   296         virtual void ConstructL( CActiveApDb* aDb );
       
   297 
       
   298 
       
   299     public:
       
   300         /**
       
   301         * Returns the database object
       
   302         */
       
   303         CActiveApDb*     Database();
       
   304 
       
   305 
       
   306         /**
       
   307         * Gets the APs corresponding to the filtering criteria,
       
   308         * already ordered.
       
   309         * @param aFailedLocked a boolean indicating if the operation
       
   310         * had failed because the DB was locked
       
   311         * @param aList a reference to the list of APs.
       
   312         * The passed list will be erased, elements destroyed,
       
   313         * new elements created in it. The list owns the created elements
       
   314         * and the caller maintaines ownership of the list.
       
   315         * @param aIspFilter The isp filter to be used
       
   316         * @param aBearerFilter The bearer filter to be used
       
   317         * @param aSortType The ordering to be used.
       
   318         * @param aReqIpvType Specifies whether the caller would like to 
       
   319         *   have IPv4, IPv6 or both access points. If it is IPv6 or Both, 
       
   320         *   in case of IPv6 support is available as a feature, it will be 
       
   321         *   supported. If IPv6 feature is not supported by the phone, it 
       
   322         *   simply defaults to the normal IPv4 version.
       
   323         *   If it is IPv4, it uses the default IPv4 version independently 
       
   324         *   from IPv6 feature beeing available or not.
       
   325         * @return the number of items in the list.
       
   326         */
       
   327         TInt AllListItemDataL
       
   328                 (
       
   329                 TBool& aFailedLocked,
       
   330                 CApListItemList& aList,
       
   331                 TInt aIspFilter,
       
   332                 TInt aBearerFilter,
       
   333                 TInt aSortType,
       
   334                 TInt aReqIpvType
       
   335                 );
       
   336 
       
   337                 
       
   338         /**
       
   339         * Gets the APs corresponding to the filtering criteria,
       
   340         * already ordered.
       
   341         * @param aFailedLocked a boolean indicating if the operation
       
   342         * had failed because the DB was locked
       
   343         * @param aList a reference to the list of APs.
       
   344         * The passed list will be erased, elements destroyed,
       
   345         * new elements created in it. The list owns the created elements
       
   346         * and the caller maintaines ownership of the list.
       
   347         * @param aIspFilter The isp filter to be used
       
   348         * @param aBearerFilter The bearer filter to be used
       
   349         * @param aSortType The ordering to be used.
       
   350         * @param aReqIpvType Specifies whether the caller would like to 
       
   351         *   have IPv4, IPv6 or both access points. If it is IPv6 or Both, 
       
   352         *   in case of IPv6 support is available as a feature, it will be 
       
   353         *   supported. If IPv6 feature is not supported by the phone, it 
       
   354         *   simply defaults to the normal IPv4 version.
       
   355         *   If it is IPv4, it uses the default IPv4 version independently 
       
   356         *   from IPv6 feature beeing available or not.        
       
   357         * @param aVpnFilterType
       
   358         * @param aIncludeEasyWlan a TBool indicating whether to include the
       
   359         *   EasyWlan AP in the list or not        
       
   360         * @return the number of items in the list.
       
   361         */
       
   362         TInt AllListItemDataL
       
   363                 (
       
   364                 TBool& aFailedLocked,
       
   365                 CApListItemList& aList,
       
   366                 TInt aIspFilter,
       
   367                 TInt aBearerFilter,
       
   368                 TInt aSortType,
       
   369                 TInt aReqIpvType,
       
   370                 TVpnFilterType aVpnFilterType,
       
   371                 TBool aIncludeEasyWlan
       
   372                 );
       
   373 
       
   374 
       
   375         /**
       
   376         * Gets the APs corresponding to the filtering criteria,
       
   377         * already ordered.
       
   378         * @param aFailedLocked a boolean indicating if the operation
       
   379         * had failed because the DB was locked
       
   380         * @param aList a reference to the list of APs.
       
   381         * The passed list will be erased, elements destroyed,
       
   382         * new elements created in it. The list owns the created elements
       
   383         * and the caller maintaines ownership of the list.
       
   384         * @return the number of items in the list.
       
   385         */
       
   386         TInt AllListItemDataL( TBool& aFailedLocked, CApListItemList& aList );
       
   387 
       
   388 
       
   389         /**
       
   390         * Reads up one access point data
       
   391         * @param aUid The UID of the access point to read
       
   392         * @param aApItem A reference to a CApAccessPointItem to hold the
       
   393         * access point item readed from the database
       
   394         */
       
   395         void AccessPointDataL( TUint32 aUid, CApAccessPointItem& aApItem );
       
   396 
       
   397 
       
   398         /**
       
   399         * Updates one access point item in the database
       
   400         * @param aApItem A reference to a CApAccessPointItem holding the
       
   401         * access point item to be updated in the database
       
   402         */
       
   403         TBool UpdateAccessPointDataL( CApAccessPointItem& aApItem );
       
   404 
       
   405 
       
   406         /**
       
   407         * Returns a pointer to the CApDataHandler object
       
   408         */
       
   409         CApDataHandler* DataHandler();
       
   410 
       
   411 
       
   412         /**
       
   413         * Returns a pointer to the CApUtils object
       
   414         */
       
   415         CApUtils*   ApUtils();
       
   416 
       
   417 
       
   418         /**
       
   419         * Sets the filtering parameters for the model
       
   420         * @param aParams The filtering parameters to be used
       
   421         */
       
   422         void SetParams( TApSettingsParams aParams );
       
   423 
       
   424 
       
   425         /**
       
   426         * Gets the filtering parameters of the model
       
   427         * @return The used filtering parameters
       
   428         */
       
   429         TApSettingsParams Params();
       
   430 
       
   431 
       
   432         /**
       
   433         * Returns a pointer to the VPN engine object
       
   434         */
       
   435         CVpnApEngine* VpnEngine();
       
   436 
       
   437 
       
   438         /**
       
   439         * Launches help
       
   440         */
       
   441         void LaunchHelpL();
       
   442 
       
   443         /**
       
   444         * Deletes an access point specified by its UID
       
   445         * @param aUid The UID of the access point to delete.
       
   446         */
       
   447         void RemoveApL( TUint32 aUid );
       
   448 
       
   449 
       
   450         /**
       
   451         * Starts a transaction
       
   452         * @param aWrite A boolean indicating whether read or write lock is
       
   453         * needed.
       
   454         * @param aShowNote A boolean indicating whether to show
       
   455         * 'Cannot access database' note or not if DB is locked
       
   456         * @param aRetry A boolean indicating whether to retry or not
       
   457         * if DB is locked
       
   458         * @param aLFFSChecking Whether low disk space is checked or not
       
   459         * @return TTransactionResult containing whther it is our
       
   460         * own transaction or not or it has failed with KErrLocked
       
   461         */
       
   462         TTransactionResult StartTransactionLC
       
   463                                 (
       
   464                                 TBool aWrite,
       
   465                                 TBool aShowNote = ETrue,
       
   466                                 TBool aRetry = ETrue,
       
   467                                 TBool aLFFSChecking = ETrue
       
   468                                 );
       
   469 
       
   470         /**
       
   471         * Gets write lock on the database
       
   472         */
       
   473         void  GetWriteLockL();
       
   474 
       
   475 
       
   476         /**
       
   477         * Cleanup function for the transaction.
       
   478         * In case of leave, it will be called and
       
   479         * transaction will be rolled back
       
   480         */
       
   481         static void RollbackTransactionOnLeave( TAny* aDb );
       
   482 
       
   483 
       
   484         /**
       
   485         * Commits the transaction on the database
       
   486         */
       
   487         TInt CommitTransaction();
       
   488 
       
   489 
       
   490         /**
       
   491         * Check if Disk space goes below critical level if allocating
       
   492         * more disk space.
       
   493         * @param aShowErrorNote If ETrue, a warning note is shown.
       
   494         * @param aBytesToWrite Amount of disk space to be allocated (use an
       
   495         * estimate if exact amount is not known).
       
   496         * @return ETrue if allocation would go below critical level.
       
   497         */
       
   498         TBool FFSSpaceBelowCriticalLevelL( TBool aShowErrorNote,
       
   499                                            TInt aBytesToWrite /*=0*/ );
       
   500 
       
   501 
       
   502         /**
       
   503         * Gets the network list
       
   504         * @param aFailedLocked a boolean indicating if the operation
       
   505         * had failed because the DB was locked
       
   506         * @param aList a reference to the list of networks.
       
   507         * The passed list will be erased, elements destroyed,
       
   508         * new elements created in it. The list owns the created elements
       
   509         * and the caller must maintaine ownership of the list.
       
   510         * Leaves on error (Database and memory errors)
       
   511         * @return the number of items in the list.
       
   512         */
       
   513         TInt NetWorkListDataL( TBool& aFailedLocked, 
       
   514                                CApNetworkItemList& aList );
       
   515 
       
   516 
       
   517         /**
       
   518         * Returns the model's required IPv type (4, 6 or both, bitfield)
       
   519         */
       
   520         TInt RequestedIPvType();
       
   521 
       
   522 
       
   523         /**
       
   524         * Returns whether the Select menu item should be deleted or not
       
   525         * @param aResourceId The ID of the current menu resource
       
   526         * @param aCount The number of items in the list
       
   527         */
       
   528         TBool Need2DeleteSelect( TInt aResourceId, TInt aCount );
       
   529         
       
   530 
       
   531         /**
       
   532         * Returns whether the Open menu item should be deleted or not
       
   533         * @param aResourceId The ID of the current menu resource
       
   534         * @param aCount The number of items in the list
       
   535         * @param aUid The UID of the current item in the list
       
   536         * @param aNeedsNone Gives whether NONE is displayed as an item or not
       
   537         */
       
   538         TBool Need2DeleteOpen( TInt aResourceId, TInt aCount, 
       
   539                                TUint32 aUid, TBool aNeedsNone );
       
   540 
       
   541 
       
   542         /**
       
   543         * Returns whether the Delete menu item should be deleted or not
       
   544         * @param aResourceId The ID of the current menu resource
       
   545         * @param aCount The number of items in the list
       
   546         * @param aUid The UID of the current item in the list
       
   547         * @param aNeedsNone Gives whether NONE is displayed as an item or not
       
   548         */
       
   549         TBool Need2DeleteDeleteL( TInt aResourceId, TInt aCount, 
       
   550                                   TUint32 aUid, TBool aNeedsNone );
       
   551 
       
   552 
       
   553         /**
       
   554         * Returns tha the New/Use existing menu item should be deleted or not
       
   555         * @param aResourceId The ID of the current menu resource
       
   556         * @param aCount The number of items in the list
       
   557         */
       
   558         TBool Need2DeleteNewUseExisting(  TInt aResourceId, TInt aCount );
       
   559 
       
   560 
       
   561         /**
       
   562         * @param aResourceId The ID of the current menu resource
       
   563         * Returns whether the New menu item should be deleted or not
       
   564         */
       
   565         TBool Need2DeleteNewL(  TInt aResourceId );
       
   566 
       
   567 
       
   568         /**
       
   569         * Returns whether the Help menu item should be deleted or not
       
   570         */
       
   571         TBool Need2DeleteHelp(  TInt aResourceId );
       
   572 
       
   573 
       
   574     protected:
       
   575     
       
   576 
       
   577 
       
   578         
       
   579     public:
       
   580         /**
       
   581         * Returns the name of the first VPN accesspoint with which the access
       
   582         * point with the passed WAP UID is associated.
       
   583         * Name is placed on the CleanupStack if not null.
       
   584         * Should not be called upon VPN access points!!!
       
   585         * @param aUid The WAP UID of the normal access point
       
   586         * @return NULL or a pointer to the name of the associated access point.
       
   587         */
       
   588         HBufC* GetLinkedVpnAccessPointLC( TUint32 aUid );
       
   589 
       
   590         
       
   591         /*
       
   592         * Returns the current EikEnvironment
       
   593         */
       
   594         CEikonEnv* EikEnv();
       
   595 
       
   596 
       
   597 
       
   598         /**
       
   599         * Creates a new access point from the passed item.
       
   600         * @param aApItem A reference to a CApAccessPointItem holding the
       
   601         * access point item to be added to the database
       
   602         * @return The UID of the newly created and saved access point.
       
   603         */
       
   604         TUint32 CreateFromDataL( CApAccessPointItem& aApItem );
       
   605 
       
   606 
       
   607         /**
       
   608         * Handles WEP security settings
       
   609         * Leaves on errors
       
   610         * Return TInt giving exit or shutdown required if any, otherwise, 0
       
   611         */
       
   612         TInt ChangeWepSettingsL( CApAccessPointItem* aApItem );
       
   613 
       
   614 
       
   615         /**
       
   616         * Handles WPA security settings
       
   617         * Leaves on errors
       
   618         * Return TInt giving exit or shutdown required if any, otherwise, 0
       
   619         */
       
   620         TInt ChangeWpaSettingsL( CApAccessPointItem* aApItem );
       
   621 
       
   622 
       
   623         /**
       
   624         * Handles 802.1x security settings
       
   625         * Leaves on errors
       
   626         * Return TInt giving exit or shutdown required if any, otherwise, 0
       
   627         */
       
   628         TInt Change8021xSettingsL( CApAccessPointItem* aApItem );
       
   629 
       
   630         /**
       
   631         * Resets all WEP and WPA settings to NULL, thus forcing their 
       
   632         * re-load
       
   633         */
       
   634         void ClearWEPAndWPASettings();
       
   635 
       
   636         /*
       
   637         * Writes the WLAN settings part
       
   638         */
       
   639         void WriteWlanL( CApAccessPointItem& aApItem, TBool aIsNew );
       
   640 
       
   641 
       
   642         /*
       
   643         * Loads the WLAN settings part
       
   644         */
       
   645         void LoadWlanL( CApAccessPointItem& aApItem );
       
   646 
       
   647         /**
       
   648         * Returns whether the passed item has the security settings
       
   649         * filled correctly or not.
       
   650         */
       
   651         TBool HasWlanSecSettingsFilledL( CApAccessPointItem& aApItem );
       
   652         
       
   653         
       
   654         /**
       
   655         * Update the security mode to reflect current state.
       
   656         * Called after the user changed security settings
       
   657         * @param aApItem The access point item containing the current settings
       
   658         */
       
   659         void UpdateSecurityModeL( CApAccessPointItem& aApItem );
       
   660 
       
   661 
       
   662     private:    // data
       
   663         CActiveApDb*                iDb;
       
   664         CApDataHandler*             iApData;
       
   665         CApUtils*                   iUtils;
       
   666         CApSettingsDeleteOperation* iop;
       
   667         TApSettingsParams           iParams;
       
   668         TBool                       iDbOwned;
       
   669         TInt                        iReqIpvType;
       
   670         TVpnFilterType              iVpnFilterType;
       
   671         CVpnApEngine*               iVpnApEngine;
       
   672         TInt                        iVariant;       /// Local variant value
       
   673         TBool                       iIncludeEasyWlan;
       
   674 
       
   675         CEikonEnv*                  iEikEnv;        /// Eikon environment
       
   676 
       
   677     public:
       
   678         CWEPSecuritySettings*       iWepSecSettings;    ///< WEP settings data
       
   679         CWEPSecuritySettingsUi*     iWepSecSettingsUi;  ///< WEP settings UI
       
   680         TInt                        iWepUiExitReason;   ///< WEP UI exit reason
       
   681 
       
   682         CWPASecuritySettings*       iWpaSecSettings;    ///< WPA settings data
       
   683         CWPASecuritySettingsUi*     iWpaSecSettingsUi;  ///< WPA settings UI
       
   684         TInt                        iWpaUiExitReason;   ///< WPA UI exit reason
       
   685         TBool                       iNoEdit;
       
   686         
       
   687         /**
       
   688         * CFeatureManagerWrapper wraps FeatureManager to eliminate maintenance 
       
   689         * of existance of FeatureManager.
       
   690         * Owned.
       
   691         */
       
   692         CFeatureManagerWrapper*     iFeatureManagerWrapper;
       
   693         
       
   694         TBool                       iInRefresh;
       
   695         TBool                       iNeedRefresh;
       
   696         TBool                       iHelpSupported;
       
   697         TBool                       iProtectionSupported;
       
   698     };
       
   699 
       
   700 
       
   701 #endif
       
   702 
       
   703 // End of file