wlansecuritysettings/wlaneapsettingsui/EapPluginConfig/inc/EAPPluginConfiguration.h
branchRCL_3
changeset 46 c74b3d9f6b9e
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
       
     1 /*
       
     2 * Copyright (c) 2001-2009 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 the License "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: Header file of EAP Plugin Configuration
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 16 %
       
    20 */
       
    21 
       
    22 #ifndef __EAPPLUGINCONFIGURATION_H__
       
    23 #define __EAPPLUGINCONFIGURATION_H__
       
    24 
       
    25 
       
    26 // INCLUDES
       
    27 #include <e32base.h>
       
    28 
       
    29 #include "EAPPluginConfigurationIf.h"
       
    30 #include "EAPPluginConfigUid.h"
       
    31 #include "EAPPluginList.h"
       
    32 #include "EapSettings.h"
       
    33 
       
    34 
       
    35 // CLASS DECLARATION
       
    36 /**
       
    37 * CEAPPluginConfiguration class
       
    38 */
       
    39 class CEAPPluginConfiguration : public CEAPPluginConfigurationIf
       
    40     {
       
    41     public:
       
    42         static CEAPPluginConfiguration* NewL();
       
    43         static CEAPPluginConfiguration* NewLC();
       
    44     
       
    45         ~CEAPPluginConfiguration();
       
    46     
       
    47         /**
       
    48         * Load the EAP Plugin configuration
       
    49         * @param    aWPAEAPPlugin   The list of EAPs in use as it was read from
       
    50         *                           WlanEapList column of WLANServiceTable. In 
       
    51         *                           output it contains the new list as it has 
       
    52         *                           to be written in the same column of 
       
    53         *                           database.
       
    54         * @param    aConnectionName The name of the connection.
       
    55         * @return   The ID of the button pressed to close configuration: 
       
    56         *           typically EAknSoftkeyBack for back, EAknCmdExit for a 
       
    57         *           request of exit or EEikCmdExit for a request of shutdown
       
    58         */
       
    59         TInt EAPPluginConfigurationL( TDes& aWPAEAPPlugin, 
       
    60                                       const TUint32 aIapID, 
       
    61                                       const TDes& aConnectionName );    
       
    62     
       
    63         /**
       
    64         * Load the EAP Plugin configuration (with expanded EAP types)
       
    65         * @param    aWPAEnabledEAPPlugin   The list of enabled EAPs in use as 
       
    66         *                           it was read from WlanEnabledEapList column 
       
    67         *                           of WLANServiceTable. In output it contains 
       
    68         *                           the new list as it has to be written in the 
       
    69         *                           same column of database.
       
    70         * @param    aWPADisabledEAPPlugin   The list of disabled EAPs in use as
       
    71         *                           it was read from WlanDisabledEapList column 
       
    72         *                           of WLANServiceTable. In output it contains 
       
    73         *                           the new list as it has to be written in the 
       
    74         *                           same column of database.
       
    75         * @param    aConnectionName The name of the connection.
       
    76         * @return   The ID of the button pressed to close configuration: 
       
    77         *           typically EAknSoftkeyBack for back, EAknCmdExit for a 
       
    78         *           request of exit or EEikCmdExit for a request of shutdown
       
    79         */
       
    80         TInt EAPPluginConfigurationL( TDes8& aWPAEnabledEAPPlugin, 
       
    81                                       TDes8& aWPADisabledEAPPlugin, 
       
    82                                       const TUint32 aIapID, 
       
    83                                       const TDes& aConnectionName );
       
    84     
       
    85         /**
       
    86         * Shows the EAP type info.
       
    87         */
       
    88         void ShowEAPTypeInfo();    
       
    89 
       
    90         /**
       
    91         * Deletes all EAP types' settings for
       
    92         * the given IAP.
       
    93         */
       
    94         void DeleteSettingsL( const TUint32 aIapID );
       
    95     
       
    96         /**
       
    97         * Changes the index of the EAP settings for all EAP types    
       
    98         */
       
    99         void ChangeIapIDL( const TUint32 aOldIapID, const TUint32 aNewIapID );
       
   100     
       
   101         /**
       
   102         * Copies the EAP type settings to another ID
       
   103         */
       
   104         void CopySettingsL( const TUint32 aSourceIapID, 
       
   105                             const TUint32 aDestinationIapID );
       
   106 
       
   107     private:
       
   108         void ConstructL();
       
   109         CEAPPluginConfiguration();
       
   110         void LoadPluginInfoL( TDes& aWPAEAPPlugin, REAPPluginList& aPlugins );
       
   111         void LoadPluginInfoL( TDes8& aWPAEnabledEAPPlugin, 
       
   112                               TDes8& aWPADisabledEAPPlugin, 
       
   113                               REAPPluginList& aPlugins );
       
   114         
       
   115         void SavePluginInfoL( TDes& aWPAEAPPlugin, REAPPluginList& aPlugins );
       
   116         void SavePluginInfoL( TDes8& aWPAEnabledEAPPlugin, 
       
   117                               TDes8& aWPADisabledEAPPlugin, 
       
   118                               REAPPluginList& aPlugins );
       
   119                               
       
   120 
       
   121         TInt MoveEAPType( EAPSettings::TEapType aEapType, TInt aPos );
       
   122 
       
   123         TInt MoveEAPType( const TDesC8& aEapType, TInt aPos );
       
   124 		
       
   125     private: // Data
       
   126             // Resource file offset.
       
   127         TInt        iResOffset; 
       
   128         TUint32        iIapId;
       
   129         RImplInfoPtrArray iEapArray;
       
   130     };
       
   131     
       
   132     
       
   133 #endif      // __EAPPLUGINCONFIGURATION_H__
       
   134 
       
   135 // End of File