--- a/accesssec_plat/eap_qt_configuration_api/inc/eapqtconfig.h Wed Jun 23 18:14:55 2010 +0300
+++ b/accesssec_plat/eap_qt_configuration_api/inc/eapqtconfig.h Tue Jul 06 14:18:35 2010 +0300
@@ -2,7 +2,7 @@
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
+ * under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
@@ -17,28 +17,55 @@
*/
/*
- * %version: 3 %
+ * %version: 8 %
*/
#ifndef EAPQTCONFIG_H
#define EAPQTCONFIG_H
+// System includes
#include <QList>
#include <QVariant>
-#include <eapqtconfigdefs.h>
+#include <eapqtconfigexport.h>
+// User includes
+
+// Forward declarations
class EapQtConfigPrivate;
+// External data types
+
+// Constants
+
+// Class declaration
class EAP_QT_CONFIG_INTERFACE_EXPORT EapQtConfig
{
+
public:
+ // Data types
+
+ enum CipherSuite
+ {
+ /* from RFC4346, listing only suites supported by EAP server */
+ TLS_NULL_WITH_NULL_NULL = 0x0000,
+ TLS_RSA_WITH_RC4_128_MD5 = 0x0004,
+ TLS_RSA_WITH_RC4_128_SHA = 0x0005,
+ TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x000a,
+ TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 0x0013,
+ TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x0016,
+ TLS_RSA_WITH_AES_128_CBC_SHA = 0x002f,
+ TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 0x0032,
+ TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x0033,
+ TLS_DH_anon_WITH_AES_128_CBC_SHA = 0x0034,
+ };
+
enum SettingsId
{
// see also EapSettings.h
/*! bool */
- UsernameAutomatic,
+ UsernameAutomatic = 0,
/*! QString */
Username,
/*! bool */
@@ -68,20 +95,7 @@
ClientAuthenticationRequired,
/*! uint */
SessionValidityTime,
- /*!
- * QList<uint> contains RFC2246 numbers for activated ciphersuites
- *
- * TLS_NULL_WITH_NULL_NULL = 0x0000
- * TLS_RSA_WITH_RC4_128_MD5 = 0x0004
- * TLS_RSA_WITH_RC4_128_SHA = 0x0005
- * TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x000a
- * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x0016
- * TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 0x0013
- * TLS_RSA_WITH_AES_128_CBC_SHA = 0x002F
- * TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 0x0032
- * TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x0033
- * TLS_DH_anon_WITH_AES_128_CBC_SHA = 0x0034
- */
+ /*! QList<uint>, values from EapQtConfig::CipherSuite */
CipherSuites,
/*! bool */
PeapVersion0Allowed,
@@ -89,6 +103,8 @@
PeapVersion1Allowed,
/*! bool */
PeapVersion2Allowed,
+ /*! bool */
+ AuthorityCertificateAutomatic,
/*! QList< QVariant(EapQtCertificateInfo) > */
AuthorityCertificate,
/*! QList< QVariant(EapQtCertificateInfo) > */
@@ -111,25 +127,35 @@
WarnNotDefaultServer,
/*! bool */
UseIdentityPrivacy,
- /*! bool */
- AuthorityCertificateAutomatic,
- /*! marker for the last entry */
+ /* marker for the last entry */
SettingsIdLast
};
-public:
+ // default constructor
EapQtConfig();
+ // destructor
~EapQtConfig();
- QVariant value(SettingsId id);
- void setValue(SettingsId id, QVariant newValue);
- QList<EapQtConfig::SettingsId> validate(
- QList<EapQtConfig::SettingsId> ids);
- void clear();
+ // gets the configuration field referred to by an id from SettingsId
+ // returns QVariant::Invalid is the field has not been set
+ QVariant value(const SettingsId id) const;
+
+ // sets the configuration field referred to by an id from SettingsId
+ // does nothing if newValue >= SettingsIdLast
+ void setValue(const SettingsId id, const QVariant &newValue) const;
+
+ // resets the object i.e. any successive call to
+ // value() returns QVariant::Invalid
+ void clear() const;
private:
+
Q_DISABLE_COPY(EapQtConfig)
+
+private: // data
+
QScopedPointer<EapQtConfigPrivate> d_ptr;
+
};
-#endif
+#endif // EAPQTCONFIG_H