cmmanager/cmmgr/Plugins/cmpluginwlan/inc/cmwlancoveragecheck.h
changeset 20 9c97ad6591ae
parent 18 fcbbe021d614
child 21 b8e8e15e80f2
child 23 7ec726f93df1
child 28 860702281757
equal deleted inserted replaced
18:fcbbe021d614 20:9c97ad6591ae
     1 /*
       
     2 * Copyright (c) 2006 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:  Declaration of WLAN Coverage Check class
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CMWLANCOVERAGECHECK_H
       
    19 #define CMWLANCOVERAGECHECK_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 #include <cmpluginwlandef.h>
       
    24 
       
    25 
       
    26 // FORWARD DECLARATION
       
    27 class CCmPluginWlanDataArray;
       
    28  
       
    29 using namespace CMManager;
       
    30 
       
    31 /**
       
    32  *  WLAN Coverage Check
       
    33  *
       
    34  *  ?more_complete_description
       
    35  *
       
    36  *  @since S60 3.2
       
    37  */
       
    38 class CCmWlanCoverageCheck : public CActive
       
    39     {
       
    40     enum EWlanCoverageState
       
    41         {
       
    42         EServiceStatus,
       
    43         EScanning,
       
    44         EDone,                        
       
    45         };
       
    46         
       
    47     public:
       
    48     
       
    49         CCmWlanCoverageCheck();
       
    50         ~CCmWlanCoverageCheck();
       
    51         
       
    52         TInt GetCoverageL();
       
    53 
       
    54         TBool ScanForPromptedSsidL( TWlanSsid aEnteredSsid, TBool aBroadcast,
       
    55                                 TWlanNetMode& aNetworkMode,
       
    56                                 TWlanConnectionExtentedSecurityMode& aSecurityMode,
       
    57                                 TBool& aProtectedSetupSupported );
       
    58 
       
    59         /**
       
    60         * Returns whether the passed ssid and length results in a hidden or 
       
    61         * a non-hidden ssid.
       
    62         *
       
    63         * @since S60 3.2
       
    64         * @param aSsidLength The length of the ssid
       
    65         * @param aSsid The ssid
       
    66         * @return ETrue if the ssid is hidden.
       
    67         */
       
    68         TBool IsHiddenSsid( TUint aSsidLength, const TUint8* aSsid ) const;
       
    69         
       
    70         /**
       
    71         * Adds the passed WLAN network data to the container array
       
    72         * if it is not already there, and sets the highest signal 
       
    73         * strength if it is already in the array.
       
    74         *
       
    75         * @since S60 3.2
       
    76         * @param aArray The array to be checked
       
    77         * @param aRXLevel The signal level of this WLAN
       
    78         * @param aNetworkName The network name (SSID) of this WLAN.
       
    79         */
       
    80         void AddToArrayIfNeededL( 
       
    81                             CCmPluginWlanDataArray& aArray, 
       
    82                             TInt aRXLevel, 
       
    83                             TDesC& aNetworkName ) const;
       
    84                 
       
    85                 
       
    86     protected:  // from CActive
       
    87     
       
    88         virtual void DoCancel();
       
    89         virtual void RunL();
       
    90 
       
    91     private:
       
    92 
       
    93         TUint32                 iProgState;
       
    94         TInt                    iCoverage;
       
    95         CActiveSchedulerWait    iWait;    
       
    96     };
       
    97 
       
    98 
       
    99 #endif // CMWLANCOVERAGECHECK_H