Tizen Native API
|
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_activate (void) |
Activates the Wi-Fi Direct service, asynchronous. | |
int | wifi_direct_deactivate (void) |
Deactivates the Wi-Fi Direct service, asynchronous. | |
int | wifi_direct_start_discovery (bool listen_only, int timeout) |
Starts discovery to find all P2P capable devices, asynchronous. | |
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, asynchronous. | |
int | wifi_direct_cancel_discovery (void) |
Cancels discovery process, asynchronous. | |
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, asynchronous. | |
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, asynchronous. | |
int | wifi_direct_disconnect (char *mac_address) |
Disconnects the specified peer, asynchronous. | |
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, asynchronous. | |
int | wifi_direct_destroy_group (void) |
Destorys the Wi-Fi Direct Group, asynchronous. | |
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 prefered 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 the all 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_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_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 WiFi 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 WiFi Direct Service Discovery. | |
int | wifi_direct_deregister_service (unsigned int service_id) |
Deregisters for a service used for WiFi 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. | |
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 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 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. |
Wi-Fi Direct provides API to manage Wi-Fi Direct.
#include <wifi-direct.h>
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.
This API is related with the following features:
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.
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 group owner.
[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 |
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.
[in] | peer | The information of discovered peer |
[in] | user_data | The user data passed from foreach function |
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.
[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 |
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.
[in] | error_code | The error code |
[in] | device_state | The device state |
[in] | user_data | The user data passed from the callback registration function |
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.
[in] | peer | The information of the discovered peer |
[in] | user_data | The user data passed from foreach function |
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.
[in] | error_code | The error code |
[in] | discovery_state | The discovery state |
[in] | user_data | The user data passed from the callback registration function |
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.
[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 |
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.
[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 |
true
to continue with the next iteration of the loop, false
to break out of the loop 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.
[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 |
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.
[in] | type | The type of WPS |
[in] | user_data | The user data passed from the request function |
true
to continue with the next iteration of the loop, false
to break out of the loop Enumeration for Wi-Fi Direct connection state.
Enumeration for Wi-Fi Direct Discovery Channel.
enum wifi_direct_error_e |
Enumeration for Wi-Fi Direct error code.
Enumeration for Wi-Fi Direct primary device type.
Enumeration for Wi-Fi Direct secondary device type.
Enumeration for Service Discovery type.
enum wifi_direct_state_e |
Enumeration for Wi-Fi Direct link status.
enum wifi_display_type_e |
Enumeration for Wi-Fi Display device type.
int wifi_direct_activate | ( | void | ) |
Activates the Wi-Fi Direct service, asynchronous.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_OPERATION_FAILED | Operation failed |
WIFI_DIRECT_ERROR_COMMUNICATION_FAILED | Communication failed |
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 |
int wifi_direct_activate_pushbutton | ( | void | ) |
Set the WPS config PBC as prefered method for connection.
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_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_connection | ( | char * | mac_address | ) |
Cancels the connection now in progress.
[in] | mac_address | The MAC address of rejected device |
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_OPERATION_FAILED | Operation failed |
WIFI_DIRECT_ERROR_COMMUNICATION_FAILED | Communication failed |
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, asynchronous.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_OPERATION_FAILED | Operation failed |
WIFI_DIRECT_ERROR_COMMUNICATION_FAILED | Communication failed |
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_service_discovery | ( | char * | mac_address, |
wifi_direct_service_type_e | service_type | ||
) |
A service started for WiFi Direct Service Discovery will be stopped.
[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. |
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_NOT_PERMITTED | Operation not permitted |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_DIRECT_ERROR_RESOURCE_BUSY | Device or resource busy |
int wifi_direct_connect | ( | char * | mac_address | ) |
Connects to a specified peer, asynchronous.
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.
[in] | mac_address | The MAC address of remote device |
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_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 |
int wifi_direct_create_group | ( | void | ) |
Creates a Wi-Fi Direct Group, asynchronous.
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.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_OPERATION_FAILED | Operation failed |
WIFI_DIRECT_ERROR_COMMUNICATION_FAILED | Communication failed |
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 |
int wifi_direct_deactivate | ( | void | ) |
Deactivates the Wi-Fi Direct service, asynchronous.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_OPERATION_FAILED | Operation failed |
WIFI_DIRECT_ERROR_COMMUNICATION_FAILED | Communication failed |
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_deinitialize | ( | void | ) |
Deinitializes Wi-Fi Direct service.
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 |
int wifi_direct_deregister_service | ( | unsigned int | service_id | ) |
Deregisters for a service used for WiFi Direct Service Discovery.
[in] | service_id | A Service ID for which service has to be deregistered. |
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_NOT_PERMITTED | Operation not permitted |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_DIRECT_ERROR_RESOURCE_BUSY | Device or resource busy |
int wifi_direct_destroy_group | ( | void | ) |
Destorys the Wi-Fi Direct Group, asynchronous.
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.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_OPERATION_FAILED | Operation failed |
WIFI_DIRECT_ERROR_COMMUNICATION_FAILED | Communication failed |
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 |
int wifi_direct_disconnect | ( | char * | mac_address | ) |
Disconnects the specified peer, asynchronous.
[in] | mac_address | The MAC address of remote device |
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_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_disconnect_all | ( | void | ) |
Disconnects all connected links to peers, asynchronous.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_OPERATION_FAILED | Operation failed |
WIFI_DIRECT_ERROR_COMMUNICATION_FAILED | Communication failed |
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_foreach_connected_peers | ( | wifi_direct_connected_peer_cb | callback, |
void * | user_data | ||
) |
Gets the information of connected peers.
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
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_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_foreach_discovered_peers | ( | wifi_direct_discovered_peer_cb | callback, |
void * | user_data | ||
) |
Gets the information of discovered peers.
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
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_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_foreach_persistent_groups | ( | wifi_direct_persistent_group_cb | callback, |
void * | user_data | ||
) |
Gets the persistent groups.
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
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_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_foreach_supported_wps_types | ( | wifi_direct_supported_wps_type_cb | callback, |
void * | user_data | ||
) |
Gets the supported WPS (Wi-Fi Protected Setup) types.
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
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_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_get_device_name | ( | char ** | device_name | ) |
Gets the name of a local device.
[out] | device_name | The name of a local device |
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_NOT_SUPPORTED | Not supported |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_DIRECT_ERROR_RESOURCE_BUSY | Device or resource busy |
int wifi_direct_get_gateway_address | ( | char ** | gateway_address | ) |
Gets the Gateway address.
[out] | gateway_address | The gateway address |
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_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_get_group_owner_intent | ( | int * | intent | ) |
Gets the intent of the group owner.
[out] | intent | The intent of the group owner |
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_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_get_ip_address | ( | char ** | ip_address | ) |
Gets IP address of a local device.
[out] | ip_address | The IP address |
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_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_get_local_wps_type | ( | wifi_direct_wps_type_e * | type | ) |
Gets the WPS (Wi-Fi Protected Setup) type.
[out] | type | The type of WPS |
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_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_get_mac_address | ( | char ** | mac_address | ) |
Gets MAC address of a local device.
[out] | mac_address | The MAC address |
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_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_get_max_clients | ( | int * | max | ) |
Gets the max number of clients.
[in] | max | The max number of clients |
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_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_get_network_interface_name | ( | char ** | name | ) |
Gets the name of network interface (for example: eth0, pdp0).
[out] | name | The name of the network interface |
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_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_get_operating_channel | ( | int * | channel | ) |
Gets the operating channel.
[out] | channel | The operating channel |
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_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_get_peer_info | ( | char * | mac_address, |
wifi_direct_discovered_peer_info_s ** | peer_info | ||
) |
Gets the information of a discovered peer.
[in] | mac_address | The MAC address of peer to get |
[out] | peer_info | The peer information to be passed |
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_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 |
Gets the primary device type of a local device.
[out] | type | The primary device type |
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_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_get_req_wps_type | ( | wifi_direct_wps_type_e * | type | ) |
Gets the requested WPS (Wi-Fi Protected Setup) type.
[out] | type | The type of WPS |
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_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 |
Gets the secondary device type of a local device.
[out] | type | The secondary device type |
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_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_get_ssid | ( | char ** | ssid | ) |
Gets SSID(Service Set Identifier) of a local device.
[out] | ssid | The SSID |
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_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_get_state | ( | wifi_direct_state_e * | state | ) |
Gets the state of Wi-Fi Direct service.
[out] | state | The state of Wi-Fi Direct service |
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_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_get_subnet_mask | ( | char ** | subnet_mask | ) |
Gets the Subnet Mask.
[out] | subnet_mask | The subnet mask |
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_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_get_supported_wps_mode | ( | int * | wps_mode | ) |
Gets the all supported WPS (Wi-Fi Protected Setup) types at local device.
[out] | wps_mode | supported wps mode for local device |
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_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_get_wps_pin | ( | char ** | pin | ) |
Gets the WPS PIN number.
[out] | pin | Pointer to store pin number. Application must free this memory. |
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_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_init_miracast | ( | bool | enable | ) |
Initializes OR Deintializes the WiFi-Direct Display (MIRACAST) service.
[in] | enable | Enables/Disables Service based on the value TRUE/FALSE |
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_NOT_PERMITTED | Operation not permitted |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_DIRECT_ERROR_RESOURCE_BUSY | Device or resource busy |
int wifi_direct_initialize | ( | void | ) |
Initializes Wi-Fi Direct service.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_OPERATION_FAILED | Operation failed |
WIFI_DIRECT_ERROR_COMMUNICATION_FAILED | Communication failed |
WIFI_DIRECT_ERROR_RESOURCE_BUSY | Device or resource busy |
WIFI_DIRECT_ERROR_NOT_SUPPORTED | Not supported |
int wifi_direct_is_autoconnection_mode | ( | bool * | mode | ) |
Get the Autoconnection mode status.
[out] | mode | Describes the auto connection mode of framework has set. |
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_DIRECT_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_DIRECT_ERROR_NOT_SUPPORTED | Not supported |
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.
[out] | is_autonomous_group | Indicates whether the current group is the autonomous group or not |
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_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_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.
[out] | discoverable | The status of discoverable: (true = discoverable, false = non-discoverable) |
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_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_is_group_owner | ( | bool * | is_group_owner | ) |
Checks whether this device is the group owner or not.
[out] | is_group_owner | Indicates whether this device is the group owner or not |
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_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_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.
[out] | listen_only | The status of listen only: (true = listen only, false = cycling between Scan and Listen or not in discovery state) |
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_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_is_persistent_group_enabled | ( | bool * | enabled | ) |
Checks whether the persistent group is enabled or disabled.
[out] | enabled | The status of the persistent group: (true = enabled, false = disabled) |
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_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_register_service | ( | wifi_direct_service_type_e | service_type, |
char * | info1, | ||
char * | info2, | ||
unsigned int * | service_id | ||
) |
Registers for a service using WiFi Direct Service Discovery.
[in] | service_type | Describes the type of service. |
[in] | info1 | Describes the information of service. It is specific service. |
[in] | info2 | Describes the information of service. It is specific service. |
[out] | service_id | A Service ID will be assigned to service getting registered. |
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_NOT_PERMITTED | Operation not permitted |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_DIRECT_ERROR_RESOURCE_BUSY | Device or resource busy |
int wifi_direct_remove_persistent_group | ( | char * | mac_address, |
const char * | ssid | ||
) |
Removes a persistent group.
[in] | mac_address | The MAC address of the persistent group owner |
[in] | ssid | The SSID (Service Set Identifier) of the persistent group owner |
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_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_set_autoconnection_mode | ( | bool | mode | ) |
Sets the Autoconnection mode.
[in] | mode | Describes the mode of connection. In case of TRUE auto-connection will be taken care by framework. |
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_DIRECT_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_DIRECT_ERROR_NOT_SUPPORTED | Not supported |
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.
[in] | cb | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
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.
[in] | cb | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
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.
[in] | device_name | The name of a local device |
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_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_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.
[in] | cb | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
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.
[in] | cb | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
int wifi_direct_set_group_owner_intent | ( | int | intent | ) |
Sets the intent of the group owner.
[in] | intent | The intent of the group owner |
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_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_set_max_clients | ( | int | max | ) |
Sets the max number of clients.
[in] | max | The max number of clients |
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_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_set_peer_found_cb | ( | wifi_direct_peer_found_cb | cb, |
void * | user_data | ||
) |
Registers the callback called when the peer is found.
[in] | cb | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
int wifi_direct_set_persistent_group_enabled | ( | bool | enabled | ) |
Enables the persistent group.
If enabled is true, then P2P persisten group will be used while creating a group and establishing a connection.
[in] | enabled | The status of persistent group: (true = enabled, false = disabled) |
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_OPERATION_FAILED | Operation failed |
WIFI_DIRECT_ERROR_COMMUNICATION_FAILED | Communication failed |
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_set_req_wps_type | ( | wifi_direct_wps_type_e | type | ) |
Sets the requested WPS (Wi-Fi Protected Setup) type.
[in] | type | The type of WPS |
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_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_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.
[in] | cb | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
int wifi_direct_set_wps_pin | ( | char * | pin | ) |
Sets or updates the WPS PIN number user expects.
[in] | pin | new pin to set. Application must set the new pin number before. |
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_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_start_discovery | ( | bool | listen_only, |
int | timeout | ||
) |
Starts discovery to find all P2P capable devices, asynchronous.
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.
[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) |
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_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_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, asynchronous.
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.
[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) |
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_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_start_service_discovery | ( | char * | mac_address, |
wifi_direct_service_type_e | service_type | ||
) |
WiFi Direct Service Discovery will be started.
[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. |
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_NOT_PERMITTED | Operation not permitted |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
WIFI_DIRECT_ERROR_RESOURCE_BUSY | Device or resource busy |
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.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
int wifi_direct_unset_connection_state_changed_cb | ( | void | ) |
Unregisters the callback called when the state of connection is changed.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
int wifi_direct_unset_device_state_changed_cb | ( | void | ) |
Unregisters the callback called when the state of device is changed.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
int wifi_direct_unset_discovery_state_changed_cb | ( | void | ) |
Unregisters the callback called when the state of discovery is changed.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
int wifi_direct_unset_peer_found_cb | ( | void | ) |
Unregisters the callback called when the peer is found.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |
int wifi_direct_unset_service_state_changed_cb | ( | void | ) |
Unregisters the callback called when the state of the service discovery is changed.
WIFI_DIRECT_ERROR_NONE | Successful |
WIFI_DIRECT_ERROR_NOT_INITIALIZED | Not initialized |