int _net_dbus_config_get_passphrase(const gchar *config_id, gchar **passphrase);
int _net_dbus_config_save_configurations(const gchar *config_id, const gchar *name,
const gchar *ssid, const gchar *passphrase, const gchar *proxy_address,
- net_ip_info_config_s *ip_info, gboolean is_hidden);
+ net_ip_info_config_s *ip_info, gboolean is_hidden, gboolean is_created);
int _net_dbus_config_save_eap_configurations(const gchar *config_id,
const gchar *name, const gchar *ssid, const gchar *passphrase,
- const gchar *proxy_address, net_eap_config_s *eap_config, gboolean is_hidden);
+ const gchar *proxy_address, net_eap_config_s *eap_config, gboolean is_hidden, gboolean is_created);
int _net_dbus_config_remove_configurations(const gchar *config_id);
int _net_dbus_config_load_configurations(const gchar *config_id, gchar **name,
- net_wifi_security_type_e *security_type, gchar **proxy_address,
+ gchar **passphrase, net_wifi_security_type_e *security_type, gchar **proxy_address,
gboolean *is_hidden, net_ip_info_config_s **ip_info, void *last_error);
int _net_dbus_config_load_eap_configurations(const gchar *config_id,
gchar **name, net_wifi_security_type_e *security_type, gchar **proxy_address,
int net_config_save_configurations(const gchar *config_id,
const gchar *name, const gchar *ssid, const gchar *passphrase,
const gchar *proxy_address, net_ip_info_config_s *ip_info,
- gboolean is_hidden);
+ gboolean is_hidden, gboolean is_created);
int net_config_save_eap_configurations(const gchar *config_id,
const gchar *name, const gchar *ssid, const gchar *passphrase,
- const gchar *proxy_address, void *eap_config, gboolean is_hidden);
+ const gchar *proxy_address, void *eap_config, gboolean is_hidden, gboolean is_created);
int net_config_remove_configurations(const gchar *config_id);
int net_config_load_configurations(const gchar *config_id, gchar **name,
- void *security_type, gchar **proxy_address, gboolean *is_hidden,
+ gchar **passphrase, void *security_type, gchar **proxy_address, gboolean *is_hidden,
net_ip_info_config_s **ip_info, void *last_error);
int net_config_load_eap_configurations(const gchar *config_id,
gchar **name, void *security_type, gchar **proxy_address,
#define WIFI_CONFIG_SECURITY_TYPE "Security"
#define WIFI_CONFIG_PROXYADDRESS "ProxyAddress"
#define WIFI_CONFIG_HIDDEN "Hidden"
+#define WIFI_CONFIG_CREATED "Created"
#define WIFI_CONFIG_IPV4_METHOD "IPv4.method"
#define WIFI_CONFIG_IPV6_METHOD "IPv6.method"
#define WIFI_CONFIG_IPV4_ADDRESS "IPv4.local_address"
gchar *name;
gchar *passphrase;
wifi_manager_security_type_e security_type;
+ gboolean is_created;
gboolean is_saved;
gboolean is_hidden;
int _wifi_save_configuration(const gchar *name, const gchar *passphrase,
wifi_manager_security_type_e security_type, const gchar *proxy_address,
- wifi_config_ip_info_s *ip_info, gboolean is_hidden);
+ wifi_config_ip_info_s *ip_info, gboolean is_hidden, gboolean is_created);
int _wifi_load_configurations(void);
int _wifi_foreach_configuration(wifi_manager_config_list_cb callback, void *user_data);
int _wifi_remove_configuration(const gchar *config_id);
int _wifi_configuration_get_passphrase(const gchar *config_id, gchar **passphrase);
int _wifi_save_eap_configurations(const gchar *name, const gchar *passphrase,
wifi_manager_security_type_e security_type, const gchar *proxy_address,
- wifi_eap_config_s *eap_config, gboolean is_hidden);
+ wifi_eap_config_s *eap_config, gboolean is_hidden, gboolean is_created);
gchar *_wifi_eap_type_to_string(wifi_manager_eap_type_e eap_type);
gchar *_wifi_eap_auth_type_to_string(wifi_manager_eap_auth_type_e eap_auth_type);
int _wifi_set_autoscan(bool autoscan);
Name: capi-network-wifi-manager
Summary: Network Wi-Fi library in TIZEN C API
-Version: 1.0.44
+Version: 1.0.45
Release: 1
Group: System/Network
License: Apache-2.0
int _net_dbus_config_save_configurations(const gchar *config_id, const gchar *name,
const gchar *ssid, const gchar *passphrase, const gchar *proxy_address,
- net_ip_info_config_s *ip_info, gboolean is_hidden)
+ net_ip_info_config_s *ip_info, gboolean is_hidden, gboolean is_created)
{
__NETWORK_FUNC_ENTER__;
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_PROXYADDRESS, g_variant_new_string(proxy_address));
if (is_hidden == TRUE)
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_HIDDEN, g_variant_new_string("TRUE"));
+ g_variant_builder_add(b, "{sv}", WIFI_CONFIG_CREATED, g_variant_new_boolean(is_created));
switch (ip_info->ip_type) {
case NET_IP_CONFIG_TYPE_STATIC:
int _net_dbus_config_save_eap_configurations(const gchar *config_id,
const gchar *name, const gchar *ssid, const gchar *passphrase,
- const gchar *proxy_address, net_eap_config_s *eap_config, gboolean is_hidden)
+ const gchar *proxy_address, net_eap_config_s *eap_config, gboolean is_hidden, gboolean is_created)
{
__NETWORK_FUNC_ENTER__;
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_PROXYADDRESS, g_variant_new_string(proxy_address));
if (is_hidden == TRUE)
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_HIDDEN, g_variant_new_string("TRUE"));
+ g_variant_builder_add(b, "{sv}", WIFI_CONFIG_CREATED, g_variant_new_boolean(is_created));
if (eap_config != NULL) {
gchar* auth_type = NULL;
}
int _net_dbus_config_load_configurations(const gchar *config_id, gchar **name,
- net_wifi_security_type_e *security_type, gchar **proxy_address,
+ gchar **passphrase, net_wifi_security_type_e *security_type, gchar **proxy_address,
gboolean *is_hidden, net_ip_info_config_s **ip_info, void *last_error)
{
__NETWORK_FUNC_ENTER__;
if (g_variant_is_of_type(value, G_VARIANT_TYPE_STRING)) {
if (g_strcmp0(field, WIFI_CONFIG_NAME) == 0) {
*name = g_strdup(g_variant_get_string(value, NULL));
+ } else if (g_strcmp0(field, WIFI_CONFIG_PASSPHRASE) == 0) {
+ *passphrase = g_strdup(g_variant_get_string(value, NULL));
} else if (g_strcmp0(field, WIFI_CONFIG_SECURITY_TYPE) == 0) {
*security_type = __net_wifi_security_type_to_int(g_variant_get_string(value, NULL));
} else if (g_strcmp0(field, WIFI_CONFIG_HIDDEN) == 0) {
int net_config_save_configurations(const gchar *config_id, const gchar *name,
const gchar *ssid, const gchar *passphrase, const gchar *proxy_address,
- net_ip_info_config_s *ip_info, gboolean is_hidden)
+ net_ip_info_config_s *ip_info, gboolean is_hidden, gboolean is_created)
{
__NETWORK_FUNC_ENTER__;
}
Error = _net_dbus_config_save_configurations(config_id, name, ssid,
- passphrase, proxy_address, ip_info, is_hidden);
+ passphrase, proxy_address, ip_info, is_hidden, is_created);
if (Error != NET_ERR_NONE)
WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
"Failed to save configurations. Error [%s]",
//LCOV_EXCL_START
int net_config_save_eap_configurations(const gchar *config_id,
const gchar *name, const gchar *ssid, const gchar *passphrase,
- const gchar *proxy_address, void *eap_config, gboolean is_hidden)
+ const gchar *proxy_address, void *eap_config, gboolean is_hidden, gboolean is_created)
{
__NETWORK_FUNC_ENTER__;
return NET_ERR_APP_NOT_REGISTERED;
}
- Error = _net_dbus_config_save_eap_configurations(config_id,
- name, ssid, passphrase, proxy_address, net_eap_config, is_hidden);
+ Error = _net_dbus_config_save_eap_configurations(config_id, name, ssid, passphrase,
+ proxy_address, net_eap_config, is_hidden, is_created);
if (Error != NET_ERR_NONE)
WIFI_LOG(WIFI_ERROR,
"Failed to save configurations. Error [%s]",
}
int net_config_load_configurations(const gchar *config_id, gchar **name,
- void *security_type, gchar **proxy_address, gboolean *is_hidden,
+ gchar **passphrase, void *security_type, gchar **proxy_address, gboolean *is_hidden,
net_ip_info_config_s **ip_info, void *last_error)
{
__NETWORK_FUNC_ENTER__;
return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
}
- Error = _net_dbus_config_load_configurations(config_id, name, sec_type,
- proxy_address, is_hidden, ip_info, last_error);
+ Error = _net_dbus_config_load_configurations(config_id, name, passphrase,
+ sec_type, proxy_address, is_hidden, ip_info, last_error);
if (Error != NET_ERR_NONE)
WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
"Failed to load configurations. Error [%s]",
h->name = g_strdup(name);
h->passphrase = g_strdup(passphrase);
h->security_type = security_type;
+ h->is_created = TRUE;
h->is_saved = FALSE;
h->is_hidden = FALSE;
h->proxy_address = NULL;
h->name = g_strdup(config->name);
h->passphrase = g_strdup(config->passphrase);
h->security_type = config->security_type;
+ h->is_created = FALSE;
h->is_saved = config->is_saved;
h->is_hidden = config->is_hidden;
h->proxy_address = g_strdup(config->proxy_address);
}
if (h->security_type == WIFI_MANAGER_SECURITY_TYPE_EAP) {
- ret = _wifi_save_eap_configurations(h->name, h->passphrase,
- h->security_type, h->proxy_address, h->eap_config, h->is_hidden);
+ ret = _wifi_save_eap_configurations(h->name, h->passphrase, h->security_type,
+ h->proxy_address, h->eap_config, h->is_hidden, h->is_created);
if (ret != WIFI_MANAGER_ERROR_NONE)
WIFI_LOG(WIFI_ERROR, "Fail to wifi_save_eap_configurations"); //LCOV_EXCL_LINE
} else {
ret = _wifi_save_configuration(h->name, h->passphrase, h->security_type,
- h->proxy_address, h->ip_info, h->is_hidden);
+ h->proxy_address, h->ip_info, h->is_hidden, h->is_created);
if (ret != WIFI_MANAGER_ERROR_NONE)
WIFI_LOG(WIFI_ERROR, "Fail to save configurations [%d]", ret); //LCOV_EXCL_LINE
}
}
static int __load_configurations(const gchar *config_id, gchar **name,
- wifi_manager_security_type_e *security_type, gchar **proxy_address,
+ gchar **passphrase, wifi_manager_security_type_e *security_type, gchar **proxy_address,
gboolean *is_hidden, wifi_config_ip_info_s **ip_info,
wifi_manager_error_e *last_error)
{
int rv;
- rv = net_config_load_configurations(config_id, name, security_type,
+ rv = net_config_load_configurations(config_id, name, passphrase, security_type,
proxy_address, is_hidden, (net_ip_info_config_s **)ip_info,
last_error);
if (rv == NET_ERR_ACCESS_DENIED) {
int _wifi_save_configuration(const gchar *name, const gchar *passphrase,
wifi_manager_security_type_e security_type, const gchar *proxy_address,
- wifi_config_ip_info_s *ip_info, gboolean is_hidden)
+ wifi_config_ip_info_s *ip_info, gboolean is_hidden, gboolean is_created)
{
int rv;
gchar *config_id = NULL;
ssid = __wifi_change_name_to_hexadecimal(name);
rv = net_config_save_configurations(config_id, name, ssid, passphrase,
- proxy_address, (void *)ip_info, is_hidden);
+ proxy_address, (void *)ip_info, is_hidden, is_created);
if (rv == NET_ERR_ACCESS_DENIED) {
WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
g_free(h);//LCOV_EXCL_LINE
break;//LCOV_EXCL_LINE
}
- rv = __load_configurations(id, &h->name, &h->security_type,
+ rv = __load_configurations(id, &h->name, &h->passphrase, &h->security_type,
&h->proxy_address, &h->is_hidden, &h->ip_info,
&h->last_error);
}
//LCOV_EXCL_START
int _wifi_save_eap_configurations(const gchar *name, const gchar *passphrase,
wifi_manager_security_type_e security_type, const gchar *proxy_address,
- wifi_eap_config_s *eap_config, gboolean is_hidden)
+ wifi_eap_config_s *eap_config, gboolean is_hidden, gboolean is_created)
{
int rv;
gchar *config_id = NULL;
ssid = __wifi_change_name_to_hexadecimal(name);
- rv = net_config_save_eap_configurations(config_id, name,
- ssid, passphrase, proxy_address, (void *)eap_config, is_hidden);
+ rv = net_config_save_eap_configurations(config_id, name, ssid, passphrase,
+ proxy_address, (void *)eap_config, is_hidden, is_created);
if (rv == NET_ERR_ACCESS_DENIED) {
WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE