Tizen(Headed) Native API  6.5
Security Information

The Security Information API provides functions for managing the Security information.

Required Header

#include <wifi-manager.h>

Overview

The Security Information API provides functions for managing the Security information. You can manage the Security information using the functions.

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_ap_get_security_type (wifi_manager_ap_h ap, wifi_manager_security_type_e *type)
 Gets the Wi-Fi security mode.
int wifi_manager_ap_set_security_type (wifi_manager_ap_h ap, wifi_manager_security_type_e type)
 Sets the Wi-Fi security mode.
int wifi_manager_ap_get_encryption_type (wifi_manager_ap_h ap, wifi_manager_encryption_type_e *type)
 Gets the Wi-Fi encryption type.
int wifi_manager_ap_set_encryption_type (wifi_manager_ap_h ap, wifi_manager_encryption_type_e type)
 Sets the Wi-Fi encryption type.
int wifi_manager_ap_is_passphrase_required (wifi_manager_ap_h ap, bool *required)
 Checks whether the passphrase is required or not.
int wifi_manager_ap_set_passphrase (wifi_manager_ap_h ap, const char *passphrase)
 Sets the passphrase.
int wifi_manager_ap_is_wps_supported (wifi_manager_ap_h ap, bool *supported)
 Checks whether the WPS(Wi-Fi Protected Setup) is supported or not.

Enumeration Type Documentation

Enumeration for Wi-Fi encryption type.

The following encryption modes are used in infrastructure and ad-hoc mode.

Since :
3.0
Enumerator:
WIFI_MANAGER_ENCRYPTION_TYPE_NONE 

Encryption disabled

WIFI_MANAGER_ENCRYPTION_TYPE_WEP 

WEP

WIFI_MANAGER_ENCRYPTION_TYPE_TKIP 

TKIP

WIFI_MANAGER_ENCRYPTION_TYPE_AES 

AES

WIFI_MANAGER_ENCRYPTION_TYPE_TKIP_AES_MIXED 

TKIP and AES are both supported

Enumeration for Wi-Fi security type.

The following security modes are used in infrastructure and ad-hoc mode. For now all EAP security mechanisms are provided only in infrastructure mode.

Since :
3.0
Enumerator:
WIFI_MANAGER_SECURITY_TYPE_NONE 

Security disabled

WIFI_MANAGER_SECURITY_TYPE_WEP 

WEP

WIFI_MANAGER_SECURITY_TYPE_WPA_PSK 

WPA-PSK

WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK 

WPA2-PSK

WIFI_MANAGER_SECURITY_TYPE_EAP 

EAP

WIFI_MANAGER_SECURITY_TYPE_WPA_FT_PSK 

FT-PSK (Since 5.0)

WIFI_MANAGER_SECURITY_TYPE_SAE 

SAE (Since 5.5)

WIFI_MANAGER_SECURITY_TYPE_OWE 

OWE (Since 5.5)

WIFI_MANAGER_SECURITY_TYPE_DPP 

DPP (Since 5.5)


Function Documentation

Gets the Wi-Fi encryption type.

Since :
3.0
Parameters:
[in]apThe access point handle
[out]typeThe type of Wi-Fi encryption
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_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported

Gets the Wi-Fi security mode.

Since :
3.0
Parameters:
[in]apThe access point handle
[out]typeThe type of Wi-Fi security
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_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_is_passphrase_required ( wifi_manager_ap_h  ap,
bool *  required 
)

Checks whether the passphrase is required or not.

Since :
3.0
Remarks:
This function is not valid if security type is WIFI_MANAGER_SECURITY_TYPE_EAP.
Parameters:
[in]apThe access point handle
[out]requiredtrue if passphrase is required, false if passphrase is not required.
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_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_is_wps_supported ( wifi_manager_ap_h  ap,
bool *  supported 
)

Checks whether the WPS(Wi-Fi Protected Setup) is supported or not.

Since :
3.0
Parameters:
[in]apThe access point handle
[out]supportedtrue if WPS is supported, otherwise false is WPS is not supported.
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_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
See also:
wifi_manager_connect_by_wps_pbc()
wifi_manager_connect_by_wps_pin()

Sets the Wi-Fi encryption type.

Since :
3.0
Parameters:
[in]apThe access point handle
[in]typeThe type of Wi-Fi encryption
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_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_set_passphrase ( wifi_manager_ap_h  ap,
const char *  passphrase 
)

Sets the passphrase.

Since :
3.0
Parameters:
[in]apThe access point handle
[in]passphraseThe passphrase of access point
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_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported

Sets the Wi-Fi security mode.

Since :
3.0
Parameters:
[in]apThe access point handle
[in]typeThe type of Wi-Fi security
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_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported