diff -r bad0cc58d154 -r c74b3d9f6b9e securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtconfiginterface_p.h --- a/securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtconfiginterface_p.h Tue Aug 31 15:16:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,205 +0,0 @@ -/* - * 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 "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * EAP method configuration QT interface private implementation - * - */ - -/* - * %version: 36 % - */ - -#ifndef EAPQTCONFIGINTERFACEPRIVATE_H -#define EAPQTCONFIGINTERFACEPRIVATE_H - -// System includes -#include -#include -#include -#include -#include -#include -#include - -// User includes - -// Forward declarations -class HbTranslator; -class CEapType; -class CEapGeneralSettings; -class CpEapPluginInterface; -class EapQtConfigInterface; - -// External data types - -// Constants - -// Class declaration -class EapQtConfigInterfacePrivate -{ - -public: - - // Data types - - // maximum lenghts (number of characters) for UTF-16 strings copied to EAP settings - static const unsigned int StringMaxLength = KGeneralStringMaxLength; - static const unsigned int CertLabelMaxLength = KMaxCertLabelLength; - static const unsigned int CertThumbprintMaxLength = KThumbprintMaxLength; - static const unsigned int CertSubjectKeyIdLength = KSHA1HashLengthBytes; - - // see eapqtinterface.h for documentation - - EapQtConfigInterfacePrivate(); - - EapQtConfigInterfacePrivate(const EapQtConfigInterface::EapBearerType bearerType, - const int iapId); - - ~EapQtConfigInterfacePrivate(); - - QList supportedOuterTypes(); - QList supportedInnerTypes(const EapQtPluginHandle &outerType); - - bool isSupportedOuterType(const EapQtPluginHandle &handle); - bool isSupportedInnerType(const EapQtPluginHandle &outerHandle, - const EapQtPluginHandle &innerHandle); - - QList certificateAuthorityCertificates(); - QList userCertificates(); - bool updateCertificates(); - - bool setConfigurationReference(const int iapId); - - QList selectedOuterTypes(); - bool setSelectedOuterTypes(const QList &outerHandles); - - bool readConfiguration(const EapQtPluginHandle &outerHandle, - const EapQtPluginHandle &pluginHandle, EapQtConfig &config); - bool saveConfiguration(const EapQtPluginHandle &pluginHandle, const EapQtConfig &config); - - bool deleteConfiguration(); - - EapQtValidator *validatorEap(const EapQtExpandedEapType &type, const EapQtConfig::SettingsId id); - - CpBaseSettingView *uiInstance(const EapQtPluginHandle &outerHandle, - const EapQtPluginHandle &pluginHandle); - - bool readPacStoreConfiguration(EapQtPacStoreConfig &config); - bool savePacStoreConfiguration(const EapQtPacStoreConfig &config); - EapQtValidator *validatorPacStore(const EapQtPacStoreConfig::PacStoreSettings id); - -private: - - // see cpp for documentation - - void loadPlugins(); - - bool fetchCertificates(QList* const caInfos, - QList* const clientInfos); - - void copyCertificateInfo(const RPointerArray* const certEntries, QList< - EapQtCertificateInfo>* const certInfos); - - void appendCertificateInfo(bool isCaCertificate, const EapQtCertificateInfo &certInfo, - RPointerArray* const certList); - - void appendEapTypes(const RArray* const eapTypes, - QList* const eapList); - - void getEapTypeIf(const EapQtPluginHandle &pluginHandle); - - void copyFromEapSettings(EAPSettings &eapSettings, EapQtConfig &config); - - void copyToEapSettings(const EapQtConfig &config, EAPSettings &eapSettings); - - TBool convertToTbool(bool value); - bool convertToBool(TBool value); - - bool isUiSupported(const QByteArray &eapType, int &pluginIndex) const; - - void checkInstanceThrowing() const; - - bool setEapDbIndex(const int iapId); - bool setEapWlanDbIndex(const int iapId); - - void shutdown(); - - EapQtConfigInterface::EapBearerType getEapBearer(); - - // comparison mehtod for qSort - // must be static for using via function pointers - static bool pluginLessThan(const EapQtPluginInfo &plugin1, const EapQtPluginInfo &plugin2); - - Q_DISABLE_COPY(EapQtConfigInterfacePrivate) - -private: // data - - /// QT members - - // is current instance for validators only - const bool mValidatorInstance; - - // list of available EAP UIs - QList mPlugins; - - // list of EAPs supported by UI - QList mPluginInfos; - - // list of supported outer EAP methods, - // combination of UI and EAP server support - QList mSupportedOuterTypes; - - // list of supported inner EAP methods queried last time, - // combination of UI and EAP server support - QList mSupportedInnerTypes; - - // currenly loaded outer EAP type - EapQtPluginHandle mLastOuterHandle; - - // translator object for EAP UIs - QScopedPointer mTranslator; - - // read CA and user certificates - QList mCaCertificates; - QList mUserCertificates; - - /// Symbian members - - // pointers to EAP server interfaces - QScopedPointer mEapGsIf; - QScopedPointer mEapTypeIf; - - // current IAP ID - int mIapId; - - // current bearer - TIndexType mEapBearer; - - // current EAP database reference to current IAP - TInt mEapDbIndex; - - // if mEapDbIndex is valid (i.e. current IAP is not - // EapQtConfigInterface::IapIdUndefined) - bool mEapDbIndexValid; - - // current loaded EAP server type interface - TEapExpandedType mCurrentServerEapType; - - // EAP server lists of its supported outer EAP methods - RArray mOuterEapsOn; - RArray mOuterEapsOff; - -}; - -#endif // EAPQTCONFIGINTERFACEPRIVATE_H