wlanutilities/eapwizard/inc/eapwizard_p.h
branchRCL_3
changeset 24 63be7eb3fc78
equal deleted inserted replaced
23:b852595f5cbe 24:63be7eb3fc78
       
     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 "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  *   EAP Wizard: Private implementation.
       
    16  *
       
    17  */
       
    18 
       
    19 #ifndef EAPWIZARD_P_H
       
    20 #define EAPWIZARD_P_H
       
    21 
       
    22 // System includes
       
    23 #include <QObject>
       
    24 #include <QHash>
       
    25 
       
    26 // User includes
       
    27 #include "wlanwizardplugin.h"
       
    28 
       
    29 // Forward declarations
       
    30 class HbTranslator;
       
    31 class HbStackedWidget;
       
    32 class HbWidget;
       
    33 class HbLabel;
       
    34 class HbView;
       
    35 class HbAction;
       
    36 class HbDocumentLoader;
       
    37 class WlanWizardHelper;
       
    38 class EapWizardPage;
       
    39 class EapQtConfigInterface;
       
    40 class EapQtPluginHandle;
       
    41 class EapQtConfig;
       
    42 class EapWizard;
       
    43 class TestWlanWizardContext;
       
    44 // External data types
       
    45 
       
    46 // Constants
       
    47 
       
    48 /*!
       
    49    @addtogroup group_eap_wizard
       
    50    @{
       
    51  */
       
    52 
       
    53 // Class declaration
       
    54 
       
    55 class EapWizardPrivate : public QObject
       
    56 {
       
    57     Q_OBJECT
       
    58 public:
       
    59     /*!
       
    60        Enumerator for internal EAP configuration cache. This cache is used to
       
    61        store user input and selections. see configurations() and 
       
    62        setConfigurations() for howto access the configurations.
       
    63        
       
    64        Below is descripted which configuration can be used with a specific EAP
       
    65        type.
       
    66        EAP-TTLS & EAP-PEAP & EAP-TLS
       
    67        - CertificateCa
       
    68        - TunnelUsernameAutomatic
       
    69        - TunnelUsername
       
    70        - TunnelRealmAutomatic
       
    71        - TunnelRealm
       
    72        
       
    73        EAP-TTLS & EAP-PEAP & EAP-FAST
       
    74        - InnerType
       
    75        
       
    76        EAP-TLS
       
    77        - CertificateUser
       
    78        
       
    79        EAP-FAST
       
    80        - PacStorePassword
       
    81        - PacStoreState
       
    82        
       
    83        LEAP, PAP, EAP-GTC, EAP/Plain-MSChapv2
       
    84        - Username
       
    85        - Password
       
    86        
       
    87        PAP, EAP-GTC, EAP/Plain-MSChapv2
       
    88        - OuterType
       
    89        
       
    90        Remember to update trace.properties upon changes.
       
    91      */
       
    92     enum ConfigurationId
       
    93     {
       
    94         //! EapQtPluginHandle::Plugin (int), EAP outer type
       
    95         OuterType = 0,
       
    96         //! EapQtPluginHandle::Plugin (int), EAP inner type
       
    97         InnerType = 1,
       
    98         //! CertificateInformation, NULL: automatic, CA Certificate
       
    99         CertificateCa = 2,
       
   100         //! CertificateInformation, User Certificate
       
   101         CertificateUser = 3,
       
   102         //! bool, automatic username for EAP identify (outer type)
       
   103         TunnelUsernameAutomatic = 4,
       
   104         //! QString, username for EAP identify (outer type)
       
   105         TunnelUsername = 5,
       
   106         //! bool, automatic realm for EAP identify (outer type)
       
   107         TunnelRealmAutomatic = 6,
       
   108         //! QString, realm for EAP identify (outer type)
       
   109         TunnelRealm = 7,
       
   110         //! QString, username for inner methods or for LEAP
       
   111         Username = 8,
       
   112         //! QString, password for inner methods or for LEAP
       
   113         Password = 9,
       
   114         //! QString, PAC store password
       
   115         PacStorePassword = 10,
       
   116         //! EapQtPacStoreConfig::PacStoreState (int), PAC store state
       
   117         PacStoreState = 11,
       
   118     };
       
   119 
       
   120 public:
       
   121     explicit EapWizardPrivate(WlanWizardHelper *wizardHelper);
       
   122     ~EapWizardPrivate();
       
   123    
       
   124 public: // From WlanWizardPlugin
       
   125     bool summary(WlanWizardPlugin::Summary sum, QString &item, QString &value);
       
   126     bool storeSettings();
       
   127     QString errorString(int errorCode);
       
   128     
       
   129 public:
       
   130     QVariant configurations(ConfigurationId confId) const;
       
   131     void setConfigurations(ConfigurationId confId, const QVariant &value);
       
   132     EapQtConfigInterface* eapConfigurationInterface() const;
       
   133     QString eapTypeToString(int id) const;
       
   134     WlanWizardHelper *wizardHelper() const;
       
   135 
       
   136 signals:
       
   137         
       
   138 public slots:
       
   139 
       
   140 protected:
       
   141 
       
   142 protected slots:
       
   143 
       
   144 private:
       
   145     Q_DISABLE_COPY(EapWizardPrivate)
       
   146     void createPages();
       
   147     bool hasInnerMethod() const;
       
   148     void handleTlsMethodsSettings(
       
   149         EapQtConfig &eapConf, 
       
   150         EapQtPluginHandle &outerType);
       
   151     
       
   152     bool handleEapFastSettings(EapQtConfig &eapConf);
       
   153     
       
   154     void handleEapAkaSimSettings(EapQtConfig &eapConf);
       
   155     
       
   156     void handleLeapSettings(EapQtConfig &eapConf);
       
   157     
       
   158     bool storeOuterTypeSettings(EapQtPluginHandle &outerType);
       
   159     
       
   160     bool storeInnerTypeSettings(EapQtPluginHandle &outerType);
       
   161     
       
   162 private slots:
       
   163     
       
   164 private: // data
       
   165     // NOT owned pointers
       
   166     //! Wizard framework services (WLAN Wizard Plugin API)
       
   167     WlanWizardHelper *mWizardHelper;
       
   168     
       
   169     // Owned pointers
       
   170     //! Translator
       
   171     QScopedPointer<HbTranslator> mTranslator;
       
   172     //! EAP configuration and services (EAP Qt Configuration Interface API)
       
   173     QScopedPointer<EapQtConfigInterface> mEapConfIf;
       
   174     //! Internal container for EAP specific settings
       
   175     QHash<ConfigurationId, QVariant> mConfigurations;
       
   176     
       
   177     // Friend classes
       
   178     friend class TestWlanWizardContext;
       
   179 };
       
   180 
       
   181 /*! @} */
       
   182 
       
   183 #endif