diff -r 000000000000 -r c40eb8fe8501 wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscan.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscan.h Tue Feb 02 02:03:13 2010 +0200 @@ -0,0 +1,382 @@ +/* +* 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: Class implementing WLAN background scan logic +* +*/ + +/* +* %version: 7 % +*/ + +#ifndef WLANBGSCAN_H +#define WLANBGSCAN_H + +#include "awsinterface.h" +#include "awsenginebase.h" +#include "wlanscanproviderinterface.h" +#include "wlantimerservices.h" +#include "wlanbgscanawscomms.h" + +/** + * WLAN Background Scan + * This class implements WLAN Background Scan logic. + * + * @since S60 S60 v5.2 + */ +NONSHARABLE_CLASS( CWlanBgScan ) : + public MWlanBgScanProvider, + public MWlanTimerServiceCallback, + public MWlanBgScanCommandListener + { + +public: + + /** + * States for WLAN Background Scan. + */ + enum TWlanBgScanState + { + EBgScanOff = 0, + EBgScanOn, + EBgScanAuto, + EBgScanAutoAws + }; + + /** + * States for Auto period. + */ + enum TWlanBgScanAutoPeriod + { + EAutoPeriodNone = 0, + EAutoPeriodNight, + EAutoPeriodDay + }; + + /** + * Describes relation of time to time range. + */ + enum TRelation + { + ESmaller, + EInsideRange, + EGreater + }; + + /** + * Two-phased constructor. + */ + static CWlanBgScan* NewL( MWlanScanResultProvider& aProvider, CWlanTimerServices& aTimerServices ); + + /** + * Destructor. + */ + virtual ~CWlanBgScan(); + + /** + * From MWlanBgScanProvider. + * Called when Scan has been completed. + * + * \msc + * ScanResultProvider,CWlanBgScan; + * --- [label="Scan is done"]; + * ScanResultProvider=>CWlanBgScan [label="ScanComplete()"]; + * ScanResultProvider<=CWlanBgScan [label="Scan()"]; + * --- [label="New scan request is placed to queue or"]; + * --- [label="existing request's scan time is updated"]; + * ScanResultProvider>>CWlanBgScan [label="return"]; + * ScanResultProvider<CWlanBgScan [label="NotConnected()"]; + * ScanResultProvider<=CWlanBgScan [label="Scan( aMaxDelay=0 )"]; + * ScanResultProvider>>CWlanBgScan [label="return"]; + * ScanResultProvider< AWS communications object. + */ + CWlanBgScanAwsComms* iAwsComms; + + /** + * Current background scan state. + */ + TWlanBgScanState iBgScanState; + + /** + * Current Auto period. + */ + TWlanBgScanAutoPeriod iAutoPeriod; + + /** + * Reference to WLAN Timer services. + */ + CWlanTimerServices& iTimerServices; + + /** + * Id of the timer service request regarding + * background scan interval change. + */ + TUint iIntervalChangeRequestId; + + /** + * Background scan peak start time. + */ + TUint iBgScanPeakStartTime; + + /** + * Background scan peak end time. + */ + TUint iBgScanPeakEndTime; + + /** + * Peak time interval. + */ + TUint iBgScanIntervalPeak; + + /** + * Off-peak time interval. + */ + TUint iBgScanIntervalOffPeak; + + }; + +#endif // WLANBGSCAN_H