cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmpwlansettingsdlg.h
changeset 20 9c97ad6591ae
parent 18 fcbbe021d614
child 21 b8e8e15e80f2
child 23 7ec726f93df1
child 28 860702281757
equal deleted inserted replaced
18:fcbbe021d614 20:9c97ad6591ae
     1 /*
       
     2 * Copyright (c) 2006 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:  Declares dialog for a wlan cm plugin view/edit
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CMPLUGINWLAN_SETTINGS_DLG_H
       
    19 #define CMPLUGINWLAN_SETTINGS_DLG_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <mcmdexec.h>
       
    23 #include <cmpbasesettingsdlg.h>
       
    24 #include "cmcommsdatnotifier.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CCmPluginBaseEng;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 /**
       
    31 * CmPluginWlanSettingsDlg dialog class
       
    32 *
       
    33 */
       
    34 NONSHARABLE_CLASS( CmPluginWlanSettingsDlg ) : public CmPluginBaseSettingsDlg
       
    35                                              , public MCmCommsDatWatcher
       
    36                                              , public CCmParentViewNotifier
       
    37     {
       
    38     public: // Constructors and destructor
       
    39 
       
    40         /**
       
    41         * Two-phase construction
       
    42         *
       
    43         * @since S60 3.2
       
    44         * @param aCmPluginBaseEng  The connection method object to use
       
    45         */
       
    46         static CmPluginWlanSettingsDlg* NewL( 
       
    47                                         CCmPluginBaseEng& aCmPluginBaseEng );
       
    48 
       
    49         /**
       
    50         * Destructor.
       
    51         */
       
    52         ~CmPluginWlanSettingsDlg();
       
    53     
       
    54     public: // from base class
       
    55     
       
    56         /**
       
    57         * From CmPluginBaseSettingsDlg
       
    58         * Create and launch dialog
       
    59         *
       
    60         * @since S60 3.2
       
    61         * @return The code returned by the dialog's ExecuteLD
       
    62         */
       
    63         TInt ConstructAndRunLD( );
       
    64     
       
    65         /**
       
    66         * From CmPluginBaseSettingsDlg
       
    67         * Updates bearer specific listbox contents
       
    68         *
       
    69         * @since S60 3.2
       
    70         * @param aItemArray item array containing the setting texts
       
    71         */
       
    72         void UpdateListBoxContentBearerSpecificL( CDesCArray& itemArray );
       
    73                 
       
    74     public: // from class MCmCommsDatWatcher
       
    75         
       
    76         /**
       
    77          * Watch changes in CommsDat
       
    78          */
       
    79         void CommsDatChangesL();
       
    80         
       
    81     public: // from class CCmParentViewNotifier
       
    82         
       
    83         void NotifyParentView( TInt aValue );
       
    84         
       
    85     private:
       
    86     
       
    87         /**
       
    88         * C++ constructor
       
    89         *
       
    90         * @since S60 3.2
       
    91         */        
       
    92         CmPluginWlanSettingsDlg( CCmPluginBaseEng& aCmPluginBaseEng );
       
    93 
       
    94 
       
    95     protected:
       
    96         /** From CAknDialog */
       
    97         TBool OkToExitL( TInt aButtonId );
       
    98         
       
    99     private: // from base class
       
   100     
       
   101         /**
       
   102         * From MEikCommandObserver
       
   103         * see base class for description
       
   104         *
       
   105         * @since S60 3.2
       
   106         * @param aCommandId
       
   107         */
       
   108         void ProcessCommandL( TInt aCommandId ) ;    
       
   109 
       
   110         // From CmPluginBaseSettingsDlg 
       
   111         
       
   112         /**
       
   113         * From CmPluginBaseSettingsDlg 
       
   114         * Determines which type of setting page should be shown
       
   115         *
       
   116         * @param aAttribute The setting to be changed by the setting page
       
   117         * @param aCommandId The command the attribute is changed with (ok/change key pressed)
       
   118         * @return the soft key selection
       
   119         */  
       
   120         TBool ShowPopupSettingPageL ( TUint32 aAttribute, TInt aCommandId  );
       
   121 
       
   122         /**
       
   123         * From CmPluginBaseSettingsDlg 
       
   124         * launches the advances settings dialog
       
   125         *
       
   126         * @since S60 3.2
       
   127         */
       
   128         virtual void RunAdvancedSettingsL();
       
   129 
       
   130         /**
       
   131         * From CmPluginBaseSettingsDlg
       
   132         * Get help contest of the plugin
       
   133         *
       
   134         * @since S60 5.0
       
   135         */
       
   136 				virtual void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   137         
       
   138     private:  // New functions
       
   139         
       
   140         /**
       
   141         * Shows the bool setting page for a certain setting or
       
   142         * simply changes the setting if ok key was pressed
       
   143         *
       
   144         * @since S60 3.2
       
   145         * @param aAttribute The setting to be changed by the setting page
       
   146         * @param aCommandId Command id, to make difference between ok and change commands
       
   147         */  
       
   148         void ChangeBoolSettingL( TUint32 aAttribute, TInt aCommandId );
       
   149                 
       
   150         /**
       
   151         * displays security setting page
       
   152         *
       
   153         * @since S60 3.2        
       
   154         */  
       
   155         void ShowSecurityModeRBPageL();    
       
   156         
       
   157         /**
       
   158         * Shows network mode setting page
       
   159         *
       
   160         * @since S60 3.2
       
   161         */  
       
   162         void ShowNetworkModeRBPageL();
       
   163         
       
   164         /**
       
   165         * Show the setting page for the WLAN Network Name settings
       
   166         *
       
   167         * @since S60 3.2
       
   168         */
       
   169         void ShowWlanNWNamePageL();
       
   170         
       
   171         /**
       
   172         * Exits plugin settings if compulsory values are filled
       
   173         *
       
   174         * @since S60 3.2
       
   175         * @param aConfirm ask user confirmation or not
       
   176         */  
       
   177         void ExitSettingsL( TBool aConfirm );
       
   178         
       
   179         void HandleCommsDatChangeL();
       
   180     private:
       
   181         TBool iSecDialExit;
       
   182         
       
   183         TInt iNotifyFromAdv;
       
   184         
       
   185     };
       
   186 
       
   187 
       
   188 /** WLAN Network name setting items - zero indexed for the ui */    
       
   189 enum TWlanNwName
       
   190     {
       
   191     EWlanNwNameUserDefined = 0, // radio button page commands
       
   192     EWlanNwNameScan
       
   193     };
       
   194 
       
   195 #endif // CMPLUGINWLAN_SETTINGS_DLG_H
       
   196