Tizen Native API  4.0
Wi-Fi Direct

Wi-Fi Direct provides API to manage Wi-Fi Direct.

Required Header

#include <wifi-direct.h>

Overview

This set of functions is used to manage the settings of Wi-Fi Direct. In addition, this set provides functions to connect and disconnect remote devices using Wi-Fi Direct.

Related Features

This API is related with the following features:

Functions

int wifi_direct_initialize (void)
 Initializes Wi-Fi Direct service.
int wifi_direct_deinitialize (void)
 Deinitializes Wi-Fi Direct service.
int wifi_direct_set_device_state_changed_cb (wifi_direct_device_state_changed_cb cb, void *user_data)
 Registers the callback called when the state of device is changed.
int wifi_direct_unset_device_state_changed_cb (void)
 Unregisters the callback called when the state of device is changed.
int wifi_direct_set_discovery_state_changed_cb (wifi_direct_discovery_state_chagned_cb cb, void *user_data)
 Registers the callback called when the state of discovery is changed.
int wifi_direct_unset_discovery_state_changed_cb (void)
 Unregisters the callback called when the state of discovery is changed.
int wifi_direct_set_peer_found_cb (wifi_direct_peer_found_cb cb, void *user_data)
 Registers the callback called when the peer is found.
int wifi_direct_unset_peer_found_cb (void)
 Unregisters the callback called when the peer is found.
int wifi_direct_set_connection_state_changed_cb (wifi_direct_connection_state_changed_cb cb, void *user_data)
 Registers the callback called when the state of connection is changed.
int wifi_direct_unset_connection_state_changed_cb (void)
 Unregisters the callback called when the state of connection is changed.
int wifi_direct_set_client_ip_address_assigned_cb (wifi_direct_client_ip_address_assigned_cb cb, void *user_data)
 Registers the callback called when the IP address of the client is assigned if your device is the group owner.
int wifi_direct_unset_client_ip_address_assigned_cb (void)
 Unregisters the callback called when the IP address of the client is assigned if your device is the group owner.
int wifi_direct_set_service_state_changed_cb (wifi_direct_service_state_changed_cb cb, void *user_data)
 Registers the callback called when the state of the service discovery is changed.
int wifi_direct_unset_service_state_changed_cb (void)
 Unregisters the callback called when the state of the service discovery is changed.
int wifi_direct_set_state_changed_cb (wifi_direct_state_changed_cb cb, void *user_data)
 Registers the callback called when the state of Wi-Fi Direct is changed.
int wifi_direct_unset_state_changed_cb (void)
 Unregisters the callback called when the state of Wi-Fi Direct is changed.
int wifi_direct_activate (void)
 Activates the Wi-Fi Direct service, asynchronously.
int wifi_direct_deactivate (void)
 Deactivates the Wi-Fi Direct service, asynchronously.
int wifi_direct_start_discovery (bool listen_only, int timeout)
 Starts discovery to find all P2P capable devices, asynchronously.
int wifi_direct_start_discovery_specific_channel (bool listen_only, int timeout, wifi_direct_discovery_channel_e channel)
 Starts discovery to find all P2P capable devices with specified channel, asynchronously.
int wifi_direct_start_discovery_specific_freq (bool listen_only, int timeout, int frequency)
 Starts discovery to find all P2P capable devices with specified frequency, asynchronously.
int wifi_direct_cancel_discovery (void)
 Cancels discovery process, asynchronously.
int wifi_direct_foreach_discovered_peers (wifi_direct_discovered_peer_cb callback, void *user_data)
 Gets the information of discovered peers.
int wifi_direct_connect (char *mac_address)
 Connects to a specified peer, asynchronously.
int wifi_direct_cancel_connection (char *mac_address)
 Cancels the connection now in progress.
int wifi_direct_disconnect_all (void)
 Disconnects all connected links to peers, asynchronously.
int wifi_direct_disconnect (char *mac_address)
 Disconnects the specified peer, asynchronously.
int wifi_direct_foreach_connected_peers (wifi_direct_connected_peer_cb callback, void *user_data)
 Gets the information of connected peers.
int wifi_direct_create_group (void)
 Creates a Wi-Fi Direct Group, asynchronously.
int wifi_direct_destroy_group (void)
 Destorys the Wi-Fi Direct Group, asynchronously.
int wifi_direct_is_group_owner (bool *is_group_owner)
 Checks whether this device is the group owner or not.
int wifi_direct_is_autonomous_group (bool *is_autonomous_group)
 Checks whether the current group is the autonomous group or not.
int wifi_direct_set_device_name (const char *device_name)
 Sets the friendly name of a local device.
int wifi_direct_get_device_name (char **device_name)
 Gets the name of a local device.
int wifi_direct_get_ssid (char **ssid)
 Gets SSID(Service Set Identifier) of a local device.
int wifi_direct_get_network_interface_name (char **name)
 Gets the name of network interface (for example: eth0, pdp0).
int wifi_direct_get_ip_address (char **ip_address)
 Gets IP address of a local device.
int wifi_direct_get_subnet_mask (char **subnet_mask)
 Gets the Subnet Mask.
int wifi_direct_get_gateway_address (char **gateway_address)
 Gets the Gateway address.
int wifi_direct_get_mac_address (char **mac_address)
 Gets MAC address of a local device.
int wifi_direct_get_state (wifi_direct_state_e *state)
 Gets the state of Wi-Fi Direct service.
int wifi_direct_is_discoverable (bool *discoverable)
 Checks whether this device is discoverable or not by P2P discovery.
int wifi_direct_is_listening_only (bool *listen_only)
 Checks whether the local device is listening only.
int wifi_direct_get_primary_device_type (wifi_direct_primary_device_type_e *type)
 Gets the primary device type of a local device.
int wifi_direct_get_secondary_device_type (wifi_direct_secondary_device_type_e *type)
 Gets the secondary device type of a local device.
int wifi_direct_activate_pushbutton (void)
 Set the WPS config PBC as preferred method for connection.
int wifi_direct_set_wps_pin (char *pin)
 Sets or updates the WPS PIN number user expects.
int wifi_direct_get_wps_pin (char **pin)
 Gets the WPS PIN number.
int wifi_direct_get_supported_wps_mode (int *wps_mode)
 Gets all the supported WPS (Wi-Fi Protected Setup) types at local device.
int wifi_direct_foreach_supported_wps_types (wifi_direct_supported_wps_type_cb callback, void *user_data)
 Gets the supported WPS (Wi-Fi Protected Setup) types.
int wifi_direct_get_local_wps_type (wifi_direct_wps_type_e *type)
 Gets the WPS (Wi-Fi Protected Setup) type.
int wifi_direct_set_req_wps_type (wifi_direct_wps_type_e type)
 Sets the requested WPS (Wi-Fi Protected Setup) type.
int wifi_direct_get_req_wps_type (wifi_direct_wps_type_e *type)
 Gets the requested WPS (Wi-Fi Protected Setup) type.
int wifi_direct_set_group_owner_intent (int intent)
 Sets the intent of the group owner.
int wifi_direct_get_group_owner_intent (int *intent)
 Gets the intent of the group owner.
int wifi_direct_set_max_clients (int max)
 Sets the max number of clients.
int wifi_direct_get_max_clients (int *max)
 Gets the max number of clients.
int wifi_direct_set_passphrase (const char *passphrase)
 Sets or updates Wi-Fi Protected Access (WPA) password. When creating Wi-Fi Direct Group, this password will be used.
int wifi_direct_get_passphrase (char **passphrase)
 Gets the Wi-Fi Protected Access (WPA) password when creating Wi-Fi Direct Group.
int wifi_direct_get_operating_channel (int *channel)
 Gets the operating channel.
int wifi_direct_set_autoconnection_mode (bool mode)
 Sets the Autoconnection mode.
int wifi_direct_is_autoconnection_mode (bool *mode)
 Get the Autoconnection mode status.
int wifi_direct_set_autoconnection_peer (char *mac_address)
 Allows a device to connect automatically.
int wifi_direct_set_persistent_group_enabled (bool enabled)
 Enables the persistent group.
