src/data/system/settings_language.c
src/data/system/settings_pincode.c
src/data/system/settings_wakeup_timer.c
+ src/data/system/settings_wireless.c
src/data/system/data_location.c
src/data/system/data_wired.c
src/data/system/data_wireless.c
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __AIR_SETTINGS_WIRELESS_H__
+#define __AIR_SETTINGS_WIRELESS_H__
+
+#include <stdbool.h>
+#include <wifi.h>
+
+/**
+* @brief Gets if passphrase is required for specific AP.
+*
+* @param[in] ap The access point handle
+*
+* @return True on success, false otherwise.
+*/
+bool settings_wireless_passharase_required(wifi_ap_h ap);
+
+#endif /* __AIR_SETTINGS_WIRELESS_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "data/system/settings_wireless.h"
+#include "app_debug.h"
+
+bool settings_wireless_passharase_required(wifi_ap_h ap)
+{
+ bool res = false;
+ int r;
+
+ if (!ap)
+ return false;
+
+ r = wifi_ap_is_passphrase_required(ap, &res);
+ if (WIFI_ERROR_NONE != r) {
+ _ERR("Failed to get result [%X]", r);
+ }
+
+ return res;
+}
#include "common/viewmgr.h"
#include "data/system/data_wired.h"
#include "data/system/data_wireless.h"
+#include "data/system/settings_wireless.h"
#include "define.h"
#include "grid/grid_wireless.h"
#include "layout.h"
struct _priv *priv;
struct wifi_ap_info *ap_info;
char *wifi_name;
+ bool required = false;
if (!it || !data) {
_ERR("Invalid argument.");
return;
}
- if (ap_info->secure_type != WIFI_SECURITY_TYPE_NONE) {
+ required = settings_wireless_passharase_required(ap_info->ap);
+ _DBG("Passphrase required : %s", (required) ? "True" : "False");
+ if (required) {
wifi_name = ap_info->essid;
if (!wifi_name)
return;