1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: WPS wizard private implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef WPSWIZARD_P_H_ |
|
19 #define WPSWIZARD_P_H_ |
|
20 |
|
21 // System includes |
|
22 #include <QObject> |
|
23 #include <wlanmgmtcommon.h> |
|
24 |
|
25 |
|
26 // User includes |
|
27 #include "wlanwizardhelper.h" |
|
28 #include "wpswizard.h" |
|
29 |
|
30 // Forward declarations |
|
31 class HbStackedWidget; |
|
32 class HbTranslator; |
|
33 class HbWidget; |
|
34 class HbLabel; |
|
35 class HbView; |
|
36 class HbAction; |
|
37 class HbDocumentLoader; |
|
38 class WlanWizardHelper; |
|
39 |
|
40 // External data types |
|
41 // Constants |
|
42 |
|
43 /*! |
|
44 * @addtogroup group_wps_wizard_plugin |
|
45 * @{ |
|
46 */ |
|
47 |
|
48 // Class declaration |
|
49 class WpsWizardPrivate : public QObject |
|
50 { |
|
51 Q_OBJECT |
|
52 |
|
53 public: |
|
54 WpsWizardPrivate(WpsWizard* wizard, WlanWizardHelper *wizardHelper); |
|
55 ~WpsWizardPrivate(); |
|
56 public: |
|
57 |
|
58 void enableNextButton(bool enable); |
|
59 |
|
60 void nextPage(); |
|
61 |
|
62 QString getSsid(); |
|
63 |
|
64 void storeSettings(int index); |
|
65 |
|
66 HbMainWindow* mainWindow(); |
|
67 |
|
68 void storeSettingsArray( |
|
69 QList<TWlanProtectedSetupCredentialAttribute>& credentials); |
|
70 QList<TWlanProtectedSetupCredentialAttribute> getSettingsArray(); |
|
71 |
|
72 void setPin(int random); |
|
73 |
|
74 int getPin(); |
|
75 |
|
76 int nextPageId(bool useWps); |
|
77 |
|
78 void setConfiguration(WlanWizardHelper::ConfigurationId confId, |
|
79 const QVariant &value); |
|
80 |
|
81 |
|
82 signals: |
|
83 |
|
84 public slots: |
|
85 |
|
86 protected: |
|
87 |
|
88 protected slots: |
|
89 |
|
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 |
|
109 WpsWizard *q_ptr; |
|
110 //! pointer to the wizard helper object |
|
111 WlanWizardHelper *mWizardHelper; |
|
112 //! Translation object |
|
113 QScopedPointer<HbTranslator> mTranslator; |
|
114 //! Object containing WLAN credentials |
|
115 TWlanProtectedSetupCredentialAttribute mWpsAttr; |
|
116 //! Array of objects containing WLAN credentials. |
|
117 QList<TWlanProtectedSetupCredentialAttribute> mIapList; |
|
118 //! Random number generated for Number entry mode |
|
119 int mRandomNumber; |
|
120 |
|
121 friend class WpsWizard; |
|
122 friend class TestWlanWizardContext; |
|
123 }; |
|
124 |
|
125 #endif /* WPSWIZARD_P_H_ */ |
|