wlanutilities/wlansniffer/apwizard/inc/wsfwlanssiddiscovery.h
branchRCL_3
changeset 25 f28ada11abbf
parent 0 56b72877c1cb
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:   Class header for CWsfWlanSsidDiscovery
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_WSFWLANSSIDDISCOVERY_H
       
    21 #define C_WSFWLANSSIDDISCOVERY_H
       
    22 
       
    23 
       
    24 //  EXTERNAL INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <cmpluginwlandef.h>
       
    27 
       
    28 
       
    29 //  FORWARD DECLARATIONS
       
    30 class CWlanMgmtClient;
       
    31 class CWlanScanInfo;
       
    32 
       
    33 
       
    34 //  CLASS DEFINITION
       
    35 /**
       
    36 * Class to carry out WLAN SSID discovery
       
    37 *
       
    38 * @since S60 5.0
       
    39 * @lib wsfapwizard.lib
       
    40 */
       
    41 NONSHARABLE_CLASS( CWsfWlanSsidDiscovery ): public CActive
       
    42     {
       
    43     /**
       
    44     * States of the WLAN discovery
       
    45     */
       
    46     enum TWsfWlanDiscoveryState
       
    47         {
       
    48         /**
       
    49         * Scanning has been started
       
    50         */
       
    51         EScanning,
       
    52         
       
    53         /**
       
    54         * Scanning finished
       
    55         */
       
    56         EDone,
       
    57         
       
    58         /**
       
    59         * Scanning was aborted
       
    60         */
       
    61         EAborted
       
    62         };
       
    63         
       
    64         
       
    65     public:
       
    66         /**
       
    67         * Factory function.
       
    68         * @since S60 5.0
       
    69         * @return Class instance
       
    70         */
       
    71         static CWsfWlanSsidDiscovery* NewL();
       
    72 
       
    73         /**
       
    74         * Destructor
       
    75         * @since S60 5.0
       
    76         */
       
    77         ~CWsfWlanSsidDiscovery();
       
    78         
       
    79         
       
    80     private:
       
    81         /**
       
    82         * Constructor
       
    83         * @since S60 5.0
       
    84         */
       
    85         CWsfWlanSsidDiscovery();
       
    86 
       
    87         /**
       
    88         * Second-phase constructor
       
    89         * @since S60 5.0
       
    90         */
       
    91         void ConstructL();
       
    92 
       
    93     
       
    94     public:     // new methods
       
    95         /**
       
    96         * Executes a direct/broadcast scan
       
    97         * @since S60 5.0
       
    98         * @param aSsid The SSID to look for in case of direct scan
       
    99         * @param aBroadcast If set to ETrue, does a broadcast scan, 
       
   100         *                   otherwise direct
       
   101         * @param aNetworkMode Network mode for the found network
       
   102         * @param aSecurityMode Security mode for the found network
       
   103         * @param aUsesPsk ETrue if the found network uses PSK in WPA mode
       
   104         * @return ETrue if the scan was successful, otherwise EFalse
       
   105         */
       
   106         TBool ScanForSsidL( TWlanSsid& aSsid, 
       
   107                             TBool aBroadcast,
       
   108                             CMManager::TWlanNetMode& aNetworkMode,
       
   109                             CMManager::TWlanSecMode& aSecurityMode,
       
   110                             TBool& aUsesPsk );
       
   111 
       
   112         /**
       
   113         * Aborts the scanning process
       
   114         * @since S60 5.0
       
   115         */
       
   116         void AbortScanning();
       
   117 
       
   118 
       
   119     private:  // from CActive
       
   120     
       
   121         /**
       
   122         * Implements cancellation of an outstanding request.
       
   123         * @since S60 5.0
       
   124         */
       
   125         void DoCancel();
       
   126 
       
   127         /**
       
   128         * Handles an active object's request completion event.
       
   129         * @since S60 5.0
       
   130         */
       
   131         void RunL();
       
   132         
       
   133         
       
   134     private:    // data
       
   135         /**
       
   136         * Progress state
       
   137         */
       
   138         TUint32 iProgState;
       
   139         
       
   140         /**
       
   141         * Nested waitloop
       
   142         */
       
   143         CActiveSchedulerWait iWait;
       
   144         
       
   145         /**
       
   146         * Wlan management client interface (owned)
       
   147         */
       
   148         CWlanMgmtClient* iWlanMgmt;
       
   149         
       
   150         /**
       
   151         * Scan info object (owned)
       
   152         */
       
   153         CWlanScanInfo* iScanInfo;
       
   154     };
       
   155 
       
   156 
       
   157 #endif // C_WSFWLANSSIDDISCOVERY_H