Tizen Native API  7.0
Wi-Fi Manager

The Wi-Fi API provides functions for managing Wi-Fi and monitoring the state of Wi-Fi.

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. The Wi-Fi Manager enables your application to activate and deactivate 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 Wi-Fi.
int wifi_manager_deinitialize (wifi_manager_h wifi)
 Deinitializes Wi-Fi.

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

Enumeration for the Wi-Fi error type.

Since :
3.0
Enumerator:
WIFI_MANAGER_ERROR_NONE 

Successful

WIFI_MANAGER_ERROR_INVALID_PARAMETER 

Invalid parameter

WIFI_MANAGER_ERROR_OUT_OF_MEMORY 

Out of memory error

WIFI_MANAGER_ERROR_INVALID_OPERATION 

Invalid operation

WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED 

Address family not supported

WIFI_MANAGER_ERROR_OPERATION_FAILED 

Operation failed

WIFI_MANAGER_ERROR_NO_CONNECTION 

There is no connected AP

WIFI_MANAGER_ERROR_NOW_IN_PROGRESS 

Now in progress

WIFI_MANAGER_ERROR_ALREADY_EXISTS 

Already exists

WIFI_MANAGER_ERROR_OPERATION_ABORTED 

Operation is aborted

WIFI_MANAGER_ERROR_DHCP_FAILED 

DHCP failed

WIFI_MANAGER_ERROR_INVALID_KEY 

Invalid key

WIFI_MANAGER_ERROR_NO_REPLY 

No reply

WIFI_MANAGER_ERROR_SECURITY_RESTRICTED 

Restricted by security system policy

WIFI_MANAGER_ERROR_ALREADY_INITIALIZED 

Already initialized

WIFI_MANAGER_ERROR_OUT_OF_RANGE 

Out of range

WIFI_MANAGER_ERROR_CONNECT_FAILED 

Connect failed

WIFI_MANAGER_ERROR_LOGIN_FAILED 

Login failed

WIFI_MANAGER_ERROR_AUTHENTICATION_FAILED 

Authentication failed

WIFI_MANAGER_ERROR_PIN_MISSING 

PIN missing

WIFI_MANAGER_ERROR_WPS_OVERLAP 

WPS Overlap (Since 4.0)

WIFI_MANAGER_ERROR_WPS_TIMEOUT 

WPS Timeout (Since 4.0)

WIFI_MANAGER_ERROR_WPS_WEP_PROHIBITED 

WPS WEP Prohibited (Since 4.0)

WIFI_MANAGER_ERROR_PERMISSION_DENIED 

Permission Denied

WIFI_MANAGER_ERROR_OFFLINE 

Connection Offline (Since 5.0)

WIFI_MANAGER_ERROR_INVALID_GATEWAY 

Invalid Gateway (Since 5.0)

WIFI_MANAGER_ERROR_NOT_SUPPORTED 

Not Supported

WIFI_MANAGER_ERROR_NOT_INITIALIZED 

Not initialized (Since 5.0)

WIFI_MANAGER_ERROR_ASSOCIATION_FAILED 

Association failed (Since 7.0)


Function Documentation

Deinitializes Wi-Fi.

Since :
3.0
Parameters:
[in]wifiThe Wi-Fi handle
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_INVALID_OPERATIONInvalid operation
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported

Initializes Wi-Fi.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/network.get
Remarks:
You must release wifi using wifi_manager_deinitialize().
Parameters:
[out]wifiThe Wi-Fi handle
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_ALREADY_INITIALIZEDAlready initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_INVALID_OPERATIONInvalid operation
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_PERMISSION_DENIEDPermission Denied
WIFI_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported