wifi_service_get_fd()

Retrieve the file descriptor for Wi-Fi service events.

Synopsis:

#include <wifi/wifi_service.h>
 
WIFI_API wifi_result_t wifi_service_get_fd(wifi_service_t *wifi_service, int *fd)

Since:

BlackBerry 10.2.0

Arguments:

wifi_service

The Wi-Fi service handle.

fd

The Wi-Fi service file descriptor.

Library:

libwifi (For the qcc command, use the -l wifi option to link against this library)

Description:

This function retrieves the file descriptor that the application uses to receive event information from the Wi-Fi service.

The ownership of the file descriptor is not passed to the application. The application must not close the file descriptors manually, but should call wifi_service_shutdown() to close the file descriptor.

The application can use the file descriptor with ionotify(), select(), poll(), or bps_add_fd() to receive event notification triggers, and then call wifi_service_read_event() to retrieve the event and wifi_service_get_event_type() to get the event type details.

Returns:

A return code from wifi_result_t.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus