wlanutilities/wlanwizard/src/wlanwizardpagescanning.cpp
author hgs
Mon, 24 May 2010 21:11:39 +0300
changeset 31 e8f4211554fb
child 39 7b3e49e4608a
permissions -rw-r--r--
201021
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
 * All rights reserved.
hgs
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
 *
hgs
parents:
diff changeset
     9
 * Initial Contributors:
hgs
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
 *
hgs
parents:
diff changeset
    12
 * Contributors:
hgs
parents:
diff changeset
    13
 *
hgs
parents:
diff changeset
    14
 * Description: 
hgs
parents:
diff changeset
    15
 * WLAN Wizard Page: Scan processing.
hgs
parents:
diff changeset
    16
 */
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
// System includes
hgs
parents:
diff changeset
    19
#include <HbMainWindow>
hgs
parents:
diff changeset
    20
#include <HbDocumentLoader>
hgs
parents:
diff changeset
    21
#include <HbWidget>
hgs
parents:
diff changeset
    22
#include <HbLabel>
hgs
parents:
diff changeset
    23
#include <HbProgressBar>
hgs
parents:
diff changeset
    24
#include <QDebug>
hgs
parents:
diff changeset
    25
#include <cmmanagerdefines_shim.h>
hgs
parents:
diff changeset
    26
#include <wlanqtutils.h>
hgs
parents:
diff changeset
    27
#include <wlanqtutilsap.h>
hgs
parents:
diff changeset
    28
hgs
parents:
diff changeset
    29
// User includes
hgs
parents:
diff changeset
    30
#include "wlanwizard_p.h"
hgs
parents:
diff changeset
    31
#include "wlanwizardpagescanning.h"
hgs
parents:
diff changeset
    32
#include "OstTraceDefinitions.h"
hgs
parents:
diff changeset
    33
#ifdef OST_TRACE_COMPILER_IN_USE
hgs
parents:
diff changeset
    34
#include "wlanwizardpagescanningTraces.h"
hgs
parents:
diff changeset
    35
#endif
hgs
parents:
diff changeset
    36
hgs
parents:
diff changeset
    37
/*!
hgs
parents:
diff changeset
    38
 * Constructor. Member initialization.
hgs
parents:
diff changeset
    39
 */
hgs
parents:
diff changeset
    40
WlanWizardPageScanning::WlanWizardPageScanning(WlanWizardPrivate* parent) :
hgs
parents:
diff changeset
    41
    WlanWizardPageInternal(parent),
hgs
parents:
diff changeset
    42
    mWidget(NULL),
hgs
parents:
diff changeset
    43
    mLabel(NULL),
hgs
parents:
diff changeset
    44
    mBar(NULL),
hgs
parents:
diff changeset
    45
    mLoader(NULL),
hgs
parents:
diff changeset
    46
    mNextPageId(WlanWizardPage::PageNone),
hgs
parents:
diff changeset
    47
    mScanResultsAvailable(false)
hgs
parents:
diff changeset
    48
{
hgs
parents:
diff changeset
    49
    WlanQtUtils* utils = mWizard->wlanQtUtils();
hgs
parents:
diff changeset
    50
hgs
parents:
diff changeset
    51
    // Connect normal scan completion signal from wlanQtUtils to result
hgs
parents:
diff changeset
    52
    // handler. Connect here instead of initializePage, since this signal may
hgs
parents:
diff changeset
    53
    // need to be caught event if the window is not active.
hgs
parents:
diff changeset
    54
    bool ok = connect(utils, SIGNAL(wlanScanApReady()), this,
hgs
parents:
diff changeset
    55
        SLOT(wlanScanResultPreCheck()));
hgs
parents:
diff changeset
    56
}
hgs
parents:
diff changeset
    57
hgs
parents:
diff changeset
    58
/*!
hgs
parents:
diff changeset
    59
 * Destructor. Loader widget is deleted.
hgs
parents:
diff changeset
    60
 * All document widgets are deleted by wlanwizard_p destructor.
hgs
parents:
diff changeset
    61
 */
hgs
parents:
diff changeset
    62
WlanWizardPageScanning::~WlanWizardPageScanning()
hgs
parents:
diff changeset
    63
{
hgs
parents:
diff changeset
    64
    delete mLoader;
hgs
parents:
diff changeset
    65
}
hgs
parents:
diff changeset
    66
hgs
parents:
diff changeset
    67
/*!
hgs
parents:
diff changeset
    68
 * Page initialization. If view is already loaded, does nothing.
hgs
parents:
diff changeset
    69
 */
hgs
parents:
diff changeset
    70
HbWidget* WlanWizardPageScanning::initializePage()
hgs
parents:
diff changeset
    71
{
hgs
parents:
diff changeset
    72
    OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESCANNING_INITIALIZEPAGE,
hgs
parents:
diff changeset
    73
        "WlanWizardPageScanning::initializePage" );
hgs
parents:
diff changeset
    74
hgs
parents:
diff changeset
    75
    // Next page id is reset with each initialization.    
hgs
parents:
diff changeset
    76
    mNextPageId = WlanWizardPage::PageNone;
hgs
parents:
diff changeset
    77
hgs
parents:
diff changeset
    78
    if (mWidget == NULL) {
hgs
parents:
diff changeset
    79
hgs
parents:
diff changeset
    80
        mLoader = new HbDocumentLoader(mWizard->mainWindow());
hgs
parents:
diff changeset
    81
hgs
parents:
diff changeset
    82
        bool ok;
hgs
parents:
diff changeset
    83
hgs
parents:
diff changeset
    84
        mLoader->load(":/docml/occ_add_wlan_06.docml", &ok);
hgs
parents:
diff changeset
    85
        Q_ASSERT_X(ok, "WlanWizardPageScanning", "Invalid docml file");
hgs
parents:
diff changeset
    86
hgs
parents:
diff changeset
    87
        // Initialize orientation
hgs
parents:
diff changeset
    88
        loadDocml(mWizard->mainWindow()->orientation());
hgs
parents:
diff changeset
    89
hgs
parents:
diff changeset
    90
        // Load widgets
hgs
parents:
diff changeset
    91
        mWidget = qobject_cast<HbWidget*> (mLoader->findWidget(
hgs
parents:
diff changeset
    92
            "occ_add_wlan_06"));
hgs
parents:
diff changeset
    93
        Q_ASSERT_X(mWidget != NULL, "WlanWizardPageScanning", "View not found");
hgs
parents:
diff changeset
    94
hgs
parents:
diff changeset
    95
        mLabel = qobject_cast<HbLabel*> (mLoader->findWidget("dialog"));
hgs
parents:
diff changeset
    96
        Q_ASSERT_X(mLabel != NULL, "WlanWizardPageScanning",
hgs
parents:
diff changeset
    97
            "textLabel not found");
hgs
parents:
diff changeset
    98
hgs
parents:
diff changeset
    99
        mBar = qobject_cast<HbProgressBar*> (mLoader->findWidget("progressBar"));
hgs
parents:
diff changeset
   100
        Q_ASSERT_X(mBar != NULL, "WlanWizardPageScanning",
hgs
parents:
diff changeset
   101
            "progressBar not found");
hgs
parents:
diff changeset
   102
hgs
parents:
diff changeset
   103
        WlanQtUtils* utils = mWizard->wlanQtUtils();
hgs
parents:
diff changeset
   104
hgs
parents:
diff changeset
   105
        // Connect orientation signal from the main window to orientation
hgs
parents:
diff changeset
   106
        // loader.
hgs
parents:
diff changeset
   107
        ok &= connect(mWizard->mainWindow(),
hgs
parents:
diff changeset
   108
            SIGNAL(orientationChanged(Qt::Orientation)), this,
hgs
parents:
diff changeset
   109
            SLOT(loadDocml(Qt::Orientation)));
hgs
parents:
diff changeset
   110
hgs
parents:
diff changeset
   111
        // Connect direct scan completion signal from wlanQtUtils to result
hgs
parents:
diff changeset
   112
        // handler.
hgs
parents:
diff changeset
   113
        ok &= connect(utils, SIGNAL(wlanScanDirectReady()), this,
hgs
parents:
diff changeset
   114
            SLOT(wlanScanDirectReady()));
hgs
parents:
diff changeset
   115
hgs
parents:
diff changeset
   116
        Q_ASSERT(ok);
hgs
parents:
diff changeset
   117
hgs
parents:
diff changeset
   118
    }
hgs
parents:
diff changeset
   119
