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