int wifi_direct_is_persistent_group_enabled (bool *enabled)
 Checks whether the persistent group is enabled or disabled.
int wifi_direct_foreach_persistent_groups (wifi_direct_persistent_group_cb callback, void *user_data)
 Gets the persistent groups.
int wifi_direct_remove_persistent_group (char *mac_address, const char *ssid)
 Removes a persistent group.
int wifi_direct_start_service_discovery (char *mac_address, wifi_direct_service_type_e service_type)
 WiFi Direct Service Discovery will be started.
int wifi_direct_cancel_service_discovery (char *mac_address, wifi_direct_service_type_e service_type)
 A service started for Wi-Fi Direct Service Discovery will be stopped.
int wifi_direct_register_service (wifi_direct_service_type_e service_type, char *info1, char *info2, unsigned int *service_id)
 Registers for a service using Wi-Fi Direct Service Discovery.
int wifi_direct_deregister_service (unsigned int service_id)
 Deregisters for a service used for Wi-Fi Direct Service Discovery.
int wifi_direct_init_miracast (bool enable)
 Initializes OR Deintializes the WiFi Direct Display (MIRACAST) service.
int wifi_direct_get_peer_info (char *mac_address, wifi_direct_discovered_peer_info_s **peer_info)
 Gets the information of a discovered peer.
int wifi_direct_init_display (void)
 Enables Wi-Fi Display (WFD) functionality and initialize the various variables required for WFD.
int wifi_direct_deinit_display (void)
 This API shall disable Wi-Fi Display functionality & disable the support of WFD Information Element (IE).
int wifi_direct_set_display (wifi_direct_display_type_e type, int port, int hdcp)
 Sets the Wi-Fi Display parameters for the WFD IE of local device.
int wifi_direct_set_display_availability (bool availability)
 Sets the Wi-Fi Display Session Availability.
int wifi_direct_get_peer_display_type (char *mac_address, wifi_direct_display_type_e *type)
 Gets the information of a peer's Wi-Fi Display device type.
int wifi_direct_get_peer_display_availability (char *mac_address, bool *availability)
 Gets the information of a peer's Wi-Fi Display session availability.
int wifi_direct_get_peer_display_hdcp (char *mac_address, int *hdcp)
 Gets the information of a peer's Wi-Fi Display HDCP support.
int wifi_direct_get_peer_display_port (char *mac_address, int *port)
 Gets the information of a peer's Wi-Fi Display RTSP control port.
int wifi_direct_get_peer_display_throughput (char *mac_address, int *throughput)
 Gets the information of a peer's Wi-Fi Display max throughput.
int wifi_direct_set_auto_group_removal (bool enable)
 Enables / Disables automatic group removal feature when all peers are disconnected.
int wifi_direct_set_session_timer (int seconds)
 Sets the timer which is used to expire the connection session.
int wifi_direct_get_session_timer (int *seconds)
 Gets the timer which is used to expire the connection session.
int wifi_direct_get_peer_rssi (char *mac_address, int *rssi)
 Gets the timer which is used to expire the connection session.
int wifi_direct_add_vsie (wifi_direct_vsie_frames_e frame_id, const char *vsie_str)
 Adds the Wi-Fi Vendor Specific Information Element (VSIE) to specific frame type.
int wifi_direct_get_vsie (wifi_direct_vsie_frames_e frame_id, char **vsie_str)
 Gets the Wi-Fi Vendor Specific Information Elements (VSIE) from specific frame.
int wifi_direct_remove_vsie (wifi_direct_vsie_frames_e frame_id, const char *vsie_str)
 Removes the Wi-Fi Vendor Specific Information Element (VSIE) from specific frame.
int wifi_direct_get_connecting_peer_info (wifi_direct_discovered_peer_info_s **peer_info)
 Gets the information of peer devices which is in the connecting state.

Typedefs

typedef void(* wifi_direct_discovery_state_chagned_cb )(int error_code, wifi_direct_discovery_state_e discovery_state, void *user_data)
 Called when the state of discovery is changed.
typedef void(* wifi_direct_peer_found_cb )(int error_code, wifi_direct_discovery_state_e discovery_state, const char *mac_address, void *user_data)
 Called when the peer is found.
typedef void(* wifi_direct_device_state_changed_cb )(int error_code, wifi_direct_device_state_e device_state, void *user_data)
 Called when the state of device is changed.
typedef void(* wifi_direct_connection_state_changed_cb )(int error_code, wifi_direct_connection_state_e connection_state, const char *mac_address, void *user_data)
 Called when the state of connection is changed.
typedef void(* wifi_direct_client_ip_address_assigned_cb )(const char *mac_address, const char *ip_address, const char *interface_address, void *user_data)
 Called when IP address of client is assigned when your device is the group owner.
typedef void(* wifi_direct_service_state_changed_cb )(int error_code, wifi_direct_service_discovery_state_e service_state, wifi_direct_service_type_e service_type, void *response_data, const char *mac_address, void *user_data)
 Called when the state of Service discovery is changed.
typedef void(* wifi_direct_state_changed_cb )(wifi_direct_state_e state, void *user_data)
 Called when the state of Wi-FI Direct is changed.
typedef bool(* wifi_direct_discovered_peer_cb )(wifi_direct_discovered_peer_info_s *peer, void *user_data)
 Called repeatedly when you get the information of discovered peers.
typedef bool(* wifi_direct_connected_peer_cb )(wifi_direct_connected_peer_info_s *peer, void *user_data)
 Called repeatedly when you get the information of connected peers.
typedef bool(* wifi_direct_supported_wps_type_cb )(wifi_direct_wps_type_e type, void *user_data)
 Called when you get the supported WPS(Wi-Fi Protected Setup) type repeatedly.
typedef bool(* wifi_direct_persistent_group_cb )(const char *mac_address, const char *ssid, void *user_data)
 Called when you get the persistent groups repeatedly.

Typedef Documentation

typedef void(* wifi_direct_client_ip_address_assigned_cb)(const char *mac_address, const char *ip_address, const char *interface_address, void *user_data)

Called when IP address of client is assigned when your device is the group owner.

The following error codes can be delivered WIFI_DIRECT_ERROR_NONE WIFI_DIRECT_ERROR_OPERATION_FAILED WIFI_DIRECT_ERROR_NOT_PERMITTED

Since :
2.3
Parameters:
[in]mac_addressThe MAC address of connection peer
[in]ip_addressThe IP address of connection peer
[in]interface_addressThe interface address of connection peer
[in]user_dataThe user data passed from the callback registration function
Precondition:
This callback will be invoked in the thread-default main context of the thread from which you registered this callback using wifi_direct_set_client_ip_address_assigned_cb().
See also:
wifi_direct_set_client_ip_address_assigned_cb()
wifi_direct_unset_client_ip_address_assigned_cb()
typedef bool(* wifi_direct_connected_peer_cb)(wifi_direct_connected_peer_info_s *peer, void *user_data)

Called repeatedly when you get the information of connected peers.

Since :
2.3
Remarks:
peer is valid only in this function.
Parameters:
[in]peerThe information of discovered peer
[in]user_dataThe user data passed from foreach function
Returns:
true to continue with the next iteration of the loop, false to break out of the loop
See also:
wifi_direct_foreach_connected_peers()
typedef void(* wifi_direct_connection_state_changed_cb)(int error_code, wifi_direct_connection_state_e connection_state, const char *mac_address, void *user_data)

Called when the state of connection is changed.

The following error codes can be delivered WIFI_DIRECT_ERROR_NONE WIFI_DIRECT_ERROR_OPERATION_FAILED WIFI_DIRECT_ERROR_NOT_PERMITTED WIFI_DIRECT_ERROR_CONNECTION_FAILED

Since :
2.3
Parameters:
[in]error_codeThe error code
[in]connection_stateThe connection state
[in]mac_addressThe MAC address of the connection peer
[in]user_dataThe user data passed from the callback registration function
Precondition:
wifi_direct_create_group(), wifi_direct_destroy_group(), wifi_direct_connect(), wifi_direct_disconnect() or wifi_direct_disconnect_all() will invoke this callback in the thread-default main context of the thread from which you registered this callback using using wifi_direct_set_connection_state_changed_cb().
See also:
wifi_direct_connect()
wifi_direct_disconnect()
wifi_direct_disconnect_all()
wifi_direct_set_connection_state_changed_cb()
wifi_direct_unset_connection_state_changed_cb()
typedef void(* wifi_direct_device_state_changed_cb)(int error_code, wifi_direct_device_state_e device_state, void *user_data)

Called when the state of device is changed.

The following error codes can be delivered WIFI_DIRECT_ERROR_NONE WIFI_DIRECT_ERROR_OPERATION_FAILED WIFI_DIRECT_ERROR_NOT_PERMITTED

Since :
2.3
Parameters:
[in]error_codeThe error code
[in]device_stateThe device state
[in]user_dataThe user data passed from the callback registration function
Precondition:
Either wifi_direct_activate() or wifi_direct_deactivate() will invoke this callback in the thread-default main context of the thread from which you registered this callback using wifi_direct_set_device_state_changed_cb().
See also:
wifi_direct_activate()
wifi_direct_deactivate()
wifi_direct_set_device_state_changed_cb()
wifi_direct_unset_device_state_changed_cb()
typedef bool(* wifi_direct_discovered_peer_cb)(wifi_direct_discovered_peer_info_s *peer, void *user_data)

Called repeatedly when you get the information of discovered peers.

Since :
2.3
Privilege Level:
public
Remarks:
peer is valid only in this function.
Parameters:
[in]peerThe information of the discovered peer
[in]user_dataThe user data passed from foreach function
Returns:
true to continue with the next iteration of the loop, false to break out of the loop
See also:
wifi_direct_foreach_discovered_peers()
typedef void(* wifi_direct_discovery_state_chagned_cb)(int error_code, wifi_direct_discovery_state_e discovery_state, void *user_data)

Called when the state of discovery is changed.

The following error codes can be delivered WIFI_DIRECT_ERROR_NONE WIFI_DIRECT_ERROR_OPERATION_FAILED WIFI_DIRECT_ERROR_NOT_PERMITTED

Since :
2.3
Parameters:
[in]error_codeThe error code
[in]discovery_stateThe discovery state
[in]user_dataThe user data passed from the callback registration function
Precondition:
Either wifi_direct_start_discovery() or wifi_direct_cancel_discovery() will invoke this callback in the thread-default main context of the thread from which you registered this callback using wifi_direct_set_discovery_state_changed_cb().
See also:
wifi_direct_start_discovery()
wifi_direct_cancel_discovery()
wifi_direct_set_discovery_state_changed_cb()
wifi_direct_unset_discovery_state_changed_cb()
typedef void(* wifi_direct_peer_found_cb)(int error_code, wifi_direct_discovery_state_e discovery_state, const char *mac_address, void *user_data)

Called when the peer is found.

The following error codes can be delivered WIFI_DIRECT_ERROR_NONE WIFI_DIRECT_ERROR_OPERATION_FAILED WIFI_DIRECT_ERROR_NOT_PERMITTED

Since :
2.3
Parameters:
[in]error_codeThe error code
[in]discovery_stateThe discovery state
[in]mac_addressThe MAC address of found peer
[in]user_dataThe user data passed from the callback registration function
Precondition:
Either wifi_direct_start_discovery() or wifi_direct_cancel_discovery() will invoke this callback in the thread-default main context of the thread from which you registered this callback using wifi_direct_set_peer_found_cb().
See also:
wifi_direct_start_discovery()
wifi_direct_cancel_discovery()
wifi_direct_set_peer_found_cb()
wifi_direct_unset_peer_found_cb()
typedef bool(* wifi_direct_persistent_group_cb)(const char *mac_address, const char *ssid, void *user_data)

Called when you get the persistent groups repeatedly.

Since :
2.3
Parameters:
[in]mac_addressThe MAC address of the persistent group owner
[in]ssidThe SSID (Service Set Identifier) of the persistent group owner
[in]user_dataThe user data passed from the request function
Returns:
true to continue with the next iteration of the loop,
false to break out of the loop
Precondition:
wifi_direct_foreach_persistent_groups() will invoke this callback.
See also:
wifi_direct_foreach_persistent_groups()
typedef void(* wifi_direct_service_state_changed_cb)(int error_code, wifi_direct_service_discovery_state_e service_state, wifi_direct_service_type_e service_type, void *response_data, const char *mac_address, void *user_data)

Called when the state of Service discovery is changed.

The following error codes can be delivered WIFI_DIRECT_ERROR_NONE WIFI_DIRECT_ERROR_OPERATION_FAILED WIFI_DIRECT_ERROR_NOT_PERMITTED

Since :
2.3
Parameters:
[in]error_codeThe error code
[in]service_stateThe service discovery state
[in]service_typeSpecifies the types of service
[in]response_dataReceived response
[in]user_dataUser can transfer the user specific data in callback
Precondition:
Either wifi_direct_start_service_discovery() or wifi_direct_cancel_service_discovery() will invoke this callback in the thread-default main context of thethread from which you registered this callback using wifi_direct_set_service_state_changed_cb().
See also:
wifi_direct_start_discovery()
wifi_direct_cancel_discovery()
wifi_direct_set_discovery_state_changed_cb()
wifi_direct_unset_discovery_state_changed_cb()
typedef void(* wifi_direct_state_changed_cb)(wifi_direct_state_e state, void *user_data)

Called when the state of Wi-FI Direct is changed.

Since :
3.0
Parameters:
[in]stateThe Wi-Fi Direct state
[in]user_dataThe user data passed from the callback registration function
Precondition:
Changes in Wi-Fi Direct state will invoke this callback if you register this callback using wifi_direct_set_state_changed_cb().
See also:
wifi_direct_set_state_changed_cb()
wifi_direct_unset_state_changed_cb()
typedef bool(* wifi_direct_supported_wps_type_cb)(wifi_direct_wps_type_e type, void *user_data)

Called when you get the supported WPS(Wi-Fi Protected Setup) type repeatedly.

Since :
2.3
Parameters:
[in]typeThe type of WPS
[in]user_dataThe user data passed from the request function
Returns:
true to continue with the next iteration of the loop,
false to break out of the loop
Precondition:
wifi_direct_foreach_supported_wps_types() will invoke this callback.
See also:
wifi_direct_foreach_supported_wps_types()

Enumeration Type Documentation

Enumeration for Wi-Fi Direct connection state.

Since :
2.3
See also:
wifi_direct_connection_state_changed_cb()
Enumerator:
WIFI_DIRECT_CONNECTION_REQ 

Connection is requested

WIFI_DIRECT_CONNECTION_WPS_REQ 

WPS is requested

WIFI_DIRECT_CONNECTION_IN_PROGRESS 

Connection in progress

WIFI_DIRECT_CONNECTION_RSP 

Connection response

WIFI_DIRECT_DISASSOCIATION_IND 

Disconnected by remote Group Client

WIFI_DIRECT_DISCONNECTION_RSP 

Disconnected by local device

WIFI_DIRECT_DISCONNECTION_IND 

Disconnected by remote Group Owner

WIFI_DIRECT_GROUP_CREATED 

Group is created

WIFI_DIRECT_GROUP_DESTROYED 

Group is destroyed

Enumeration for Wi-Fi Direct device state.

Since :
2.3
See also:
wifi_direct_device_state_changed_cb()
Enumerator:
WIFI_DIRECT_DEVICE_STATE_ACTIVATED 

Activated

WIFI_DIRECT_DEVICE_STATE_DEACTIVATED 

Deactivated

Enumeration for Wi-Fi Direct Discovery Channel.

Since :
2.3
See also:
wifi_direct_start_discovery_specific_channel()
Enumerator:
WIFI_DIRECT_DISCOVERY_FULL_SCAN 

Scan full channel

WIFI_DIRECT_DISCOVERY_SOCIAL_CHANNEL 

Scan social channel

WIFI_DIRECT_DISCOVERY_CHANNEL1 

Scan channel 1

WIFI_DIRECT_DISCOVERY_CHANNEL6 

Scan channel 6

WIFI_DIRECT_DISCOVERY_CHANNEL11 

Scan channel 11

Enumeration for Wi-Fi Direct discovery state.

Since :
2.3
See also:
wifi_direct_discovery_state_chagned_cb()
wifi_direct_peer_found_cb()
Enumerator:
WIFI_DIRECT_ONLY_LISTEN_STARTED 

Only listen started

WIFI_DIRECT_DISCOVERY_STARTED 

Discovery started

WIFI_DIRECT_DISCOVERY_FOUND 

A remote peer is found

WIFI_DIRECT_DISCOVERY_FINISHED 

Discovery finished

WIFI_DIRECT_DISCOVERY_LOST 

A remote peer is lost (Since 3.0)

Enumeration for Wi-Fi Display device type.

Since :
2.4
See also:
wifi_direct_set_display()
wifi_direct_get_peer_display_type()
Enumerator:
WIFI_DIRECT_DISPLAY_TYPE_SOURCE 

Configure as WFD Source

WIFI_DIRECT_DISPLAY_TYPE_PRISINK 

Configure as WFD Primary Sink

WIFI_DIRECT_DISPLAY_TYPE_SECSINK 

Configure as WFD Secondary Sink

WIFI_DIRECT_DISPLAY_TYPE_DUAL 

Configure as WFD Dual Role

WIFI_DIRECT_DISPLAY_TYPE_MAX 

Not configured

Enumeration for Wi-Fi Direct error code.

Since :
2.3
Enumerator:
WIFI_DIRECT_ERROR_NONE 

Successful

WIFI_DIRECT_ERROR_NOT_PERMITTED 

Operation not permitted(1)

WIFI_DIRECT_ERROR_OUT_OF_MEMORY 

Out of memory(12)

WIFI_DIRECT_ERROR_PERMISSION_DENIED 

Permission denied(13)

WIFI_DIRECT_ERROR_RESOURCE_BUSY 

Device or resource busy(16)

WIFI_DIRECT_ERROR_INVALID_PARAMETER 

Invalid function parameter(22)

WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT 

Connection timed out(110)

WIFI_DIRECT_ERROR_NOT_SUPPORTED 

Not supported

WIFI_DIRECT_ERROR_NOT_INITIALIZED 

Not initialized

WIFI_DIRECT_ERROR_COMMUNICATION_FAILED 

I/O error

WIFI_DIRECT_ERROR_WIFI_USED 

WiFi is being used

WIFI_DIRECT_ERROR_MOBILE_AP_USED 

Mobile AP is being used

WIFI_DIRECT_ERROR_CONNECTION_FAILED 

Connection failed

WIFI_DIRECT_ERROR_AUTH_FAILED 

Authentication failed

WIFI_DIRECT_ERROR_OPERATION_FAILED 

Operation failed

WIFI_DIRECT_ERROR_TOO_MANY_CLIENT 

Too many client

WIFI_DIRECT_ERROR_ALREADY_INITIALIZED 

Already initialized client

WIFI_DIRECT_ERROR_CONNECTION_CANCELED 

Connection canceled by local device

Enumeration for Wi-Fi Direct primary device type.

Since :
2.3
See also:
wifi_direct_get_primary_device_type()
Enumerator:
WIFI_DIRECT_PRIMARY_DEVICE_TYPE_COMPUTER 

Computer

WIFI_DIRECT_PRIMARY_DEVICE_TYPE_INPUT_DEVICE 

Input device

WIFI_DIRECT_PRIMARY_DEVICE_TYPE_PRINTER 

Printer

WIFI_DIRECT_PRIMARY_DEVICE_TYPE_CAMERA 

Camera

WIFI_DIRECT_PRIMARY_DEVICE_TYPE_STORAGE 

Storage

WIFI_DIRECT_PRIMARY_DEVICE_TYPE_NETWORK_INFRA 

Network Infrastructure

WIFI_DIRECT_PRIMARY_DEVICE_TYPE_DISPLAY 

Display

WIFI_DIRECT_PRIMARY_DEVICE_TYPE_MULTIMEDIA_DEVICE 

Multimedia device

WIFI_DIRECT_PRIMARY_DEVICE_TYPE_GAME_DEVICE 

Game device

WIFI_DIRECT_PRIMARY_DEVICE_TYPE_TELEPHONE 

Telephone

WIFI_DIRECT_PRIMARY_DEVICE_TYPE_AUDIO 

Audio

WIFI_DIRECT_PRIMARY_DEVICE_TYPE_OTHER 

Others

Enumeration for Wi-Fi Direct secondary device type.

Since :
2.3
See also:
wifi_direct_get_secondary_device_type()
Enumerator:
WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_PC 

PC

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_SERVER 

Server

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_MEDIA_CENTER 

Media Center

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_UMPC 

UMPC

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_NOTEBOOK 

Notebook

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_DESKTOP 

Desktop

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_MID 

MID

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_COMPUTER_NETBOOK 

Netbook

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_KEYBOARD 

Keyboard

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_MOUSE 

Mouse

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_JOYSTICK 

Joystick

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_TRACKBALL 

Trackball

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_CONTROLLER 

Controller

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_REMOTE 

Remote

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_TOUCHSCREEN 

Touchscreen

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_BIOMETRIC_READER 

Biometric reader

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_INPUT_BARCODE_READER 

Barcode reader

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_PRINTER 

Printer

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_SCANNER 

Scanner

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_FAX 

Fax

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_COPIER 

Copier

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_PRINTER_ALL_IN_ONE 

All-in-one

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_DIGITAL_STILL 

Digital still camera

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_VIDEO 

Video camera

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_WEBCAM 

Webcam

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_CAMERA_SECURITY 

Security camera

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_STORAGE_NAS 

NAS

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_NETWORK_INFRA_AP 

AP

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_NETWORK_INFRA_ROUTER 

Router

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_NETWORK_INFRA_SWITCH 

Switch

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_NETWORK_INFRA_GATEWAY 

Gateway

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_TV 

TV

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_PIC_FRAME 

Picture frame

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_PROJECTOR 

Projector

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_DISPLAY_MONITOR 

Monitor

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_DAR 

DAR

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_PVR 

PVR

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_MCX 

MCX

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_STB 

Set-top box

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_MS_MA_ME 

Media Server / Media Adapter / Media Extender

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_MULTIMEDIA_PVP 

Portable video player

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_XBOX 

Xbox

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_XBOX_360 

Xbox 360

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_PS 

Playstation

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_CONSOLE 

Console

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_GAME_PORTABLE 

Portable

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_TELEPHONE_WINDOWS_MOBILE 

Windows Mobile

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_TELEPHONE_PHONE_SINGLE 

Phone - single mode

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_TELEPHONE_PHONE_DUAL 

Phone - dual mode

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_TELEPHONE_SMARTPHONE_SINGLE 

Smart Phone - single mode

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_TELEPHONE_SMARTPHONE_DUAL 

Smart Phone - dual mode

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_TUNER 

Tuner

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_SPEAKER 

Speaker

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_PMP 

Portable Music Player

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_HEADSET 

Headset

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_HEADPHONE 

Headphone

WIFI_DIRECT_SECONDARY_DEVICE_TYPE_AUDIO_MIC 

Microphone

Enumeration for Wi-Fi Direct service Discovery state.

Since :
2.3
See also:
wifi_direct_service_state_changed_cb()
Enumerator:
WIFI_DIRECT_SERVICE_DISCOVERY_STARTED 

Service discovery started

WIFI_DIRECT_SERVICE_DISCOVERY_FOUND 

Service discovery found

WIFI_DIRECT_SERVICE_DISCOVERY_FINISHED 

Service discovery finished

Enumeration for Service Discovery type.

Since :
2.3
See also:
wifi_direct_service_state_changed_cb()
wifi_direct_start_service_discovery()
wifi_direct_cancel_service_discovery()
wifi_direct_register_service()
Enumerator:
WIFI_DIRECT_SERVICE_TYPE_ALL 

Service discovery type all

