Tizen Native API  3.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 using features in your application can be found in the Feature List.

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 wifi manager handle.

Typedef Documentation

typedef void* wifi_manager_h

The wifi 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_PERMISSION_DENIED 

Permission Denied

WIFI_MANAGER_ERROR_NOT_SUPPORTED 

Not Supported


Function Documentation

Deinitializes Wi-Fi.

Since :
3.0
Parameters:
[in]wifiThe wifi handle
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
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 handle using wifi_manager_deinitialize().
Parameters:
[out]wifiThe wifi 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