wlanutilities/wlanqtutilities/wrapper/src/wlanqtutilsscan.cpp
branchRCL_3
changeset 25 f28ada11abbf
parent 24 63be7eb3fc78
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
     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 scan platform specific implementation wrapper.
       
    16 */
       
    17 
       
    18 // System includes
       
    19 
       
    20 // User includes
       
    21 
       
    22 #include "wlanqtutilsscaniap_symbian.h"
       
    23 #include "wlanqtutilsscanap_symbian.h"
       
    24 #include "wlanqtutilsscan.h"
       
    25 
       
    26 /*!
       
    27     \class WlanQtUtilsScan
       
    28     \brief WLAN scan platform specific implementation wrapper.
       
    29 
       
    30     This class implements the WLAN scanning functionality platform independently.
       
    31     The private implementation class implements the platform specific parts. 
       
    32 */
       
    33 
       
    34 // External function prototypes
       
    35 
       
    36 // Local constants
       
    37 
       
    38 // ======== LOCAL FUNCTIONS ========
       
    39 
       
    40 // ======== MEMBER FUNCTIONS ========
       
    41 
       
    42 /*!
       
    43     Constructor.
       
    44     
       
    45     @param [in] parent Parent object.
       
    46 */
       
    47 
       
    48 WlanQtUtilsScan::WlanQtUtilsScan(QObject *parent) :
       
    49     QObject(parent)
       
    50 {
       
    51     QT_TRAP_THROWING(
       
    52         d_ptrIap = WlanQtUtilsScanIapPrivate::NewL(this);
       
    53         d_ptrAp = WlanQtUtilsScanApPrivate::NewL(this));
       
    54 }
       
    55 
       
    56 /*!
       
    57     Destructor.
       
    58 */
       
    59 
       
    60 WlanQtUtilsScan::~WlanQtUtilsScan()
       
    61 {
       
    62     delete d_ptrIap;
       
    63     delete d_ptrAp;
       
    64 }
       
    65 
       
    66 /*!
       
    67     Scans available WLAN IAP's, including hidden ones.
       
    68 */
       
    69 
       
    70 void WlanQtUtilsScan::scanWlanIaps()
       
    71 {
       
    72     d_ptrIap->ScanIaps();
       
    73 }
       
    74 
       
    75 /*!
       
    76     Scans available WLAN AP's (i.e. broadcast scan).
       
    77 */
       
    78 
       
    79 void WlanQtUtilsScan::scanWlanAps()
       
    80 {
       
    81     d_ptrAp->Scan();
       
    82 }
       
    83 
       
    84 /*!
       
    85     Scans with given WLAN SSID (i.e. direct scan).
       
    86     
       
    87     @param [in] ssid WLAN SSID to scan.
       
    88 */
       
    89 
       
    90 void WlanQtUtilsScan::scanWlanDirect(const QString &ssid)
       
    91 {
       
    92     d_ptrAp->Scan(ssid);
       
    93 }
       
    94 
       
    95 /*!
       
    96     Stops current scan. Can also be called if there is no scan in progres.
       
    97 */
       
    98 
       
    99 void WlanQtUtilsScan::stopScan()
       
   100 {
       
   101     d_ptrIap->StopScan();
       
   102     d_ptrAp->StopScan();
       
   103 }