wlansecuritysettings/wlaneapsettingsui/EapTtls/ConfigUi/inc/EapTtlsUiView.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 TTLS UI setting dialog
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 22 %
       
    20 */
       
    21 
       
    22 #ifndef _EAPTTLSUIVIEW_H_
       
    23 #define _EAPTTLSUIVIEW_H_
       
    24 
       
    25 // INCLUDES
       
    26 #include <AknDialog.h>
       
    27 #include <EapTlsPeapUiConnection.h>
       
    28 #include <EapTlsPeapUiDataConnection.h>
       
    29 #include <EapTlsPeapUiTlsPeapData.h>
       
    30 #include <eikspane.h>
       
    31 #include <akntitle.h>
       
    32 #include <aknsettingitemlist.h>
       
    33 #include <aknlists.h>
       
    34 #include <aknselectionlist.h>
       
    35 #include <eiklbo.h>
       
    36 #include "EapTtlsUi.hrh"
       
    37 #include <EapTlsPeapUiCipherSuite.h>
       
    38 #include <EapTlsPeapUiEapType.h>
       
    39 #include <EapTlsPeapUiCertificate.h>
       
    40 #include <AbsEapTlsPeapUiCertificates.h>
       
    41 
       
    42 
       
    43 // FORWARD DECLARATIONS
       
    44 class CAknSettingStyleListBox;
       
    45 class CSettingsListBoxItemDrawer;
       
    46 class CEapTtlsSettingItemArray;
       
    47 
       
    48 
       
    49 // CLASS DECLARATION
       
    50 
       
    51 /**
       
    52 *  Settings dialog class definition
       
    53 */
       
    54 class CEapTtlsUiDialog : public CAknDialog, 
       
    55                          public MEapTlsPeapUiCertificates,
       
    56                          public MEikListBoxObserver
       
    57     {
       
    58     public:
       
    59         CEapTtlsUiDialog( CEapTlsPeapUiConnection* aConnection, 
       
    60                           TIndexType aIndexType, TInt aIndex, 
       
    61                           TInt& aButtonId );
       
    62 
       
    63         ~CEapTtlsUiDialog();
       
    64 
       
    65         /**
       
    66         * Create and launch dialog.
       
    67         * @param aResourceId The resource ID of the dialog to load.
       
    68         * @return The ID of the button that closed the dialog
       
    69         */
       
    70         TInt ConstructAndRunLD( TInt aResourceId );
       
    71         
       
    72         /**
       
    73         * Chain into key event handler.
       
    74         * @param aKeyEvent The event.
       
    75         * @param aType The type of key event.
       
    76         * @return Was the key consumed or not.
       
    77         */
       
    78         TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
       
    79                                           TEventCode aType);
       
    80 
       
    81     public: // From MEikListBoxObserver
       
    82         
       
    83         /**
       
    84         * Handles list box events.
       
    85         * @param aListBox   The originating list box.
       
    86         * @param aEventType A code for the event.
       
    87         */
       
    88         void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
       
    89     
       
    90     public: // From CEikDialog
       
    91         
       
    92         /**
       
    93         * @see CEikDialog
       
    94         */
       
    95         void HandleDialogPageEventL( TInt aEventID );
       
    96 
       
    97 
       
    98     protected:
       
    99         void PreLayoutDynInitL();
       
   100         void PostLayoutDynInitL();
       
   101         TBool OkToExitL( TInt aButtonId );
       
   102         void ProcessCommandL( TInt aCommand );
       
   103         void PageChangedL( TInt aPageId );
       
   104 
       
   105     private:
       
   106         void ChangeTitleL( TBool aIsStarted );
       
   107         void DrawSettingsListL();
       
   108         void ShowSettingPageL( TInt aCalledFromMenu ); 
       
   109         void MoveEapTypeL( TInt aOldPos, TInt aNewPos );
       
   110         void DrawEapListL( TInt aWantedIndex );
       
   111         TInt ShowRadioButtonSettingPageL( TInt aTitle, 
       
   112                                           CDesCArrayFlat* aValues, 
       
   113                                           TInt aCurrentItem );
       
   114         void DrawCipherSuitesL();
       
   115         void CompleteReadCertificates( const TInt aResult);
       
   116         void CompleteUiConstructionL();
       
   117         TInt CheckActiveUserCertificate();
       
   118         TInt CheckActiveCaCertificate();
       
   119         void UserCertificateHouseKeeping( TInt aSelected );
       
   120         void CaCertificateHouseKeeping( TInt aSelected );
       
   121         void CreateEapTypeDataBaseL();    
       
   122         void SetCipherIconsL();
       
   123         void SetEapIconsL();
       
   124         TUint GetEnabledEapTypeCount();
       
   125         TBool IsPlainMschapv2Enabled();
       
   126         TBool IsPapEnabled();
       
   127         void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   128 
       
   129         void GetFullCertLabelL( const SCertEntry& aCert, TDes& aFullLabel );
       
   130 
       
   131         /**
       
   132         * Initialize menu pane.
       
   133         * @param aResourceId Menu pane resource id.
       
   134         * @param CEikMenuPane Menu pane.
       
   135         */
       
   136         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   137         
       
   138         void ConfigureL( TBool aQuick );
       
   139 
       
   140 
       
   141     private:
       
   142         CEapTlsPeapUiConnection* iConnection;
       
   143         CEapTlsPeapUiDataConnection* iDataConnection;
       
   144         CEapTlsPeapUiCipherSuites* iCipherSuites;
       
   145         CEapTlsPeapUiCertificates* iCertificates;
       
   146         
       
   147         CEapTlsPeapUiTlsPeapData* iUiData;
       
   148         CArrayFixFlat<TEapTlsPeapUiCipherSuite>* iUiCipherSuites;
       
   149         CArrayFixFlat<TEapTlsPeapUiCertificate>* iUiUserCertificates;
       
   150         CArrayFixFlat<TEapTlsPeapUiCertificate>* iUiCACertificates;
       
   151         CArrayFixFlat<TEapTlsPeapUiEapType>* iUiEapTypes;
       
   152                                 
       
   153         CAknSingleNumberStyleListBox* iUserCertificateListBox;
       
   154         CAknSingleNumberStyleListBox* iCaCertificateListBox;
       
   155         CAknSingleNumberStyleListBox* iCipherSuiteListBox;
       
   156         CAknSingleNumberStyleListBox* iEapTypesListBox;
       
   157         CEapTtlsSettingItemArray* iSettingArray;
       
   158         CAknSettingStyleListBox* iSettingListBox;
       
   159         CDesCArray* iEapTypeViewArray;
       
   160         CDesCArray* iCipherSuitesViewArray;
       
   161         CEapTlsPeapUiEapTypes* iEapTypes;
       
   162         TIndexType iIndexType; 
       
   163         TInt iIndex;
       
   164         HBufC* iPreviousText;
       
   165         TInt* iButtonId;
       
   166         
       
   167         // Tells the status of UI construction. TRUE if UI construction is completed.
       
   168 		TBool iIsUIConstructionCompleted;
       
   169 		
       
   170 		// For exiting dialog
       
   171 		TBool iExiting;
       
   172     };
       
   173 
       
   174 
       
   175 #endif // _EAPTTLSUIVIEW_H_
       
   176 
       
   177 //  End of File