wlanutilities/wlanwizard/inc/wlanwizardpagescanning.h
changeset 31 e8f4211554fb
child 39 7b3e49e4608a
equal deleted inserted replaced
30:ab513c8439db 31:e8f4211554fb
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *   WLAN Wizard Page: Scan processing
       
    16 */
       
    17 
       
    18 #ifndef WLANWIZARDPAGESCANNING_H
       
    19 #define WLANWIZARDPAGESCANNING_H
       
    20 
       
    21 // System includes
       
    22 
       
    23 // User includes
       
    24 #include "wlanwizardpageinternal.h"
       
    25 #include "wlanwizard.h"
       
    26 
       
    27 // Forward declarations
       
    28 class WlanWizardPrivate;
       
    29 class HbLabel;
       
    30 class HbProgressBar;
       
    31 class HbDocumentLoader;
       
    32 
       
    33 // External data types
       
    34 
       
    35 // Constants
       
    36 
       
    37 /*!
       
    38  * @addtogroup group_wlan_wizard
       
    39  * @{
       
    40  */
       
    41 
       
    42 class WlanWizardPageScanning: public WlanWizardPageInternal
       
    43 {
       
    44     Q_OBJECT
       
    45     
       
    46 public:
       
    47     /*!
       
    48      * Constructor method for the scanning view object.
       
    49      * @param parent pointer to parent object.
       
    50      */
       
    51     WlanWizardPageScanning(WlanWizardPrivate* parent);
       
    52     
       
    53     /*!
       
    54      * Destructor for the scanning view object.
       
    55      */
       
    56     ~WlanWizardPageScanning();
       
    57 
       
    58     /*!
       
    59      * Page initialization procedures. Inherited from WlanWizardPage.
       
    60      * @see WlanWizardPage
       
    61      */
       
    62     HbWidget* initializePage();
       
    63     
       
    64     /*!
       
    65      * Validates the scan results and sets the configuration in the wlanwizard.
       
    66      * @param removeFromStack output parameter that returns true.
       
    67      * @return depending on the scan results, returns the appropriate view
       
    68      * identifier.
       
    69      */
       
    70     int nextId(bool &removeFromStack) const;
       
    71     
       
    72     /*!
       
    73      * Reimplements the default function in WlanWizardPage.
       
    74      * @return true
       
    75      * @see WlanWizardPage
       
    76      */
       
    77     bool requiresStartOperation();
       
    78     
       
    79     /*!
       
    80      * Reimplements the empty default function in WlanWizardPage. Initiates
       
    81      * AP scan.
       
    82      * @see WlanWizardPage
       
    83      */
       
    84     void startOperation();
       
    85     
       
    86     /*!
       
    87      * This method is overrides the default implementation from WlanWizardPage.
       
    88      * It indicates whether the Next-button should be enabled or not.
       
    89      * @return always false - the scanning proceeds to next window
       
    90      * automatically or not at all.
       
    91      */
       
    92     bool showPage();
       
    93 
       
    94 public slots:
       
    95     /*!
       
    96      * Loads the document orientation information from occ_add_wlan_06.docml
       
    97      * This is called each time phone orientation changes.
       
    98      * @param orientation indicates whether the phone is in portrait or
       
    99      * landscape mode.
       
   100      */
       
   101     void loadDocml(Qt::Orientation orientation);
       
   102     
       
   103     /*!
       
   104      * Checks whether the view is active. If it is, execute wlanScanApReady. If
       
   105      * not, set mScanResultsAvailable to true.
       
   106      */
       
   107     void wlanScanResultPreCheck();
       
   108     
       
   109     /*!
       
   110      * Processes the direct scan results. If no results were found, the next
       
   111      * page is network mode query.
       
   112      * If match is found and scan result indicates
       
   113      * a) Open network, the next page is result processing.
       
   114      * b) Network with WEP/WPA/WPA2 protection, the next page is key query.
       
   115      * c) EAP protected network, the next page is EAP type query.
       
   116      * d) WPS support, the next page is WPS configuration page.
       
   117      * All matching results are considered hidden networks.
       
   118      */
       
   119     void wlanScanDirectReady();
       
   120     
       
   121 private:
       
   122     /*!
       
   123      * Processes the Access Point scan results in search for an access point
       
   124      * with an SSID that matches the SSID given by the user. If no match is
       
   125      * found, a direct scan is initiated with the SSID given by the user.
       
   126      * If match is found and scan result indicates
       
   127      * a) Open network, the next page is result processing.
       
   128      * b) Network with WEP/WPA/WPA2 protection, the next page is key query.
       
   129      * c) EAP protected network, the next page is EAP type query.
       
   130      * d) WPS support, the next page is WPS configuration page.
       
   131      * All matching results are considered public networks.
       
   132      */
       
   133     void wlanScanApReady();
       
   134 
       
   135     /*!
       
   136      * Pointer to the view.
       
   137      */
       
   138     HbWidget *mWidget;
       
   139 
       
   140     /*!
       
   141      * Pointer to the label widget.
       
   142      */
       
   143     HbLabel *mLabel;
       
   144 
       
   145     /*!
       
   146      * Pointer to the progress bar widget.
       
   147      */
       
   148     HbProgressBar *mBar;
       
   149 
       
   150     /*!
       
   151      * Pointer to document loader object.
       
   152      */
       
   153     HbDocumentLoader *mLoader;
       
   154 
       
   155     /*!
       
   156      * The next page identifier. 
       
   157      */
       
   158     int mNextPageId;
       
   159     
       
   160     /*!
       
   161      * Indicator, whether AP scan results are available or not
       
   162      */
       
   163     bool mScanResultsAvailable;
       
   164 };
       
   165 
       
   166 /*! @} */
       
   167 
       
   168 #endif