/** * This function is used to list WLAN Info with WLAN Info API * * @infoBuff - when function returns it holds the WLAN Information */ void GetWLANAPIInfoL(TDes &infoBuff) { CWlanScanInfo iScanInfo; CWlanMgmtClient iWLANMgmtClient; iWLANMgmtClient.GetScanResults(iScanInfo); TInt i=1, k; TBuf<36> bss; _LIT(KNetwork, "Network "); _LIT(KNEWLine, "\n"); _LIT(KSeparator, " - "); _LIT(KBSSIDFormat, "%02X:"); _LIT(KSSIDUnknown, "SSID Unknown"); infoBuff.Zero(); for(iScanInfo.First(); !iScanInfo.IsDone(); iScanInfo.Next() ) { infoBuff.Append(KNetwork); infoBuff.AppendNum(i); infoBuff.Append(KSeparator); i++; //Retrieve BSSID TWlanBssid bssid; iScanInfo.Bssid( bssid ); bss.Zero(); for(k = 0; k < bssid.Length(); k++) bss.AppendFormat(KBSSIDFormat, bssid[k]); //remove last : bss.Delete(bss.Length()-1, 1); infoBuff.Append(bss); infoBuff.Append(KSeparator); //Get transmision level TInt8 rxLevel = iScanInfo->RXLevel(); infoBuff.AppendNum(rxLevel); infoBuff.Append(KSeparator); //Get SSID TBuf8<36> ssid; TInt err; err = GetSSID(&iScanInfo, ssid); if(err== KErrNone) { bss.Zero(); bss.Copy(ssid); infoBuff.Append(bss); } else infoBuff.Append(KSSIDUnknown); infoBuff.Append(KNEWLine); } }
Monday, April 11, 2011
GetWLANAPIInfol
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment