|
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 * Control Panel QT UI for WPA/WPA2/802_Dot_1x configuration |
|
16 * |
|
17 */ |
|
18 |
|
19 /* |
|
20 * %version: tr1cfwln#23 % |
|
21 */ |
|
22 |
|
23 // System includes |
|
24 #include <QStringList> |
|
25 #include <cpsettingformitemdata.h> |
|
26 #include <cpitemdatahelper.h> |
|
27 #include <cpbasesettingview.h> |
|
28 #include <cmconnectionmethod_shim.h> |
|
29 #include <eapqtplugininfo.h> |
|
30 #include <eapqtconfiginterface.h> |
|
31 |
|
32 // User includes |
|
33 #include "cpwpacmnui.h" |
|
34 #include "cpwpacmnui_p.h" |
|
35 |
|
36 // Trace Definition |
|
37 #include "OstTraceDefinitions.h" |
|
38 #ifdef OST_TRACE_COMPILER_IN_USE |
|
39 #include "cpwpacmnuiTraces.h" |
|
40 #endif |
|
41 |
|
42 /*! |
|
43 \class CpWpaCmnUi |
|
44 \brief CpWpaCmnUi implements the common Ui for WPA/WPA2/802.1x/WPA2 only |
|
45 Security Settings Control Panel Plugins, |
|
46 which will allow viewing/editing of WPA/WPA2/802.1x/WPA2 Security Settings. |
|
47 */ |
|
48 //Contructs Common Ui (WPA/WPA2/802.1x/WPA2only) object |
|
49 CpWpaCmnUi::CpWpaCmnUi(CMManagerShim::WlanSecMode securityMode, CpItemDataHelper &dataHelpper) |
|
50 |
|
51 { |
|
52 d_ptr = new CpWpaCmnUiPrivate(securityMode,dataHelpper); |
|
53 } |
|
54 //Deletes objects owned by Common Ui |
|
55 CpWpaCmnUi::~CpWpaCmnUi() |
|
56 { |
|
57 //delete all dynamically allocated objects |
|
58 OstTraceFunctionEntry1(CPWPACMNUI_CPWPACMNUI_ENTRY,this); |
|
59 |
|
60 delete d_ptr; |
|
61 |
|
62 OstTraceFunctionExit1(CPWPACMNUI_CPWPACMNUI_EXIT,this); |
|
63 } |
|
64 |
|
65 // ======== MEMBER FUNCTIONS ======== |
|
66 |
|
67 /*! |
|
68 * Creates the Ui instance based on the security mode;WPAWPA2/802.1x/WPA2 only |
|
69 * Owns the Ui instance |
|
70 * |
|
71 * \param eapQtConfigInterface to list all eap plugins |
|
72 * \param mCmCM Connection MethoD Qt interface |
|
73 * |
|
74 * \return Ui instance for the security mode set |
|
75 */ |
|
76 |
|
77 CpSettingFormItemData* CpWpaCmnUi::createUi( |
|
78 EapQtConfigInterface *eapQtConfigInterface, |
|
79 CmConnectionMethodShim *cmCM) |
|
80 { |
|
81 OstTraceFunctionEntry1(CPWPACMNUI_CREATEUI_ENTRY,this); |
|
82 OstTraceFunctionExit1(CPWPACMNUI_CREATEUI_EXIT,this); |
|
83 return d_ptr->createUi(eapQtConfigInterface,cmCM); |
|
84 } |
|
85 |
|
86 |
|
87 /*! |
|
88 Validates current security settings. This function is called whenever |
|
89 user tries to exit from the settings view. If the plugin determines |
|
90 that some settings need editing before considered valid, it shall |
|
91 return false. A dialog will be shown to the user indicating that |
|
92 settings are still incomplete and asking if he/she wishes to exit |
|
93 anyway. |
|
94 |
|
95 \return True if security settings are valid, false if not. |
|
96 */ |
|
97 bool CpWpaCmnUi::validateSettings() |
|
98 { |
|
99 return d_ptr->validateSettings(); |
|
100 } |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |