char *vconf_name = vconf_keynode_get_name(key);
- if (!g_strcmp0(vconf_name, VCONFKEY_SETAPPL_DEVICE_NAME_STR)){
+ if (!g_strcmp0(vconf_name, VCONFKEY_SETAPPL_DEVICE_NAME_STR)) {
char *name_value = NULL;
name_value = vconf_get_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR);
- WFD_RET_IF (!name_value, "Get string is failed");
- DBG(LOG_INFO,"name : %s", name_value);
+ WFD_RET_IF(!name_value, "Get string is failed");
+ DBG(LOG_INFO, "name : %s", name_value);
if (ugd->device_name_item && g_strcmp0(ugd->dev_name, name_value))
wfd_ug_view_refresh_glitem(ugd->device_name_item);
}
if (ugd->wfd_status <= WIFI_DIRECT_STATE_DEACTIVATING) {
DBG(LOG_INFO, "Activate WiFi Direct...");
- if (FALSE != wfd_client_switch_on(ugd)) {
+ if (FALSE != wfd_client_switch_on(ugd))
DBG(LOG_ERROR, "Failed to Activate WiFi Direct");
- }
}
}
}
DBG(LOG_INFO, "__wfd_hotspot_mode_vconf_change_cb mode %d", hotspot_mode);
if (VCONFKEY_MOBILE_HOTSPOT_MODE_NONE == hotspot_mode) {
- if (NULL != ugd->act_popup) {
+ if (NULL != ugd->act_popup)
evas_object_del(ugd->act_popup);
- }
+
#ifdef WFD_ON_OFF_GENLIST
wfd_ug_refresh_on_off_check(ugd);
#endif
evas_object_event_callback_del(ugd->base, EVAS_CALLBACK_SHOW, _wfd_init_cb);
res = launch_wifi_direct_manager(ugd);
- if (res != 0) {
+ if (res != 0)
DBG(LOG_ERROR, "Failed to launch wifi direct manager\n");
- }
__FUNC_EXIT__;
return;
int wfd_status = -1;
int ret;
- if (!ug || !priv) {
+ if (!ug || !priv)
return NULL;
- }
ugd = priv;
ugd->ug = ug;
bindtextdomain(PACKAGE, LOCALEDIR);
ugd->win = ug_get_window();
- if (!ugd->win) {
+ if (!ugd->win)
return NULL;
- }
/* set rotation */
if (elm_win_wm_rotation_supported_get(ugd->win)) {
}
ret = app_control_get_extra_data(control, "viewtype", &viewtype);
- if(ret == APP_CONTROL_ERROR_NONE && viewtype) {
+ if (ret == APP_CONTROL_ERROR_NONE && viewtype) {
DBG(LOG_INFO, "viewtype: %s\n", viewtype);
ugd->view_type = strdup(viewtype);
WFD_IF_FREE_MEM(viewtype);
ret = app_control_get_extra_data(control, "device_filter", &device_filter);
if (ret == APP_CONTROL_ERROR_NONE && device_filter) {
DBG(LOG_INFO, "Device filter: %s", device_filter);
- if (0 == strncmp(device_filter, "computer", 8)) {
+ if (0 == strncmp(device_filter, "computer", 8))
ugd->device_filter = WFD_DEVICE_TYPE_COMPUTER;
- } else if (0 == strncmp(device_filter, "input_device", 12)) {
+ else if (0 == strncmp(device_filter, "input_device", 12))
ugd->device_filter = WFD_DEVICE_TYPE_INPUT_DEVICE;
- } else if (0 == strncmp(device_filter, "printer", 6)) {
+ else if (0 == strncmp(device_filter, "printer", 6))
ugd->device_filter = WFD_DEVICE_TYPE_PRINTER;
- } else if (0 == strncmp(device_filter, "camera", 6)) {
+ else if (0 == strncmp(device_filter, "camera", 6))
ugd->device_filter = WFD_DEVICE_TYPE_CAMERA;
- } else if (0 == strncmp(device_filter, "storage", 7)) {
+ else if (0 == strncmp(device_filter, "storage", 7))
ugd->device_filter = WFD_DEVICE_TYPE_STORAGE;
- } else if (0 == strncmp(device_filter, "network_infra", 13)) {
+ else if (0 == strncmp(device_filter, "network_infra", 13))
ugd->device_filter = WFD_DEVICE_TYPE_NW_INFRA;
- } else if (0 == strncmp(device_filter, "display", 7)) {
+ else if (0 == strncmp(device_filter, "display", 7))
ugd->device_filter = WFD_DEVICE_TYPE_DISPLAYS;
- } else if (0 == strncmp(device_filter, "multimedia_device", 17)) {
+ else if (0 == strncmp(device_filter, "multimedia_device", 17))
ugd->device_filter = WFD_DEVICE_TYPE_MM_DEVICES;
- } else if (0 == strncmp(device_filter, "game_device", 11)) {
+ else if (0 == strncmp(device_filter, "game_device", 11))
ugd->device_filter = WFD_DEVICE_TYPE_GAME_DEVICES;
- } else if (0 == strncmp(device_filter, "telephone", 9)) {
+ else if (0 == strncmp(device_filter, "telephone", 9))
ugd->device_filter = WFD_DEVICE_TYPE_TELEPHONE;
- } else if (0 == strncmp(device_filter, "audio", 5)) {
+ else if (0 == strncmp(device_filter, "audio", 5))
ugd->device_filter = WFD_DEVICE_TYPE_AUDIO;
- } else {
+ else
ugd->device_filter = WFD_DEVICE_TYPE_OTHER;
- }
+
WFD_IF_FREE_MEM(device_filter);
}
ret = app_control_get_extra_data(control, "auto_exit", &auto_exit);
if (ret == APP_CONTROL_ERROR_NONE && auto_exit) {
DBG(LOG_INFO, "Auto exit: %s", auto_exit);
- if (0 == strncmp(auto_exit, "on", 2)) {
+ if (0 == strncmp(auto_exit, "on", 2))
ugd->is_auto_exit = true;
- } else {
+ else
ugd->is_auto_exit = false;
- }
+
WFD_IF_FREE_MEM(auto_exit);
}
ret = app_control_get_extra_data(control, "multi_connect", &multi_connect);
if (ret == APP_CONTROL_ERROR_NONE && multi_connect) {
DBG(LOG_INFO, "Multi connection: %s", multi_connect);
- if (0 == strncmp(multi_connect, "off", 2)) {
+ if (0 == strncmp(multi_connect, "off", 2))
ugd->is_multi_connect = false;
- } else {
+ else
ugd->is_multi_connect = true;
- }
+
WFD_IF_FREE_MEM(multi_connect);
}
}
}
- if (mode == UG_MODE_FULLVIEW) {
+ if (mode == UG_MODE_FULLVIEW)
ugd->base = _create_fullview(ugd->win, ugd);
- } else {
+ else
ugd->base = _create_frameview(ugd->win, ugd);
- }
if (ugd->base) {
evas_object_event_callback_add(ugd->base, EVAS_CALLBACK_DEL, wfd_ug_layout_del_cb, ugd);
/* check status of wifi-direct from vconf */
wfd_status = wfd_get_vconf_status();
- if (wfd_status < 0) {
+ if (wfd_status < 0)
return NULL;
- }
/* draw UI */
initialize_gen_item_class();
}
ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_DEVICE_NAME_STR,
__wfd_main_vconf_change_cb, ugd);
- if (ret) {
+ if (ret)
DBG(LOG_ERROR, "Failed to set vconf notification callback(VCONFKEY_SETAPPL_DEVICE_NAME_STR)");
- }
#ifdef WIFI_STATE_CB
ret = vconf_notify_key_changed(VCONFKEY_WIFI_STATE, _wifi_on_state_cb, ugd);
- if (ret) {
+ if (ret)
DBG(LOG_ERROR, "Failed to set vconf notification callback(VCONFKEY_WIFI_STATE)");
-
- }
#endif
ret = vconf_notify_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE,
__wfd_hotspot_mode_vconf_change_cb, ugd);
- if (ret) {
+ if (ret)
DBG(LOG_ERROR, "Failed to set vconf notification callback(MOBILE_HOTSPOT_MODE)");
- }
__FUNC_EXIT__;
return ugd->base;
struct ug_data *ugd;
int res;
- if (!ug || !priv) {
+ if (!ug || !priv)
return;
- }
ugd = priv;
wfd_refresh_wifi_direct_state(ugd);
DBG(LOG_INFO, "on pause, wfd status: %d\n", ugd->wfd_status);
- if ((WIFI_DIRECT_STATE_DISCOVERING == ugd->wfd_status) &&
+ if ((WIFI_DIRECT_STATE_DISCOVERING == ugd->wfd_status) &&
(WIFI_DIRECT_ERROR_NONE != wifi_direct_cancel_discovery())) {
DBG(LOG_ERROR, "Failed to send cancel discovery state [%d]\n", ugd->wfd_status);
__FUNC_EXIT__;
/* DeInit WiFi Direct */
ret = deinit_wfd_client(ugd);
- if (ret) {
- DBG(LOG_ERROR,"Failed to DeInit WiFi Direct");
- }
+ if (ret)
+ DBG(LOG_ERROR, "Failed to DeInit WiFi Direct");
if (ugd->scan_toolbar) {
wfd_ug_view_refresh_button(ugd->scan_toolbar,
ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_DEVICE_NAME_STR,
__wfd_main_vconf_change_cb);
- if (ret == -1) {
- DBG(LOG_ERROR,"Failed to ignore vconf key callback\n");
- }
+ if (ret == -1)
+ DBG(LOG_ERROR, "Failed to ignore vconf key callback\n");
#ifdef WIFI_STATE_CB
ret = vconf_ignore_key_changed(VCONFKEY_WIFI_STATE, _wifi_on_state_cb);
- if (ret == -1) {
- DBG(LOG_ERROR,"Failed to ignore vconf key callback\n");
- }
+ if (ret == -1)
+ DBG(LOG_ERROR, "Failed to ignore vconf key callback\n");
#endif
ret = vconf_ignore_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE,
__wfd_hotspot_mode_vconf_change_cb);
- if (ret == -1) {
- DBG(LOG_ERROR,"Failed to ignore vconf key callback MOBILE_HOTSPOT_MODE\n");
- }
+ if (ret == -1)
+ DBG(LOG_ERROR, "Failed to ignore vconf key callback MOBILE_HOTSPOT_MODE\n");
wfd_ug_view_free_peers(ugd);
WFD_IF_FREE_MEM(ugd->title);
DBG(LOG_DEBUG, "Msg from app: %s", app_msg);
if (!strcmp(app_msg, "destroy")) {
- if(!ugd->rename_popup) {
+ if (!ugd->rename_popup) {
DBG(LOG_INFO, "Destroying UG.");
wfd_ug_view_free_peers(ugd);
wfd_destroy_ug(ugd);