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