diff -r 30a5f517c615 -r b3d8f88532b7 wlanutilities/wpswizard/inc/wpswizard_p.h --- a/wlanutilities/wpswizard/inc/wpswizard_p.h Fri Jun 11 16:27:29 2010 +0100 +++ b/wlanutilities/wpswizard/inc/wpswizard_p.h Thu Jul 22 16:44:32 2010 +0100 @@ -1,104 +1,125 @@ /* -* 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: WPS wizard private implementation -* -*/ + * 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: WPS wizard private implementation + * + */ #ifndef WPSWIZARD_P_H_ #define WPSWIZARD_P_H_ // System includes -#include -#include -#include +#include #include -#include + // User includes -#include "wlanwizardhelpper.h" +#include "wlanwizardhelper.h" #include "wpswizard.h" // Forward declarations class HbStackedWidget; +class HbTranslator; class HbWidget; class HbLabel; class HbView; class HbAction; class HbDocumentLoader; -class WlanWizardHelpper; - +class WlanWizardHelper; // External data types // Constants +/*! + * @addtogroup group_wps_wizard_plugin + * @{ + */ + // Class declaration class WpsWizardPrivate : public QObject { - - friend class WpsWizard; - + Q_OBJECT + public: - WpsWizardPrivate(WpsWizard* wizard, WlanWizardHelpper *wizardHelpper, int bearerType, int referenceId); + WpsWizardPrivate(WpsWizard* wizard, WlanWizardHelper *wizardHelper); ~WpsWizardPrivate(); public: - /*! - * Based on the input either disables or enables next button - */ + void enableNextButton(bool enable); - /*! - * Moves automatically to the next page - */ + void nextPage(); - /*! - * Returns the SSID of the network - */ + QString getSsid(); - /*! - * Stores the settings received from the AP - */ - void storeSettings(int aIndex); - /*! - * Stores multiple settings received from the AP - */ + + void storeSettings(int index); + + HbMainWindow* mainWindow(); + void storeSettingsArray( - QList& aCredentials); + QList& credentials); QList getSettingsArray(); - /*! - * Stores the generated PIN - */ + void setPin(int random); - /*! - * Returns the generated PIN - */ + int getPin(); -private: - Q_DISABLE_COPY(WpsWizardPrivate) - /*! - * Returns id of next page. updates settings EapWizard. - */ - void createPages(); + int nextPageId(bool useWps); + + void setConfiguration(WlanWizardHelper::ConfigurationId confId, + const QVariant &value); + + +signals: + +public slots: + +protected: + +protected slots: private: + + void createPages(); + + int convertSecurityModes(TWlanIapSecurityMode securityMode); + + int convertNetworkModes(TWlanOperatingMode networkMode); + + int convertDefaultWepKey(TWlanDefaultWepKey defaultWepKey); + + Q_DISABLE_COPY(WpsWizardPrivate) + +private slots: + +private: + + //data + + //! Pointer to the WPS wizard WpsWizard *q_ptr; - WlanWizardHelpper *mWizardHelpper; - QTranslator *mTranslator; + //! pointer to the wizard helper object + WlanWizardHelper *mWizardHelper; + //! Translation object + QScopedPointer mTranslator; + //! Object containing WLAN credentials TWlanProtectedSetupCredentialAttribute mWpsAttr; + //! Array of objects containing WLAN credentials. QList mIapList; - int mBearerType; - int mReferenceId; + //! Random number generated for Number entry mode int mRandomNumber; + + friend class WpsWizard; + friend class TestWlanWizardContext; }; #endif /* WPSWIZARD_P_H_ */