|
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 * EAP Wizard: API implementation. |
|
16 */ |
|
17 |
|
18 // System includes |
|
19 |
|
20 // User includes |
|
21 #include "eapwizard.h" |
|
22 #include "eapwizard_p.h" |
|
23 #include "OstTraceDefinitions.h" |
|
24 #ifdef OST_TRACE_COMPILER_IN_USE |
|
25 #include "eapwizardTraces.h" |
|
26 #endif |
|
27 |
|
28 /*! |
|
29 \class EapWizard |
|
30 \brief EAP plugin for WLAN wizard. |
|
31 */ |
|
32 |
|
33 // External function prototypes |
|
34 |
|
35 // Local constants |
|
36 |
|
37 // ======== LOCAL FUNCTIONS ======== |
|
38 |
|
39 // ======== MEMBER FUNCTIONS ======== |
|
40 |
|
41 /*! |
|
42 Constructor of EAP Wizard. |
|
43 |
|
44 @param [in] wizardHelper pointer to the helpper instance. |
|
45 */ |
|
46 EapWizard::EapWizard(WlanWizardHelper *wizardHelper) : d_ptr(NULL) |
|
47 { |
|
48 OstTraceFunctionEntry0(EAPWIZARD_EAPWIZARD_ENTRY); |
|
49 |
|
50 d_ptr.reset( new EapWizardPrivate(wizardHelper)); |
|
51 |
|
52 OstTraceFunctionExit0(EAPWIZARD_EAPWIZARD_EXIT); |
|
53 } |
|
54 |
|
55 /*! |
|
56 Destructor. |
|
57 */ |
|
58 EapWizard::~EapWizard() |
|
59 { |
|
60 OstTraceFunctionEntry0(EAPWIZARD_DEAPWIZARD_ENTRY); |
|
61 OstTraceFunctionExit0(EAPWIZARD_DEAPWIZARD_EXIT); |
|
62 } |
|
63 |
|
64 /*! |
|
65 See WlanWizardPlugin::summary(). |
|
66 |
|
67 This method is used to query eap plugin specific summary items. |
|
68 |
|
69 Both item and value are localized strings. |
|
70 |
|
71 @param [in] sum Summary id to be queried |
|
72 @param [in,out] item The item string is returned here |
|
73 @param [in,out] value The value of item is returned here. |
|
74 |
|
75 @return true if summary item is found, false otherwise. |
|
76 */ |
|
77 bool EapWizard::summary(WlanWizardPlugin::Summary sum, QString &item, QString &value) |
|
78 { |
|
79 OstTraceFunctionEntry0(EAPWIZARD_SUMMARY_ENTRY); |
|
80 bool ret = d_ptr->summary(sum, item, value); |
|
81 OstTraceFunctionExit0(EAPWIZARD_SUMMARY_EXIT); |
|
82 return ret; |
|
83 } |
|
84 |
|
85 /*! |
|
86 See WlanWizardPlugin::storeSettings(). |
|
87 |
|
88 Stores EAP specific settings. |
|
89 */ |
|
90 bool EapWizard::storeSettings() |
|
91 { |
|
92 OstTraceFunctionEntry0(EAPWIZARD_STORESETTINGS_ENTRY); |
|
93 |
|
94 bool ret = d_ptr->storeSettings(); |
|
95 |
|
96 OstTraceFunctionExit0(EAPWIZARD_STORESETTINGS_EXIT); |
|
97 |
|
98 return ret; |
|
99 } |
|
100 |
|
101 |
|
102 /*! |
|
103 See WlanWizardPlugin::errorString(). |
|
104 |
|
105 Gets EAP Wizard specific error code. In case mapping cannot be done an empty |
|
106 string is returned. |
|
107 */ |
|
108 QString EapWizard::errorString(int errorCode) |
|
109 { |
|
110 OstTraceFunctionEntry0(EAPWIZARD_ERRORSTRING_ENTRY); |
|
111 |
|
112 QString string = d_ptr->errorString(errorCode); |
|
113 |
|
114 OstTraceFunctionExit0(EAPWIZARD_ERRORSTRING_EXIT); |
|
115 return string; |
|
116 } |