Tizen Native API
3.0
|
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:
- http://tizen.org/feature/network.wifi
- http://tizen.org/feature/network.wifi.direct
- http://tizen.org/feature/network.wifi.direct.display
- http://tizen.org/feature/network.wifi.direct.serivce_discovery
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature List.
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_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. | |
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_address The MAC address of connection peer [in] ip_address The IP address of connection peer [in] interface_address The interface address of connection peer [in] user_data The 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().
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] peer The information of discovered peer [in] user_data The user data passed from foreach function
- Returns:
true
to continue with the next iteration of the loop,false
to break out of the loop
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_code The error code [in] connection_state The connection state [in] mac_address The MAC address of the connection peer [in] user_data The 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().
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_code The error code [in] device_state The device state [in] user_data The 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().
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] peer The information of the discovered peer [in] user_data The user data passed from foreach function
- Returns:
true
to continue with the next iteration of the loop,false
to break out of the loop
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_code The error code [in] discovery_state The discovery state [in] user_data The 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().
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_code The error code [in] discovery_state The discovery state [in] mac_address The MAC address of found peer [in] user_data The 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().
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_address The MAC address of the persistent group owner [in] ssid The SSID (Service Set Identifier) of the persistent group owner [in] user_data The 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.
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_code The error code [in] service_state The service discovery state [in] service_type Specifies the types of service [in] response_data Received response [in] user_data User 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().
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] state The Wi-Fi Direct state [in] user_data The 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().
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] type The type of WPS [in] user_data The 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.
Enumeration Type Documentation
Enumeration for Wi-Fi Direct connection state.
- Since :
- 2.3
- Enumerator:
Enumeration for Wi-Fi Direct Discovery Channel.
- Since :
- 2.3
Enumeration for Wi-Fi Direct discovery state.
- Since :
- 2.3
Enumeration for Wi-Fi Display device type.
- Since :
- 2.4
enum wifi_direct_error_e |
Enumeration for Wi-Fi Direct error code.
- Since :
- 2.3
- Enumerator:
Enumeration for Wi-Fi Direct primary device type.
- Since :
- 2.3
- Enumerator:
Enumeration for Wi-Fi Direct secondary device type.
- Since :
- 2.3
- Enumerator:
Enumeration for Service Discovery type.
- Since :
- 2.3
- Enumerator:
enum wifi_direct_state_e |
Enumeration for Wi-Fi Direct link status.
- Since :
- 2.3
- Enumerator:
enum wifi_display_type_e |
Enumeration for Wi-Fi Display device type.
- Since :
- 2.3
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_NONE Successful WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy WIFI_DIRECT_ERROR_WIFI_USED Wi-Fi is being used WIFI_DIRECT_ERROR_MOBILE_AP_USED Mobile 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.
int wifi_direct_activate_pushbutton | ( | void | ) |
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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
- See also:
- wifi_direct_activate()
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_address The MAC address of rejected device
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
int wifi_direct_cancel_discovery | ( | void | ) |
Cancels discovery process, 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_NONE Successful WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Discovery must be started by wifi_direct_start_discovery().
- Postcondition:
- wifi_direct_discovery_state_chagned_cb() will be invoked.
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_address The MAC address of servicing device. A broadcast
will be sent when MAC is SET to ZERO[in] service_type Describes the type of service
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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_address The MAC address of remote device
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_TOO_MANY_CLIENT Too many client WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT Connection timed out WIFI_DIRECT_ERROR_CONNECTION_FAILED Connection failed WIFI_DIRECT_ERROR_AUTH_FAILED Authentication failed
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
- Postcondition:
- wifi_direct_connection_state_changed_cb() will be invoked.
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_NONE Successful WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy WIFI_DIRECT_ERROR_AUTH_FAILED Authentication 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.
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_NONE Successful WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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.
int wifi_direct_deinit_display | ( | void | ) |
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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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().
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_NONE Successful WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication 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_id A Service ID for which service has to be deregistered
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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_NONE Successful WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy WIFI_DIRECT_ERROR_AUTH_FAILED Authentication 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.
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_address The MAC address of remote device
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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.
int wifi_direct_disconnect_all | ( | void | ) |
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_NONE Successful WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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.
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] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
int wifi_direct_foreach_persistent_groups | ( | wifi_direct_persistent_group_cb | callback, |
void * | user_data | ||
) |
Gets the persistent groups.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
- Postcondition:
- wifi_direct_persistent_group_cb() will be called.
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.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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_name The name of a local device
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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_address The gateway address
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_OUT_OF_MEMORY Out of memory WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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] intent The intent of the group owner
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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_address The IP address
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_OUT_OF_MEMORY Out of memory WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
- See also:
- wifi_direct_activate()
int wifi_direct_get_local_wps_type | ( | wifi_direct_wps_type_e * | type | ) |
Gets the WPS (Wi-Fi Protected Setup) type.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[out] type The type of WPS
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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_address The MAC address
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_OUT_OF_MEMORY Out of memory WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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] max The max number of clients
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
int wifi_direct_get_network_interface_name | ( | char ** | name | ) |
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] name The name of the network interface
- Returns:
0
on success, otherwise negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_OUT_OF_MEMORY Out of memory WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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] channel The operating channel
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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
- Parameters:
-
[out] passphrase Pointer to store wpa password. Application must free this memory
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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_address MAC Address of the PEER [out] availability The 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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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_address MAC Address of the PEER [out] hdcp The 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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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_address MAC Address of the PEER [out] port The 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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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_address MAC Address of the PEER [out] throughput The 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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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_address MAC Address of the PEER [out] type The 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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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_address The MAC address of peer to get [out] peer_info The peer information to be passed
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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_address MAC Address of the peer device [out] rssi RSSI value of the peer device
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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] type The primary device type
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
- See also:
- wifi_direct_initialize()
int wifi_direct_get_req_wps_type | ( | wifi_direct_wps_type_e * | type | ) |
Gets the requested WPS (Wi-Fi Protected Setup) type.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[out] type The type of WPS
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
Gets the secondary device type of a local device.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[out] type The secondary device type
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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] seconds Connection session timer value
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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] ssid The SSID
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_OUT_OF_MEMORY Out of memory WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
- See also:
- wifi_direct_initialize()
int wifi_direct_get_state | ( | wifi_direct_state_e * | state | ) |
Gets the state of Wi-Fi Direct service.
- Since :
- 2.3
- Parameters:
-
[out] state The state of Wi-Fi Direct service
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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_mask The subnet mask
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_OUT_OF_MEMORY Out of memory WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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_mode Supported wps mode for local device
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
- See also:
- wifi_direct_initialize()
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
- Parameters:
-
[out] pin Pointer to store pin number. Application must free this memory
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate()
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] enable Enables/Disables Service based on the value TRUE/FALSE
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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_NONE Successful WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy WIFI_DIRECT_ERROR_NOT_SUPPORTED Not 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] mode Describes the auto connection mode of framework has set.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- Wi-Fi Direct service must be initialized by 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_group Indicates whether the current group is the autonomous group or not
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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] discoverable The status of discoverable: ( true
= discoverable,false
= non-discoverable)
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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_owner Indicates whether this device is the group owner or not
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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_only The 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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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] enabled The status of the persistent group: ( true
= enabled,false
= disabled)
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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_type Describes the type of service. [in] info1 Describes the information of service. It is service-specific [in] info2 Describes the information of service. It is service-specific [out] service_id A Service ID will be assigned to service getting registered
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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_address The MAC address of the persistent group owner [in] ssid The SSID (Service Set Identifier) of the persistent group owner
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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] enable Enables/Disables Group Removal feature based on the value TRUE/FALSE
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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.
int wifi_direct_set_autoconnection_mode | ( | bool | mode | ) |
Sets the Autoconnection mode.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[in] mode Describes the mode of connection. In case of TRUE
auto-connection will be taken care by framework
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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_address Device MAC address to allow autoconnection
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
- See also:
- wifi_direct_activate()
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.
- Since :
- 2.3
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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.
- Since :
- 2.3
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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_name The name of a local device
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct must be activated by wifi_direct_activate().
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.
- Since :
- 2.3
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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.
- Since :
- 2.3
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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] type WFD Device Type: define the Role of WFD device like source or sink [in] port Specifies Session Management Control Port number. It should be 2 bytes (0~65535) [in] hdcp CP 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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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().
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] availability Wi-Fi Display Session Availability
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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().
int wifi_direct_set_group_owner_intent | ( | int | intent | ) |
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] intent The intent of the group owner
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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] max The max number of clients
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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:
-
passphrase new 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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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] cb The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
int wifi_direct_set_persistent_group_enabled | ( | bool | enabled | ) |
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] enabled The status of persistent group: ( true
= enabled,false
= disabled)
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
int wifi_direct_set_req_wps_type | ( | wifi_direct_wps_type_e | type | ) |
Sets the requested WPS (Wi-Fi Protected Setup) type.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[in] type The type of WPS
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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.
- Since :
- 2.3
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
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] seconds Set the connection session timer value in seconds
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
- See also:
- wifi_direct_activate()
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.
- Since :
- 3.0
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation 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] pin New 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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device or resource busy
- Precondition:
- Wi-Fi Direct service must be activated by wifi_direct_activate().
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
- Parameters:
-
[in] listen_only The status of listen only: ( true
= listen only,false
= cycling between Scan and Listen)[in] timeout Specifies the duration of discovery period, in seconds (if 0, a default value will be used)
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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.
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
- Parameters:
-
[in] listen_only The status of listen only: ( true
= listen only,false
= cycling between Scan and Listen)[in] timeout Specifies the duration of discovery period, in seconds. If 0
, a default value will be used[in] channel Specifies 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_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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.
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_address The MAC address of servicing device. A broadcast
will be sent when MAC is SET to ZERO[in] service_type Describes the type of service
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_INVALID_PARAMETER Invalid parameter WIFI_DIRECT_ERROR_NOT_SUPPORTED Not supported WIFI_DIRECT_ERROR_OPERATION_FAILED Operation failed WIFI_DIRECT_ERROR_COMMUNICATION_FAILED Communication failed WIFI_DIRECT_ERROR_PERMISSION_DENIED Permission denied WIFI_DIRECT_ERROR_NOT_PERMITTED Operation not permitted WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized WIFI_DIRECT_ERROR_RESOURCE_BUSY Device 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.
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.
- Since :
- 2.3
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
WIFI_DIRECT_ERROR_NONE Successful WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
int wifi_direct_unset_connection_state_changed_cb | ( | void | ) |
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_NONE Successful WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
int wifi_direct_unset_device_state_changed_cb | ( | void | ) |
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_NONE Successful WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
int wifi_direct_unset_discovery_state_changed_cb | ( | void | ) |
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_NONE Successful WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
int wifi_direct_unset_peer_found_cb | ( | void | ) |
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_NONE Successful WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
int wifi_direct_unset_service_state_changed_cb | ( | void | ) |
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_NONE Successful WIFI_DIRECT_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Wi-Fi Direct service must be initialized by wifi_direct_initialize().
int wifi_direct_unset_state_changed_cb | ( | void | ) |
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_NONE Successful WIFI_DIRECT_ERROR_OPERATION_FAILED Operation Failed