Tizen Native API
3.0
|
The Wi-Fi API provides functions for monitoring the state of Wi-Fi.
Required Header
#include <wifi.h>
Overview
The Wi-Fi Monitor allows monitoring the changes of Wi-Fi.
Related Features
This API is related with the following features:
- http://tizen.org/feature/network.wifi
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 using features in your application can be found in the Feature List.
Functions | |
int | wifi_get_connection_state (wifi_connection_state_e *connection_state) TIZEN_DEPRECATED_API |
Gets the connection state. | |
int | wifi_set_device_state_changed_cb (wifi_device_state_changed_cb callback, void *user_data) TIZEN_DEPRECATED_API |
Registers the callback called when the device state is changed. | |
int | wifi_unset_device_state_changed_cb (void) TIZEN_DEPRECATED_API |
Unregisters the callback called when the device state is changed. | |
int | wifi_set_background_scan_cb (wifi_scan_finished_cb callback, void *user_data) TIZEN_DEPRECATED_API |
Registers the callback called when the background scan is finished periodically. | |
int | wifi_unset_background_scan_cb (void) TIZEN_DEPRECATED_API |
Unregisters the callback called when the scan is finished periodically. | |
int | wifi_set_connection_state_changed_cb (wifi_connection_state_changed_cb callback, void *user_data) TIZEN_DEPRECATED_API |
Registers the callback called when the connection state is changed. | |
int | wifi_unset_connection_state_changed_cb (void) TIZEN_DEPRECATED_API |
Unregisters the callback called when the connection state is changed. | |
int | wifi_set_rssi_level_changed_cb (wifi_rssi_level_changed_cb callback, void *user_data) TIZEN_DEPRECATED_API |
Registers callback called when the RSSI of connected Wi-Fi is changed. | |
int | wifi_unset_rssi_level_changed_cb (void) TIZEN_DEPRECATED_API |
Unregisters callback called when the RSSI of connected Wi-Fi is changed. | |
Typedefs | |
typedef void(* | wifi_device_state_changed_cb )(wifi_device_state_e state, void *user_data) |
Called when the device state is changed. | |
typedef void(* | wifi_connection_state_changed_cb )(wifi_connection_state_e state, wifi_ap_h ap, void *user_data) |
Called when the connection state is changed. | |
typedef void(* | wifi_rssi_level_changed_cb )(wifi_rssi_level_e rssi_level, void *user_data) |
Called when the RSSI of connected Wi-Fi is changed. |
Typedef Documentation
typedef void(* wifi_connection_state_changed_cb)(wifi_connection_state_e state, wifi_ap_h ap, void *user_data) |
Called when the connection state is changed.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_connection_state_changed_cb instead.
- Since :
- 2.3.1
- Parameters:
-
[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_device_state_changed_cb)(wifi_device_state_e state, void *user_data) |
Called when the device state is changed.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_device_state_changed_cb instead.
- Since :
- 2.3.1
- Parameters:
-
[in] state The device state [in] user_data The user data passed from the callback registration function
typedef void(* wifi_rssi_level_changed_cb)(wifi_rssi_level_e rssi_level, void *user_data) |
Called when the RSSI of connected Wi-Fi is changed.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_rssi_level_changed_cb instead.
- Since :
- 2.3.1
- Parameters:
-
[in] rssi_level The level of RSSI [in] user_data The user data passed from the callback registration function
Enumeration Type Documentation
Enumeration for the state of the Wi-Fi connection.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_connection_state_e instead.
- Since :
- 2.3.1
enum wifi_device_state_e |
Enumeration for the state of the Wi-Fi device.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_device_state_e instead.
- Since :
- 2.3.1
enum wifi_rssi_level_e |
Enumeration for the RSSI level.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_rssi_level_e instead.
- Since :
- 2.3.1
Function Documentation
int wifi_get_connection_state | ( | wifi_connection_state_e * | connection_state | ) |
Gets the connection state.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_get_connection_state() instead.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.get
- Parameters:
-
[out] connection_state The connection state
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_PARAMETER Invalid parameter WIFI_ERROR_OPERATION_FAILED Operation failed WIFI_ERROR_PERMISSION_DENIED Permission Denied WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_set_background_scan_cb | ( | wifi_scan_finished_cb | callback, |
void * | user_data | ||
) |
Registers the callback called when the background scan is finished periodically.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_set_background_scan_cb() instead.
- Since :
- 2.3.1
- Parameters:
-
[in] callback The callback function to be called [in] user_data The user data passed to the callback function
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_OPERATION Invalid operation WIFI_ERROR_INVALID_PARAMETER Invalid parameter WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_set_connection_state_changed_cb | ( | wifi_connection_state_changed_cb | callback, |
void * | user_data | ||
) |
Registers the callback called when the connection state is changed.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_set_connection_state_changed_cb() instead.
- Since :
- 2.3.1
- Parameters:
-
[in] callback The callback function to be called [in] user_data The user data passed to the callback function
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_OPERATION Invalid operation WIFI_ERROR_INVALID_PARAMETER Invalid parameter WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_set_device_state_changed_cb | ( | wifi_device_state_changed_cb | callback, |
void * | user_data | ||
) |
Registers the callback called when the device state is changed.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_set_device_state_changed_cb() instead.
- Since :
- 2.3.1
- Parameters:
-
[in] callback The callback function to be called [in] user_data The user data passed to the callback function
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_OPERATION Invalid operation WIFI_ERROR_INVALID_PARAMETER Invalid parameter WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_set_rssi_level_changed_cb | ( | wifi_rssi_level_changed_cb | callback, |
void * | user_data | ||
) |
Registers callback called when the RSSI of connected Wi-Fi is changed.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_set_rssi_level_changed_cb() instead.
- Since :
- 2.3.1
- Parameters:
-
[in] callback The callback function to be called [in] user_data The user data passed to the callback function
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_OPERATION Invalid operation WIFI_ERROR_INVALID_PARAMETER Invalid parameter WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_unset_background_scan_cb | ( | void | ) |
Unregisters the callback called when the scan is finished periodically.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_unset_background_scan_cb() instead.
- Since :
- 2.3.1
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_OPERATION Invalid operation WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_unset_connection_state_changed_cb | ( | void | ) |
Unregisters the callback called when the connection state is changed.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_unset_connection_state_changed_cb() instead.
- Since :
- 2.3.1
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_OPERATION Invalid operation WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_unset_device_state_changed_cb | ( | void | ) |
Unregisters the callback called when the device state is changed.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_unset_device_state_changed_cb() instead.
- Since :
- 2.3.1
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_OPERATION Invalid operation WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_unset_rssi_level_changed_cb | ( | void | ) |
Unregisters callback called when the RSSI of connected Wi-Fi is changed.
- Deprecated:
- Deprecated since 3.0. Use wifi_manager_unset_rssi_level_changed_cb() instead.
- Since :
- 2.3.1
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_OPERATION Invalid operation WIFI_ERROR_NOT_SUPPORTED Not supported