wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscanproviderinterface.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 02:03:13 +0200
changeset 0 c40eb8fe8501
child 3 6524e815f76f
permissions -rw-r--r--
Revision: 201003 Kit: 201005

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  This abstract class defines WLAN scan provider interface.
*
*/

/*
* %version: 4 %
*/


#ifndef WLANSCANPROVIDERINTERFACE_H
#define WLANSCANPROVIDERINTERFACE_H

/**
 * @brief Interface definition for WLAN Scan Result Provider API.
 *
 * This class defines the methods used for issuing and cancelling Scan requests.
 *
 * @since S60 v5.2
 */
class MWlanScanResultProvider
    {

public:

    /**
     * Issue scan request.
     *
     * @since S60 v5.2
     * @param aMaxDelay Maximum amount of seconds the client is willing to wait for
     *                  the availability results. The valid range is from 0 to 1200
     *                  seconds.
     */
    virtual void Scan( const TUint& aMaxDelay ) = 0;

    /**
     * Cancel pending scan request.
     *
     * @since S60 v5.2
     */        
    virtual void CancelScan() = 0;

    };



/**
 * @brief Interface definition for WLAN Background Scan Provider API.
 *
 * This class defines the methods WLAN engine uses to communicate with 
 * WLAN Background Scan provider.
 *
 * @since S60 v5.2
 */
class MWlanBgScanProvider
    {

public:
    
    struct TWlanBgScanSettings
        {
        TUint32 backgroundScanInterval;
        TUint psmServerMode;
        TUint bgScanPeakStartTime;
        TUint bgScanPeakEndTime;
        TUint32 bgScanIntervalPeak;
        TUint32 bgScanIntervalOffPeak;
        
        TWlanBgScanSettings() :
            backgroundScanInterval( 0 ),
            psmServerMode( 0 ),
            bgScanPeakStartTime( 0),
            bgScanPeakEndTime( 0 ),
            bgScanIntervalPeak( 0 ),
            bgScanIntervalOffPeak( 0 )
            { }
        
        TWlanBgScanSettings( TUint32 aBackgroundScanInterval,
                            TUint aPsmServerMode,
                            TUint aBgScanPeakStartTime,
                            TUint aBgScanPeakEndTime,
                            TUint32 aBgScanIntervalPeak,
                            TUint32 aBgScanIntervalOffPeak ) :
            backgroundScanInterval( aBackgroundScanInterval ),
            psmServerMode( aPsmServerMode ),
            bgScanPeakStartTime( aBgScanPeakStartTime),
            bgScanPeakEndTime( aBgScanPeakEndTime ),
            bgScanIntervalPeak( aBgScanIntervalPeak ),
            bgScanIntervalOffPeak( aBgScanIntervalOffPeak )
            { }
        
        };

    /**
     * Called when Scan is complete.
     *
     * @since S60 v5.2
     */
    virtual void ScanComplete() = 0;
        
    /**
     * Issued when WLAN is disconnected.
     *
     * @since S60 v5.2
     */
    virtual void NotConnected() = 0;
    
    /**
     * Whether background scan is enabled.
     *
     * @since S60 v5.2
     * @return True if background scan is enabled,
     *         False otherwise.
     */
    virtual TBool IsBgScanEnabled() = 0;
    
    /**
     * Notification about changed settings.
     *
     * @since S60 v5.2
     * 
     * @param aSettings new settings to be taken into use
     */
    virtual void NotifyChangedSettings( TWlanBgScanSettings& aSettings ) = 0;

    };


#endif // WLANSCANPROVIDERINTERFACE_H