|
Tizen Native API
10.0
|
The Wi-Fi API offers functionalities for managing Wi-Fi connectivity and monitoring its status.
Required Header
#include <wifi-manager.h>
Overview
Wi-Fi allows your application to connect to a Wireless Local Area Network (WLAN) and to transfer data over the network. With Wi-Fi, your application can establish a connection to a Wireless Local Area Network (WLAN) and facilitate data transmission across the network.
The Wi-Fi Manager empowers your application to enable or disable a local Wi-Fi device, and to connect to a WLAN network in the infrastructure mode.
Related Features
This API is related with the following features:
- http://tizen.org/feature/network.wifi
It is recommended to design applications with regard to features, for reliability.
You can check if a device supports the related features for this API by using System Information, and control your application's actions accordingly.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
Functions | |
| int | wifi_manager_initialize (wifi_manager_h *wifi) |
| Initializes the Wi-Fi service and prepares it for use. | |
| int | wifi_manager_deinitialize (wifi_manager_h wifi) |
| Terminates the Wi-Fi service and releases all resources associated with it. | |
Typedefs | |
| typedef void * | wifi_manager_h |
| The Wi-Fi manager handle. | |
Typedef Documentation
| typedef void* wifi_manager_h |
The Wi-Fi manager handle.
- Since :
- 3.0
Enumeration Type Documentation
| enum wifi_manager_error_e |
Enumeration for the Wi-Fi error type.
- Since :
- 3.0
- Enumerator:
Function Documentation
| int wifi_manager_deinitialize | ( | wifi_manager_h | wifi | ) |
Terminates the Wi-Fi service and releases all resources associated with it.
This function deinitializes the Wi-Fi service, releasing all allocated resources and terminating any ongoing operations related to Wi-Fi management.
- Since :
- 3.0
- Parameters:
-
[in] wifi The Wi-Fi handle
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported
| int wifi_manager_initialize | ( | wifi_manager_h * | wifi | ) |
Initializes the Wi-Fi service and prepares it for use.
This function initializes the Wi-Fi service, allocating necessary resources and preparing it for subsequent Wi-Fi management operations such as scanning for networks, connecting to a network, or retrieving Wi-Fi information.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/network.get
- Remarks:
- You must release wifi using wifi_manager_deinitialize().
- Parameters:
-
[out] wifi The Wi-Fi handle
- Returns:
0on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_ALREADY_INITIALIZED Already initialized WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation WIFI_MANAGER_ERROR_OPERATION_FAILED Operation failed WIFI_MANAGER_ERROR_PERMISSION_DENIED Permission Denied WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported