securitysettings/cpwlansecurityuiplugins/cpwpa2ui/inc/cpwpa2ui.h
changeset 22 093cf0757204
child 26 9abfd4f00d37
equal deleted inserted replaced
20:8b3129ac4c0f 22:093cf0757204
       
     1 /*
       
     2 * Copyright (c) 2010 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: 
       
    15 *    Control Panel QT UI for WPA2 only configuration
       
    16 *
       
    17 */
       
    18 
       
    19 /*
       
    20 * %version: 10 %
       
    21 */
       
    22 
       
    23 
       
    24 #ifndef CPWPA2UI_H
       
    25 #define CPWPA2UI_H
       
    26 
       
    27 // System includes
       
    28 #include <cpsettingformitemdata.h>
       
    29 #include <HbMessageBox>
       
    30 //#include <HbTranslator>
       
    31 //#include <QSharedPointer>
       
    32 #include <QTranslator>
       
    33 
       
    34 
       
    35 // User includes
       
    36 #include "cpwlansecurityplugininterface.h"
       
    37 
       
    38 // Forward declarations
       
    39 class EapPluginInformation;
       
    40 class PluginInformation;
       
    41 class CpBaseSettingView;
       
    42 class EapQtConfigInterface;
       
    43 class EapEntyItemData;
       
    44 class CpWpaCmnUi;
       
    45 class CmConnectionMethodShim;
       
    46 
       
    47 /*!
       
    48  * @addtogroup group_wlan_security_ui_plugin_wpa2_only
       
    49  * @{
       
    50  */
       
    51 
       
    52 /*! 
       
    53  * Implements WPA2 only plugin for Wlan security control panel  
       
    54  */
       
    55 // Class declaration
       
    56 class CpWpa2Ui : public QObject, public CpWlanSecurityPluginInterface
       
    57 {
       
    58     Q_OBJECT
       
    59     Q_INTERFACES(CpWlanSecurityPluginInterface)
       
    60 
       
    61 public:
       
    62     CpWpa2Ui();
       
    63     ~CpWpa2Ui();
       
    64 
       
    65 public: // from CpWlanSecurityPluginInterface 
       
    66           
       
    67         CMManagerShim::WlanSecMode securityMode() const;
       
    68         
       
    69         QString securityModeTextId() const;
       
    70        
       
    71        void setReference(CmConnectionMethodShim *cmCm, uint id);
       
    72               
       
    73        int orderNumber() const;
       
    74               
       
    75        CpSettingFormItemData* uiInstance(
       
    76                CpItemDataHelper &dataHelper);
       
    77     
       
    78 private:
       
    79        
       
    80        bool tryUpdate();
       
    81 
       
    82        void handleUpdateError();
       
    83 
       
    84        void showMessageBox( HbMessageBox::MessageBoxType type,
       
    85            const QString &text);
       
    86 
       
    87        void updateWpaSettings();
       
    88   
       
    89 private slots:
       
    90  
       
    91     //void currentEapPlugin(int currentPlugin);    
       
    92     //void wpaTypeChanged(int pskEnable);
       
    93     void pskKeyChanged(QString& key);
       
    94     
       
    95 
       
    96 private:
       
    97     
       
    98     Q_DISABLE_COPY(CpWpa2Ui)
       
    99         
       
   100     //!WPA security group item
       
   101     CpSettingFormItemData* mUi;   
       
   102 
       
   103     //! Connection method Id
       
   104     int mCmId;
       
   105    
       
   106     //!Translator for all the localisation Text Id's
       
   107     //QSharedPointer<HbTranslator> mTranslator;
       
   108     QTranslator* mTranslator;
       
   109     
       
   110     //! Connection Settings Shim connection method pointer    
       
   111     CmConnectionMethodShim *mCmCM;    
       
   112     
       
   113     //! Eap Plugin config interface
       
   114 	EapQtConfigInterface *mEapQtConfigInterface;
       
   115 	
       
   116 	//!WPA ui Implementer Interface
       
   117     QScopedPointer <CpWpaCmnUi> mWpa2Ui;
       
   118     
       
   119     //! Message box for info notes
       
   120     QSharedPointer<HbMessageBox> mMessageBox;
       
   121 
       
   122  };
       
   123 
       
   124 /*! @} */
       
   125  
       
   126 #endif