VIEWER_ITEM_RADIO_MODE_OFF = 0x01,
VIEWER_ITEM_RADIO_MODE_CONNECTED,
VIEWER_ITEM_RADIO_MODE_CONNECTING,
- VIEWER_ITEM_RADIO_MODE_MAX
+ VIEWER_ITEM_RADIO_MODE_MAX,
+ VIEWER_ITEM_RADIO_MODE_DISCONNECTING
} VIEWER_ITEM_RADIO_MODES;
typedef enum {
}
break;
- case VIEWER_ITEM_RADIO_MODE_CONNECTED:
+ case VIEWER_ITEM_RADIO_MODE_CONNECTING:
ret = wlan_manager_disconnect(device_info->ap);
if (ret != WLAN_MANAGER_ERR_NONE)
- ERROR_LOG(UG_NAME_NORMAL, "Failed disconnect [0x%x]", device_info);
- else
- ug_app_state->is_disconnect = true;
+ ERROR_LOG(UG_NAME_NORMAL, "Failed connect cancel [0x%x]", device_info);
break;
-
- case VIEWER_ITEM_RADIO_MODE_CONNECTING:
+ case VIEWER_ITEM_RADIO_MODE_CONNECTED:
default:
INFO_LOG(UG_NAME_NORMAL, "Ignore click");
break;
char *status_txt = NULL;
/* The strings are currently hard coded. It will be replaced with string ids later */
if (VIEWER_ITEM_RADIO_MODE_CONNECTING == mode) {
- if (ug_app_state->is_disconnect)
- status_txt = g_strdup(sc(PACKAGE, I18N_TYPE_Disconnecting));
- else
- status_txt = g_strdup(sc(PACKAGE, I18N_TYPE_Connecting));
+ status_txt = g_strdup(sc(PACKAGE, I18N_TYPE_Connecting));
+ } else if (VIEWER_ITEM_RADIO_MODE_DISCONNECTING == mode) {
+ status_txt = g_strdup(sc(PACKAGE, I18N_TYPE_Disconnecting));
} else if (VIEWER_ITEM_RADIO_MODE_CONNECTED == mode) {
status_txt = g_strdup(sc(PACKAGE, I18N_TYPE_Connected));
} else if (VIEWER_ITEM_RADIO_MODE_OFF == mode) {
status_txt = g_strdup(sc(PACKAGE, I18N_TYPE_Unknown));
INFO_LOG(UG_NAME_NORMAL, "Invalid mode: %d", mode);
}
- ug_app_state->is_disconnect = false;
return status_txt;
}
first_item = NULL;
last_item = NULL;
grouptitle = NULL;
- ug_app_state->is_disconnect = false;
assertm_if(NULL == win, "NULL!!");
viewer_list = elm_genlist_add(win);
return FALSE;
}
+ if (gdata->radio_mode == VIEWER_ITEM_RADIO_MODE_CONNECTED)
+ mode = VIEWER_ITEM_RADIO_MODE_DISCONNECTING;
+
if (gdata->radio_mode == mode) {
INFO_LOG(UG_NAME_NORMAL, "[%s] is already in requested state", gdata->device_info->ssid);
return FALSE;