hgs
parents:
diff changeset
   120
    mLabel->setPlainText(hbTrId("txt_occ_dialog_searching").arg(
hgs
parents:
diff changeset
   121
        mWizard->configuration(WlanWizardPrivate::ConfSsid).toString()));
hgs
parents:
diff changeset
   122
hgs
parents:
diff changeset
   123
    return mWidget;
hgs
parents:
diff changeset
   124
}
hgs
parents:
diff changeset
   125
hgs
parents:
diff changeset
   126
/*!
hgs
parents:
diff changeset
   127
 * Sends the user to the next page.
hgs
parents:
diff changeset
   128
 */
hgs
parents:
diff changeset
   129
int WlanWizardPageScanning::nextId(bool &removeFromStack) const
hgs
parents:
diff changeset
   130
{
hgs
parents:
diff changeset
   131
    removeFromStack = true;
hgs
parents:
diff changeset
   132
hgs
parents:
diff changeset
   133
    return mNextPageId;
hgs
parents:
diff changeset
   134
}
hgs
parents:
diff changeset
   135
hgs
parents:
diff changeset
   136
/*!
hgs
parents:
diff changeset
   137
 * Always false. Moving to next page is not done manually.
hgs
parents:
diff changeset
   138
 * @see WlanWizardPage
hgs
parents:
diff changeset
   139
 */
hgs
parents:
diff changeset
   140
bool WlanWizardPageScanning::showPage()
hgs
parents:
diff changeset
   141
{
hgs
parents:
diff changeset
   142
    return false;
hgs
parents:
diff changeset
   143
}
hgs
parents:
diff changeset
   144
hgs
parents:
diff changeset
   145
/*!
hgs
parents:
diff changeset
   146
 * Loads the document orientation-specific parameters.
hgs
parents:
diff changeset
   147
 */
hgs
parents:
diff changeset
   148
void WlanWizardPageScanning::loadDocml(Qt::Orientation orientation)
hgs
parents:
diff changeset
   149
{
hgs
parents:
diff changeset
   150
    OstTrace1( TRACE_NORMAL, WLANWIZARDPAGESCANNING_LOADDOCML,
hgs
parents:
diff changeset
   151
        "WlanWizardPageScanning::loadDocml - orientation ;orientation=%x",
hgs
parents:
diff changeset
   152
        ( TUint )( orientation ) );
hgs
parents:
diff changeset
   153
hgs
parents:
diff changeset
   154
    bool ok;
hgs
parents:
diff changeset
   155
    // Then load the orientation specific section
hgs
parents:
diff changeset
   156
    if (orientation == Qt::Horizontal) {
hgs
parents:
diff changeset
   157
        mLoader->load(":/docml/occ_add_wlan_06.docml", "landscape_section", &ok);
hgs
parents:
diff changeset
   158
        Q_ASSERT(ok);
hgs
parents:
diff changeset
   159
    } else {
hgs
parents:
diff changeset
   160
        Q_ASSERT(orientation == Qt::Vertical);
hgs
parents:
diff changeset
   161
        mLoader->load(":/docml/occ_add_wlan_06.docml", "portrait_section", &ok);
hgs
parents:
diff changeset
   162
        Q_ASSERT(ok);
hgs
parents:
diff changeset
   163
    }
hgs
parents:
diff changeset
   164
}
hgs
parents:
diff changeset
   165
hgs
parents:
diff changeset
   166
void WlanWizardPageScanning::wlanScanResultPreCheck()
hgs
parents:
diff changeset
   167
{
hgs
parents:
diff changeset
   168
    if (!mWidget) {
hgs
parents:
diff changeset
   169
        OstTrace1( TRACE_BORDER, WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK,
hgs
parents:
diff changeset
   170
            "WlanWizardPageScanning::wlanScanResultPreCheck no widget;this=%x",
hgs
parents:
diff changeset
   171
            this );
hgs
parents:
diff changeset
   172
hgs
parents:
diff changeset
   173
        mScanResultsAvailable = true;
hgs
parents:
diff changeset
   174
    }
hgs
parents:
diff changeset
   175
    else {
hgs
parents:
diff changeset
   176
        if (mWizard->isCurrentPage(mWidget)) {
hgs
parents:
diff changeset
   177
            OstTrace0( TRACE_BORDER,
hgs
parents:
diff changeset
   178
                DUP1_WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK,
hgs
parents:
diff changeset
   179
                "WlanWizardPageScanning::wlanScanResultPreCheck go to results");
hgs
parents:
diff changeset
   180
hgs
parents:
diff changeset
   181
            wlanScanApReady();
hgs
parents:
diff changeset
   182
        }
hgs
parents:
diff changeset
   183
        else {
hgs
parents:
diff changeset
   184
            OstTrace0( TRACE_BORDER,
hgs
parents:
diff changeset
   185
                DUP2_WLANWIZARDPAGESCANNING_WLANSCANRESULTPRECHECK,
hgs
parents:
diff changeset
   186
                "WlanWizardPageScanning::wlanScanResultPreCheck"
hgs
parents:
diff changeset
   187
                " not current widget" );
hgs
parents:
diff changeset
   188
hgs
parents:
diff changeset
   189
            mScanResultsAvailable = true;
hgs
parents:
diff changeset
   190
        }
hgs
parents:
diff changeset
   191
    }
hgs
parents:
diff changeset
   192
}
hgs
parents:
diff changeset
   193
hgs
parents:
diff changeset
   194
/*!
hgs
parents:
diff changeset
   195
 * Public networks did not reveal matches. Direct scan has been performed to
hgs
parents:
diff changeset
   196
 * find out if the network is hidden but in range. If network is found, proceed
hgs
parents:
diff changeset
   197
 * to next page according to scan results.
hgs
parents:
diff changeset
   198
 * If nothing is found, proceed to manual network 
hgs
parents:
diff changeset
   199
 * mode selection page.
hgs
parents:
diff changeset
   200
 */
hgs
parents:
diff changeset
   201
void WlanWizardPageScanning::wlanScanDirectReady()
hgs
parents:
diff changeset
   202
{
hgs
parents:
diff changeset
   203
    OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESCANNING_WLANSCANDIRECTREADY,
hgs
parents:
diff changeset
   204
        "WlanWizardPageScanning::wlanScanDirectReady" );
hgs
parents:
diff changeset
   205
hgs
parents:
diff changeset
   206
    WlanQtUtils* utils = mWizard->wlanQtUtils();
hgs
parents:
diff changeset
   207
hgs
parents:
diff changeset
   208
    Q_ASSERT(utils);
hgs
parents:
diff changeset
   209
hgs
parents:
diff changeset
   210
    QList<QSharedPointer<WlanQtUtilsAp> > wlanApList;
hgs
parents:
diff changeset
   211
hgs
parents:
diff changeset
   212
    utils->availableWlanAps(wlanApList);
hgs
parents:
diff changeset
   213
hgs
parents:
diff changeset
   214
    qDebug("WlanWizardPageScanning::wlanScanDirectReady - results read");
hgs
parents:
diff changeset
   215
hgs
parents:
diff changeset
   216
    QSharedPointer<WlanQtUtilsAp> item;
hgs
parents:
diff changeset
   217
hgs
parents:
diff changeset
   218
    qDebug("%d APs found", wlanApList.size());
hgs
parents:
diff changeset
   219
    if(wlanApList.isEmpty()) {
hgs
parents:
diff changeset
   220
        qDebug("Match not found. Go to manual settings.");
hgs
parents:
diff changeset
   221
        mNextPageId = WlanWizardPageInternal::PageNetworkMode;
hgs
parents:
diff changeset
   222
    }
