Tizen Native API
6.0
|
The TDLS APIs for managing TDLS.
Required Header
#include <wifi-manager.h>
Overview
The TDLS APIs for managing TDLS.
Required Header
This API is related with the following features:
- http://tizen.org/feature/network.wifi.tdls
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_tdls_set_discovered_cb (wifi_manager_h wifi, wifi_manager_tdls_discovered_cb callback, void *user_data) |
Registers the callback called when a TDLS device is found. | |
int | wifi_manager_tdls_unset_discovered_cb (wifi_manager_h wifi) |
Unregisters the callback called when TDLS device is found. | |
int | wifi_manager_tdls_start_discovery (wifi_manager_h wifi, const char *peer_mac_addr) |
Discovers devices that support TDLS. | |
int | wifi_manager_tdls_connect (wifi_manager_h wifi, const char *peer_mac_addr) |
Connects to a peer device. | |
int | wifi_manager_tdls_disconnect (wifi_manager_h wifi, const char *peer_mac_addr) |
Disconnects the connected peer. | |
int | wifi_manager_tdls_get_connected_peer (wifi_manager_h wifi, char **peer_mac_addr) |
Gets Peer Mac address of Connected peer. | |
int | wifi_manager_tdls_set_state_changed_cb (wifi_manager_h wifi, wifi_manager_tdls_state_changed_cb callback, void *user_data) |
Registers the callback called when TDLS state is changed. | |
int | wifi_manager_tdls_unset_state_changed_cb (wifi_manager_h wifi) |
Unregisters the callback called when TDLS state is changed. | |
int | wifi_manager_tdls_enable_channel_switching (wifi_manager_h wifi, const char *peer_mac_addr, int freq) |
Enables a TDLS channel switching request. | |
int | wifi_manager_tdls_disable_channel_switching (wifi_manager_h wifi, const char *peer_mac_addr) |
Disables a TDLS channel switching request. | |
int | wifi_manager_set_ip_conflict_cb (wifi_manager_h wifi, wifi_manager_ip_conflict_cb callback, void *user_data) |
Registers the callback called when IP conflict state is changed. | |
int | wifi_manager_unset_ip_conflict_cb (wifi_manager_h wifi) |
Unregisters the callback called when IP conflict state is changed. | |
int | wifi_manager_set_ip_conflict_detect_enable (wifi_manager_h wifi, bool detect) |
Enables or disables IP conflict detection. | |
int | wifi_manager_ip_conflict_detect_is_enabled (wifi_manager_h wifi, bool *state) |
Checks whether IP conflict detection is enabled. | |
int | wifi_manager_get_ip_conflict_state (wifi_manager_h wifi, wifi_manager_ip_conflict_state_e *state) |
Gets the state of the IP conflict. | |
int | wifi_manager_is_5ghz_band_supported (wifi_manager_h wifi, bool *supported) |
Gets whether 5Ghz Wi-Fi band is supported. | |
Typedefs | |
typedef void(* | wifi_manager_tdls_state_changed_cb )(wifi_manager_tdls_state_e state, char *peer_mac_addr, void *user_data) |
Called when the Wi-Fi TDLS state is changed. | |
typedef void(* | wifi_manager_tdls_discovered_cb )(wifi_manager_tdls_discovery_state_e state, char *peer_mac_addr, void *user_data) |
Called when the Wi-Fi TDLS is discovered. |
Typedef Documentation
typedef void(* wifi_manager_tdls_discovered_cb)(wifi_manager_tdls_discovery_state_e state, char *peer_mac_addr, void *user_data) |
Called when the Wi-Fi TDLS is discovered.
- Since :
- 4.0
- Remarks:
- peer_mac_addr is usable only in the callback. To use outside the callback, make a copy.
- Parameters:
-
[in] state The TDLS state [in] peer_mac_addr The MAC address of the TDLS peer [in] user_data The user data passed from the callback registration function
typedef void(* wifi_manager_tdls_state_changed_cb)(wifi_manager_tdls_state_e state, char *peer_mac_addr, void *user_data) |
Called when the Wi-Fi TDLS state is changed.
- Since :
- 3.0
- Parameters:
-
[in] state The TDLS state [in] peer_mac_addr The MAC address of the TDLS peer [in] user_data The user data passed from the callback registration function
Enumeration Type Documentation
Function Documentation
int wifi_manager_get_ip_conflict_state | ( | wifi_manager_h | wifi, |
wifi_manager_ip_conflict_state_e * | state | ||
) |
Gets the state of the IP conflict.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.get
- Parameters:
-
[in] wifi The Wi-Fi handle [out] state The current state of IP conflict
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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_ip_conflict_detect_is_enabled | ( | wifi_manager_h | wifi, |
bool * | state | ||
) |
Checks whether IP conflict detection is enabled.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.get
- Parameters:
-
[in] wifi The Wi-Fi handle [out] state true
if IP conflict detection is enabled, otherwisefalse
if IP conflict detection is disabled.
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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_is_5ghz_band_supported | ( | wifi_manager_h | wifi, |
bool * | supported | ||
) |
Gets whether 5Ghz Wi-Fi band is supported.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.get
- Parameters:
-
[in] wifi The Wi-Fi handle [out] supported true
if 5Ghz Wi-Fi band is supported, otherwisefalse
if 5Ghz Wi-Fi band is not supported.
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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_set_ip_conflict_cb | ( | wifi_manager_h | wifi, |
wifi_manager_ip_conflict_cb | callback, | ||
void * | user_data | ||
) |
Registers the callback called when IP conflict state is changed.
- Since :
- 5.0
- Parameters:
-
[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
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
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_ip_conflict_detect_enable | ( | wifi_manager_h | wifi, |
bool | detect | ||
) |
Enables or disables IP conflict detection.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.set
- Parameters:
-
[in] wifi The Wi-Fi handle [in] detect True or false boolean to enable or disable
- Returns:
0
on success, otherwise negative error value
- Return values:
-
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_PERMISSION_DENIED Permission denied WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported
int wifi_manager_tdls_connect | ( | wifi_manager_h | wifi, |
const char * | peer_mac_addr | ||
) |
Connects to a peer device.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.set
- Parameters:
-
[in] wifi The Wi-Fi handle [in] peer_mac_addr The MAC address of the peer device to be connected
- Returns:
0
on success, otherwise negative error value
- Return values:
-
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_PERMISSION_DENIED Permission Denied WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported
int wifi_manager_tdls_disable_channel_switching | ( | wifi_manager_h | wifi, |
const char * | peer_mac_addr | ||
) |
Disables a TDLS channel switching request.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.set
- Parameters:
-
[in] wifi The Wi-Fi handle [in] peer_mac_addr The MAC address of the connected TDLS peer
- Returns:
0
on success, otherwise negative error value
- Return values:
-
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_PERMISSION_DENIED Permission denied WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported
int wifi_manager_tdls_disconnect | ( | wifi_manager_h | wifi, |
const char * | peer_mac_addr | ||
) |
Disconnects the connected peer.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.set
- Parameters:
-
[in] wifi The Wi-Fi handle [in] peer_mac_addr The MAC address of the connected peer
- Returns:
0
on success, otherwise negative error value
- Return values:
-
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_PERMISSION_DENIED Permission Denied WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported
int wifi_manager_tdls_enable_channel_switching | ( | wifi_manager_h | wifi, |
const char * | peer_mac_addr, | ||
int | freq | ||
) |
Enables a TDLS channel switching request.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.set
- Parameters:
-
[in] wifi The Wi-Fi handle [in] peer_mac_addr The MAC address of the connected TDLS peer [in] freq The new frequency [MHz]
- Returns:
0
on success, otherwise negative error value
- Return values:
-
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_PERMISSION_DENIED Permission denied WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported
int wifi_manager_tdls_get_connected_peer | ( | wifi_manager_h | wifi, |
char ** | peer_mac_addr | ||
) |
Gets Peer Mac address of Connected peer.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.get
- Remarks:
- The peer_mac_addr should be freed using free().
- Parameters:
-
[in] wifi The Wi-Fi handle [out] peer_mac_addr The MAC address of the connected peer
- Returns:
0
on success, otherwise negative error value
- Return values:
-
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_NO_CONNECTION No active TDLS Connection WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported
int wifi_manager_tdls_set_discovered_cb | ( | wifi_manager_h | wifi, |
wifi_manager_tdls_discovered_cb | callback, | ||
void * | user_data | ||
) |
Registers the callback called when a TDLS device is found.
- Since :
- 4.0
- Parameters:
-
[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
- Returns:
0
on success, otherwise negative error value
- Return values:
-
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_tdls_set_state_changed_cb | ( | wifi_manager_h | wifi, |
wifi_manager_tdls_state_changed_cb | callback, | ||
void * | user_data | ||
) |
Registers the callback called when TDLS state is changed.
- Since :
- 3.0
- Parameters:
-
[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
- Returns:
0
on success, otherwise negative error value
- Return values:
-
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_tdls_start_discovery | ( | wifi_manager_h | wifi, |
const char * | peer_mac_addr | ||
) |
Discovers devices that support TDLS.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.set
- Parameters:
-
[in] wifi The Wi-Fi handle [in] peer_mac_addr The MAC address (e.g., ff:ff:ff:ff:ff:ff, AA:BB:CC:DD:EE:FF) of the peer to be discovered
- Returns:
0
on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied
int wifi_manager_tdls_unset_discovered_cb | ( | wifi_manager_h | wifi | ) |
Unregisters the callback called when TDLS device is found.
- Since :
- 4.0
- Parameters:
-
[in] wifi The Wi-Fi handle
- Returns:
0
on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation
Unregisters the callback called when TDLS state is changed.
- Since :
- 3.0
- Parameters:
-
[in] wifi The Wi-Fi handle
- Returns:
0
on success, otherwise negative error value
- Return values:
-
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
int wifi_manager_unset_ip_conflict_cb | ( | wifi_manager_h | wifi | ) |
Unregisters the callback called when IP conflict state is changed.
- Since :
- 5.0
- Parameters:
-
[in] wifi The Wi-Fi handle
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
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