securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtconfig.cpp
changeset 34 ad1f037f1ac2
parent 27 9660a5eb236f
--- a/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtconfig.cpp	Thu Jun 10 16:12:28 2010 +0300
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtconfig.cpp	Thu Jun 24 11:23:08 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,15 +17,117 @@
  */
 
 /*
- * %version: 9 %
+ * %version: 13 %
  */
 
-#include "eapqtconfig.h"
+// System includes
+#include <eapqtconfig.h>
+
+// User includes
 #include "eapqtconfig_p.h"
 
-//----------------------------------------------------------------------------
-//              EapQtConfig                
-//----------------------------------------------------------------------------
+/*!
+ *  \class EapQtConfig
+ *  \brief Public implementation of EAP method QT configuration data
+ *         structure for EAP QT configuration interface
+ *
+ * Following lists the applicable settings per EAP method:
+ * 
+ * EAP-SIM, EAP-AKA
+ * - UsernameAutomatic
+ * - Username
+ * - RealmAutomatic
+ * - Realm
+ * - UsePseudonyms
+ * - SessionValidityTime
+ * - OuterType
+ * 
+ * EAP-GTC, LEAP, EAP-MSCHAPv2, Plain-MSCHAPv2, PAP
+ * - Username
+ * - PasswordPrompt
+ * - Password
+ * - PasswordStored
+ * - PasswordClear
+ * - SessionValidityTime
+ * - OuterType
+ * 
+ * EAP-TLS
+ * - UsernameAutomatic
+ * - Username
+ * - RealmAutomatic
+ * - Realm
+ * - VerifyServerRealm
+ * - ClientAuthenticationRequired
+ * - SessionValidityTime
+ * - CipherSuites
+ * - AuthorityCertificateAutomatic
+ * - AuthorityCertificate
+ * - UserCertificate
+ * - OuterType
+ * - UseIdentityPrivacy
+ *
+ * EAP-TTLS
+ * - UsernameAutomatic
+ * - Username
+ * - RealmAutomatic
+ * - Realm
+ * - VerifyServerRealm
+ * - ClientAuthenticationRequired
+ * - SessionValidityTime
+ * - CipherSuites
+ * - AuthorityCertificateAutomatic
+ * - AuthorityCertificate
+ * - UserCertificate
+ * - InnerType
+ * - UseIdentityPrivacy
+ * 
+ * EAP-FAST
+ * - UsernameAutomatic
+ * - Username
+ * - RealmAutomatic
+ * - Realm
+ * - VerifyServerRealm
+ * - ClientAuthenticationRequired
+ * - SessionValidityTime
+ * - CipherSuites
+ * - AuthorityCertificateAutomatic
+ * - AuthorityCertificate
+ * - UserCertificate
+ * - InnerType
+ * - ProvisioningModeAuthenticated
+ * - ProvisioningModeUnauthenticated
+ * - PACGroupReference
+ * - WarnADHPNoPAC
+ * - WarnADHPNoMatchingPAC
+ * - WarnNotDefaultServer
+ * - UseIdentityPrivacy
+ * 
+ * PEAP
+ * - UsernameAutomatic
+ * - Username
+ * - RealmAutomatic
+ * - Realm
+ * - VerifyServerRealm
+ * - ClientAuthenticationRequired
+ * - SessionValidityTime
+ * - CipherSuites
+ * - PeapVersion0Allowed
+ * - PeapVersion1Allowed
+ * - PeapVersion2Allowed
+ * - AuthorityCertificateAutomatic
+ * - AuthorityCertificate
+ * - UserCertificate
+ * - InnerType
+ * - UseIdentityPrivacy
+ */
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
 
 EapQtConfig::EapQtConfig() :
     d_ptr(new EapQtConfigPrivate)
@@ -37,38 +139,28 @@
     // scoped pointer deleted automatically
 }
 
-QVariant EapQtConfig::value(SettingsId id)
+QVariant EapQtConfig::value(const SettingsId id) const
 {
     // check for valid range, otherwise memory is consumed for no reason
-    if(id >= SettingsIdLast) {
+    if (id >= SettingsIdLast) {
         qDebug("ERROR: EapQtConfig::value - invalid id!");
         return QVariant::Invalid;
     }
     return d_ptr->mSettings[id];
 }
 
-void EapQtConfig::setValue(SettingsId id, QVariant newValue)
+void EapQtConfig::setValue(const SettingsId id, const QVariant &newValue) const
 {
     // check for valid range, otherwise memory is consumed for no reason
-    if(id < SettingsIdLast) {
+    if (id < SettingsIdLast) {
         d_ptr->mSettings[id] = newValue;
-    } else {
+    }
+    else {
         qDebug("ERROR: EapQtConfig::setValue - invalid id!");
     }
-    return;
 }
 
-void EapQtConfig::clear() {
+void EapQtConfig::clear() const
+{
     d_ptr->mSettings.clear();
-    return;
 }
-
-QList<EapQtConfig::SettingsId> EapQtConfig::validate(
-    QList<EapQtConfig::SettingsId> ids)
-{
-    // not supported
-    Q_UNUSED(ids);
-    return QList<EapQtConfig::SettingsId>();
-}
-
-