WifiConfig_GetScannedNetworks Function
Header: #include <applibs/wificonfig.h>
Gets the Wi-Fi networks found by the last scan operation. This function is not thread safe.
If
scannedNetworkArrayis too small to hold all the networks, this function fills all the elements and returns the number of array elements.If the WiFiConfig capability is not present, the function returns an empty array.
ssize_t WifiConfig_GetScannedNetworks(WifiConfig_ScannedNetwork * scannedNetworkArray, size_t scannedNetworkArrayCount);
Parameters
scannedNetworkArrayA pointer to an array that returns the retrieved Wi-Fi networks.scannedNetworkArrayCountThe number of elements scannedNetworkArray can hold. The array should have one element for each Wi-Fi network found by the last scan operation.
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.
EFAULT: the
scannedNetworkArrayparameter is NULL.ERANGE: the
scannedNetworkArrayCountparameter is 0.EINVAL: the
scannedNetworkArrayparameter or its struct version is invalid.EAGAIN: the Wi-Fi device isn't ready yet.
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 WifiConfig_ScannedNetwork elements returned by scannedNetworkArray, 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.
Povratne informacije
Pošalјite i prikažite povratne informacije za