Tizen Native API
5.5
|
The Wi-Fi API provides functions for monitoring the state of Wi-Fi.
#include <wifi-manager.h>
The Wi-Fi Monitor allows monitoring the changes of Wi-Fi.
This API is related with the following features:
It is recommended to design applications with regard to features, for reliability.
You can check if a device supports the related features for this API by using System Information, and control your application's actions accordingly.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
Functions | |
int | wifi_manager_get_connection_state (wifi_manager_h wifi, wifi_manager_connection_state_e *connection_state) |
Gets the connection state. | |
int | wifi_manager_set_device_state_changed_cb (wifi_manager_h wifi, wifi_manager_device_state_changed_cb callback, void *user_data) |
Registers the callback called when the device state is changed. | |
int | wifi_manager_unset_device_state_changed_cb (wifi_manager_h wifi) |
Unregisters the callback called when the device state is changed. | |
int | wifi_manager_set_background_scan_cb (wifi_manager_h wifi, wifi_manager_scan_finished_cb callback, void *user_data) |
Registers the callback called when the background scan is finished. | |
int | wifi_manager_unset_background_scan_cb (wifi_manager_h wifi) |
Unregisters the callback called when the scan is finished. | |
int | wifi_manager_set_scan_state_changed_cb (wifi_manager_h wifi, wifi_manager_scan_state_changed_cb callback, void *user_data) |
Registers the callback called when the scanning state is changed. | |
int | wifi_manager_unset_scan_state_changed_cb (wifi_manager_h wifi) |
Unregisters the callback called when the scanning state is changed. | |
int | wifi_manager_set_connection_state_changed_cb (wifi_manager_h wifi, wifi_manager_connection_state_changed_cb callback, void *user_data) |
Registers the callback called when the connection state is changed. | |
int | wifi_manager_unset_connection_state_changed_cb (wifi_manager_h wifi) |
Unregisters the callback called when the connection state is changed. | |
int | wifi_manager_set_rssi_level_changed_cb (wifi_manager_h wifi, wifi_manager_rssi_level_changed_cb callback, void *user_data) |
Registers callback called when the RSSI of connected Wi-Fi is changed. | |
int | wifi_manager_unset_rssi_level_changed_cb (wifi_manager_h wifi) |
Unregisters callback called when the RSSI of connected Wi-Fi is changed. | |
int | wifi_manager_set_module_state_changed_cb (wifi_manager_h wifi, wifi_manager_module_state_changed_cb callback, void *user_data) |
Registers a callback called when the Wi-Fi Module state is changed. | |
int | wifi_manager_unset_module_state_changed_cb (wifi_manager_h wifi) |
Unregisters the callback called when the Wi-Fi Module state is changed. | |
int | wifi_manager_get_module_state (wifi_manager_h wifi, wifi_manager_module_state_e *state) |
Gets the Wi-Fi Module state. | |
int | wifi_manager_bssid_scan (wifi_manager_h wifi, wifi_manager_bssid_scan_finished_cb callback, void *user_data) |
Starts BSSID scan asynchronously. | |
Typedefs | |
typedef void(* | wifi_manager_device_state_changed_cb )(wifi_manager_device_state_e state, void *user_data) |
Called when the device state is changed. | |
typedef void(* | wifi_manager_connection_state_changed_cb )(wifi_manager_connection_state_e state, wifi_manager_ap_h ap, void *user_data) |
Called when the connection state is changed. | |
typedef void(* | wifi_manager_ip_conflict_cb )(char *mac, wifi_manager_ip_conflict_state_e state, void *user_data) |
Called when the IP conflict state is changed. | |
typedef void(* | wifi_manager_rssi_level_changed_cb )(wifi_manager_rssi_level_e rssi_level, void *user_data) |
Called when the RSSI of connected Wi-Fi is changed. | |
typedef void(* | wifi_manager_module_state_changed_cb )(wifi_manager_module_state_e wifi_module_state, void *user_data) |
Called when the Wi-Fi Module state is changed. |
typedef void(* wifi_manager_connection_state_changed_cb)(wifi_manager_connection_state_e state, wifi_manager_ap_h ap, void *user_data) |
Called when the connection state is changed.
[in] | state | The connection state |
[in] | ap | The access point |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* wifi_manager_device_state_changed_cb)(wifi_manager_device_state_e state, void *user_data) |
Called when the device state is changed.
[in] | state | The device state |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* wifi_manager_ip_conflict_cb)(char *mac, wifi_manager_ip_conflict_state_e state, void *user_data) |
Called when the IP conflict state is changed.
[in] | mac | The destination MAC address causing conflict |
[in] | state | The current state |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* wifi_manager_module_state_changed_cb)(wifi_manager_module_state_e wifi_module_state, void *user_data) |
Called when the Wi-Fi Module state is changed.
[in] | wifi_module_state | The Wi-Fi Module state |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* wifi_manager_rssi_level_changed_cb)(wifi_manager_rssi_level_e rssi_level, void *user_data) |
Called when the RSSI of connected Wi-Fi is changed.
[in] | rssi_level | The level of RSSI |
[in] | user_data | The user data passed from the callback registration function |
Enumeration for the state of the Wi-Fi connection.
Enumeration for the RSSI level.
int wifi_manager_bssid_scan | ( | wifi_manager_h | wifi, |
wifi_manager_bssid_scan_finished_cb | callback, | ||
void * | user_data | ||
) |
Starts BSSID scan asynchronously.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_get_connection_state | ( | wifi_manager_h | wifi, |
wifi_manager_connection_state_e * | connection_state | ||
) |
Gets the connection state.
[in] | wifi | The Wi-Fi handle |
[out] | connection_state | The connection state |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_get_module_state | ( | wifi_manager_h | wifi, |
wifi_manager_module_state_e * | state | ||
) |
Gets the Wi-Fi Module state.
[in] | wifi | The Wi-Fi handle |
[out] | state | The Wi-Fi Module state |
0
on success, otherwise negative error value WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_set_background_scan_cb | ( | wifi_manager_h | wifi, |
wifi_manager_scan_finished_cb | callback, | ||
void * | user_data | ||
) |
Registers the callback called when the background scan is finished.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_set_connection_state_changed_cb | ( | wifi_manager_h | wifi, |
wifi_manager_connection_state_changed_cb | callback, | ||
void * | user_data | ||
) |
Registers the callback called when the connection state is changed.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_set_device_state_changed_cb | ( | wifi_manager_h | wifi, |
wifi_manager_device_state_changed_cb | callback, | ||
void * | user_data | ||
) |
Registers the callback called when the device state is changed.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_set_module_state_changed_cb | ( | wifi_manager_h | wifi, |
wifi_manager_module_state_changed_cb | callback, | ||
void * | user_data | ||
) |
Registers a callback called when the Wi-Fi Module state is changed.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
0
on success, otherwise negative error value WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_set_rssi_level_changed_cb | ( | wifi_manager_h | wifi, |
wifi_manager_rssi_level_changed_cb | callback, | ||
void * | user_data | ||
) |
Registers callback called when the RSSI of connected Wi-Fi is changed.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_set_scan_state_changed_cb | ( | wifi_manager_h | wifi, |
wifi_manager_scan_state_changed_cb | callback, | ||
void * | user_data | ||
) |
Registers the callback called when the scanning state is changed.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback function to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_unset_background_scan_cb | ( | wifi_manager_h | wifi | ) |
Unregisters the callback called when the scan is finished.
[in] | wifi | The Wi-Fi handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
Unregisters the callback called when the connection state is changed.
[in] | wifi | The Wi-Fi handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
Unregisters the callback called when the device state is changed.
[in] | wifi | The Wi-Fi handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
Unregisters the callback called when the Wi-Fi Module state is changed.
[in] | wifi | The Wi-Fi handle |
0
on success, otherwise negative error value WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
Unregisters callback called when the RSSI of connected Wi-Fi is changed.
[in] | wifi | The Wi-Fi handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
Unregisters the callback called when the scanning state is changed.
[in] | wifi | The Wi-Fi handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |