accesssec_plat/eap_qt_configuration_api/inc/eapqtconfig.h
branchRCL_3
changeset 46 c74b3d9f6b9e
parent 45 bad0cc58d154
child 55 9c2aa05919d9
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
     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 method QT configuration
       
    16  *
       
    17  */
       
    18 
       
    19 /*
       
    20  * %version: 8 %
       
    21  */
       
    22 
       
    23 #ifndef EAPQTCONFIG_H
       
    24 #define EAPQTCONFIG_H
       
    25 
       
    26 // System includes
       
    27 #include <QList>
       
    28 #include <QVariant>
       
    29 #include <eapqtconfigexport.h>
       
    30 
       
    31 // User includes
       
    32 
       
    33 // Forward declarations
       
    34 class EapQtConfigPrivate;
       
    35 
       
    36 // External data types
       
    37 
       
    38 // Constants
       
    39 
       
    40 // Class declaration
       
    41 class EAP_QT_CONFIG_INTERFACE_EXPORT EapQtConfig
       
    42 {
       
    43 
       
    44 public:
       
    45 
       
    46     // Data types
       
    47 
       
    48     enum CipherSuite
       
    49     {
       
    50         /* from RFC4346, listing only suites supported by EAP server */
       
    51         TLS_NULL_WITH_NULL_NULL           = 0x0000,
       
    52         TLS_RSA_WITH_RC4_128_MD5          = 0x0004,
       
    53         TLS_RSA_WITH_RC4_128_SHA          = 0x0005,
       
    54         TLS_RSA_WITH_3DES_EDE_CBC_SHA     = 0x000a,
       
    55         TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 0x0013,
       
    56         TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x0016,
       
    57         TLS_RSA_WITH_AES_128_CBC_SHA      = 0x002f,
       
    58         TLS_DHE_DSS_WITH_AES_128_CBC_SHA  = 0x0032,
       
    59         TLS_DHE_RSA_WITH_AES_128_CBC_SHA  = 0x0033,
       
    60         TLS_DH_anon_WITH_AES_128_CBC_SHA  = 0x0034,
       
    61     };
       
    62 
       
    63     enum SettingsId
       
    64     {
       
    65         // see also EapSettings.h
       
    66 
       
    67         /*! bool */
       
    68         UsernameAutomatic = 0,
       
    69         /*! QString */
       
    70         Username,
       
    71         /*! bool */
       
    72         PasswordPrompt,
       
    73         /*! write-only: QString */
       
    74         Password,
       
    75         /*! bool
       
    76          * in read: defines if password already exists in settings database
       
    77          * in write: when true, defines that password is not included in the provided
       
    78          *      configuration since it already exists in settings database, i.e. earlier
       
    79          *      set password remains unchanged */
       
    80         PasswordStored,
       
    81         /*! write-only: bool
       
    82          * true: clears the password from database
       
    83          * false: does nothing
       
    84          */
       
    85         PasswordClear,
       
    86         /*! bool */
       
    87         RealmAutomatic,
       
    88         /*! QString */
       
    89         Realm,
       
    90         /*! bool */
       
    91         UsePseudonyms,
       
    92         /*! bool */
       
    93         VerifyServerRealm,
       
    94         /*! bool */
       
    95         ClientAuthenticationRequired,
       
    96         /*! uint */
       
    97         SessionValidityTime,
       
    98         /*! QList<uint>, values from EapQtConfig::CipherSuite */
       
    99         CipherSuites,
       
   100         /*! bool */
       
   101         PeapVersion0Allowed,
       
   102         /*! bool */
       
   103         PeapVersion1Allowed,
       
   104         /*! bool */
       
   105         PeapVersion2Allowed,
       
   106         /*! bool */
       
   107         AuthorityCertificateAutomatic,
       
   108         /*! QList< QVariant(EapQtCertificateInfo) > */
       
   109         AuthorityCertificate,
       
   110         /*! QList< QVariant(EapQtCertificateInfo) > */
       
   111         UserCertificate,
       
   112         /*! QList< QVariant(EapQtPluginHandle) > */
       
   113         InnerType,
       
   114         /*!  EapQtPluginHandle */
       
   115         OuterType,
       
   116         /*! bool */
       
   117         ProvisioningModeAuthenticated,
       
   118         /*! bool */
       
   119         ProvisioningModeUnauthenticated,
       
   120         /*! QString */
       
   121         PACGroupReference,
       
   122         /*! bool */
       
   123         WarnADHPNoPAC,
       
   124         /*! bool */
       
   125         WarnADHPNoMatchingPAC,
       
   126         /*! bool */
       
   127         WarnNotDefaultServer,
       
   128         /*! bool */
       
   129         UseIdentityPrivacy,
       
   130         /* marker for the last entry */
       
   131         SettingsIdLast
       
   132     };
       
   133 
       
   134     // default constructor
       
   135     EapQtConfig();
       
   136     // destructor
       
   137     ~EapQtConfig();
       
   138 
       
   139     // gets the configuration field referred to by an id from SettingsId
       
   140     // returns QVariant::Invalid is the field has not been set
       
   141     QVariant value(const SettingsId id) const;
       
   142 
       
   143     // sets the configuration field referred to by an id from SettingsId
       
   144     // does nothing if newValue >= SettingsIdLast
       
   145     void setValue(const SettingsId id, const QVariant &newValue) const;
       
   146 
       
   147     // resets the object i.e. any successive call to
       
   148     // value() returns QVariant::Invalid
       
   149     void clear() const;
       
   150 
       
   151 private:
       
   152 
       
   153     Q_DISABLE_COPY(EapQtConfig)
       
   154 
       
   155 private: // data
       
   156 
       
   157     QScopedPointer<EapQtConfigPrivate> d_ptr;
       
   158 
       
   159 };
       
   160 
       
   161 #endif // EAPQTCONFIG_H