/* Inform net-popup to remove the wifi found notification */
netconfig_send_notification_to_net_popup(NETCONFIG_DEL_FOUND_AP_NOTI, NULL);
netconfig_send_notification_to_net_popup(NETCONFIG_DEL_PORTAL_NOTI, NULL);
+ netconfig_send_notification_to_net_popup(NETCONFIG_DEL_IP_CONFLICT_NOTI, NULL);
_deregister_network_notification();
}
return g_tech_state;
}
+gboolean wifi_state_is_technology_available(void)
+{
+ GVariant *message = NULL;
+ GVariantIter *iter, *next;
+ const char *path;
+ gboolean ret = FALSE;
+
+ message = netconfig_invoke_dbus_method(CONNMAN_SERVICE,
+ CONNMAN_MANAGER_PATH, CONNMAN_MANAGER_INTERFACE,
+ "GetTechnologies", NULL);
+ if (message == NULL) {
+ ERR("Failed to get_technology_state");
+ return FALSE;
+ }
+
+ g_variant_get(message, "(a(oa{sv}))", &iter);
+ while (g_variant_iter_loop(iter, "(oa{sv})", &path, &next)) {
+ if (path != NULL && g_strcmp0(path, CONNMAN_WIFI_TECHNOLOGY_PREFIX) == 0)
+ ret = TRUE;
+ }
+
+ g_variant_unref(message);
+ g_variant_iter_free(iter);
+
+ DBG("Wi-Fi technology is %s", ret ? "available" : "unavailable");
+ return ret;
+}
+
void wifi_state_set_connected_essid(void)
{
__set_wifi_connected_essid();
*/
gboolean handle_get_wifi_state(Wifi *wifi, GDBusMethodInvocation *context)
{
- g_return_val_if_fail(wifi != NULL, FALSE);
+ g_return_val_if_fail(wifi != NULL, TRUE);
GVariant *param = NULL;
wifi_tech_state_e tech_state = NETCONFIG_WIFI_TECH_UNKNOWN;
wifi_service_state_e service_state = NETCONFIG_WIFI_UNKNOWN;