×
Namespaces

Variants
Actions
Revision as of 16:24, 23 April 2009 by Forum Nokia KB (Talk | contribs)

Archived:How to get and set the WLAN scan interval using Symbian C++

From Nokia Developer Wiki
Jump to: navigation, search


Template:KBTS

Article Metadata
Tested with
Devices(s): Nokia 6210 Navigator, Nokia E90 Communicator, Nokia N78, Nokia N95
Compatibility
Platform(s): S60 3rd Edition FP1, S60 3rd Edition FP2
S60 3rd Edition FP2
S60 3rd Edition FP1
S60 3rd Edition (initial release)
Article
Keywords: WLAN_DEVICE_SETTINGS, WLAN_BG_SCAN_INTERVAL
Created: (23 Apr 2009)
Last edited: Forum Nokia KB (23 Apr 2009)

Description

This article explains how to get and set the time period for scanning WLAN networks using definitions from the CommsDat WLAN API (wlancdbcols.h).

Template:NoteS

This API is not part of the public SDK. It can be found in the SDK API Plug-in.

Template:NoteE

Solution

 CCommsDatabase* iDb = CCommsDatabase::NewL();
 
// Open user settings
CCommsDbTableView* iDbtable =
iDb->OpenViewMatchingUintLC( TPtrC(WLAN_DEVICE_SETTINGS),
TPtrC(WLAN_DEVICE_SETTINGS_TYPE),
KWlanUserSettings );
iDbtable->UpdateRecord();
 
// Sets scan interval to 1 minute
iDbtable->WriteUintL(TPtrC( WLAN_BG_SCAN_INTERVAL ), 60);
User::LeaveIfError( iDbtable->PutRecordChanges() );
// iScanNetworks gives the Scan interval which is set in seconds
// (in this case it returns 60)
TUint32 iScanNetworks;
iDbtable->ReadUintL(TPtrC( WLAN_BG_SCAN_INTERVAL ), iScanNetworks);
103 page views in the last 30 days.
×