31
|
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:
|
|
15 |
* WLAN Wizard Plugin API: Interface for plugins to wizard services.
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef WLANWIZARDHELPER_H
|
|
19 |
#define WLANWIZARDHELPER_H
|
|
20 |
|
|
21 |
// System includes
|
|
22 |
#include <cmmanagerdefines_shim.h>
|
|
23 |
|
|
24 |
// User includes
|
|
25 |
|
|
26 |
// Forward declarations
|
|
27 |
class HbMainWindow;
|
|
28 |
class HbWidget;
|
|
29 |
class WlanWizardPage;
|
|
30 |
|
|
31 |
// External data types
|
|
32 |
|
|
33 |
// Constants
|
|
34 |
|
|
35 |
/*!
|
|
36 |
* @addtogroup group_wlan_wizard_api_internal
|
|
37 |
* @{
|
|
38 |
*/
|
|
39 |
|
|
40 |
/*!
|
|
41 |
This class specifies the interface class that wizard plugins (EAP and WPS)
|
|
42 |
can use to access wizard framework services.
|
|
43 |
*/
|
|
44 |
class WlanWizardHelper
|
|
45 |
{
|
|
46 |
public:
|
|
47 |
/*!
|
|
48 |
WLAN Wizard configuration, which are accessible by wlan wizard and it's
|
|
49 |
plugins. WLAN wizard pages uses this information to store configurations
|
|
50 |
from ui and state events.
|
|
51 |
|
|
52 |
Please remember to update trace.properties upon changes.
|
|
53 |
*/
|
|
54 |
enum ConfigurationId {
|
60
|
55 |
//! QString: WLAN Network name
|
|
56 |
ConfName = 0,
|
|
57 |
//! QByteArray: WLAN Network SSID
|
|
58 |
ConfSsid = 1,
|
31
|
59 |
//! int: CMManagerShim::WlanConnectionMode
|
60
|
60 |
ConfNetworkMode = 2,
|
31
|
61 |
//! int: CMManagerShim::WlanSecMode
|
60
|
62 |
ConfSecurityMode = 3,
|
31
|
63 |
//! QString: WPA PSK
|
60
|
64 |
ConfKeyWpa = 4,
|
31
|
65 |
//! QString: WEP Key 1
|
60
|
66 |
ConfKeyWep1 = 5,
|
31
|
67 |
//! QString: WEP Key 2
|
60
|
68 |
ConfKeyWep2 = 6,
|
31
|
69 |
//! QString: WEP Key 3
|
60
|
70 |
ConfKeyWep3 = 7,
|
31
|
71 |
//! QString: WEP Key 4
|
60
|
72 |
ConfKeyWep4 = 8,
|
31
|
73 |
//! int: CMManagerShim:::WlanWepKeyIndex, Default WEP Key index
|
60
|
74 |
ConfKeyWepDefault = 9,
|
31
|
75 |
//! bool: Internet Connectivity Test result, true passed.
|
60
|
76 |
ConfIctStatus = 10,
|
31
|
77 |
//! int, -1 (WlanQtUtils::IapIdNone): not defined: IAP ID
|
60
|
78 |
ConfIapId = 11,
|
31
|
79 |
//! bool: true if connection was established successfully
|
60
|
80 |
ConfConnected = 12,
|
53
|
81 |
//! bool: WLAN AP explicit scanning need
|
60
|
82 |
ConfWlanScanSSID = 13,
|
31
|
83 |
//! bool: if true use psk, if false use EAP
|
60
|
84 |
ConfUsePsk = 14,
|
31
|
85 |
//! bool: if true processing connection page is required.
|
60
|
86 |
ConfProcessSettings = 15,
|
31
|
87 |
//! QString: Localized error string for WlanWizardPageGenericError
|
60
|
88 |
ConfGenericErrorString = 16,
|
39
|
89 |
//! WlanWizardScanList: Available network options
|
60
|
90 |
ConfAvailableNetworkOptions = 17,
|
39
|
91 |
//! bool: Wps supported
|
60
|
92 |
ConfWpsSupported = 18,
|
39
|
93 |
//! int: Identifies how many steps should be gone backwards from
|
|
94 |
// GenericErrorPage
|
60
|
95 |
ConfGenericErrorPageStepsBackwards = 19,
|
31
|
96 |
};
|
|
97 |
|
|
98 |
public:
|
|
99 |
|
|
100 |
/*!
|
|
101 |
Reader method for wlan configurations.
|
|
102 |
|
|
103 |
See ConfigurationId for further details about the data types in QVariant.
|
|
104 |
|
|
105 |
@param [in] confId Defines what configuration is read.
|
|
106 |
|
|
107 |
@return configuration value.
|
|
108 |
*/
|
|
109 |
virtual QVariant configuration(ConfigurationId confId) const = 0;
|
|
110 |
|
|
111 |
/*!
|
|
112 |
Sets wlan configuration value for given configuration identifier.
|
|
113 |
See ConfigurationId for further details about the data types in QVariant.
|
|
114 |
|
|
115 |
@param [in] confId Configuration Identifier do to be set
|
|
116 |
@param [in] value Value for configuration.
|
|
117 |
*/
|
|
118 |
virtual void setConfiguration(
|
|
119 |
ConfigurationId confId,
|
|
120 |
const QVariant &value) = 0;
|
|
121 |
|
|
122 |
/*!
|
39
|
123 |
* Clears wlan configuration at the given configuration identifier and sets
|
|
124 |
* the configuration value to type Invalid.
|
|
125 |
*
|
|
126 |
* @param [in] confId Configuration Identifier do to be cleared
|
|
127 |
*/
|
|
128 |
virtual void clearConfiguration(ConfigurationId confId) = 0;
|
|
129 |
|
|
130 |
/*!
|
|
131 |
* Tests whether a configuration has been set.
|
|
132 |
*
|
|
133 |
* @param [in] confId Configuration Identifier do to be tested
|
|
134 |
* @return true if configuration value != Invalid, else false.
|
|
135 |
*/
|
|
136 |
virtual bool configurationExists(ConfigurationId confId) = 0;
|
|
137 |
|
|
138 |
/*!
|
31
|
139 |
Enables the next button in wizard.
|
|
140 |
|
|
141 |
@param [in] enable to enable button set to true.
|
|
142 |
*/
|
|
143 |
virtual void enableNextButton(bool enable) = 0;
|
|
144 |
|
|
145 |
/*!
|
|
146 |
Adds a new wizard page into the wizard framework.
|
|
147 |
|
|
148 |
@param [in] pageId The identifier of Page. See WlanWizardPage::PageIds.
|
|
149 |
@param [in] page New wizard page.
|
|
150 |
*/
|
|
151 |
virtual void addPage(int pageId, WlanWizardPage *page) = 0;
|
|
152 |
|
|
153 |
/*!
|
|
154 |
Triggers movement to the next page.
|
|
155 |
|
|
156 |
@note This operation has been protected with 1.5 second timer to prevent
|
|
157 |
too short lasting pages.
|
|
158 |
|
|
159 |
@note Must be used with WlanWizardPage::startOperation().
|
|
160 |
*/
|
|
161 |
virtual void nextPage() = 0;
|
|
162 |
|
|
163 |
/*!
|
|
164 |
@return the main window of wizard.
|
|
165 |
*/
|
|
166 |
virtual HbMainWindow *mainWindow() const = 0;
|
|
167 |
|
|
168 |
/*!
|
|
169 |
Checks if provided page visualization is the current visible page.
|
|
170 |
|
|
171 |
@param [in] page Wizard Page visualization to be checked
|
|
172 |
|
|
173 |
@return true if the page is currently visible.
|
|
174 |
*/
|
|
175 |
virtual bool isCurrentPage(const HbWidget *page) const = 0;
|
|
176 |
|
|
177 |
/*!
|
|
178 |
Can be used to get correct page id based on the existing configuration.
|
|
179 |
|
|
180 |
This method can be used in so called entry points to wizards
|
|
181 |
- WLAN Wizard has been lauched and setParameters() has been called
|
|
182 |
- WLAN Wizard makes own internal scanning
|
|
183 |
- WPS Wizard uses manual configuration mode.
|
|
184 |
|
|
185 |
@param [in] useWps true: if WPS Wizard needs to be opened, false: otherwise
|
|
186 |
|
|
187 |
@return Page Id based on configurations:
|
|
188 |
- WEP/WPA(2) with PSK: WlanWizardPageInternal::PageKeyQuery
|
|
189 |
- Open: WlanWizardPage::PageProcessSettings
|
|
190 |
- 802.1x or WPA (2) with EAP: WlanWizardPage::PageEapStart
|
|
191 |
- UseWps: WlanWizardPage::PageWpsStart
|
|
192 |
*/
|
|
193 |
virtual int nextPageId(bool useWps) = 0;
|
|
194 |
|
|
195 |
signals:
|
|
196 |
|
|
197 |
public slots:
|
|
198 |
|
|
199 |
protected:
|
|
200 |
|
|
201 |
protected slots:
|
|
202 |
|
|
203 |
private:
|
|
204 |
|
|
205 |
private slots:
|
|
206 |
|
|
207 |
private: // data
|
|
208 |
};
|
|
209 |
|
|
210 |
/*! @} */
|
|
211 |
|
|
212 |
#endif // WLANWIZARDHELPER_H
|