--- a/accesssec_plat/eap_qt_configuration_api/inc/eapqtvalidator.h Thu Jun 10 16:12:28 2010 +0300
+++ b/accesssec_plat/eap_qt_configuration_api/inc/eapqtvalidator.h 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,46 +17,53 @@
*/
/*
- * %version: 2 %
+ * %version: 6 %
*/
#ifndef EAPQTVALIDATOR_H
#define EAPQTVALIDATOR_H
-#include <QVariant>
-#include <eapqtconfigdefs.h>
+// System includes
+#include <qglobal.h>
-/*!
- * @addtogroup group_eap_config_api
- * @{
- */
+// User includes
+// Forward declarations
+class QVariant;
class HbLineEdit;
-/*!
+// External data types
+
+// Constants
+
+// Class declaration
+
+/*
* Eap Qt Validator interface. This interface provides a method to configure
* the editor to use required constraints, hints, editor classes and so one
* depending on the EAP type and the configuration identifier.
* See updateEditor() method for further details.
*
- * Another important method of this class is the validate() method. With
- * that method you can check that the content and format is valid for
- * given configuration compination.
+ * validate() method checks that the content and format are valid for
+ * given configuration parameter.
*
- * An instance of validator can be created with
+ * An instance of a validator is created with
* EapQtConfigInterface::validatorEap() method.
*/
-class EAP_QT_CONFIG_INTERFACE_EXPORT EapQtValidator
+class EapQtValidator
{
+
public:
- /*!
- * Validation status.
+ // Data types
+
+ /*
+ * Validation status. Can be extended.
*/
enum Status {
/// Ok
- StatusOk,
+ StatusOk = 0,
/// Content is invalid
StatusInvalid,
/// The length is not valid
@@ -68,50 +75,32 @@
/// Input is too long
StatusTooLong,
};
-
-public:
EapQtValidator() {};
virtual ~EapQtValidator() {};
/*!
- * Processes validation to the given input \a value.
+ * Validates the given input \a value.
*
* @param value Value to be validated
*
* @return Status code.
- *
- * - EapQtConfig::Username: All values
- * - EapQtConfig::Password: All values
- * - EapQtConfig::Realm: All values
- * - EapQtConfig::ServerName: All values
- * - EapQtConfig::PacStorePassword: All values
- * - EapQtConfig::PacStorePasswordConfirmation: StatusOk and StatusInvalid
*/
- virtual Status validate(QVariant value) = 0;
+ virtual Status validate(const QVariant &value) = 0;
/*!
- * Sets required configurations to the lineedit such as:
- * - Constraints
- * - HbInputFilter
- * - HbValidator
- * - inputMethodsHints
- * - maximum length
- * - predictive input mode
- * - number/text mode
+ * Sets required configurations to the line edit.
*
- * Configurations depends on the Expanded EAP type and the configuration id
- * which were used to instantiate the validator.
+ * Configurations depend on given EAP type and the configuration
+ * identifire which was used to instantiate the validator.
*
* @param edit LineEdit to be updated.
*/
- virtual void updateEditor(HbLineEdit* edit) = 0;
+ virtual void updateEditor(HbLineEdit* const edit) = 0;
private:
Q_DISABLE_COPY(EapQtValidator)
};
-/*! @} */
-
#endif