WIFI_DIRECT_SERVICE_TYPE_BONJOUR 

Service discovery type bonjour

WIFI_DIRECT_SERVICE_TYPE_UPNP 

Service discovery type UPNP

WIFI_DIRECT_SERVICE_TYPE_WS_DISCOVERY 

Service discovery type ws discovery

WIFI_DIRECT_SERVICE_TYPE_WIFI_DISPLAY 

Service discovery type wifi-display

WIFI_DIRECT_SERVICE_TYPE_BT_ADDR 

Service discovery type bt address

WIFI_DIRECT_SERVICE_TYPE_CONTACT_INFO 

Service discovery type contact info

WIFI_DIRECT_SERVICE_TYPE_VENDOR 

Service discovery type vendor-specific

Enumeration for Wi-Fi Direct link status.

Since :
2.3
See also:
wifi_direct_state_changed_cb()
wifi_direct_get_state()
Enumerator:
WIFI_DIRECT_STATE_DEACTIVATED 

Deactivated

WIFI_DIRECT_STATE_DEACTIVATING 

Deactivating

WIFI_DIRECT_STATE_ACTIVATING 

Activating

WIFI_DIRECT_STATE_ACTIVATED 

Activated

WIFI_DIRECT_STATE_DISCOVERING 

Discovering

WIFI_DIRECT_STATE_CONNECTING 

Connecting

WIFI_DIRECT_STATE_DISCONNECTING 

Disconnecting

WIFI_DIRECT_STATE_CONNECTED 

Connected

WIFI_DIRECT_STATE_GROUP_OWNER 

Group owner

Enumeration for Wi-Fi Frame type.

Since :
4.0
See also:
wifi_direct_add_vsie()
wifi_direct_remove_vsie()
wifi_direct_get_vsie()
Enumerator:
WIFI_DIRECT_VSIE_FRAME_P2P_PROBE_REQ 

P2P probe request frame

WIFI_DIRECT_VSIE_FRAME_P2P_PROBE_RESP 

P2P probe response frame

WIFI_DIRECT_VSIE_FRAME_P2P_GO_PROBE_RESP 

P2P group owner probe response frame

WIFI_DIRECT_VSIE_FRAME_P2P_GO_BEACON 

P2P probe request frame

WIFI_DIRECT_VSIE_FRAME_P2P_PD_REQ 

P2P provision discovery request frame

WIFI_DIRECT_VSIE_FRAME_P2P_PD_RESP 

P2P provision discovery response frame

WIFI_DIRECT_VSIE_FRAME_P2P_GO_NEG_REQ 

P2P probe request frame

WIFI_DIRECT_VSIE_FRAME_P2P_GO_NEG_RESP 

P2P group owner negotiation response frame

WIFI_DIRECT_VSIE_FRAME_P2P_GO_NEG_CONF 

P2P group owner negotiation confirmation frame

WIFI_DIRECT_VSIE_FRAME_P2P_INV_REQ 

P2P invitation request frame

WIFI_DIRECT_VSIE_FRAME_P2P_INV_RESP 

P2P invitation response frame

WIFI_DIRECT_VSIE_FRAME_P2P_ASSOC_REQ 

P2P association request frame

WIFI_DIRECT_VSIE_FRAME_P2P_ASSOC_RESP 

P2P association response frame

WIFI_DIRECT_VSIE_FRAME_ASSOC_REQ 

Association request frame

Enumeration for Wi-Fi WPS type.

Since :
2.3
See also:
wifi_direct_supported_wps_type_cb()
wifi_direct_get_local_wps_type()
wifi_direct_set_req_wps_type()
wifi_direct_get_req_wps_type()
Enumerator:
WIFI_DIRECT_WPS_TYPE_NONE 

No WPS type

WIFI_DIRECT_WPS_TYPE_PBC 

Push Button Configuration

WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY 

Display PIN code

WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD 

Provide the keypad to input the PIN

Enumeration for Wi-Fi Display device type.

Since :
2.3
Enumerator:
WIFI_DISPLAY_TYPE_NONE 

Configure as WFD Source

WIFI_DISPLAY_TYPE_SINK 

Configure as WFD Primary Sink

WIFI_DISPLAY_TYPE_SRC 

Configure as WFD Secondary Sink

WIFI_DISPLAY_TYPE_DUAL 

Configure as WFD Dual Role

WIFI_DISPLAY_TYPE_MAX 

Not configured


Function Documentation

int wifi_direct_activate ( void  )

Activates the Wi-Fi Direct service, asynchronously.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
WIFI_DIRECT_ERROR_WIFI_USEDWi-Fi is being used
WIFI_DIRECT_ERROR_MOBILE_AP_USEDMobile AP is being used
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
Postcondition:
wifi_direct_device_state_changed_cb() will be invoked.
See also:
wifi_direct_initialize()
wifi_direct_deactivate()
wifi_direct_device_state_changed_cb()

Set the WPS config PBC as preferred method for connection.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
int wifi_direct_add_vsie ( wifi_direct_vsie_frames_e  frame_id,
const char *  vsie_str 
)

Adds the Wi-Fi Vendor Specific Information Element (VSIE) to specific frame type.

Since :
4.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
vsie_str for frame_id will be in effect until Wi-Fi Direct is deactivated.
Parameters:
[in]frame_idframe ID for setting VSIE
[in]vsie_strVSIE data
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_remove_vsie()
wifi_direct_get_vsie()
int wifi_direct_cancel_connection ( char *  mac_address)

Cancels the connection now in progress.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressThe MAC address of rejected device
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy

Cancels discovery process, asynchronously.

This function stops all discovery processes started with wifi_direct_start_discovery... functions.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Discovery must be started by wifi_direct_start_discovery().
Postcondition:
wifi_direct_discovery_state_chagned_cb() will be invoked.
See also:
wifi_direct_start_discovery()
wifi_direct_start_discovery_specific_channel()
wifi_direct_start_discovery_specific_freq()
wifi_direct_discovery_state_chagned_cb()
int wifi_direct_cancel_service_discovery ( char *  mac_address,
wifi_direct_service_type_e  service_type 
)

A service started for Wi-Fi Direct Service Discovery will be stopped.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressThe MAC address of servicing device. A broadcast
will be sent when MAC is SET to ZERO
[in]service_typeDescribes the type of service
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
int wifi_direct_connect ( char *  mac_address)

Connects to a specified peer, asynchronously.

This API connects to specified peer by automatically determining whether to perform group formation, join an existing group, invite, re-invoke a group. The decision is based on the current state of the peers (i.e. GO, STA, not connected) and the availability of persistent data.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressThe MAC address of remote device
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_TOO_MANY_CLIENTToo many client
WIFI_DIRECT_ERROR_CONNECTION_TIME_OUTConnection timed out
WIFI_DIRECT_ERROR_CONNECTION_FAILEDConnection failed
WIFI_DIRECT_ERROR_AUTH_FAILEDAuthentication failed
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
Postcondition:
wifi_direct_connection_state_changed_cb() will be invoked.
See also:
wifi_direct_activate()
wifi_direct_disconnect()
wifi_direct_disconnect_all()
wifi_direct_connection_state_changed_cb()
int wifi_direct_create_group ( void  )

Creates a Wi-Fi Direct Group, asynchronously.

This API sets up device as the Group Owner and waits for clients to connect. In addition, a soft AP will be created, the WPS registrar and the DHCP server will be started.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
WIFI_DIRECT_ERROR_AUTH_FAILEDAuthentication failed
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
Postcondition:
wifi_direct_connection_state_changed_cb() will be invoked with WIFI_DIRECT_GROUP_CREATED.
See also:
wifi_direct_activate()
wifi_direct_destroy_group()
wifi_direct_connection_state_changed_cb()
int wifi_direct_deactivate ( void  )

Deactivates the Wi-Fi Direct service, asynchronously.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
Postcondition:
wifi_direct_device_state_changed_cb() will be invoked.
See also:
wifi_direct_activate()
wifi_direct_device_state_changed_cb()

