Exemplo n.º 1
0
void __scan_request_cb(wifi_error_e error_code, void *user_data)
{
    OIC_LOG(INFO, LOG_TAG, "__scan_request_cb");
    int error_code1;
    error_code1 = wifi_foreach_found_aps(__wifi_found_ap_cb, NULL);
    if (error_code1 != WIFI_ERROR_NONE)
        OIC_LOG(INFO,LOG_TAG,"#### Fail to scan");

    OIC_LOG(INFO, LOG_TAG,"#### __scan_request_cb exit ");
}
Exemplo n.º 2
0
gboolean view_main_show(void *data)
{
	__COMMON_FUNC_ENTER__;

	int i;
	wifi_device_info_t *wifi_device = NULL;
	GList* list_of_device = NULL;

	int state = wlan_manager_state_get();
	if (WLAN_MANAGER_ERROR == state || WLAN_MANAGER_OFF == state) {
		INFO_LOG(SP_NAME_NORMAL, "Wi-Fi state is OFF");
		view_main_create_empty_layout();
		goto exit;
	} else if (WLAN_MANAGER_CONNECTED == state) {
		__COMMON_FUNC_EXIT__;
		return FALSE;
	}

	wifi_devpkr_enable_scan_btn();

	/* If previous profile list exists then just clear the genlist */
	if (profiles_list_size) {
		view_main_scan_ui_clear();
		view_main_add_group_title();
	} else {
		view_main_create_main_list();
	}

	view_main_state_set(ITEM_CONNECTION_MODE_OFF);

	profiles_list_size = 0;

	wifi_foreach_found_aps(view_main_wifi_found_ap_cb, &profiles_list_size);
	INFO_LOG(SP_NAME_NORMAL, "profiles list count [%d]\n", profiles_list_size);

	list_of_device = wifi_device_list;
	for (i = 0; i < profiles_list_size && list_of_device != NULL; i++) {
		wifi_device = (wifi_device_info_t*)list_of_device->data;

		view_main_wifi_insert_found_ap(wifi_device);

		list_of_device = list_of_device->next;
	}

	if (wifi_device_list != NULL) {
		g_list_free(wifi_device_list);
		wifi_device_list = NULL;
	}

	if (profiles_list_size <= 0)
		view_main_create_empty_layout();
	else
		evas_object_show(list);

exit:
	wifi_devpkr_redraw();

	evas_object_show(devpkr_app_state->popup);
	evas_object_show(devpkr_app_state->win_main);

	__COMMON_FUNC_EXIT__;
	return FALSE;
}