Tizen Native API
6.5
|
The Network Monitoring API provides functions for getting Wi-Fi general information.
Required Header
#include <inm.h>
Overview
This set of functions is used to get Wi-Fi related information. To use This kind of APIs, You should create a inm handle using inm_initialize(). You should destroy the created inm handle if you do not need it anymore.
Related Features
This API is related with the following features:
- http://tizen.org/feature/network.wifi
- http://tizen.org/feature/network.inm
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
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 | inm_wifi_set_scan_state_changed_cb (inm_h inm, inm_wifi_scan_state_changed_cb callback, void *user_data) |
Sets the callback called when the scanning state is changed. | |
int | inm_wifi_unset_scan_state_changed_cb (inm_h inm) |
Unsets the callback called when the scanning state is changed. | |
int | inm_wifi_get_scan_state (inm_h inm, inm_wifi_scan_state_e *state) |
Gets the Wi-Fi scan state. | |
int | inm_wifi_get_connected_ap (inm_h inm, inm_connection_h *ap) |
Gets the handle of the connected access point. | |
int | inm_wifi_foreach_found_ap (inm_h inm, inm_wifi_found_ap_cb callback, void *user_data) |
Gets the result of the scan. | |
Typedefs | |
typedef void(* | inm_wifi_scan_state_changed_cb )(inm_wifi_scan_state_e state, void *user_data) |
Called when the scanning state is changed. | |
typedef bool(* | inm_wifi_found_ap_cb )(inm_connection_h ap, void *user_data) |
Called for each found access point. |
Typedef Documentation
typedef bool(* inm_wifi_found_ap_cb)(inm_connection_h ap, void *user_data) |
Called for each found access point.
- Since :
- 5.0
- Remarks:
- ap should not be freed. ap is valid only in this function. In order to use ap outside this function, you must copy the ap with inm_connection_clone().
- Parameters:
-
[in] ap The access point handle [in] user_data The user data passed from the request function
- Returns:
true
to continue with the next iteration of the loop,
otherwisefalse
to break out of the loop
- Precondition:
- inm_wifi_foreach_found_ap() will invoke this callback.
- See also:
- inm_wifi_foreach_found_ap()
typedef void(* inm_wifi_scan_state_changed_cb)(inm_wifi_scan_state_e state, void *user_data) |
Called when the scanning state is changed.
- Since :
- 5.0
- Parameters:
-
[in] state The wifi scanning state [in] user_data The user data passed from the callback registration function
Enumeration Type Documentation
Function Documentation
int inm_wifi_foreach_found_ap | ( | inm_h | inm, |
inm_wifi_found_ap_cb | callback, | ||
void * | user_data | ||
) |
Gets the result of the scan.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.get
- Parameters:
-
[in] inm The inm handle [in] callback The callback to be called [in] user_data The user data passed to the callback function
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_OUT_OF_MEMORY Out of memory INM_ERROR_PERMISSION_DENIED Permission Denied INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_NOT_INITIALIZED Not initialized INM_ERROR_OPERATION_FAILED Operation failed
- Postcondition:
- This function invokes inm_wifi_found_ap_cb().
int inm_wifi_get_connected_ap | ( | inm_h | inm, |
inm_connection_h * | ap | ||
) |
Gets the handle of the connected access point.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.get
- Remarks:
- You must release ap using inm_connection_destroy().
- Parameters:
-
[in] inm The inm handle [out] ap The access point handle
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_OUT_OF_MEMORY Out of memory INM_ERROR_PERMISSION_DENIED Permission Denied INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_NOT_INITIALIZED Not initialized INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_get_scan_state | ( | inm_h | inm, |
inm_wifi_scan_state_e * | state | ||
) |
Gets the Wi-Fi scan state.
- Since :
- 5.0
- Parameters:
-
[in] inm The inm handle [in] state The Wi-Fi scan state
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_NOT_INITIALIZED Not initialized INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_set_scan_state_changed_cb | ( | inm_h | inm, |
inm_wifi_scan_state_changed_cb | callback, | ||
void * | user_data | ||
) |
Sets the callback called when the scanning state is changed.
- Since :
- 5.0
- Parameters:
-
[in] inm The inm handle [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:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_NOT_INITIALIZED Not initialized INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_unset_scan_state_changed_cb | ( | inm_h | inm | ) |
Unsets the callback called when the scanning state is changed.
- Since :
- 5.0
- Parameters:
-
[in] inm The inm handle
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_NOT_INITIALIZED Not initialized INM_ERROR_OPERATION_FAILED Operation failed