Tizen Native API
|
The Security Information API provides functions for managing the Security information.
Required Header
#include <wifi.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:
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.
Functions | |
int | wifi_ap_get_security_type (wifi_ap_h ap, wifi_security_type_e *type) |
Gets the Wi-Fi security mode. | |
int | wifi_ap_set_security_type (wifi_ap_h ap, wifi_security_type_e type) |
Sets the Wi-Fi security mode. | |
int | wifi_ap_get_encryption_type (wifi_ap_h ap, wifi_encryption_type_e *type) |
Gets the Wi-Fi encryption type. | |
int | wifi_ap_set_encryption_type (wifi_ap_h ap, wifi_encryption_type_e type) |
Sets the Wi-Fi encryption type. | |
int | wifi_ap_is_passphrase_required (wifi_ap_h ap, bool *required) |
Checks whether the passphrase is required or not. | |
int | wifi_ap_set_passphrase (wifi_ap_h ap, const char *passphrase) |
Sets the passphrase. | |
int | wifi_ap_is_wps_supported (wifi_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 :
- 2.3.1
enum wifi_security_type_e |
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 :
- 2.3.1
Function Documentation
int wifi_ap_get_encryption_type | ( | wifi_ap_h | ap, |
wifi_encryption_type_e * | type | ||
) |
Gets the Wi-Fi encryption type.
- Since :
- 2.3.1
- Parameters:
-
[in] ap The access point handle [out] type The type of Wi-Fi encryption
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_PARAMETER Invalid parameter WIFI_ERROR_OPERATION_FAILED Operation failed WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_ap_get_security_type | ( | wifi_ap_h | ap, |
wifi_security_type_e * | type | ||
) |
Gets the Wi-Fi security mode.
- Since :
- 2.3.1
- Parameters:
-
[in] ap The access point handle [out] type The type of Wi-Fi security
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_PARAMETER Invalid parameter WIFI_ERROR_OPERATION_FAILED Operation failed WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_ap_is_passphrase_required | ( | wifi_ap_h | ap, |
bool * | required | ||
) |
Checks whether the passphrase is required or not.
- Since :
- 2.3.1
- Remarks:
- This function is not valid if security type is WIFI_SECURITY_TYPE_EAP.
- Parameters:
-
[in] ap The access point handle [out] required true
if passphrase is required,false
if passphrase is not required.
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_PARAMETER Invalid parameter WIFI_ERROR_OPERATION_FAILED Operation failed WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_ap_is_wps_supported | ( | wifi_ap_h | ap, |
bool * | supported | ||
) |
Checks whether the WPS(Wi-Fi Protected Setup) is supported or not.
- Since :
- 2.3.1
- Parameters:
-
[in] ap The access point handle [out] supported ture
if WPS is supported, otherwisefalse
is WPS is not supported.
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_PARAMETER Invalid parameter WIFI_ERROR_OPERATION_FAILED Operation failed WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_ap_set_encryption_type | ( | wifi_ap_h | ap, |
wifi_encryption_type_e | type | ||
) |
Sets the Wi-Fi encryption type.
- Since :
- 2.3.1
- Parameters:
-
[in] ap The access point handle [in] type The type of Wi-Fi encryption
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_PARAMETER Invalid parameter WIFI_ERROR_OPERATION_FAILED Operation failed WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_ap_set_passphrase | ( | wifi_ap_h | ap, |
const char * | passphrase | ||
) |
Sets the passphrase.
- Since :
- 2.3.1
- Parameters:
-
[in] ap The access point handle [in] passphrase The passphrase of access point
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_PARAMETER Invalid parameter WIFI_ERROR_OPERATION_FAILED Operation failed WIFI_ERROR_NOT_SUPPORTED Not supported
int wifi_ap_set_security_type | ( | wifi_ap_h | ap, |
wifi_security_type_e | type | ||
) |
Sets the Wi-Fi security mode.
- Since :
- 2.3.1
- Parameters:
-
[in] ap The access point handle [in] type The type of Wi-Fi security
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_ERROR_NONE Successful WIFI_ERROR_INVALID_PARAMETER Invalid parameter WIFI_ERROR_OPERATION_FAILED Operation failed WIFI_ERROR_NOT_SUPPORTED Not supported