Tizen Native API
3.0
|
The Connection Wi-Fi Profile API provides functions for managing the Wi-Fi profile.
Required Header
#include <net_connection.h>
Overview
The Connection Wi-Fi Profile API provides functions for managing the Wi-Fi profile. You can manage the Wi-Fi profile using the functions.
Related Features
This API is related with the following features:
- http://tizen.org/feature/network.wifi
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 | connection_profile_get_wifi_essid (connection_profile_h profile, char **essid) |
Gets the ESSID (Extended Service Set Identifier). | |
int | connection_profile_get_wifi_bssid (connection_profile_h profile, char **bssid) |
Gets the BSSID (Basic Service Set Identifier). | |
int | connection_profile_get_wifi_rssi (connection_profile_h profile, int *rssi) |
Gets the RSSI. | |
int | connection_profile_get_wifi_frequency (connection_profile_h profile, int *frequency) |
Gets the frequency (MHz). | |
int | connection_profile_get_wifi_max_speed (connection_profile_h profile, int *max_speed) |
Gets the max speed (Mbps). | |
int | connection_profile_get_wifi_security_type (connection_profile_h profile, connection_wifi_security_type_e *type) |
Gets the security mode of Wi-Fi. | |
int | connection_profile_get_wifi_encryption_type (connection_profile_h profile, connection_wifi_encryption_type_e *type) |
Gets the security mode of Wi-Fi. | |
int | connection_profile_is_wifi_passphrase_required (connection_profile_h profile, bool *required) |
Checks whether passphrase is required. | |
int | connection_profile_set_wifi_passphrase (connection_profile_h profile, const char *passphrase) |
Sets the passphrase of the Wi-Fi WPA. | |
int | connection_profile_is_wifi_wps_supported (connection_profile_h profile, bool *supported) |
Checks whether the WPS (Wi-Fi Protected Setup) is supported. |
Enumeration Type Documentation
Enumeration for encryption modes.
- Since :
- 2.3.1
Function Documentation
int connection_profile_get_wifi_bssid | ( | connection_profile_h | profile, |
char ** | bssid | ||
) |
Gets the BSSID (Basic Service Set Identifier).
- Since :
- 2.3.1
- Remarks:
- You must release bssid using free().
- Parameters:
-
[in] profile The profile handle [out] bssid The BSSID
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_OUT_OF_MEMORY Out of memory CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_get_wifi_encryption_type | ( | connection_profile_h | profile, |
connection_wifi_encryption_type_e * | type | ||
) |
Gets the security mode of Wi-Fi.
- Since :
- 2.3.1
- Parameters:
-
[in] profile The profile handle [out] type The type of Wi-Fi security
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_OPERATION_FAILED Operation failed CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_get_wifi_essid | ( | connection_profile_h | profile, |
char ** | essid | ||
) |
Gets the ESSID (Extended Service Set Identifier).
- Since :
- 2.3.1
- Remarks:
- You must release essid using free().
- Parameters:
-
[in] profile The profile handle [out] essid The ESSID
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_OUT_OF_MEMORY Out of memory CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_get_wifi_frequency | ( | connection_profile_h | profile, |
int * | frequency | ||
) |
Gets the frequency (MHz).
- Since :
- 2.3.1
- Parameters:
-
[in] profile The profile handle [out] frequency The frequency
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_get_wifi_max_speed | ( | connection_profile_h | profile, |
int * | max_speed | ||
) |
Gets the max speed (Mbps).
- Since :
- 2.3.1
- Parameters:
-
[in] profile The profile handle [out] max_speed The max speed
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_get_wifi_rssi | ( | connection_profile_h | profile, |
int * | rssi | ||
) |
Gets the RSSI.
- Since :
- 2.3.1
- Parameters:
-
[in] profile The profile handle [out] rssi The RSSI
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_get_wifi_security_type | ( | connection_profile_h | profile, |
connection_wifi_security_type_e * | type | ||
) |
Gets the security mode of Wi-Fi.
- Since :
- 2.3.1
- Parameters:
-
[in] profile The profile handle [out] type The type of Wi-Fi security
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_OPERATION_FAILED Operation failed CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_is_wifi_passphrase_required | ( | connection_profile_h | profile, |
bool * | required | ||
) |
Checks whether passphrase is required.
- Since :
- 2.3.1
- Remarks:
- This function is not valid if security type is CONNECTION_WIFI_SECURITY_TYPE_EAP.
- Parameters:
-
[in] profile The profile handle [out] required true
if a passphrase is required, otherwisefalse
if a passphrase is not required
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_is_wifi_wps_supported | ( | connection_profile_h | profile, |
bool * | supported | ||
) |
Checks whether the WPS (Wi-Fi Protected Setup) is supported.
- Since :
- 2.3.1
- Remarks:
- If WPS is supported, you can connect the access point with WPS by wifi_connect_with_wps().
- Parameters:
-
[in] profile The profile handle [out] supported true
if WPS is supported, otherwisefalse
if WPS is not supported
- Returns:
0
on success, otherwise negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
int connection_profile_set_wifi_passphrase | ( | connection_profile_h | profile, |
const char * | passphrase | ||
) |
Sets the passphrase of the Wi-Fi WPA.
- Since :
- 2.3.1
- Parameters:
-
[in] profile The profile handle [in] passphrase The passphrase of Wi-Fi security
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CONNECTION_ERROR_NONE Successful CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter CONNECTION_ERROR_NOT_SUPPORTED Not supported
- See also:
- connection_update_profile()