1 /* |
1 /* |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: WPS wizard private implementation |
14 * Description: WPS wizard private implementation |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef WPSWIZARD_P_H_ |
18 #ifndef WPSWIZARD_P_H_ |
19 #define WPSWIZARD_P_H_ |
19 #define WPSWIZARD_P_H_ |
20 |
20 |
21 // System includes |
21 // System includes |
22 #include <qobject.h> |
22 #include <QObject> |
23 #include <qhash.h> |
|
24 #include <qmap.h> |
|
25 #include <wlanmgmtcommon.h> |
23 #include <wlanmgmtcommon.h> |
26 #include <qtranslator.h> |
24 |
27 |
25 |
28 // User includes |
26 // User includes |
29 #include "wlanwizardhelpper.h" |
27 #include "wlanwizardhelper.h" |
30 #include "wpswizard.h" |
28 #include "wpswizard.h" |
31 |
29 |
32 // Forward declarations |
30 // Forward declarations |
33 class HbStackedWidget; |
31 class HbStackedWidget; |
|
32 class HbTranslator; |
34 class HbWidget; |
33 class HbWidget; |
35 class HbLabel; |
34 class HbLabel; |
36 class HbView; |
35 class HbView; |
37 class HbAction; |
36 class HbAction; |
38 class HbDocumentLoader; |
37 class HbDocumentLoader; |
39 class WlanWizardHelpper; |
38 class WlanWizardHelper; |
40 |
|
41 |
39 |
42 // External data types |
40 // External data types |
43 // Constants |
41 // Constants |
44 |
42 |
|
43 /*! |
|
44 * @addtogroup group_wps_wizard_plugin |
|
45 * @{ |
|
46 */ |
|
47 |
45 // Class declaration |
48 // Class declaration |
46 class WpsWizardPrivate : public QObject |
49 class WpsWizardPrivate : public QObject |
47 { |
50 { |
48 |
51 Q_OBJECT |
49 friend class WpsWizard; |
52 |
50 |
|
51 public: |
53 public: |
52 WpsWizardPrivate(WpsWizard* wizard, WlanWizardHelpper *wizardHelpper, int bearerType, int referenceId); |
54 WpsWizardPrivate(WpsWizard* wizard, WlanWizardHelper *wizardHelper); |
53 ~WpsWizardPrivate(); |
55 ~WpsWizardPrivate(); |
54 public: |
56 public: |
55 /*! |
57 |
56 * Based on the input either disables or enables next button |
|
57 */ |
|
58 void enableNextButton(bool enable); |
58 void enableNextButton(bool enable); |
59 /*! |
59 |
60 * Moves automatically to the next page |
|
61 */ |
|
62 void nextPage(); |
60 void nextPage(); |
63 /*! |
61 |
64 * Returns the SSID of the network |
|
65 */ |
|
66 QString getSsid(); |
62 QString getSsid(); |
67 /*! |
63 |
68 * Stores the settings received from the AP |
64 void storeSettings(int index); |
69 */ |
65 |
70 void storeSettings(int aIndex); |
66 HbMainWindow* mainWindow(); |
71 /*! |
67 |
72 * Stores multiple settings received from the AP |
|
73 */ |
|
74 void storeSettingsArray( |
68 void storeSettingsArray( |
75 QList<TWlanProtectedSetupCredentialAttribute>& aCredentials); |
69 QList<TWlanProtectedSetupCredentialAttribute>& credentials); |
76 QList<TWlanProtectedSetupCredentialAttribute> getSettingsArray(); |
70 QList<TWlanProtectedSetupCredentialAttribute> getSettingsArray(); |
77 /*! |
71 |
78 * Stores the generated PIN |
|
79 */ |
|
80 void setPin(int random); |
72 void setPin(int random); |
81 /*! |
73 |
82 * Returns the generated PIN |
|
83 */ |
|
84 int getPin(); |
74 int getPin(); |
85 |
75 |
86 private: |
76 int nextPageId(bool useWps); |
87 Q_DISABLE_COPY(WpsWizardPrivate) |
77 |
88 /*! |
78 void setConfiguration(WlanWizardHelper::ConfigurationId confId, |
89 * Returns id of next page. updates settings EapWizard. |
79 const QVariant &value); |
90 */ |
80 |
91 void createPages(); |
81 |
|
82 signals: |
|
83 |
|
84 public slots: |
|
85 |
|
86 protected: |
|
87 |
|
88 protected slots: |
92 |
89 |
93 private: |
90 private: |
|
91 |
|
92 void createPages(); |
|
93 |
|
94 int convertSecurityModes(TWlanIapSecurityMode securityMode); |
|
95 |
|
96 int convertNetworkModes(TWlanOperatingMode networkMode); |
|
97 |
|
98 int convertDefaultWepKey(TWlanDefaultWepKey defaultWepKey); |
|
99 |
|
100 Q_DISABLE_COPY(WpsWizardPrivate) |
|
101 |
|
102 private slots: |
|
103 |
|
104 private: |
|
105 |
|
106 //data |
|
107 |
|
108 //! Pointer to the WPS wizard |
94 WpsWizard *q_ptr; |
109 WpsWizard *q_ptr; |
95 WlanWizardHelpper *mWizardHelpper; |
110 //! pointer to the wizard helper object |
96 QTranslator *mTranslator; |
111 WlanWizardHelper *mWizardHelper; |
|
112 //! Translation object |
|
113 QScopedPointer<HbTranslator> mTranslator; |
|
114 //! Object containing WLAN credentials |
97 TWlanProtectedSetupCredentialAttribute mWpsAttr; |
115 TWlanProtectedSetupCredentialAttribute mWpsAttr; |
|
116 //! Array of objects containing WLAN credentials. |
98 QList<TWlanProtectedSetupCredentialAttribute> mIapList; |
117 QList<TWlanProtectedSetupCredentialAttribute> mIapList; |
99 int mBearerType; |
118 //! Random number generated for Number entry mode |
100 int mReferenceId; |
|
101 int mRandomNumber; |
119 int mRandomNumber; |
|
120 |
|
121 friend class WpsWizard; |
|
122 friend class TestWlanWizardContext; |
102 }; |
123 }; |
103 |
124 |
104 #endif /* WPSWIZARD_P_H_ */ |
125 #endif /* WPSWIZARD_P_H_ */ |