wlanutilities/wlanwizard/t_wlanwizard/stubs/eapqtconfig.h
changeset 53 bdc64aa9b954
parent 49 fb81b597edf1
child 60 822a45792fdd
equal deleted inserted replaced
49:fb81b597edf1 53:bdc64aa9b954
     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  *   DUMMY: Stub for eapwizard testing
       
    16  *
       
    17  */
       
    18 
       
    19 #ifndef EAPQTCONFIG_H
       
    20 #define EAPQTCONFIG_H
       
    21 
       
    22 #include <QList>
       
    23 #include <QVariant>
       
    24 #include <eapqtconfigdefs.h>
       
    25 
       
    26 class EapQtConfigPrivate;
       
    27 
       
    28 class EapQtConfig
       
    29 {
       
    30 public:
       
    31     enum SettingsId
       
    32     {
       
    33         // see also EapSettings.h
       
    34 
       
    35         /*! bool */
       
    36         UsernameAutomatic,
       
    37         /*! QString */
       
    38         Username,
       
    39         /*! bool */
       
    40         PasswordPrompt,
       
    41         /*! write-only: QString */
       
    42         Password,
       
    43         /*! bool
       
    44          * in read: defines if password already exists in settings database
       
    45          * in write: when true, defines that password is not included in the provided
       
    46          *      configuration since it already exists in settings database, i.e. earlier
       
    47          *      set password remains unchanged */
       
    48         PasswordStored,
       
    49         /*! write-only: bool
       
    50          * true: clears the password from database
       
    51          * false: does nothing
       
    52          */
       
    53         PasswordClear,
       
    54         /*! bool */
       
    55         RealmAutomatic,
       
    56         /*! QString */
       
    57         Realm,
       
    58         /*! bool */
       
    59         UsePseudonyms,
       
    60         /*! bool */
       
    61         VerifyServerRealm,
       
    62         /*! bool */
       
    63         ClientAuthenticationRequired,
       
    64         /*! uint */
       
    65         SessionValidityTime,
       
    66         /*! 
       
    67          * QList<uint> contains RFC numbers for activated ciphersuites
       
    68          *
       
    69          * Refer to RFC2246 chapter A.5 for the values.
       
    70          *
       
    71          * Supported CipherSuites by EAP Server default implementation: 
       
    72          * TLS_NULL_WITH_NULL_NULL = (0x0000), 
       
    73          * - No key exchange, no encryption and no authentication.
       
    74          * TLS_RSA_WITH_RC4_128_MD5 = (0x0004),
       
    75          * - RSA key exchange, RC4_128 encryption and MD5 authentication.
       
    76          *   NOTE this is included only because PEAP requires this cipher 
       
    77          *   suite as a mandatory. Think carefully whether this meets your 
       
    78          *   security requirements.
       
    79          * TLS_RSA_WITH_RC4_128_SHA = (0x0005), 
       
    80          * - RSA key exchange, RC4_128 encryption and SHA1 authentication.
       
    81          *   NOTE this is included only because PEAP requires this cipher 
       
    82          *   suite as a mandatory. Think carefully whether this meets your 
       
    83          *   security
       
    84          *   requirements.
       
    85          * TLS_RSA_WITH_3DES_EDE_CBC_SHA = (0x000a)
       
    86          * - RSA key exchange, 3DES-EDE-CBC encryption and SHA1 
       
    87          *   authentication.
       
    88          * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = (0x0016)
       
    89          * - Diffie-Helmann RSA key exchange, 3DES-EDE-CBC encryption and SHA1
       
    90          *   authentication.
       
    91          * TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = (0x0013)
       
    92          * - Diffie-Helmann DSS key exchange, 3DES-EDE-CBC encryption and SHA1
       
    93          *   authentication.
       
    94          * TLS_RSA_WITH_AES_128_CBC_SHA      = 0x002F
       
    95          * - RSA key exchange, AES-128 encryption and SHA1 authentication.
       
    96          * TLS_DHE_DSS_WITH_AES_128_CBC_SHA  = 0x0032
       
    97          * - Diffie-Helmann DSS key exchange, AES-128-CBC encryption and SHA1
       
    98          *   authentication.
       
    99          * TLS_DHE_RSA_WITH_AES_128_CBC_SHA  = 0x0033
       
   100          * - Diffie-Helmann RSA key exchange, AES-128-CBC encryption and SHA1
       
   101          *   authentication.
       
   102          * TLS_DH_anon_WITH_AES_128_CBC_SHA  = 0x0034,
       
   103          * - Supported when EAP-FAST is supported 
       
   104          * - Diffie-Helmann anonymous key exchange, AES-128-CBC encryption and 
       
   105          *   SHA1 authentication.
       
   106          */
       
   107         CipherSuites,
       
   108         /*! bool */
       
   109         PeapVersion0Allowed,
       
   110         /*! bool */
       
   111         PeapVersion1Allowed,
       
   112         /*! bool */
       
   113         PeapVersion2Allowed,
       
   114         /*! QList< QVariant(EapQtCertificateInfo) > */
       
   115         AuthorityCertificate,
       
   116         /*! QList< QVariant(EapQtCertificateInfo) > */
       
   117         UserCertificate,
       
   118         /*! QList< QVariant(EapQtPluginHandle) > */
       
   119         InnerType,
       
   120         /*!  EapQtPluginHandle */
       
   121         OuterType,
       
   122         /*! bool */
       
   123         ProvisioningModeAuthenticated,
       
   124         /*! bool */
       
   125         ProvisioningModeUnauthenticated,
       
   126         /*! QString */
       
   127         PACGroupReference,
       
   128         /*! bool */
       
   129         WarnADHPNoPAC,
       
   130         /*! bool */
       
   131         WarnADHPNoMatchingPAC,
       
   132         /*! bool */
       
   133         WarnNotDefaultServer,
       
   134         /*! bool */
       
   135         UseIdentityPrivacy,
       
   136         /*! bool */
       
   137         AuthorityCertificateAutomatic,
       
   138         /*! marker for the last entry */
       
   139         SettingsIdLast
       
   140     };
       
   141 
       
   142 public:
       
   143     EapQtConfig();
       
   144     EapQtConfig(const EapQtConfig& other);
       
   145     ~EapQtConfig();
       
   146 
       
   147     QVariant value(SettingsId id);
       
   148     void setValue(SettingsId id, QVariant newValue);
       
   149     QList<EapQtConfig::SettingsId> validate(
       
   150         QList<EapQtConfig::SettingsId> ids);
       
   151     void clear();
       
   152     
       
   153 public: // FOR TESTING PURPOSE
       
   154     bool operator==(const EapQtConfig & rhs ) const;
       
   155 
       
   156 private:
       
   157     QHash<int, QVariant> mSettings;
       
   158 };
       
   159 
       
   160 #endif