This API shall disable Wi-Fi Display functionality & disable the support of WFD Information Element (IE).

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate() and enable Wi-Fi Display by wifi_direct_init_display().
See also:
wifi_direct_activate()
wifi_direct_init_display()
wifi_direct_set_display()
int wifi_direct_deinitialize ( void  )

Deinitializes Wi-Fi Direct service.

Since :
2.3
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
int wifi_direct_deregister_service ( unsigned int  service_id)

Deregisters for a service used for Wi-Fi Direct Service Discovery.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]service_idA Service ID for which service has to be deregistered
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
int wifi_direct_destroy_group ( void  )

Destorys the Wi-Fi Direct Group, asynchronously.

This API destroys the Wi-Fi Direct Group owned by a local device. If creating a Group is in progress, this API cancels that creating.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
WIFI_DIRECT_ERROR_AUTH_FAILEDAuthentication failed
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
Postcondition:
wifi_direct_connection_state_changed_cb() will be invoked with WIFI_DIRECT_GROUP_DESTROYED.
See also:
wifi_direct_activate()
wifi_direct_create_group()
wifi_direct_connection_state_changed_cb()
int wifi_direct_disconnect ( char *  mac_address)

Disconnects the specified peer, asynchronously.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressThe MAC address of remote device
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
Postcondition:
wifi_direct_connection_state_changed_cb() will be invoked.
See also:
wifi_direct_activate()
wifi_direct_disconnect()
wifi_direct_connection_state_changed_cb()

Disconnects all connected links to peers, asynchronously.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
Postcondition:
wifi_direct_connection_state_changed_cb() will be invoked.
See also:
wifi_direct_activate()
wifi_direct_disconnect()
wifi_direct_connection_state_changed_cb()
int wifi_direct_foreach_connected_peers ( wifi_direct_connected_peer_cb  callback,
void *  user_data 
)

Gets the information of connected peers.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_discovered_peer_cb()
int wifi_direct_foreach_discovered_peers ( wifi_direct_discovered_peer_cb  callback,
void *  user_data 
)

Gets the information of discovered peers.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_discovered_peer_cb()

Gets the persistent groups.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
Postcondition:
wifi_direct_persistent_group_cb() will be called.
See also:
wifi_direct_initialize()
wifi_direct_persistent_group_cb()

Gets the supported WPS (Wi-Fi Protected Setup) types.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_supported_wps_type_cb()

Gets the information of peer devices which is in the connecting state.

Since :
4.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
peer_info must be released with free().
Parameters:
[out]peer_infoconnecting peer device data
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be connecting state by wifi_direct_connect() or by receiving connection request from p2p peer device.
See also:
wifi_direct_activate()
wifi_direct_connect()
int wifi_direct_get_device_name ( char **  device_name)

Gets the name of a local device.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
device_name must be released with free().
Parameters:
[out]device_nameThe name of a local device
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_set_device_name()
int wifi_direct_get_gateway_address ( char **  gateway_address)

Gets the Gateway address.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
gateway_address must be released using free().
Parameters:
[out]gateway_addressThe gateway address
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_OUT_OF_MEMORYOut of memory
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
int wifi_direct_get_group_owner_intent ( int *  intent)

Gets the intent of the group owner.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]intentThe intent of the group owner
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_set_group_owner_intent()
int wifi_direct_get_ip_address ( char **  ip_address)

Gets IP address of a local device.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
ip_address must be released using free().
Parameters:
[out]ip_addressThe IP address
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_OUT_OF_MEMORYOut of memory
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()

Gets the WPS (Wi-Fi Protected Setup) type.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]typeThe type of WPS
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_foreach_supported_wps_types()
int wifi_direct_get_mac_address ( char **  mac_address)

Gets MAC address of a local device.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
mac_address must be released using free().
Parameters:
[out]mac_addressThe MAC address
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_OUT_OF_MEMORYOut of memory
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
int wifi_direct_get_max_clients ( int *  max)

Gets the max number of clients.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]maxThe max number of clients
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_set_max_clients()

Gets the name of network interface (for example: eth0, pdp0).

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
name must be released using free().
Parameters:
[out]nameThe name of the network interface
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_OUT_OF_MEMORYOut of memory
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
int wifi_direct_get_operating_channel ( int *  channel)

Gets the operating channel.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]channelThe operating channel
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
int wifi_direct_get_passphrase ( char **  passphrase)

Gets the Wi-Fi Protected Access (WPA) password when creating Wi-Fi Direct Group.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
device_name must be released with free().
Parameters:
[out]passphrasePointer to store wpa password. Application must free this memory
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_set_passphrase()
int wifi_direct_get_peer_display_availability ( char *  mac_address,
bool *  availability 
)

Gets the information of a peer's Wi-Fi Display session availability.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressMAC Address of the PEER
[out]availabilityThe information of a peer's Wi-Fi Display session availability if there's Wi-Fi Direct information, this will be NULL
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_foreach_discovered_peers()
int wifi_direct_get_peer_display_hdcp ( char *  mac_address,
int *  hdcp 
)

Gets the information of a peer's Wi-Fi Display HDCP support.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressMAC Address of the PEER
[out]hdcpThe information of a peer's Wi-Fi Display HDCP support if there's Wi-Fi Direct information, this will be NULL
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_foreach_discovered_peers()
int wifi_direct_get_peer_display_port ( char *  mac_address,
int *  port 
)

Gets the information of a peer's Wi-Fi Display RTSP control port.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressMAC Address of the PEER
[out]portThe information of a peer's Wi-Fi Display RTSP control port if there's Wi-Fi Direct information, this will be NULL
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_foreach_discovered_peers()
int wifi_direct_get_peer_display_throughput ( char *  mac_address,
int *  throughput 
)

Gets the information of a peer's Wi-Fi Display max throughput.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressMAC Address of the PEER
[out]throughputThe information of a peer's Wi-Fi Display max throughput (Mbps) if there's Wi-Fi Direct information, this will be NULL
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_foreach_discovered_peers()
int wifi_direct_get_peer_display_type ( char *  mac_address,
wifi_direct_display_type_e type 
)

Gets the information of a peer's Wi-Fi Display device type.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressMAC Address of the PEER
[out]typeThe information of a peer's Wi-Fi Display device type if there's Wi-Fi Direct information, this will be NULL
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_foreach_discovered_peers()
int wifi_direct_get_peer_info ( char *  mac_address,
wifi_direct_discovered_peer_info_s **  peer_info 
)

Gets the information of a discovered peer.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressThe MAC address of peer to get
[out]peer_infoThe peer information to be passed
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_foreach_discovered_peers()
int wifi_direct_get_peer_rssi ( char *  mac_address,
int *  rssi 
)

Gets the timer which is used to expire the connection session.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressMAC Address of the peer device
[out]rssiRSSI value of the peer device
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_activate()

Gets the primary device type of a local device.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]typeThe primary device type
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()

Gets the requested WPS (Wi-Fi Protected Setup) type.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]typeThe type of WPS
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_foreach_supported_wps_types()

Gets the secondary device type of a local device.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]typeThe secondary device type
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
int wifi_direct_get_session_timer ( int *  seconds)

Gets the timer which is used to expire the connection session.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]secondsConnection session timer value
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
int wifi_direct_get_ssid ( char **  ssid)

Gets SSID(Service Set Identifier) of a local device.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
ssid must be released using free().
Parameters:
[out]ssidThe SSID
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_OUT_OF_MEMORYOut of memory
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()

Gets the state of Wi-Fi Direct service.

Since :
2.3
Parameters:
[out]stateThe state of Wi-Fi Direct service
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
int wifi_direct_get_subnet_mask ( char **  subnet_mask)

Gets the Subnet Mask.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
subnet_mask must be released using free().
Parameters:
[out]subnet_maskThe subnet mask
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_OUT_OF_MEMORYOut of memory
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
int wifi_direct_get_supported_wps_mode ( int *  wps_mode)

Gets all the supported WPS (Wi-Fi Protected Setup) types at local device.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]wps_modeSupported wps mode for local device
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
int wifi_direct_get_vsie ( wifi_direct_vsie_frames_e  frame_id,
char **  vsie_str 
)

