API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

TAPI_AEECLSID_SERVINGNETWORKS

Brew Release
Brew MP 1.0.2
See Also
ISHELL_CreateInstance() ISignal
Description
This class provides an implementation of the tapi_IServingNetworks interface, which allows applications to get information about current serving networks and a mechanism to notify an application on any change in network information.
Example:
The following is an example of using tapi_IServingNetworks to register for changes in serving system information, and to get the details of WLAN network information when available.
   
   nRet = ISHELL_CreateInstance(pIShell, tapi_AEECLSID_ServingNetworks, (void **) &piServingNetworks);
   // Check return value, handle errors...

   nRet = tapi_IServingNetworks_OnSrvInfoChange(piServingNetworks, piSignal);
   // Check return value, handle errors...


A function associated with a signal can get WLAN network information in following way:
   
   // Retrieve the available number of networks
   nRet = tapi_IServingNetworks_GetSrvNetworks(piServingNetworks, NULL, 0, &nAvailNw);
   // Check return value, handle errors...
   
   if(0 == nAvailNw){
      return;
   }
      
   nNwInfoLen = sizeof(AEETNwInfo) * nAvailNw;
   pNwInfo = MALLOC(nNwInfoLen);
   // Check return value, handle errors...

   nRet = tapi_IServingNetworks_GetSrvNetworks(piServingNetworks, pNwInfo, nNwInfoLen , &nAvailNw);
   // Check return value, handle errors...
   
   bFound = FALSE;
   for(i =0; isysMode){
         bFound = TRUE;
         break;
      }
   }
   
   if(FALSE == bFound){
      return; //No Wlan network found
   }
   
   // Set union descriptor prior to use
   tapiSrvInfo._d = tapi_SYS_MODE_WLAN;
   
   nRet = tapi_IServingNetworks_GetNetworkInfo(piServingNetworks, pNwInfo[i]->nwid , tapiSrvInfo);
   // Check return value, handle errors...
      
Default Interface Name