wlanutilities/wlanwizard/inc/wlanwizardpagescanning.h
changeset 39 7b3e49e4608a
parent 31 e8f4211554fb
equal deleted inserted replaced
36:682dd021f9be 39:7b3e49e4608a
    17 
    17 
    18 #ifndef WLANWIZARDPAGESCANNING_H
    18 #ifndef WLANWIZARDPAGESCANNING_H
    19 #define WLANWIZARDPAGESCANNING_H
    19 #define WLANWIZARDPAGESCANNING_H
    20 
    20 
    21 // System includes
    21 // System includes
       
    22 #include <QSharedPointer>
       
    23 #include <QList>
       
    24 #include <QHash>
    22 
    25 
    23 // User includes
    26 // User includes
    24 #include "wlanwizardpageinternal.h"
    27 #include "wlanwizardpageinternal.h"
    25 #include "wlanwizard.h"
    28 #include "wlanwizard.h"
       
    29 #include "wlanwizardscanlist.h"
    26 
    30 
    27 // Forward declarations
    31 // Forward declarations
    28 class WlanWizardPrivate;
    32 class WlanWizardPrivate;
    29 class HbLabel;
    33 class HbLabel;
    30 class HbProgressBar;
    34 class HbProgressBar;
    31 class HbDocumentLoader;
    35 class HbDocumentLoader;
       
    36 class WlanQtUtilsAp;
    32 
    37 
    33 // External data types
    38 // External data types
    34 
    39 
    35 // Constants
    40 // Constants
    36 
    41 
    42 class WlanWizardPageScanning: public WlanWizardPageInternal
    47 class WlanWizardPageScanning: public WlanWizardPageInternal
    43 {
    48 {
    44     Q_OBJECT
    49     Q_OBJECT
    45     
    50     
    46 public:
    51 public:
    47     /*!
    52     explicit WlanWizardPageScanning(WlanWizardPrivate* parent);
    48      * Constructor method for the scanning view object.
    53     virtual ~WlanWizardPageScanning();
    49      * @param parent pointer to parent object.
       
    50      */
       
    51     WlanWizardPageScanning(WlanWizardPrivate* parent);
       
    52     
    54     
    53     /*!
    55 public:
    54      * Destructor for the scanning view object.
    56     HbWidget* initializePage();
    55      */
    57     int nextId(bool &removeFromStack) const;
    56     ~WlanWizardPageScanning();
    58     int previousTriggered();
       
    59     bool showPage();
       
    60     bool requiresStartOperation();
       
    61     void startOperation();
    57 
    62 
    58     /*!
    63 signals:
    59      * Page initialization procedures. Inherited from WlanWizardPage.
       
    60      * @see WlanWizardPage
       
    61      */
       
    62     HbWidget* initializePage();
       
    63     
    64     
    64     /*!
    65 public slots:
    65      * Validates the scan results and sets the configuration in the wlanwizard.
    66     void loadDocmlSection(Qt::Orientation orientation);
    66      * @param removeFromStack output parameter that returns true.
    67     void wlanScanResultPreCheck(int scanStatus);
    67      * @return depending on the scan results, returns the appropriate view
    68     void wlanScanDirectReady(int scanStatus);
    68      * identifier.
       
    69      */
       
    70     int nextId(bool &removeFromStack) const;
       
    71     
    69     
    72     /*!
    70 protected:
    73      * Reimplements the default function in WlanWizardPage.
       
    74      * @return true
       
    75      * @see WlanWizardPage
       
    76      */
       
    77     bool requiresStartOperation();
       
    78     
    71     
    79     /*!
    72 protected slots:
    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     
    73     
   121 private:
    74 private:
   122     /*!
    75     Q_DISABLE_COPY(WlanWizardPageScanning)
   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();
    76     void wlanScanApReady();
       
    77     void getSsidMatchList(
       
    78         QString ssid,
       
    79         const QList<QSharedPointer<WlanQtUtilsAp> > &matchList);
       
    80     void getFinalScanResults(
       
    81         const QList<QSharedPointer<WlanQtUtilsAp> > &directScanResults,
       
    82         const QList<QSharedPointer<WlanQtUtilsAp> > &openScanResults,
       
    83         QList<WlanScanResult> &finalResults);
       
    84     int processMultipleScanResults(const QList<WlanScanResult> &finalResults);
       
    85     void selectNextPageActions(const QList<WlanScanResult> &finalResults);
       
    86     
       
    87 private slots:
   134 
    88 
       
    89 private:
   135     /*!
    90     /*!
   136      * Pointer to the view.
    91      * Pointer to the view.
   137      */
    92      */
   138     HbWidget *mWidget;
    93     HbWidget *mWidget;
   139 
    94 
   140     /*!
    95     /*!
   141      * Pointer to the label widget.
    96      * Pointer to the label widget.
   142      */
    97      */
   143     HbLabel *mLabel;
    98     HbLabel *mLabel;
   144 
       
   145     /*!
       
   146      * Pointer to the progress bar widget.
       
   147      */
       
   148     HbProgressBar *mBar;
       
   149 
    99 
   150     /*!
   100     /*!
   151      * Pointer to document loader object.
   101      * Pointer to document loader object.
   152      */
   102      */
   153     HbDocumentLoader *mLoader;
   103     HbDocumentLoader *mLoader;
   156      * The next page identifier. 
   106      * The next page identifier. 
   157      */
   107      */
   158     int mNextPageId;
   108     int mNextPageId;
   159     
   109     
   160     /*!
   110     /*!
   161      * Indicator, whether AP scan results are available or not
   111      * Indicator, whether AP scan results are available or not.
   162      */
   112      */
   163     bool mScanResultsAvailable;
   113     bool mScanResultsAvailable;
       
   114     
       
   115     /*!
       
   116      * Indicator of the current scan status.
       
   117      */
       
   118     int mScanStatus;
       
   119     
       
   120     /*!
       
   121      * list containing the results of a normal scan of open networks.
       
   122      */
       
   123     QList<QSharedPointer<WlanQtUtilsAp> > mWlanApList;
   164 };
   124 };
   165 
   125 
   166 /*! @} */
   126 /*! @} */
   167 
   127 
   168 #endif
   128 #endif