Tizen Native API  3.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 using features in your application can be found in the Feature List.

Functions

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.

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 WiFi TDLS state is changed.

Typedef Documentation

typedef void(* wifi_manager_tdls_state_changed_cb)(wifi_manager_tdls_state_e state, char *peer_mac_addr, void *user_data)

Called when the WiFi TDLS state is changed.

Since :
3.0
Parameters:
[in]stateThe TDLS state
[in]peer_mac_addrMAC address of the TDLS peer
[in]user_dataThe user data passed from the callback registration function
See also:
wifi_manager_tdls_set_state_changed_cb()
wifi_manager_tdls_unset_state_changed_cb()

Enumeration Type Documentation

Enumeration for the state of the Wi-Fi TDLS.

Since :
3.0
Enumerator:
WIFI_MANAGER_TDLS_STATE_DISCONNECTED 

Wi-Fi TDLS is Disconnected

WIFI_MANAGER_TDLS_STATE_CONNECTED 

Wi-Fi TDLS is Connected


Function Documentation

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]wifiThe wifi handle
[in]peer_mac_addrThe MAC address of the connected peer
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_INVALID_OPERATIONInvalid operation
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_PERMISSION_DENIEDPermission Denied
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot 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]wifiThe wifi handle
[out]peer_mac_addrThe MAC address of the connected peer
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_INVALID_OPERATIONInvalid operation
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NO_CONNECTIONNo active TDLS Connection
WIFI_MANAGER_ERROR_PERMISSION_DENIEDPermission Denied
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported

Registers the callback called when TDLS state is changed.

Since :
3.0
Parameters:
[in]wifiThe wifi 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:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_INVALID_OPERATIONInvalid operation
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported

Unregisters the callback called when TDLS state is changed.

Since :
3.0
Parameters:
[in]wifiThe wifi handle
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_INVALID_OPERATIONInvalid operation
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported