Tizen Native API
4.0
|
The Configuration API provides functions for managing the configuration of Wi-Fi.
#include <wifi-manager.h>
The Configuration API provides functions for managing the configuration of Wi-Fi. You can manage the configuration information using the functions.
This API is related with the following features:
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_config_create (wifi_manager_h wifi, const char *name, const char *passphrase, wifi_manager_security_type_e security_type, wifi_manager_config_h *config) |
Gets access point configuration handle. | |
int | wifi_manager_config_clone (wifi_manager_config_h origin, wifi_manager_config_h *cloned_config) |
Clones the access point configuration handle. | |
int | wifi_manager_config_destroy (wifi_manager_config_h config) |
Destroys the access point configuration handle. | |
int | wifi_manager_config_save (wifi_manager_h wifi, wifi_manager_config_h config) |
Saves Wi-Fi configuration of access point. | |
int | wifi_manager_config_remove (wifi_manager_h wifi, wifi_manager_config_h config) |
Removes Wi-Fi configuration of access point. | |
int | wifi_manager_config_foreach_configuration (wifi_manager_h wifi, wifi_manager_config_list_cb callback, void *user_data) |
Gets configurations of an access point. | |
int | wifi_manager_config_get_name (wifi_manager_config_h config, char **name) |
Gets the name of access point from configuration. | |
int | wifi_manager_config_get_security_type (wifi_manager_config_h config, wifi_manager_security_type_e *security_type) |
Gets the security type of access point from configuration. | |
int | wifi_manager_config_set_proxy_address (wifi_manager_config_h config, wifi_manager_address_family_e address_family, const char *proxy_address) |
Sets access point proxy address configuration. | |
int | wifi_manager_config_get_proxy_address (wifi_manager_config_h config, wifi_manager_address_family_e *address_family, char **proxy_address) |
Gets the proxy address of access point from configuration. | |
int | wifi_manager_config_set_hidden_ap_property (wifi_manager_config_h config, bool is_hidden) |
Sets the hidden property of access point from the configuration. | |
int | wifi_manager_config_get_hidden_ap_property (wifi_manager_config_h config, bool *is_hidden) |
Gets the hidden property of access point from the configuration. | |
int | wifi_manager_config_get_eap_anonymous_identity (wifi_manager_config_h config, char **anonymous_identity) |
Gets access point anonymous identity from configuration. | |
int | wifi_manager_config_set_eap_anonymous_identity (wifi_manager_config_h config, const char *anonymous_identity) |
Sets access point anonymous identity to configuration. | |
int | wifi_manager_config_get_eap_ca_cert_file (wifi_manager_config_h config, char **ca_cert) |
Gets access point cacert file from configuration. | |
int | wifi_manager_config_set_eap_ca_cert_file (wifi_manager_config_h config, const char *ca_cert) |
Sets access point cacert file to configuration. | |
int | wifi_manager_config_get_eap_client_cert_file (wifi_manager_config_h config, char **client_cert) |
Gets access point client cert file from configuration. | |
int | wifi_manager_config_set_eap_client_cert_file (wifi_manager_config_h config, const char *private_key, const char *client_cert) |
Sets access point client cert file to configuration. | |
int | wifi_manager_config_get_eap_identity (wifi_manager_config_h config, char **identity) |
Gets access point identity from configuration. | |
int | wifi_manager_config_set_eap_identity (wifi_manager_config_h config, const char *identity) |
Sets access point identity to configuration. | |
int | wifi_manager_config_get_eap_type (wifi_manager_config_h config, wifi_manager_eap_type_e *eap_type) |
Gets access point EAP type from configuration. | |
int | wifi_manager_config_set_eap_type (wifi_manager_config_h config, wifi_manager_eap_type_e eap_type) |
Sets access point EAP type to configuration. | |
int | wifi_manager_config_get_eap_auth_type (wifi_manager_config_h config, wifi_manager_eap_auth_type_e *eap_auth_type) |
Gets access point EAP auth type from configuration. | |
int | wifi_manager_config_set_eap_auth_type (wifi_manager_config_h config, wifi_manager_eap_auth_type_e eap_auth_type) |
Sets access point EAP auth type to configuration. | |
int | wifi_manager_config_get_eap_subject_match (wifi_manager_config_h config, char **subject_match) |
Gets access point subject match from configuration. | |
int | wifi_manager_config_set_eap_subject_match (wifi_manager_config_h config, const char *subject_match) |
Sets access point subject match to configuration. | |
Typedefs | |
typedef void * | wifi_manager_config_h |
The Wi-Fi access point configuration handle. | |
typedef bool(* | wifi_manager_config_list_cb )(const wifi_manager_config_h config, void *user_data) |
Called for each found access point configuration. |
typedef void* wifi_manager_config_h |
The Wi-Fi access point configuration handle.
typedef bool(* wifi_manager_config_list_cb)(const wifi_manager_config_h config, void *user_data) |
Called for each found access point configuration.
[in] | config | The access point configuration handle |
[in] | user_data | The user data passed from the request function |
true
to continue with the next iteration of the loop, otherwise false
to break out of the loop int wifi_manager_config_clone | ( | wifi_manager_config_h | origin, |
wifi_manager_config_h * | cloned_config | ||
) |
Clones the access point configuration handle.
[in] | origin | The origin access point configuration handle |
[out] | cloned_config | The cloned access point configuration handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_config_create | ( | wifi_manager_h | wifi, |
const char * | name, | ||
const char * | passphrase, | ||
wifi_manager_security_type_e | security_type, | ||
wifi_manager_config_h * | config | ||
) |
Gets access point configuration handle.
[in] | wifi | The Wi-Fi handle |
[in] | name | The access point name |
[in] | passphrase | The access point passphrase |
[in] | security_type | The access point security type |
[out] | config | The access point configuration handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_config_destroy | ( | wifi_manager_config_h | config | ) |
Destroys the access point configuration handle.
[in] | config | The access point configuration handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_config_foreach_configuration | ( | wifi_manager_h | wifi, |
wifi_manager_config_list_cb | callback, | ||
void * | user_data | ||
) |
Gets configurations of an access point.
[in] | wifi | The Wi-Fi handle |
[in] | callback | The callback to be called |
[in] | user_data | The user data passed to the callback function |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_config_get_eap_anonymous_identity | ( | wifi_manager_config_h | config, |
char ** | anonymous_identity | ||
) |
Gets access point anonymous identity from configuration.
[in] | config | The access point configuration handle |
[out] | anonymous_identity | The anonymous identity of access point |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
int wifi_manager_config_get_eap_auth_type | ( | wifi_manager_config_h | config, |
wifi_manager_eap_auth_type_e * | eap_auth_type | ||
) |
Gets access point EAP auth type from configuration.
[in] | config | The access point configuration handle |
[out] | eap_auth_type | The EAP auth type of access point |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
int wifi_manager_config_get_eap_ca_cert_file | ( | wifi_manager_config_h | config, |
char ** | ca_cert | ||
) |
Gets access point cacert file from configuration.
[in] | config | The access point configuration handle |
[out] | ca_cert | The certification authority(CA) certificates file of access point |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
int wifi_manager_config_get_eap_client_cert_file | ( | wifi_manager_config_h | config, |
char ** | client_cert | ||
) |
Gets access point client cert file from configuration.
[in] | config | The access point configuration handle |
[out] | client_cert | The certification authority(CA) certificates file of access point |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
int wifi_manager_config_get_eap_identity | ( | wifi_manager_config_h | config, |
char ** | identity | ||
) |
Gets access point identity from configuration.
[in] | config | The access point configuration handle |
[out] | identity | The identity of access point |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
int wifi_manager_config_get_eap_subject_match | ( | wifi_manager_config_h | config, |
char ** | subject_match | ||
) |
Gets access point subject match from configuration.
[in] | config | The access point configuration handle |
[out] | subject_match | The subject match of access point |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
int wifi_manager_config_get_eap_type | ( | wifi_manager_config_h | config, |
wifi_manager_eap_type_e * | eap_type | ||
) |
Gets access point EAP type from configuration.
[in] | config | The access point configuration handle |
[out] | eap_type | The EAP type of access point |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
int wifi_manager_config_get_hidden_ap_property | ( | wifi_manager_config_h | config, |
bool * | is_hidden | ||
) |
Gets the hidden property of access point from the configuration.
[in] | config | The access point configuration handle |
[out] | is_hidden | The hidden property of access point |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_config_get_name | ( | wifi_manager_config_h | config, |
char ** | name | ||
) |
Gets the name of access point from configuration.
[in] | config | The access point configuration handle |
[out] | name | The name of access point |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_config_get_proxy_address | ( | wifi_manager_config_h | config, |
wifi_manager_address_family_e * | address_family, | ||
char ** | proxy_address | ||
) |
Gets the proxy address of access point from configuration.
[in] | config | The access point configuration handle |
[out] | address_family | The address family |
[out] | proxy_address | The proxy address |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_config_get_security_type | ( | wifi_manager_config_h | config, |
wifi_manager_security_type_e * | security_type | ||
) |
Gets the security type of access point from configuration.
[in] | config | The access point configuration handle |
[out] | security_type | The security type of access point |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_config_remove | ( | wifi_manager_h | wifi, |
wifi_manager_config_h | config | ||
) |
Removes Wi-Fi configuration of access point.
[in] | wifi | The Wi-Fi handle |
[in] | config | The access point configuration handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_config_save | ( | wifi_manager_h | wifi, |
wifi_manager_config_h | config | ||
) |
Saves Wi-Fi configuration of access point.
When a configuration is changed, these changes will be not applied to the Connection Manager immediately.
When you call this function, your changes affect the Connection Manager and the existing configuration is updated.
[in] | wifi | The Wi-Fi handle |
[in] | config | The access point configuration handle |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_config_set_eap_anonymous_identity | ( | wifi_manager_config_h | config, |
const char * | anonymous_identity | ||
) |
Sets access point anonymous identity to configuration.
[in] | config | The access point configuration handle |
[in] | anonymous_identity | The anonymous identity |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
int wifi_manager_config_set_eap_auth_type | ( | wifi_manager_config_h | config, |
wifi_manager_eap_auth_type_e | eap_auth_type | ||
) |
Sets access point EAP auth type to configuration.
[in] | config | The access point configuration handle |
[in] | eap_auth_type | The EAP auth type |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
int wifi_manager_config_set_eap_ca_cert_file | ( | wifi_manager_config_h | config, |
const char * | ca_cert | ||
) |
Sets access point cacert file to configuration.
[in] | config | The access point configuration handle |
[in] | ca_cert | The certification authority(CA) certificates file of access point |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
int wifi_manager_config_set_eap_client_cert_file | ( | wifi_manager_config_h | config, |
const char * | private_key, | ||
const char * | client_cert | ||
) |
Sets access point client cert file to configuration.
[in] | config | The access point configuration handle |
[in] | private_key | The private key file |
[in] | client_cert | The certification authority(CA) certificates file of access point |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
int wifi_manager_config_set_eap_identity | ( | wifi_manager_config_h | config, |
const char * | identity | ||
) |
Sets access point identity to configuration.
[in] | config | The access point configuration handle |
[in] | identity | The identity |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
int wifi_manager_config_set_eap_subject_match | ( | wifi_manager_config_h | config, |
const char * | subject_match | ||
) |
Sets access point subject match to configuration.
[in] | config | The access point configuration handle |
[in] | subject_match | The subject match |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
int wifi_manager_config_set_eap_type | ( | wifi_manager_config_h | config, |
wifi_manager_eap_type_e | eap_type | ||
) |
Sets access point EAP type to configuration.
[in] | config | The access point configuration handle |
[in] | eap_type | The EAP type |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission Denied |
int wifi_manager_config_set_hidden_ap_property | ( | wifi_manager_config_h | config, |
bool | is_hidden | ||
) |
Sets the hidden property of access point from the configuration.
[in] | config | The access point configuration handle |
[in] | is_hidden | The new value of the hidden property |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission denied |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_config_set_proxy_address | ( | wifi_manager_config_h | config, |
wifi_manager_address_family_e | address_family, | ||
const char * | proxy_address | ||
) |
Sets access point proxy address configuration.
[in] | config | The access point configuration handle |
[in] | address_family | The address family |
[in] | proxy_address | The proxy address |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_PERMISSION_DENIED | Permission denied |
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED | Not supported address family |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |