Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
How to prevent web browsing with WLAN programatically
With Symbian devices, we can connect to WLAN and browse internet without restriction. But if device management want to configure devices in such a way so that WLAN, BT, IRDA, GPRS etc can't be used in company devices for security reason. How we can stop WLAN from being used? In this article, we are examining how we can prevent WLAN to browse web programmatically.
We can monitor the publish and subscribe category (KPSUidWlan) to get notification about the status of the connection. When we get the value of key either EPSWlanIndicatorActive or EPSWlanIndicatorActiveSecure then we can disconnect the connection as shown in the following code.
TInt Val = -1;
if(iWlanStatusExpected == EFalse)
TInt Count = iWlanEngine->Count();
if((Val == EPSWlanIndicatorActive || Val == EPSWlanIndicatorActiveSecure) && Count > 0)
for(TInt i = 0; i <Count; i++ )
TRAPD(tt, iWlanEngine->GetBearerL(i, bearerName));
if(bearerName.Compare(_L("WLAN")) == 0) // Check for other??
This code was tested with E90 (S60 3.1 platform) We need capability NetworkControl Example code be found from following link: File:Wlanonoff.zip