hgs
parents:
diff changeset
   223
    else {
hgs
parents:
diff changeset
   224
        int strongestSignal = 0;
hgs
parents:
diff changeset
   225
        int strongestIndex = 0;
hgs
parents:
diff changeset
   226
hgs
parents:
diff changeset
   227
        for (int i = 0; i < wlanApList.size(); i++) {
hgs
parents:
diff changeset
   228
            // All direct scan results are matches. No need to compare ssids.
hgs
parents:
diff changeset
   229
            // In case there are multiple matches to direct scan, use the
hgs
parents:
diff changeset
   230
            // strongest signal on the result list.
hgs
parents:
diff changeset
   231
            item = wlanApList.at(i);
hgs
parents:
diff changeset
   232
            int str = item->value(WlanQtUtilsAp::ConfIdSignalStrength).toInt();
hgs
parents:
diff changeset
   233
            if (str > strongestSignal) {
hgs
parents:
diff changeset
   234
                qDebug("Strongest signal %d at %d", str, i);
hgs
parents:
diff changeset
   235
                strongestSignal = str;
hgs
parents:
diff changeset
   236
                strongestIndex = i;
hgs
parents:
diff changeset
   237
            }
hgs
parents:
diff changeset
   238
        }
hgs
parents:
diff changeset
   239
hgs
parents:
diff changeset
   240
        item = wlanApList.at(strongestIndex);
hgs
parents:
diff changeset
   241
        qDebug("Select AP at %d", strongestIndex);
hgs
parents:
diff changeset
   242
        mNextPageId = mWizard->getNextPageId(
hgs
parents:
diff changeset
   243
            item->value(WlanQtUtilsAp::ConfIdSsid).toString(),
hgs
parents:
diff changeset
   244
            item->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt(),
hgs
parents:
diff changeset
   245
            item->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt(),
hgs
parents:
diff changeset
   246
            item->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool(),
hgs
parents:
diff changeset
   247
            true, // hidden
hgs
parents:
diff changeset
   248
            item->value(WlanQtUtilsAp::ConfIdWpsSupported).toBool());
hgs
parents:
diff changeset
   249
    }
hgs
parents:
diff changeset
   250
hgs
parents:
diff changeset
   251
    mWizard->nextPage();
hgs
parents:
diff changeset
   252
hgs
parents:
diff changeset
   253
}
hgs
parents:
diff changeset
   254
hgs
parents:
diff changeset
   255
/*!
hgs
parents:
diff changeset
   256
 * All wlan channels have been scanned for public networks. Now process the
hgs
parents:
diff changeset
   257
 * results. If a network is found which matches the ssid set by the user,
hgs
parents:
diff changeset
   258
 * proceed to next page according to the network attributes.
hgs
parents:
diff changeset
   259
 * If no ssid match is found, proceed to a direct scan.
hgs
parents:
diff changeset
   260
 */
hgs
parents:
diff changeset
   261
void WlanWizardPageScanning::wlanScanApReady()
hgs
parents:
diff changeset
   262
{
hgs
parents:
diff changeset
   263
    OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESCANNING_WLANSCANAPREADY,
hgs
parents:
diff changeset
   264
        "WlanWizardPageScanning::wlanScanApReady" );
hgs
parents:
diff changeset
   265
hgs
parents:
diff changeset
   266
    WlanQtUtils* utils = mWizard->wlanQtUtils();
hgs
parents:
diff changeset
   267
    Q_ASSERT(utils);
hgs
parents:
diff changeset
   268
    
hgs
parents:
diff changeset
   269
    QList<QSharedPointer<WlanQtUtilsAp> > wlanApList;
hgs
parents:
diff changeset
   270
    
hgs
parents:
diff changeset
   271
    // Fetch the list of scan results.
hgs
parents:
diff changeset
   272
    utils->availableWlanAps(wlanApList);
hgs
parents:
diff changeset
   273
hgs
parents:
diff changeset
   274
    qDebug("WlanWizardPageScanning::wlanScanApReady - results read");
hgs
parents:
diff changeset
   275
hgs
parents:
diff changeset
   276
    QString ssid =
hgs
parents:
diff changeset
   277
        mWizard->configuration(WlanWizardPrivate::ConfSsid).toString();
hgs
parents:
diff changeset
   278
    qDebug() << "SSID scanned by user " << ssid;
hgs
parents:
diff changeset
   279
hgs
parents:
diff changeset
   280
    bool matchFound = false;
hgs
parents:
diff changeset
   281
    int strongestSignal = -1;
hgs
parents:
diff changeset
   282
    int strongestIndex = 0;
hgs
parents:
diff changeset
   283
    QSharedPointer<WlanQtUtilsAp> item;
hgs
parents:
diff changeset
   284
        
hgs
parents:
diff changeset
   285
    qDebug("%d APs found", wlanApList.size());
hgs
parents:
diff changeset
   286
hgs
parents:
diff changeset
   287
    for (int i = 0; i < wlanApList.size(); i++) {
hgs
parents:
diff changeset
   288
        // In case there are multiple matches to direct scan, use the
hgs
parents:
diff changeset
   289
        // strongest signal on the result list.
hgs
parents:
diff changeset
   290
        item = wlanApList.at(i);
hgs
parents:
diff changeset
   291
        if (item->value(WlanQtUtilsAp::ConfIdSsid).toString() == ssid) {
hgs
parents:
diff changeset
   292
            qDebug("Match found");
hgs
parents:
diff changeset
   293
            matchFound = true;
hgs
parents:
diff changeset
   294
hgs
parents:
diff changeset
   295
            int str = item->value(WlanQtUtilsAp::ConfIdSignalStrength).toInt();
hgs
parents:
diff changeset
   296
            if (str > strongestSignal) {
hgs
parents:
diff changeset
   297
                qDebug("Strongest signal %d at %d", str, i);
hgs
parents:
diff changeset
   298
                strongestSignal = str;
hgs
parents:
diff changeset
   299
                strongestIndex = i;
hgs
parents:
diff changeset
   300
            }
hgs
parents:
diff changeset
   301
        }
hgs
parents:
diff changeset
   302
    }
hgs
parents:
diff changeset
   303
hgs
parents:
diff changeset
   304
    if (matchFound) {
hgs
parents:
diff changeset
   305
        qDebug("Select AP at %d", strongestIndex);
hgs
parents:
diff changeset
   306
        item = wlanApList.at(strongestIndex);
hgs
parents:
diff changeset
   307
        mNextPageId = mWizard->getNextPageId(
hgs
parents:
diff changeset
   308
            item->value(WlanQtUtilsAp::ConfIdSsid).toString(),
hgs
parents:
diff changeset
   309
            item->value(WlanQtUtilsAp::ConfIdConnectionMode).toInt(),
hgs
parents:
diff changeset
   310
            item->value(WlanQtUtilsAp::ConfIdSecurityMode).toInt(),
hgs
parents:
diff changeset
   311
            item->value(WlanQtUtilsAp::ConfIdWpaPskUse).toBool(),
hgs
parents:
diff changeset
   312
            false, // public
hgs
parents:
diff changeset
   313
            item->value(WlanQtUtilsAp::ConfIdWpsSupported).toBool());
hgs
parents:
diff changeset
   314
        // The ssid indicated by the user was found. Proceed to next page.
hgs
parents:
diff changeset
   315
        mWizard->nextPage();
hgs
parents:
diff changeset
   316
    }
hgs
parents:
diff changeset
   317
    else {
hgs
parents:
diff changeset
   318
        qDebug("Match not found. Perform direct scan.");
hgs
parents:
diff changeset
   319
        utils->scanWlanDirect(ssid);
hgs
parents:
diff changeset
   320
    }
hgs
parents:
diff changeset
   321
hgs
parents:
diff changeset
   322
}
hgs
parents:
diff changeset
   323
hgs
parents:
diff changeset
   324
/*!
hgs
parents:
diff changeset
   325
 * Overloaded function from WlanWizardPage. Indicates that this window requires
hgs
parents:
diff changeset
   326
 * post-initialization start operations.
hgs
parents:
diff changeset
   327
 */
hgs
parents:
diff changeset
   328
bool WlanWizardPageScanning::requiresStartOperation()
hgs
parents:
diff changeset
   329
{
hgs
parents:
diff changeset
   330
    return true;
hgs
parents:
diff changeset
   331
}
hgs
parents:
diff changeset
   332
hgs
parents:
diff changeset
   333
/*!
hgs
parents:
diff changeset
   334
 * Wlan scan is performed as a "post-initialization" which is executed in a
hgs
parents:
diff changeset
   335
 * separate scheduler loop.
hgs
parents:
diff changeset
   336
 */
hgs
parents:
diff changeset
   337
void WlanWizardPageScanning::startOperation()
hgs
parents:
diff changeset
   338
{
hgs
parents:
diff changeset
   339
    OstTrace0( TRACE_NORMAL, WLANWIZARDPAGESCANNING_STARTOPERATION,
hgs
parents:
diff changeset
   340
        "WlanWizardPageScanning::startOperation - start AP scan if results"
hgs
parents:
diff changeset
   341
        " are available." );
hgs
parents:
diff changeset
   342
hgs
parents:
diff changeset
   343
    if (mScanResultsAvailable) {
hgs
parents:
diff changeset
   344
        mScanResultsAvailable = false;
hgs
parents:
diff changeset
   345
        wlanScanApReady();
hgs
parents:
diff changeset
   346
    }
hgs
parents:
diff changeset
   347
}
hgs
parents:
diff changeset
   348