इसके माध्यम से साझा किया गया


WifiConfig_GetStoredNetworkCount Function

Header: #include <applibs/wificonfig.h>

Gets the number of stored Wi-Fi networks on the device. This function is not thread safe.

Note

Before you call WifiConfig_GetStoredNetworks, you must call WifiConfig_GetStoredNetworkCount and use the result as the array size for the WifiConfig_StoredNetwork array that is passed to WifiConfig_GetStoredNetworks.

ssize_t WifiConfig_GetStoredNetworkCount(void);

Errors

Returns -1 if an error is encountered and sets errno to the error value.

  • EACCES: the application manifest does not include the WifiConfig capability.

  • EAGAIN: the Wi-Fi device isn't ready yet.

  • ENETDOWN: the Wi-Fi network interface is unavailable.

Any other errno may also be specified; such errors aren't deterministic and the same behavior might not be retained through system updates.

Return value

Returns the number of Wi-Fi networks stored on the device, or -1 for failure, in which case errno is set to the error value.

Application manifest requirements

The application manifest must include the WifiConfig capability.