author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 18 Aug 2010 10:52:46 +0300 | |
changeset 50 | d4198dcb9983 |
parent 46 | 2fbd1d709fe7 |
child 56 | de27cc8389dd |
permissions | -rw-r--r-- |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
3 |
* All rights reserved. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
8 |
* |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
9 |
* Initial Contributors: |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
11 |
* |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
12 |
* Contributors: |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
13 |
* |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
14 |
* Description: |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
15 |
* WLAN Wizard Page: Scan processing. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
16 |
*/ |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
// System includes |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
19 |
#include <HbParameterLengthLimiter> |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#include <HbMainWindow> |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#include <HbDocumentLoader> |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
#include <HbWidget> |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include <HbLabel> |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
#include <HbProgressBar> |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
#include <cmmanagerdefines_shim.h> |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
#include <wlanqtutils.h> |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
#include <wlanqtutilsap.h> |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
// User includes |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
#include "wlanwizard_p.h" |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
#include "wlanwizardpagescanning.h" |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
#include "OstTraceDefinitions.h" |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
#ifdef OST_TRACE_COMPILER_IN_USE |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
#include "wlanwizardpagescanningTraces.h" |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
#endif |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
|
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
37 |
// Local constants |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
38 |
|
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
/*! |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
40 |
* Constructor method for the scanning view object. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
41 |
* @param [in] parent pointer to parent object. |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
*/ |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
WlanWizardPageScanning::WlanWizardPageScanning(WlanWizardPrivate* parent) : |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
WlanWizardPageInternal(parent), |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
mWidget(NULL), |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
mLabel(NULL), |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
mLoader(NULL), |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
mNextPageId(WlanWizardPage::PageNone), |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
49 |
mScanResultsAvailable(false), |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
50 |
mScanStatus(WlanQtUtils::ScanStatusOk) |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
52 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_WLANWIZARDPAGESCANNING_ENTRY ); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
53 |
WlanQtUtils* utils = mWizard->wlanQtUtils(); |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
54 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
// Connect normal scan completion signal from wlanQtUtils to result |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
// handler. Connect here instead of initializePage, since this signal may |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
// need to be caught event if the window is not active. |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
58 |
bool ok = connect( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
59 |
utils, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
60 |
SIGNAL(wlanScanApReady(int)), |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
61 |
this, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
62 |
SLOT(wlanScanResultPreCheck(int))); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
63 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
64 |
Q_ASSERT(ok); |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
65 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_WLANWIZARDPAGESCANNING_EXIT ); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
} |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
67 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
/*! |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
* Destructor. Loader widget is deleted. |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
* All document widgets are deleted by wlanwizard_p destructor. |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
*/ |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
WlanWizardPageScanning::~WlanWizardPageScanning() |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
74 |
OstTraceFunctionEntry0( DUP1_WLANWIZARDPAGESCANNING_WLANWIZARDPAGESCANNING_ENTRY ); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
75 |
delete mLoader; |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
76 |
OstTraceFunctionExit0( DUP1_WLANWIZARDPAGESCANNING_WLANWIZARDPAGESCANNING_EXIT ); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
} |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
78 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
/*! |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
80 |
* Page initialization. If view is already loaded, does nothing. Inherited from |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
81 |
* WlanWizardPage. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
82 |
* @return pointer to widget "occ_add_wlan_06". |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
*/ |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
HbWidget* WlanWizardPageScanning::initializePage() |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
86 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_INITIALIZEPAGE_ENTRY ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
87 |
OstTrace0( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
88 |
TRACE_NORMAL, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
89 |
WLANWIZARDPAGESCANNING_INITIALIZEPAGE, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
90 |
"WlanWizardPageScanning::initializePage"); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
// Next page id is reset with each initialization. |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
93 |
mNextPageId = WlanWizardPage::PageNone; |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
94 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
95 |
if (mWidget == NULL) { |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
96 |
mLoader = new HbDocumentLoader(mWizard->mainWindow()); |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
97 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
98 |
bool ok; |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
99 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
100 |
mLoader->load(":/docml/occ_add_wlan_06.docml", &ok); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
101 |
Q_ASSERT(ok); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
102 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
103 |
// Initialize orientation |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
104 |
loadDocmlSection(mWizard->mainWindow()->orientation()); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
105 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
106 |
// Load widgets |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
107 |
mWidget = qobject_cast<HbWidget*> (mLoader->findWidget( |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
"occ_add_wlan_06")); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
109 |
Q_ASSERT(mWidget != NULL); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
110 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
mLabel = qobject_cast<HbLabel*> (mLoader->findWidget("dialog")); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
112 |
Q_ASSERT(mLabel != NULL); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
113 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
WlanQtUtils* utils = mWizard->wlanQtUtils(); |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
115 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
116 |
// Connect orientation signal from the main window to orientation |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
// loader. |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
118 |
ok = connect( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
119 |
mWizard->mainWindow(), |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
120 |
SIGNAL(orientationChanged(Qt::Orientation)), |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
121 |
this, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
122 |
SLOT(loadDocmlSection(Qt::Orientation))); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
123 |
Q_ASSERT(ok); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
// Connect direct scan completion signal from wlanQtUtils to result |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
// handler. |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
127 |
ok = connect( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
128 |
utils, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
129 |
SIGNAL(wlanScanDirectReady(int)), |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
130 |
this, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
131 |
SLOT(wlanScanDirectReady(int))); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
132 |
Q_ASSERT(ok); |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
133 |
} |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
|
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
135 |
mLabel->setPlainText(HbParameterLengthLimiter( |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
136 |
"txt_occ_dialog_searching").arg(mWizard->configuration( |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
137 |
WlanWizardPrivate::ConfSsid).toString())); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
138 |
|
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
139 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_INITIALIZEPAGE_EXIT ); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
return mWidget; |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
141 |
} |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
142 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
143 |
/*! |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
* Sends the user to the next page. |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
145 |
* @param [out] removeFromStack is always true: this page is removed from the |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
146 |
* stacked widget after "Next" button is pressed. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
147 |
* @return the id value of the next page. |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
*/ |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
149 |
int WlanWizardPageScanning::nextId(bool &removeFromStack) const |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
151 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_NEXTID_ENTRY ); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
152 |
removeFromStack = true; |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
153 |
|
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
154 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_NEXTID_EXIT ); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
155 |
return mNextPageId; |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
156 |
} |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
157 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
/*! |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
159 |
* This function reimplements WlanWizardPage::previousTriggered. When going |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
160 |
* back from scanning view, the ongoing scan operation is also stopped. Since |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
161 |
* there is no need to react to following the acknowledgement signal from |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
162 |
* wlanQtUtils, the corresponding handler slots are disconnected before the |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
163 |
* opration and immediately connected again. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
164 |
* @return one step backwards value. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
165 |
*/ |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
166 |
int WlanWizardPageScanning::previousTriggered() |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
167 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
168 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_PREVIOUSTRIGGERED_ENTRY ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
169 |
disconnect(this, SLOT(wlanScanDirectReady(int))); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
170 |
disconnect(this, SLOT(wlanScanResultPreCheck(int))); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
171 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
172 |
WlanQtUtils* utils = mWizard->wlanQtUtils(); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
173 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
174 |
utils->stopWlanScan(); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
175 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
176 |
bool ok = connect( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
177 |
utils, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
178 |
SIGNAL(wlanScanApReady(int)), |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
179 |
this, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
180 |
SLOT(wlanScanResultPreCheck(int))); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
181 |
Q_ASSERT(ok); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
182 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
183 |
ok = connect( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
184 |
utils, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
185 |
SIGNAL(wlanScanDirectReady(int)), |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
186 |
this, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
187 |
SLOT(wlanScanDirectReady(int))); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
188 |
Q_ASSERT(ok); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
189 |
|
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
190 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_PREVIOUSTRIGGERED_EXIT ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
191 |
return OneStepBackwards; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
192 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
193 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
194 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
195 |
/*! |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
196 |
* This method is overrides the default implementation from WlanWizardPage. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
197 |
* It indicates whether the Next-button should be enabled or not. It also resets |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
198 |
* the ConfProcessSettings-configuration to false - meaning that if no scan |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
199 |
* results are available, no iap is created. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
200 |
* @return always false - the scanning proceeds to next window |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
201 |
* automatically or not at all. |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
202 |
*/ |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
203 |
bool WlanWizardPageScanning::showPage() |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
204 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
205 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_SHOWPAGE_ENTRY ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
206 |
mWizard->setConfiguration(WlanWizardHelper::ConfProcessSettings, false); |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
207 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_SHOWPAGE_EXIT ); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
208 |
return false; |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
209 |
} |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
210 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
211 |
/*! |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
212 |
* Reimplements the default function in WlanWizardPage. Indicates to the |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
213 |
* framework that startOperation() function must be executed. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
214 |
* @return true |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
215 |
* @see WlanWizardPage |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
216 |
*/ |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
217 |
bool WlanWizardPageScanning::requiresStartOperation() |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
218 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
219 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_REQUIRESSTARTOPERATION_ENTRY ); |
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
220 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_REQUIRESSTARTOPERATION_EXIT ); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
221 |
return true; |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
222 |
} |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
223 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
224 |
/*! |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
225 |
* Wlan scan is performed as a "post-initialization" which is executed in a |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
226 |
* separate scheduler loop. If scan results are available, starts reading them. |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
227 |
*/ |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
228 |
void WlanWizardPageScanning::startOperation() |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
229 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
230 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_STARTOPERATION_ENTRY ); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
231 |
OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESCANNING_STARTOPERATION, |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
232 |
"WlanWizardPageScanning::startOperation - start AP scan if results" |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
233 |
" are available." ); |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
234 |
|
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
235 |
if (mScanResultsAvailable) { |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
236 |
mScanResultsAvailable = false; |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
237 |
wlanScanApReady(); |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
238 |
} |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
239 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_STARTOPERATION_EXIT ); |
38
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
240 |
} |
2dc6da6fb431
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
241 |
|
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
242 |
/*! |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
243 |
* Loads the document orientation information from occ_add_wlan_06.docml |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
244 |
* This is called each time phone orientation changes. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
245 |
* @param [in] orientation indicates whether the phone is in portrait or |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
246 |
* landscape mode. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
247 |
*/ |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
248 |
void WlanWizardPageScanning::loadDocmlSection(Qt::Orientation orientation) |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
249 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
250 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_LOADDOCMLSECTION_ENTRY ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
251 |
OstTrace1( TRACE_NORMAL, WLANWIZARDPAGESCANNING_LOADDOCML, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
252 |
"WlanWizardPageScanning::loadDocml - orientation ;orientation=%x", |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
253 |
( TUint )( orientation ) ); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
254 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
255 |
WlanWizardPageInternal::loadDocmlSection( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
256 |
mLoader, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
257 |
orientation, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
258 |
":/docml/occ_add_wlan_06.docml", |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
259 |
"portrait_section", |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
260 |
"landscape_section"); |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
261 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_LOADDOCMLSECTION_EXIT ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
262 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
263 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
264 |
/*! |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
265 |
* Checks whether the view is active. If it is, execute wlanScanApReady. If |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
266 |
* not, set mScanResultsAvailable to true. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
267 |
* @param [in] scanStatus indicates whether the scan was succesful, cancelled of |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
268 |
* failed. The argument is saved to a member variable. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
269 |
*/ |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
270 |
void WlanWizardPageScanning::wlanScanResultPreCheck(int scanStatus) |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
271 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
272 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK_ENTRY ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
273 |
mScanStatus = scanStatus; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
274 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
275 |
if (!mWidget) { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
276 |
OstTrace1( TRACE_BORDER, WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
277 |
"WlanWizardPageScanning::wlanScanResultPreCheck no widget;this=%x", |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
278 |
this ); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
279 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
280 |
mScanResultsAvailable = true; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
281 |
} else { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
282 |
if (mWizard->isCurrentPage(mWidget)) { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
283 |
OstTrace0( TRACE_BORDER, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
284 |
DUP1_WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
285 |
"WlanWizardPageScanning::wlanScanResultPreCheck go to results"); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
286 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
287 |
wlanScanApReady(); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
288 |
} else { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
289 |
OstTrace0( TRACE_BORDER, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
290 |
DUP2_WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
291 |
"WlanWizardPageScanning::wlanScanResultPreCheck" |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
292 |
" not current widget" ); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
293 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
294 |
mScanResultsAvailable = true; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
295 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
296 |
} |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
297 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK_EXIT ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
298 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
299 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
300 |
/*! |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
301 |
* Processes the direct scan results. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
302 |
* @param [in] scanStatus indicates whether the scan was succesful, canceled or |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
303 |
* failed. In case the scan was not succesful, always proceed to manual wizard. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
304 |
*/ |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
305 |
void WlanWizardPageScanning::wlanScanDirectReady(int scanStatus) |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
306 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
307 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_WLANSCANDIRECTREADY_ENTRY ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
308 |
OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESCANNING_WLANSCANDIRECTREADY, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
309 |
"WlanWizardPageScanning::wlanScanDirectReady" ); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
310 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
311 |
WlanQtUtils* utils = mWizard->wlanQtUtils(); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
312 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
313 |
Q_ASSERT(utils); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
314 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
315 |
QList<WlanScanResult> filteredResults; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
316 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
317 |
if (scanStatus == WlanQtUtils::ScanStatusOk) { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
318 |
QList<QSharedPointer<WlanQtUtilsAp> > directScanResults; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
319 |
// Read the directed scan results from Qt Utils |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
320 |
utils->availableWlanAps(directScanResults); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
321 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
322 |
// Identify open and hidden networks. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
323 |
getFinalScanResults(directScanResults, mWlanApList, filteredResults); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
324 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
325 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
326 |
// Process the scan results. If scan status is not ok, feed an empty |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
327 |
// result table to the selection function. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
328 |
selectNextPageActions(filteredResults); |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
329 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_WLANSCANDIRECTREADY_EXIT ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
330 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
331 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
332 |
/*! |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
333 |
* All wlan channels have been scanned for public networks. After processing the |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
334 |
* results a direct scan is initiated. This function also checks whether the |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
335 |
* scan was succesful, canceled or failed. In case the scan was not succesful, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
336 |
* always proceed to manual wizard. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
337 |
*/ |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
338 |
void WlanWizardPageScanning::wlanScanApReady() |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
339 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
340 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_WLANSCANAPREADY_ENTRY ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
341 |
OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESCANNING_WLANSCANAPREADY, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
342 |
"WlanWizardPageScanning::wlanScanApReady" ); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
343 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
344 |
if (mScanStatus == WlanQtUtils::ScanStatusOk) { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
345 |
WlanQtUtils* utils = mWizard->wlanQtUtils(); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
346 |
Q_ASSERT(utils); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
347 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
348 |
QList<QSharedPointer<WlanQtUtilsAp> > openScanResults; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
349 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
350 |
// Fetch the list of scan results. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
351 |
utils->availableWlanAps(openScanResults); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
352 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
353 |
// The name of the network that we are looking for. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
354 |
QString ssid = |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
355 |
mWizard->configuration(WlanWizardPrivate::ConfSsid).toString(); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
356 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
357 |
// Store matching scan results. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
358 |
getSsidMatchList(ssid, openScanResults); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
359 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
360 |
// Next directed scan. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
361 |
utils->scanWlanDirect(ssid); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
362 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
363 |
else { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
364 |
mWizard->clearConfiguration(WlanWizardHelper::ConfAvailableNetworkOptions); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
365 |
mNextPageId = WlanWizardPageInternal::PageNetworkMode; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
366 |
mWizard->nextPage(); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
367 |
} |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
368 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_WLANSCANAPREADY_EXIT ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
369 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
370 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
371 |
/*! |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
372 |
* This function stores all the APs that match ssid parameter to mWlanApList |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
373 |
* member list. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
374 |
* @param [in] ssid is the name of the network we are interested in. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
375 |
* @param [in] matchList is the list of all APs that were revealed in the scan. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
376 |
*/ |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
377 |
void WlanWizardPageScanning::getSsidMatchList( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
378 |
QString ssid, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
379 |
const QList<QSharedPointer<WlanQtUtilsAp> > &matchList) |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
380 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
381 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_GETSSIDMATCHLIST_ENTRY ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
382 |
mWlanApList.clear(); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
383 |
QSharedPointer<WlanQtUtilsAp> item; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
384 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
385 |
for (int i = 0; i < matchList.size(); i++) { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
386 |
item = matchList.at(i); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
387 |
if (item->value(WlanQtUtilsAp::ConfIdSsid).toString() == ssid) { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
388 |
mWlanApList.append(item); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
389 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
390 |
} |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
391 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_GETSSIDMATCHLIST_EXIT ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
392 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
393 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
394 |
/* |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
395 |
* Find out which of the direct scan results are open networks by comparing |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
396 |
* result to open scan results. Return finalResults. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
397 |
* @param [in] directScanResults are the results of a directed scan. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
398 |
* @param [in] openScanResults are the results of a scan inquiring any APs. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
399 |
* @param [out] finalResults is a list of APs with visibility flag included. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
400 |
*/ |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
401 |
void WlanWizardPageScanning::getFinalScanResults( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
402 |
const QList<QSharedPointer<WlanQtUtilsAp> > &directScanResults, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
403 |
const QList<QSharedPointer<WlanQtUtilsAp> > &openScanResults, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
404 |
QList<WlanScanResult> &finalResults) |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
405 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
406 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_GETFINALSCANRESULTS_ENTRY ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
407 |
finalResults.clear(); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
408 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
409 |
// The key assumption of this algorithm is that both direct and public scan |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
410 |
// reveal the same set of AP:s with the exception of hidden AP:s. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
411 |
// In other words: Direct scan result set is the whole set with each AP |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
412 |
// marked as hidden by default. If an AP has been revealed also by public |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
413 |
// scan, it is changed to visible. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
414 |
for (int i = 0; i < directScanResults.size(); i++) { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
415 |
WlanScanResult resultItem; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
416 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
417 |
resultItem.scanResult = directScanResults.at(i); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
418 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
419 |
// Initialize as hidden. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
420 |
resultItem.networkHidden = true; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
421 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
422 |
for (int j = 0; j < openScanResults.size(); j++) { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
423 |
if (WlanQtUtilsAp::compare( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
424 |
openScanResults.at(j).data(), |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
425 |
directScanResults.at(i).data()) == 0) { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
426 |
// Mark open, if a public scan revealed the same AP |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
427 |
resultItem.networkHidden = false; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
428 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
429 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
430 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
431 |
finalResults.append(resultItem); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
432 |
} |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
433 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_GETFINALSCANRESULTS_EXIT ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
434 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
435 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
436 |
/*! |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
437 |
* This function processes the scan results in case multiple results were |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
438 |
* acquired with matching SSIDs. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
439 |
* @param [in] finalResults is the list of APs revealed by the last scans. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
440 |
* @return the identifier of the next page. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
441 |
*/ |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
442 |
int WlanWizardPageScanning::processMultipleScanResults( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
443 |
const QList<WlanScanResult> &finalResults) |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
444 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
445 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_PROCESSMULTIPLESCANRESULTS_ENTRY ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
446 |
WlanWizardScanList networkOptions; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
447 |
int nextPage; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
448 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
449 |
// Build the list of results to be placed in the configuration. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
450 |
networkOptions.build(finalResults); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
451 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
452 |
QVariant tmp; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
453 |
tmp.setValue(networkOptions); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
454 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
455 |
mWizard->setConfiguration( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
456 |
WlanWizardHelper::ConfAvailableNetworkOptions, tmp); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
457 |
|
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
458 |
if (networkOptions.wpsSelected()) { |
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
459 |
// In case all available network mode options support wps, go directly |
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
460 |
// to wps-wizard. |
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
461 |
nextPage = WlanWizardPageInternal::PageWpsStart; |
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
462 |
} else if (networkOptions.netModes() > SingleResult) { |
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
463 |
// If there are more than one network mode choices, go to manual selection |
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
464 |
// of network mode. |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
465 |
nextPage = WlanWizardPageInternal::PageNetworkMode; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
466 |
} else { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
467 |
// if only a single network mode option is available, the mode query |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
468 |
// may be skipped and the next page is set to security mode query. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
469 |
WlanNetworkSetting setting = networkOptions.getNetModes().at(0); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
470 |
mWizard->setConfiguration(WlanWizardHelper::ConfNetworkMode, setting.mode); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
471 |
mWizard->setConfiguration(WlanWizardHelper::ConfHiddenWlan, setting.hidden); |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
472 |
mWizard->setConfiguration(WlanWizardHelper::ConfWpsSupported, setting.wpsSupported); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
473 |
nextPage = WlanWizardPageInternal::PageNetworkSecurity; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
474 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
475 |
|
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
476 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_PROCESSMULTIPLESCANRESULTS_EXIT ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
477 |
return nextPage; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
478 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
479 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
480 |
/*! |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
481 |
* This function decides what to do with the scan results. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
482 |
* @param [in] finalResults is the list of APs revealed by the last scans. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
483 |
*/ |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
484 |
void WlanWizardPageScanning::selectNextPageActions( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
485 |
const QList<WlanScanResult> &finalResults) |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
486 |
{ |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
487 |
OstTraceFunctionEntry0( WLANWIZARDPAGESCANNING_SELECTNEXTPAGEACTIONS_ENTRY ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
488 |
mWizard->clearConfiguration(WlanWizardHelper::ConfAvailableNetworkOptions); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
489 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
490 |
if (finalResults.isEmpty()) { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
491 |
// In case of no results at all were found. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
492 |
mNextPageId = WlanWizardPageInternal::PageNetworkMode; |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
493 |
} else if (finalResults.size() == SingleResult) { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
494 |
// In case there is only a single result. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
495 |
WlanScanResult item = finalResults.first(); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
496 |
mNextPageId = mWizard->getNextPageId( |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
497 |
item.scanResult->value(WlanQtUtilsAp::ConfIdSsid).toString(), |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
498 |
item.scanResult->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt(), |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
499 |
item.scanResult->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt(), |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
500 |
item.scanResult->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool(), |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
501 |
item.networkHidden, |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
502 |
item.scanResult->value(WlanQtUtilsAp::ConfIdWpsSupported).toBool()); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
503 |
} else { |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
504 |
// In case more than one result is available. |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
505 |
mWizard->setConfiguration(WlanWizardHelper::ConfProcessSettings, true); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
506 |
mNextPageId = processMultipleScanResults(finalResults); |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
507 |
} |
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
508 |
|
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
509 |
mWizard->nextPage(); |
50
d4198dcb9983
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
510 |
OstTraceFunctionExit0( WLANWIZARDPAGESCANNING_SELECTNEXTPAGEACTIONS_EXIT ); |
46
2fbd1d709fe7
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
511 |
} |