Gets the Wi-Fi Vendor Specific Information Elements (VSIE) from specific frame.

Since :
4.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
vsie_str must be released with free().
Parameters:
[in]frame_idframe ID for setting VSIE
[out]vsie_strVSIE data
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate() and set VSIE for specific frame by wifi_direct_add_vsie().
See also:
wifi_direct_activate()
wifi_direct_add_vsie()
wifi_direct_remove_vsie()
int wifi_direct_get_wps_pin ( char **  pin)

Gets the WPS PIN number.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
device_name must be released with free().
Parameters:
[out]pinPointer to store pin number. Application must free this memory
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_set_wps_pin()
int wifi_direct_init_display ( void  )

Enables Wi-Fi Display (WFD) functionality and initialize the various variables required for WFD.

Starts listening in only assigned channel. Device will be discoverable only in assigned listen channel.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate()
See also:
wifi_direct_activate()
wifi_direct_deinit_display()
wifi_direct_set_display()
int wifi_direct_init_miracast ( bool  enable)

Initializes OR Deintializes the WiFi Direct Display (MIRACAST) service.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]enableEnables/Disables Service based on the value TRUE/FALSE
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
int wifi_direct_initialize ( void  )

Initializes Wi-Fi Direct service.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
See also:
wifi_direct_deinitialize()
int wifi_direct_is_autoconnection_mode ( bool *  mode)

Get the Autoconnection mode status.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]modeDescribes the auto connection mode of framework has set.
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_foreach_supported_wps_types()
wifi_direct_initialize()
int wifi_direct_is_autonomous_group ( bool *  is_autonomous_group)

Checks whether the current group is the autonomous group or not.

If you create a group by wifi_direct_create_group(), then the current group is the autonomous group.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]is_autonomous_groupIndicates whether the current group is the autonomous group or not
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_create_group()
wifi_direct_destroy_group()
int wifi_direct_is_discoverable ( bool *  discoverable)

Checks whether this device is discoverable or not by P2P discovery.

If you call wifi_direct_start_discovery(), then your device can be discoverable.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]discoverableThe status of discoverable: (true = discoverable, false = non-discoverable)
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_start_discovery()
wifi_direct_cancel_discovery()
int wifi_direct_is_group_owner ( bool *  is_group_owner)

Checks whether this device is the group owner or not.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]is_group_ownerIndicates whether this device is the group owner or not
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
int wifi_direct_is_listening_only ( bool *  listen_only)

Checks whether the local device is listening only.

If you call wifi_direct_start_discovery() with listen_only as true, it does not support specific channel but the initial 802.11.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]listen_onlyThe status of listen only:(true = listen only, false = cycling between Scan and Listen or not in discovery state)
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_start_discovery()
wifi_direct_cancel_discovery()
wifi_direct_is_discoverable()
int wifi_direct_is_persistent_group_enabled ( bool *  enabled)

Checks whether the persistent group is enabled or disabled.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[out]enabledThe status of the persistent group: (true = enabled, false = disabled)
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_set_persistent_group_enabled()
int wifi_direct_register_service ( wifi_direct_service_type_e  service_type,
char *  info1,
char *  info2,
unsigned int *  service_id 
)

Registers for a service using Wi-Fi Direct Service Discovery.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]service_typeDescribes the type of service.
[in]info1Describes the information of service. It is service-specific
[in]info2Describes the information of service. It is service-specific
[out]service_idA Service ID will be assigned to service getting registered
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
int wifi_direct_remove_persistent_group ( char *  mac_address,
const char *  ssid 
)

Removes a persistent group.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressThe MAC address of the persistent group owner
[in]ssidThe SSID (Service Set Identifier) of the persistent group owner
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_foreach_persistent_groups()
int wifi_direct_remove_vsie ( wifi_direct_vsie_frames_e  frame_id,
const char *  vsie_str 
)

Removes the Wi-Fi Vendor Specific Information Element (VSIE) from specific frame.

Since :
4.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
vsie_str for frame_id will be in effect until Wi-Fi Direct is deactivated.
Parameters:
[in]frame_idframe ID for removing VSIE
[in]vsie_strVSIE data
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate() and set VSIE for specific frame by wifi_direct_add_vsie().
See also:
wifi_direct_activate()
wifi_direct_add_vsie()
wifi_direct_get_vsie()
int wifi_direct_set_auto_group_removal ( bool  enable)

Enables / Disables automatic group removal feature when all peers are disconnected.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]enableEnables/Disables Group Removal feature based on the value TRUE/FALSE
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
Postcondition:
wifi_direct_connection_state_changed_cb() will be invoked with WIFI_DIRECT_GROUP_DESTROYED when there's no connected Group Client if device is Group Owner and this feature is enabled.
See also:
wifi_direct_activate()
wifi_direct_create_group()
wifi_direct_connection_state_changed_cb()

Sets the Autoconnection mode.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]modeDescribes the mode of connection. In case of TRUE
auto-connection will be taken care by framework
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_foreach_supported_wps_types()
int wifi_direct_set_autoconnection_peer ( char *  mac_address)

Allows a device to connect automatically.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressDevice MAC address to allow autoconnection
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()

Registers the callback called when the IP address of the client is assigned if your device is the group owner.

Since :
2.3
Parameters:
[in]cbThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_unset_client_ip_address_assigned_cb()
wifi_direct_client_ip_address_assigned_cb()

Registers the callback called when the state of connection is changed.

Since :
2.3
Parameters:
[in]cbThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_unset_connection_state_changed_cb()
wifi_direct_connection_state_changed_cb()
int wifi_direct_set_device_name ( const char *  device_name)

Sets the friendly name of a local device.

This device name is shown to other devices during device discovery.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
The name set is only valid during activated state. After Wi-Fi Direct is deactivated, this name will be same as the phone name.
Parameters:
[in]device_nameThe name of a local device
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_get_device_name()

Registers the callback called when the state of device is changed.

Since :
2.3
Parameters:
[in]cbThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_unset_device_state_changed_cb()
wifi_direct_device_state_changed_cb()

Registers the callback called when the state of discovery is changed.

Since :
2.3
Parameters:
[in]cbThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_unset_discovery_state_changed_cb()
wifi_direct_discovery_state_chagned_cb()
int wifi_direct_set_display ( wifi_direct_display_type_e  type,
int  port,
int  hdcp 
)

Sets the Wi-Fi Display parameters for the WFD IE of local device.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]typeWFD Device Type: define the Role of WFD device like source or sink
[in]portSpecifies Session Management Control Port number. It should be 2 bytes (0~65535)
[in]hdcpCP support bit: (1 = enable the hdcp support, 0 = disable the hdcp support)
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate() and enable Wi-Fi Display by wifi_direct_init_display().
See also:
wifi_direct_activate()
wifi_direct_init_display()
wifi_direct_deinit_display()
int wifi_direct_set_display_availability ( bool  availability)

Sets the Wi-Fi Display Session Availability.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]availabilityWi-Fi Display Session Availability
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate() and enable Wi-Fi Display by wifi_direct_display_init().
See also:
wifi_direct_activate()
wifi_direct_init_display()
wifi_direct_deinit_display()

Sets the intent of the group owner.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
The range of intent is 0 - 15. The higher the intent is, the higher the probability to be the group owner is.
Parameters:
[in]intentThe intent of the group owner
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_get_group_owner_intent()
int wifi_direct_set_max_clients ( int  max)

Sets the max number of clients.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]maxThe max number of clients
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_get_max_clients()
int wifi_direct_set_passphrase ( const char *  passphrase)

Sets or updates Wi-Fi Protected Access (WPA) password. When creating Wi-Fi Direct Group, this password will be used.

Since :
2.4
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
passphrasenew wpa password to set. Application must set the new password before.
Remarks:
a peer can connect to this group as Wi-Fi Infrastructured mode with a passphrase.
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_get_passphrase()
int wifi_direct_set_peer_found_cb ( wifi_direct_peer_found_cb  cb,
void *  user_data 
)

Registers the callback called when the peer is found.

