Tizen Native API  5.5
Network Monitoring Wi-Fi

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:

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]apThe access point handle
[in]user_dataThe user data passed from the request function
Returns:
true to continue with the next iteration of the loop,
otherwise false 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]stateThe wifi scanning state
[in]user_dataThe user data passed from the callback registration function
See also:
inm_wifi_set_scan_state_changed_cb()
inm_wifi_unset_scan_state_changed_cb()

Enumeration Type Documentation

Enumeration for the wifi scanning state.

Since :
5.0
Enumerator:
INM_WIFI_SCAN_STATE_NOT_SCANNING 

Scan is not running

INM_WIFI_SCAN_STATE_SCANNING 

Scan is in progress


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]inmThe inm handle
[in]callbackThe callback to be called
[in]user_dataThe user data passed to the callback function
Returns:
0 on success, otherwise negative error value
Return values:
INM_ERROR_NONESuccessful
INM_ERROR_OUT_OF_MEMORYOut of memory
INM_ERROR_PERMISSION_DENIEDPermission Denied
INM_ERROR_INVALID_PARAMETERInvalid parameter
INM_ERROR_NOT_SUPPORTEDNot supported
INM_ERROR_NOT_INITIALIZEDNot initialized
INM_ERROR_OPERATION_FAILEDOperation failed
Postcondition:
This function invokes inm_wifi_found_ap_cb().

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]inmThe inm handle
[out]apThe access point handle
Returns:
0 on success, otherwise negative error value
Return values:
INM_ERROR_NONESuccessful
INM_ERROR_OUT_OF_MEMORYOut of memory
INM_ERROR_PERMISSION_DENIEDPermission Denied
INM_ERROR_INVALID_PARAMETERInvalid parameter
INM_ERROR_NOT_SUPPORTEDNot supported
INM_ERROR_NOT_INITIALIZEDNot initialized
INM_ERROR_OPERATION_FAILEDOperation failed

Gets the Wi-Fi scan state.

Since :
5.0
Parameters:
[in]inmThe inm handle
[in]stateThe Wi-Fi scan state
Returns:
0 on success, otherwise negative error value
Return values:
INM_ERROR_NONESuccessful
INM_ERROR_INVALID_PARAMETERInvalid parameter
INM_ERROR_NOT_SUPPORTEDNot supported
INM_ERROR_NOT_INITIALIZEDNot initialized
INM_ERROR_OPERATION_FAILEDOperation 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]inmThe inm handle
[in]callbackThe callback function to be called
[in]user_dataThe user data passed to the callback function
Returns:
0 on success, otherwise negative error value
Return values:
INM_ERROR_NONESuccessful
INM_ERROR_INVALID_PARAMETERInvalid parameter
INM_ERROR_NOT_SUPPORTEDNot supported
INM_ERROR_NOT_INITIALIZEDNot initialized
INM_ERROR_OPERATION_FAILEDOperation failed

Unsets the callback called when the scanning state is changed.

Since :
5.0
Parameters:
[in]inmThe inm handle
Returns:
0 on success, otherwise negative error value
Return values:
INM_ERROR_NONESuccessful
INM_ERROR_INVALID_PARAMETERInvalid parameter
INM_ERROR_NOT_SUPPORTEDNot supported
INM_ERROR_NOT_INITIALIZEDNot initialized
INM_ERROR_OPERATION_FAILEDOperation failed