|
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 the License "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 * Control Panel QT UI for WPA/WPA2 configuration |
|
16 * |
|
17 */ |
|
18 |
|
19 /* |
|
20 * %version: tr1cfwln#11.1.1 % |
|
21 */ |
|
22 |
|
23 |
|
24 #ifndef CPWPAUI_H |
|
25 #define CPWPAUI_H |
|
26 |
|
27 // System includes |
|
28 #include <cpsettingformitemdata.h> |
|
29 #include <hbglobal.h> |
|
30 #include <HbMessageBox> |
|
31 |
|
32 // User includes |
|
33 #include "cpwlansecurityplugininterface.h" |
|
34 |
|
35 // Forward declarations |
|
36 class EapPluginInformation; |
|
37 class PluginInformation; |
|
38 class CpBaseSettingView; |
|
39 class EapQtConfigInterface; |
|
40 class EapEntyItemData; |
|
41 class CpWpaCmnUi; |
|
42 class CmConnectionMethodShim; |
|
43 class QTranslator; |
|
44 |
|
45 /*! |
|
46 * @addtogroup group_wlan_security_ui_plugin_wpa/wpa2 |
|
47 * @{ |
|
48 */ |
|
49 |
|
50 /*! |
|
51 * Implements WPA/WPA2 plugin for Wlan security control panel |
|
52 */ |
|
53 class CpWpaUi : public QObject, public CpWlanSecurityPluginInterface |
|
54 { |
|
55 Q_OBJECT |
|
56 Q_INTERFACES(CpWlanSecurityPluginInterface) |
|
57 |
|
58 public: |
|
59 CpWpaUi(); |
|
60 ~CpWpaUi(); |
|
61 |
|
62 public: // from CpWlanSecurityPluginInterface |
|
63 |
|
64 CMManagerShim::WlanSecMode securityMode() const; |
|
65 |
|
66 QString securityModeTextId() const; |
|
67 |
|
68 void setReference(CmConnectionMethodShim *cmCm, uint id); |
|
69 |
|
70 int orderNumber() const; |
|
71 |
|
72 CpSettingFormItemData* uiInstance( |
|
73 CpItemDataHelper &dataHelper); |
|
74 |
|
75 private: |
|
76 |
|
77 bool tryUpdate(); |
|
78 |
|
79 void handleUpdateError(); |
|
80 |
|
81 void showMessageBox( HbMessageBox::MessageBoxType type, |
|
82 const QString &text); |
|
83 |
|
84 void updateWpaSettings(); |
|
85 |
|
86 |
|
87 private slots: |
|
88 |
|
89 //void currentEapPlugin(int plugin); |
|
90 //void wpaTypeChanged(int pskEnable); |
|
91 void pskKeyChanged(QString& key); |
|
92 |
|
93 |
|
94 private: |
|
95 |
|
96 Q_DISABLE_COPY(CpWpaUi) |
|
97 |
|
98 //!WPA security group item |
|
99 CpSettingFormItemData* mUi; |
|
100 |
|
101 //! Connection method Id |
|
102 int mCmId; |
|
103 |
|
104 //!Translator for all the localisation Text Id's |
|
105 QTranslator *mTranslator; |
|
106 |
|
107 //! Connection Settings Shim connection method pointer |
|
108 CmConnectionMethodShim *mCmCM; |
|
109 |
|
110 //! Eap Plugin config interface |
|
111 EapQtConfigInterface *mEapQtConfigInterface; |
|
112 |
|
113 //!WPA ui Implementer Interface |
|
114 QScopedPointer <CpWpaCmnUi> mWpaUi; |
|
115 |
|
116 //! Message box for info notes |
|
117 QSharedPointer<HbMessageBox> mMessageBox; |
|
118 |
|
119 }; |
|
120 |
|
121 /*! @} */ |
|
122 |
|
123 #endif //CPWPAUI_H |