Since :
2.3
Parameters:
[in]cbThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_unset_peer_found_cb()
wifi_direct_peer_found_cb()

Enables the persistent group.

If enabled is true, then P2P persistent group will be used while creating a group and establishing a connection.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]enabledThe status of persistent group: (true = enabled, false = disabled)
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_is_persistent_group_enabled()

Sets the requested WPS (Wi-Fi Protected Setup) type.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]typeThe type of WPS
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_foreach_supported_wps_types()

Registers the callback called when the state of the service discovery is changed.

Since :
2.3
Parameters:
[in]cbThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_unset_service_state_changed_cb()
wifi_direct_service_state_changed_cb()
int wifi_direct_set_session_timer ( int  seconds)

Sets the timer which is used to expire the connection session.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]secondsSet the connection session timer value in seconds
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()

Registers the callback called when the state of Wi-Fi Direct is changed.

Since :
3.0
Parameters:
[in]cbThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation Failed
See also:
wifi_direct_unset_state_changed_cb()
int wifi_direct_set_wps_pin ( char *  pin)

Sets or updates the WPS PIN number user expects.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]pinNew pin to set. Application must set the new pin number before
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
See also:
wifi_direct_activate()
wifi_direct_get_wps_pin()
int wifi_direct_start_discovery ( bool  listen_only,
int  timeout 
)

Starts discovery to find all P2P capable devices, asynchronously.

If application developers call wifi_direct_start_discovery() with listen_only as true, then skip the initial 802.11 Scan and then enter Listen state instead of cycling between Scan and Listen.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
The function can be called if the Wi-Fi Direct state is one of:
WIFI_DIRECT_STATE_ACTIVATED
WIFI_DIRECT_STATE_DISCOVERING
WIFI_DIRECT_STATE_GROUP_OWNER
The function can be called even if there is another discovery in progress. All started processes will run simultaneously. Each process will receive WIFI_DIRECT_DISCOVERY_FINISHED event in wifi_direct_discovery_state_chagned_cb().
Parameters:
[in]listen_onlyThe status of listen only: (true = listen only, false = cycling between Scan and Listen)
[in]timeoutSpecifies the duration of discovery period, in seconds. If 0, then there is no limit on how long the discovery takes. The actual limit (and time after which discovery stops) depends on the vendor's hardware and firmware
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
Postcondition:
wifi_direct_discovery_state_chagned_cb() will be invoked.
See also:
wifi_direct_activate()
wifi_direct_cancel_discovery()
wifi_direct_discovery_state_chagned_cb()
int wifi_direct_start_discovery_specific_channel ( bool  listen_only,
int  timeout,
wifi_direct_discovery_channel_e  channel 
)

Starts discovery to find all P2P capable devices with specified channel, asynchronously.

If you call this function with channel as WIFI_DIRECT_DISCOVERY_FULL_SCAN it works same as wifi_direct_start_discovery() API. If application developers call this function with channel as WIFI_DIRECT_DISCOVERY_SOCIAL_CHANNEL, then will search only the devices on the social channels(channel 1 or 6 or 11). If application developers call this function with type as WIFI_DIRECT_DISCOVERY_CHANNEL1, then will search only the devices on the channel 1. If application developers call this function with type as WIFI_DIRECT_DISCOVERY_CHANNEL6, then will search only the devices on the channel 6. If application developers call this function with type as WIFI_DIRECT_DISCOVERY_CHANNEL11, then will search only the devices on the channel 11.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
The function can be called if the Wi-Fi Direct state is one of:
WIFI_DIRECT_STATE_ACTIVATED
WIFI_DIRECT_STATE_DISCOVERING
WIFI_DIRECT_STATE_GROUP_OWNER
The function can be called even if there is another discovery in progress. All started processes will run simultaneously. Each process will receive WIFI_DIRECT_DISCOVERY_FINISHED event in wifi_direct_discovery_state_chagned_cb().
Parameters:
[in]listen_onlyThe status of listen only: (true = listen only, false = cycling between Scan and Listen)
[in]timeoutSpecifies the duration of discovery period, in seconds. If 0, then there is no limit on how long the discovery takes. The actual limit (and time after which discovery stops) depends on the vendor's hardware and firmware
[in]channelSpecifies the discovery channel. (Full scan, social channels, channel 1, 6, 11)
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
Postcondition:
wifi_direct_discovery_state_chagned_cb() will be invoked.
See also:
wifi_direct_activate()
wifi_direct_cancel_discovery()
wifi_direct_discovery_state_chagned_cb()
int wifi_direct_start_discovery_specific_freq ( bool  listen_only,
int  timeout,
int  frequency 
)

Starts discovery to find all P2P capable devices with specified frequency, asynchronously.

Since :
4.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Remarks:
The function can be called if the Wi-Fi Direct state is one of:
WIFI_DIRECT_STATE_ACTIVATED
WIFI_DIRECT_STATE_DISCOVERING
WIFI_DIRECT_STATE_GROUP_OWNER
The function can be called even if there is another discovery in progress. All started processes will run simultaneously. Each process will receive WIFI_DIRECT_DISCOVERY_FINISHED event in wifi_direct_discovery_state_chagned_cb().
Parameters:
[in]listen_onlyIndicates mode in which the discovery service will work. If true, the service will only listen, otherwise it will cycle between scanning and listening
[in]timeoutSpecifies the duration of discovery period, in seconds. If 0, then there is no limit on how long the discovery takes. The actual limit (and time after which discovery stops) depends on the vendor's hardware and firmware
[in]frequencySpecifies the discovery frequency in MHz
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
Postcondition:
wifi_direct_discovery_state_chagned_cb() will be invoked.
See also:
wifi_direct_activate()
wifi_direct_cancel_discovery()
wifi_direct_discovery_state_chagned_cb()
wifi_direct_discovered_peer_cb()
int wifi_direct_start_service_discovery ( char *  mac_address,
wifi_direct_service_type_e  service_type 
)

WiFi Direct Service Discovery will be started.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/wifidirect
Parameters:
[in]mac_addressThe MAC address of servicing device. A broadcast
will be sent when MAC is SET to ZERO
[in]service_typeDescribes the type of service
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation failed
WIFI_DIRECT_ERROR_COMMUNICATION_FAILEDCommunication failed
WIFI_DIRECT_ERROR_PERMISSION_DENIEDPermission denied
WIFI_DIRECT_ERROR_NOT_PERMITTEDOperation not permitted
WIFI_DIRECT_ERROR_NOT_SUPPORTEDNot supported
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
WIFI_DIRECT_ERROR_RESOURCE_BUSYDevice or resource busy
Precondition:
Wi-Fi Direct service must be activated by wifi_direct_activate().
Postcondition:
wifi_direct_set_service_state_changed_cb() will be invoked.
See also:
wifi_direct_activate()
wifi_direct_set_service_state_changed_cb()

Unregisters the callback called when the IP address of the client is assigned if your device is the group owner.

Since :
2.3
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_set_connection_state_changed_cb()

Unregisters the callback called when the state of connection is changed.

Since :
2.3
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_set_connection_state_changed_cb()

Unregisters the callback called when the state of device is changed.

Since :
2.3
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_set_device_state_changed_cb()

Unregisters the callback called when the state of discovery is changed.

Since :
2.3
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_set_discovery_state_changed_cb()

Unregisters the callback called when the peer is found.

Since :
2.3
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_set_peer_found_cb()

Unregisters the callback called when the state of the service discovery is changed.

Since :
2.3
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_NOT_INITIALIZEDNot initialized
Precondition:
Wi-Fi Direct service must be initialized by wifi_direct_initialize().
See also:
wifi_direct_initialize()
wifi_direct_set_service_state_changed_cb()

Unregisters the callback called when the state of Wi-Fi Direct is changed.

Since :
3.0
Returns:
0 on success, otherwise a negative error value
Return values:
WIFI_DIRECT_ERROR_NONESuccessful
WIFI_DIRECT_ERROR_OPERATION_FAILEDOperation Failed
See also:
wifi_direct_initialize()
wifi_direct_set_state_changed_cb()