Name: ug-setting-mobileap-efl
Summary: Tethering UI Gadget Library
-Version: 1.0.137
+Version: 1.0.138
Release: 1
Group: App/Network
License: Flora-1.1
return;
}
dev_name = vconf_keynode_get_str(key);
- if (ad->setup.name_item != NULL) {
+ if (ad->setup.name_item != NULL)
elm_genlist_item_update(ad->setup.name_item);
- }
- if (ad->main.help_item != NULL) {
+
+ if (ad->main.help_item != NULL)
elm_genlist_item_update(ad->main.help_item);
- }
+
if (ad->rename_popup) {
elm_entry_entry_set(ad->rename_entry, dev_name);
elm_entry_cursor_end_set(ad->rename_entry);
}
- if (ad->main.hotspot_mode & VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI) {
+ if (ad->main.hotspot_mode & VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI)
_update_wifi_item(ad, MH_STATE_PROCESS);
- }
+
return;
}
vconf_key = vconf_keynode_get_int(key);
if (vconf_key) {
- if (vconf_set_int(VCONF_KEY_MOBILEAP_SYSPOPUP_RESPONSE, 0) < 0) {
+ if (vconf_set_int(VCONF_KEY_MOBILEAP_SYSPOPUP_RESPONSE, 0) < 0)
ERR("vconf_set_int is failed\n");
- }
+
if (ad->type != TETHERING_TYPE_WIFI) {
DBG("no need to handle user response\n");
return;
}
vconf_key = vconf_keynode_get_int(key);
- if (vconf_key == SETTING_USB_NONE_MODE) {
+ if (vconf_key == SETTING_USB_NONE_MODE)
return;
- }
+
if (vconf_key != VCONFKEY_SYSMAN_USB_AVAILABLE) {
if (ad->type == TETHERING_TYPE_USB && ad->popup) {
evas_object_del(ad->popup);
tethering_error_e ret;
int count = 0;
- for (l = ad->client_list; l != NULL; l = g_slist_next(l) ) {
+ for (l = ad->client_list; l != NULL; l = g_slist_next(l)) {
handle = l->data;
if (handle == NULL)
continue;
GSList *l = NULL;
tethering_client_h handle;
- for (l = ad->client_list; l != NULL; l = g_slist_next(l) ) {
+ for (l = ad->client_list; l != NULL; l = g_slist_next(l)) {
handle = l->data;
if (handle == NULL)
continue;
void _free_genlist_item(Elm_Object_Item **item)
{
- if (*item == NULL) {
+ if (*item == NULL)
return;
- }
elm_object_item_del(*item);
*item = NULL;
void _free_genlist_itc(Elm_Genlist_Item_Class **itc)
{
- if (*itc == NULL) {
+ if (*itc == NULL)
return;
- }
elm_genlist_item_class_free(*itc);
*itc = NULL;
{
int value = 0;
- if (vconf_get_int(VCONFKEY_TELEPHONY_SIM_SLOT, &value) < 0) {
+ if (vconf_get_int(VCONFKEY_TELEPHONY_SIM_SLOT, &value) < 0)
ERR("vconf_get_int is failed\n");
- }
+
DBG("%s : %d\n", VCONFKEY_TELEPHONY_SIM_SLOT, value);
- if (value == VCONFKEY_TELEPHONY_SIM_INSERTED) {
+ if (value == VCONFKEY_TELEPHONY_SIM_INSERTED)
return value;
- }
#if defined TIZEN_FEATURE_DUALSIM_ENABLE
if (vconf_get_int(VCONFKEY_TELEPHONY_SIM_SLOT2, &value) < 0) {
int i = 0;
no_of_dev = _get_list_clients_count(ad);
- for (i = 0; i < no_of_dev; i++) {
+ for (i = 0; i < no_of_dev; i++)
_free_genlist_item(&ad->connected_device.station_items[i]);
- }
_free_genlist_itc(&client->dev_itc[TETHERING_TYPE_WIFI]);
_free_genlist_itc(&client->dev_itc[TETHERING_TYPE_BT]);
elm_genlist_clear(cli_view->genlist);
- for (l = ad->client_list; l != NULL; l = g_slist_next(l) ) {
+ for (l = ad->client_list; l != NULL; l = g_slist_next(l)) {
handle = (tethering_client_h *)l->data;
tethering_client_get_tethering_type(handle, &connection_type);
if (!strcmp("elm.text", part)) {
tethering_client_get_name(client, &name);
- if (NULL == name) {
+ if (NULL == name)
return NULL;
- }
if (!strcmp(name, "UNKNOWN")) {
free(name);
__set_genlist_itc(ad);
- for (l = ad->client_list; l != NULL; l = g_slist_next(l) ) {
+ for (l = ad->client_list; l != NULL; l = g_slist_next(l)) {
handle = (tethering_client_h *)l->data;
tethering_client_get_tethering_type(handle, &connection_type);
elm_object_focus_set(ad->rename_entry, EINA_FALSE);
- if (ad->rename_popup) {
+ if (ad->rename_popup)
evas_object_del(ad->rename_popup);
- }
+
ad->rename_popup = NULL;
ad->rename_entry = NULL;
__set_rotate_cb(NULL, NULL);
if (ev->button == 3) {
elm_object_focus_set(ad->rename_entry, EINA_FALSE);
- if (ad->rename_popup) {
+ if (ad->rename_popup)
evas_object_del(ad->rename_popup);
- }
+
ad->rename_popup = NULL;
ad->rename_entry = NULL;
}
static bool __is_space_str(const char *str)
{
while (str) {
- if (*str != '\0' && *str != ' ') {
+ if (*str != '\0' && *str != ' ')
return FALSE;
- } else if (*str == '\0') {
+ else if (*str == '\0')
return TRUE;
- }
str++;
}
return TRUE;
__MOBILE_AP_FUNC_ENTER__;
mh_appdata_t *ad = (mh_appdata_t *)data;
- const char *entry_text = NULL;
- char *input_str = NULL;
+ const char *entry_text = NULL;
+ char *input_str = NULL;
bool is_space_string = FALSE;
entry_text = elm_entry_entry_get(obj);
if (input_str == NULL || (strlen(input_str) == 0)) {
elm_object_disabled_set(ad->rename_button, TRUE);
elm_entry_input_panel_return_key_disabled_set(obj, TRUE);
- if (input_str) {
+ if (input_str)
free(input_str);
- }
+
return;
}
elm_object_disabled_set(ad->rename_button, FALSE);
elm_entry_input_panel_return_key_disabled_set(ad->rename_entry, FALSE);
}
- if (input_str) {
+ if (input_str)
free(input_str);
- }
+
__MOBILE_AP_FUNC_EXIT__;
}
snprintf(buf, sizeof(buf), STR_PW_MAX_LEN_WARN_MSG, DEVICE_NAME_LENGTH_MAX);
ret = notification_status_message_post(buf);
- if (ret != NOTIFICATION_ERROR_NONE) {
+ if (ret != NOTIFICATION_ERROR_NONE)
ERR("notification_status_message_post() is failed : %d\n", ret);
- }
__MOBILE_AP_FUNC_EXIT__;
}
ad->rename_entry = NULL;
}
if (g_strcmp0(ad->setup.device_name, device_name_str)) {
- if (vconf_set_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR, device_name_str) != 0) {
- DBG("Set vconf[%s] failed\n",VCONFKEY_SETAPPL_DEVICE_NAME_STR);
- }
+ if (vconf_set_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR, device_name_str) != 0)
+ DBG("Set vconf[%s] failed\n", VCONFKEY_SETAPPL_DEVICE_NAME_STR);
g_strlcpy(ad->setup.device_name, entry_str,
sizeof(ad->setup.device_name));
__MOBILE_AP_FUNC_ENTER__;
__set_portrait_mode(is_portrait);
- if (rotate_cb) {
+ if (rotate_cb)
rotate_cb(is_portrait, rotate_cb_data);
- }
+
__MOBILE_AP_FUNC_EXIT__;
}
}
mh_appdata_t *ad = (mh_appdata_t*) data;
- if (strcmp(part, "elm.icon.entry")) {
+ if (strcmp(part, "elm.icon.entry"))
return NULL;
- }
entry = elm_entry_add(obj);
elm_entry_single_line_set(entry, EINA_TRUE);
static char *__rename_desc_label_get(void *data, Evas_Object *obj,
const char *part)
{
- if (!strcmp(part, "elm.text.multiline" )) {
+ if (!strcmp(part, "elm.text.multiline"))
return g_strdup(STR_RENAME_DEVICE_MSG);
- }
+
return NULL;
}
void _update_tethering_enabling_item(mh_appdata_t *ad, tethering_type_e type, mh_state_e state)
{
- switch(type) {
+ switch (type) {
case TETHERING_TYPE_WIFI:
_update_wifi_item(ad, MH_STATE_NONE);
ad->is_wifi_teth_enabling = false;
break;
-
case TETHERING_TYPE_BT:
_update_bt_item(ad, MH_STATE_NONE);
ad->is_bt_teth_enabling = false;
break;
-
case TETHERING_TYPE_USB:
_update_usb_item(ad, MH_STATE_NONE);
ad->is_usb_teth_enabling = false;
break;
-
- default :
+ default:
ERR("invalid type \n");
break;
}
void _update_tethering_item(mh_appdata_t * ad, mh_state_e state)
{
ERR("type : %d state : %d\n", ad->type, state);
- switch(ad->type) {
- case TETHERING_TYPE_WIFI:
- _update_wifi_item(ad, state);
- break;
- case TETHERING_TYPE_BT:
- _update_bt_item(ad, state);
- break;
- case TETHERING_TYPE_USB:
- _update_usb_item(ad, state);
- break;
- default:
- break;
+ switch (ad->type) {
+ case TETHERING_TYPE_WIFI:
+ _update_wifi_item(ad, state);
+ break;
+ case TETHERING_TYPE_BT:
+ _update_bt_item(ad, state);
+ break;
+ case TETHERING_TYPE_USB:
+ _update_usb_item(ad, state);
+ break;
+ default:
+ break;
}
}
DBG("Re-Check cellular state (%d)\n", recheck_count);
- if(cellular_state == CONNECTION_CELLULAR_STATE_FLIGHT_MODE) {
+ if (cellular_state == CONNECTION_CELLULAR_STATE_FLIGHT_MODE) {
_update_tethering_item(ad, MH_STATE_NONE);
recheck_count = 0;
return FALSE;
return FALSE;
}
} else {
- if(++recheck_count >= PS_RECHECK_COUNT_MAX) {
+ if (++recheck_count >= PS_RECHECK_COUNT_MAX) {
DBG("Cellular network is not connected : %d\n", cellular_state);
_update_tethering_item(ad, MH_STATE_NONE);
_prepare_popup(MH_POPUP_NETWORK_OUT_OF_RANGE, STR_NO_DATA_SERVICE);
/* Check SIM state */
if (_get_sim_state() != VCONFKEY_TELEPHONY_SIM_INSERTED) {
- if(ad->type == TETHERING_TYPE_WIFI)
+ if (ad->type == TETHERING_TYPE_WIFI)
_prepare_popup(MH_POPUP_NO_SIM, STR_INSERT_SIM_TO_USE_TETH);
else
_prepare_popup(MH_POPUP_NO_SIM, STR_CONN_MOBILE_DATA_TO_USE_TETH);
} else {
if (vconf_get_bool(VCONFKEY_3G_ENABLE , &dnet_state) < 0) {
ERR("vconf_get_bool is failed\n");
- } else if(dnet_state == 0) {
+ } else if (dnet_state == 0) {
DBG("Data Network is not connected");
_prepare_popup(MH_POPUP_MOBILE_DATA_OFF, STR_NO_NET_CONN_MSG);
_create_popup(ad);
}
if (cellular_state != CONNECTION_CELLULAR_STATE_CONNECTED &&
cellular_state != CONNECTION_CELLULAR_STATE_AVAILABLE) {
- if(ad->ps_recheck_timer_id > 0) {
+ if (ad->ps_recheck_timer_id > 0) {
g_source_remove(ad->ps_recheck_timer_id);
ad->ps_recheck_timer_id = 0;
- if (ad->is_wifi_teth_enabling == true && ad->type != TETHERING_TYPE_WIFI) {
- _update_tethering_enabling_item(ad, TETHERING_TYPE_WIFI, MH_STATE_NONE);
- }
- if (ad->is_bt_teth_enabling == true && ad->type != TETHERING_TYPE_BT) {
- _update_tethering_enabling_item(ad, TETHERING_TYPE_BT, MH_STATE_NONE);
- }
- if (ad->is_usb_teth_enabling == true && ad->type != TETHERING_TYPE_USB) {
- _update_tethering_enabling_item(ad, TETHERING_TYPE_USB, MH_STATE_NONE);
- }
+ if (ad->is_wifi_teth_enabling == true
+ && ad->type != TETHERING_TYPE_WIFI)
+ _update_tethering_enabling_item(ad, TETHERING_TYPE_WIFI,
+ MH_STATE_NONE);
+ if (ad->is_bt_teth_enabling == true
+ && ad->type != TETHERING_TYPE_BT)
+ _update_tethering_enabling_item(ad, TETHERING_TYPE_BT,
+ MH_STATE_NONE);
+ if (ad->is_usb_teth_enabling == true
+ && ad->type != TETHERING_TYPE_USB)
+ _update_tethering_enabling_item(ad, TETHERING_TYPE_USB,
+ MH_STATE_NONE);
}
- ad->ps_recheck_timer_id = g_timeout_add(PS_RECHECK_INTERVAL, _ps_recheck_timeout_cb, (void*)ad);
+ ad->ps_recheck_timer_id = g_timeout_add(PS_RECHECK_INTERVAL,
+ _ps_recheck_timeout_cb, (void*)ad);
return 0;
}
}
- DBG("Cellular network is connected\n");
DBG("-\n");
return 1;
}
_set_vconf_prev_wifi_state(wifi_state);
value = _get_checkbox_status(TETHERING_TYPE_WIFI);
if (0 == value) {
- if (wifi_state == true || _is_wifi_direct_on() == true) {
+ if (wifi_state == true || _is_wifi_direct_on() == true)
fmt = STR_TETH_ON_DESC_1;
- } else {
+ else
fmt = STR_TETH_ON_DESC_2;
- }
+
str = g_malloc0(MH_LABEL_LENGTH_MAX);
if (str == NULL) {
ERR("memory allocation is failed\n");
break;
case TETHERING_DISABLED_BY_OTHERS:
- if (ad->main.wifi_item && _get_vconf_prev_wifi_state() == true) {
+ if (ad->main.wifi_item && _get_vconf_prev_wifi_state() == true)
elm_object_item_disabled_set(ad->main.wifi_item, EINA_TRUE);
- }
break;
case TETHERING_DISABLED_BY_LOW_BATTERY:
return;
}
- if (result != TETHERING_ERROR_NONE) {
- }
_update_main_view(ad, type);
return;
return;
}
- if (ad->main.wifi_item && type == TETHERING_TYPE_WIFI && _get_vconf_prev_wifi_state() == true) {
+ if (ad->main.wifi_item && type == TETHERING_TYPE_WIFI && _get_vconf_prev_wifi_state() == true)
elm_object_item_disabled_set(ad->main.wifi_item, EINA_TRUE);
- }
_update_main_view(ad, type);
_append_list_client_handle(ad, client);
#ifdef TETHERING_DATA_USAGE_SUPPORT
- if (ad->is_foreground && _get_list_clients_count(ad) == 1) {
+ if (ad->is_foreground && _get_list_clients_count(ad) == 1)
_start_update_data_packet_usage(ad);
- }
#endif
} else {
tethering_client_get_mac_address(client, &mac_addr);
DBG("+\n");
- mh_appdata_t *ad= (mh_appdata_t *)user_data;
+ mh_appdata_t *ad = (mh_appdata_t *)user_data;
char *str = NULL;
char *fmt = NULL;
if (state == WIFI_DEVICE_STATE_ACTIVATED) {
if (ad->main.wifi_item && elm_object_item_disabled_get(ad->main.wifi_item))
elm_object_item_disabled_set(ad->main.wifi_item, EINA_FALSE);
_set_vconf_prev_wifi_state(false);
- } else if (state == WIFI_DEVICE_STATE_DEACTIVATED){
+ } else if (state == WIFI_DEVICE_STATE_DEACTIVATED) {
_set_vconf_prev_wifi_state(true);
}
ad->popup_checkbox = NULL;
evas_object_del(ad->popup);
ad->popup = NULL;
- if (state == WIFI_DEVICE_STATE_ACTIVATED) {
+ if (state == WIFI_DEVICE_STATE_ACTIVATED)
fmt = STR_TETH_ON_DESC_1;
- } else {
+ else
fmt = STR_TETH_ON_DESC_2;
- }
+
str = g_malloc0(MH_LABEL_LENGTH_MAX);
if (str == NULL) {
ERR("memory allocation is failed\n");
return;
}
- if (!g_strcmp0(passphrase, ad->setup.wifi_passphrase)) {
+ if (!g_strcmp0(passphrase, ad->setup.wifi_passphrase))
goto DONE;
- }
g_strlcpy(ad->setup.wifi_passphrase, passphrase,
sizeof(ad->setup.wifi_passphrase));
#define UG_MODULE_API __attribute__ ((visibility("default")))
#endif
-//#include <setting-cfg.h>
+#if 0
+#include <setting-cfg.h>
+#endif
#include "mobile_hotspot.h"
#include "mh_view_main.h"
#include "mh_string.h"
#include "mh_view_wifi_setup.h"
-//UG_MODULE_API int setting_plugin_search_init(app_control_h app_control, void * priv, char ** domainname);
+#if 0 /* Not support */
+UG_MODULE_API int setting_plugin_search_init(app_control_h app_control, void * priv, char ** domainname);
+#endif
static Evas_Object *create_content(mh_appdata_t *ad)
{
elm_object_part_content_set(layout, "elm.swallow.content", content);
evas_object_show(layout);
ret = connection_create(&ad->conn_handle);
- if (ret != CONNECTION_ERROR_NONE) {
+ if (ret != CONNECTION_ERROR_NONE)
ERR("connection_create() is failed : %d\n", ret);
- }
ret = wifi_initialize();
- if (ret != WIFI_ERROR_NONE) {
+ if (ret != WIFI_ERROR_NONE)
ERR("wifi_initialize() is failed : %d\n", ret);
- }
__set_callbacks(ad->handle, (void *)ad);
#ifdef TETHERING_DATA_USAGE_SUPPORT
_start_update_data_packet_usage(ad);
#endif
- if (ad->connected_device.navi_it) {
+ if (ad->connected_device.navi_it)
_start_update_device_conn_time(ad);
- }
}
app_control_get_extra_data(app_control, "viewtype", &viewtype);
if (viewtype != NULL) {
- if(strcmp(viewtype, "wifisettings") == 0)
+ if (strcmp(viewtype, "wifisettings") == 0)
mh_draw_wifi_setup_view(ad);
g_free(viewtype);
}
ad->is_foreground = true;
if (item && elm_genlist_item_expanded_get(item)) {
- for (l = ad->client_list; l != NULL; l = g_slist_next(l) ) {
+ for (l = ad->client_list; l != NULL; l = g_slist_next(l)) {
item = elm_genlist_item_next_get(item);
elm_genlist_item_fields_update(item, "elm.text", ELM_GENLIST_ITEM_FIELD_TEXT);
}
#ifdef TETHERING_DATA_USAGE_SUPPORT
_start_update_data_packet_usage(ad);
#endif
- if (ad->connected_device.navi_it) {
+ if (ad->connected_device.navi_it)
_start_update_device_conn_time(ad);
- }
}
DBG("-\n");
}
#endif
_stop_update_device_conn_time(ad);
- if (vconf_set_int(VCONF_MOBILE_AP_CONNECT_USB_POPUP_STATUS, 0) < 0) {
+ if (vconf_set_int(VCONF_MOBILE_AP_CONNECT_USB_POPUP_STATUS, 0) < 0)
ERR("vconf_set_int is failed\n");
- }
ret = wifi_deinitialize();
- if (ret != WIFI_ERROR_NONE) {
+ if (ret != WIFI_ERROR_NONE)
ERR("wifi_deinitialize() is failed : %d\n", ret);
- }
ret = connection_destroy(ad->conn_handle);
- if (ret != CONNECTION_ERROR_NONE) {
+ if (ret != CONNECTION_ERROR_NONE)
ERR("connection_destroy() is failed : %d\n", ret);
- }
ret = tethering_destroy(ad->handle);
- if (ret != TETHERING_ERROR_NONE) {
+ if (ret != TETHERING_ERROR_NONE)
ERR("tethering_destroy() is failed : %d\n", ret);
- }
if (ad->layout == NULL) {
ERR("ad->layout is NULL\n");
ad->popup = NULL;
}
- if(ad->ps_recheck_timer_id > 0) {
+ if (ad->ps_recheck_timer_id > 0) {
g_source_remove(ad->ps_recheck_timer_id);
ad->ps_recheck_timer_id = 0;
}
app_control_h app_control;
app_control_create(&app_control);
- if(ret != APP_CONTROL_ERROR_NONE) {
+ if (ret != APP_CONTROL_ERROR_NONE) {
ERR("app_control_create failed");
return;
}
app_control_set_app_id(app_control, "setting-network-efl");
ret = app_control_send_launch_request(app_control, NULL, NULL);
- if(ret == APP_CONTROL_ERROR_NONE) {
+ if (ret == APP_CONTROL_ERROR_NONE)
DBG("Launch network ug successful");
- } else {
+ else
ERR("Fail to launch network ug");
- }
app_control_destroy(app_control);
}
if (response == true) {
switch (popup_type) {
case MH_POPUP_WIFI_ON_CHECKBOX:
- if(state) {
+ if (state)
_set_checkbox_status(TETHERING_TYPE_WIFI, 1);
- }
+
ad->is_wifi_teth_enabling = false;
ret = tethering_enable(ad->handle, TETHERING_TYPE_WIFI);
if (ret != TETHERING_ERROR_NONE) {
break;
case MH_POPUP_BT_ON_CHECKBOX:
- if(state) {
+ if (state)
_set_checkbox_status(TETHERING_TYPE_BT, 1);
- }
+
ad->is_bt_teth_enabling = false;
ret = tethering_enable(ad->handle, TETHERING_TYPE_BT);
if (ret != TETHERING_ERROR_NONE) {
break;
case MH_POPUP_USB_ON_CHECKBOX:
- if(state) {
+ if (state)
_set_checkbox_status(TETHERING_TYPE_USB, 1);
- }
+
if (_get_vconf_usb_state() != VCONFKEY_SYSMAN_USB_AVAILABLE) {
_update_tethering_item(ad, MH_STATE_NONE);
break;
break;
case MH_POPUP_USB_ON_CHECKBOX:
- _update_tethering_enabling_item(ad,TETHERING_TYPE_USB, MH_STATE_NONE);
+ _update_tethering_enabling_item(ad, TETHERING_TYPE_USB, MH_STATE_NONE);
break;
case MH_POPUP_WIFI_AP_OFF:
Evas_Event_Mouse_Up *ev = event_info;
- if (ev->button == 3) {
+ if (ev->button == 3)
__handle_popup_resp(data, false);
- }
}
static void __popup_block_clicked_cb(void *data, Evas_Object *obj, void *event_info)
char *fmt = NULL;
char str[MH_LABEL_LENGTH_MAX];
- if (ad->type < TETHERING_TYPE_USB || ad->type > TETHERING_TYPE_BT ) {
+ if (ad->type < TETHERING_TYPE_USB || ad->type > TETHERING_TYPE_BT) {
ERR("Invalid Tethering type\n");
return;
}
- switch(ad->type) {
+ switch (ad->type) {
case TETHERING_TYPE_WIFI:
wifi_is_activated(&wifi_state);
_set_vconf_prev_wifi_state(wifi_state);
- if (wifi_state == true || _is_wifi_direct_on() == true) {
+ if (wifi_state == true || _is_wifi_direct_on() == true)
fmt = STR_TETH_ON_DESC_1;
- } else {
+ else
fmt = STR_TETH_ON_DESC_2;
- }
+
snprintf(str, MH_LABEL_LENGTH_MAX, fmt, TETHERING_WIFI_MAX_CONNECTED_STA);
break;
elm_object_focus_next_object_set(yes_button, check, ELM_FOCUS_NEXT);
if (cancel_button) {
elm_object_focus_next_object_set(cancel_button, check, ELM_FOCUS_PREVIOUS);
- elm_object_focus_next_object_set(check ,cancel_button, ELM_FOCUS_NEXT);
+ elm_object_focus_next_object_set(check , cancel_button, ELM_FOCUS_NEXT);
}
}
else
elm_object_content_set(popup, popup_content);
- cancel_button =_create_button(popup, STR_CANCEL,
+ cancel_button = _create_button(popup, STR_CANCEL,
"button1", __popup_no_btn_clicked_cb, ad);
yes_button = _create_button(popup, STR_TURN_OFF,
"button2", __popup_yes_btn_clicked_cb, ad);
int change_ang = 0;
change_ang = elm_win_rotation_get(g_ad->win);
- if (change_ang == 0 || change_ang == 180) {
+ if (change_ang == 0 || change_ang == 180)
_hadnle_rename_popup_rotation(EINA_TRUE);
- } else {
+ else
_hadnle_rename_popup_rotation(EINA_FALSE);
- }
+
__MOBILE_AP_FUNC_EXIT__;
}
#endif
ERR("Invalid param\n");
return EINA_FALSE;
}
- if (ad->main.usage_item == NULL) {
- return EINA_TRUE;
- }
if (ad->main.usage_item)
elm_genlist_item_update(ad->main.usage_item);
}
/* If previous data is not updated, new data is not required */
- if (ad->data_statistics.is_updated == false) {
+ if (ad->data_statistics.is_updated == false)
return ECORE_CALLBACK_RENEW;
- }
/* Because previous data is updated, new data is required.
It will be returned asynchronously. */
return;
}
- if (ad->update_conn_time_handle) {
+ if (ad->update_conn_time_handle)
_stop_update_device_conn_time(ad);
- }
+
ad->update_conn_time_handle = ecore_timer_add(UPDATE_INTERVAL,
ap_update_device_conn_time, (void *)ad);
return;
}
- if (ad->update_statistics_handle) {
+ if (ad->update_statistics_handle)
_stop_update_data_packet_usage(ad);
- }
ad->data_statistics.is_updated = false;
tethering_get_data_usage(ad->handle, _data_usage_cb, (void *)ad);
free(passphrase);
ret = tethering_wifi_get_ssid_visibility(ad->handle, &visibility);
- if (ret != TETHERING_ERROR_NONE) {
+ if (ret != TETHERING_ERROR_NONE)
ERR("tethering_wifi_get_ssid_visibility is failed\n");
- }
+
ad->setup.visibility = visibility;
ad->setup.visibility_new = visibility;
ret = tethering_wifi_get_security_type(ad->handle, &type);
- if (ret != TETHERING_ERROR_NONE) {
+ if (ret != TETHERING_ERROR_NONE)
ERR("tethering_wifi_get_security_type is failed\n");
- }
+
ad->setup.security_type = type;
ad->setup.security_type_new = type;
{
__MOBILE_AP_FUNC_ENTER__;
- if (ad->main.wifi_state == wifi_state) {
+ if (ad->main.wifi_state == wifi_state)
return;
- }
if (ad->main.wifi_state == MH_STATE_PROCESS) {
ad->main.wifi_state = MH_STATE_NONE;
{
__MOBILE_AP_FUNC_ENTER__;
- if (ad->main.bt_state == bt_state) {
+ if (ad->main.bt_state == bt_state)
return;
- }
if (ad->main.bt_state == MH_STATE_PROCESS) {
ad->main.bt_state = MH_STATE_NONE;
{
__MOBILE_AP_FUNC_ENTER__;
- if (ad->main.usb_state == usb_state) {
+ if (ad->main.usb_state == usb_state)
return;
- }
if (ad->main.usb_state == MH_STATE_PROCESS) {
ad->main.usb_state = MH_STATE_NONE;
ad->main.device_item = item;
}
- if (ad->connected_device.navi_it) {
+ if (ad->connected_device.navi_it)
_update_conn_clients(ad);
- }
__MOBILE_AP_FUNC_EXIT__;
return;
_update_wifi_item(ad, MH_STATE_NONE);
} else {
obj = elm_object_item_part_content_get(ad->main.wifi_item, "elm.swallow.end");
- if (obj != NULL) {
+ if (obj != NULL)
elm_check_state_set(obj, wifi_state);
- }
- if (ad->main.wifi_item) {
+ if (ad->main.wifi_item)
elm_genlist_item_update(ad->main.wifi_item);
- }
}
break;
_update_bt_item(ad, MH_STATE_NONE);
} else {
obj = elm_object_item_part_content_get(ad->main.bt_item, "elm.swallow.end");
- if (obj != NULL) {
+ if (obj != NULL)
elm_check_state_set(obj, bt_state);
- }
- if (ad->main.bt_item) {
+ if (ad->main.bt_item)
elm_genlist_item_update(ad->main.bt_item);
- }
}
break;
static char *__get_wifi_label(void *data, Evas_Object *obj, const char *part)
{
- if (!strcmp("elm.text", part)) {
+ if (!strcmp("elm.text", part))
return strdup(STR_WIFI_TETH);
- }
return NULL;
}
static char *__get_bt_label(void *data, Evas_Object *obj, const char *part)
{
- if (!strcmp("elm.text", part)) {
+ if (!strcmp("elm.text", part))
return strdup(STR_BLUETOOTH_TETH);
- }
return NULL;
}
static char *__get_usb_label(void *data, Evas_Object *obj, const char *part)
{
- if (!strcmp("elm.text", part)) {
+ if (!strcmp("elm.text", part))
return strdup(STR_USB_TETH);
- }
return NULL;
}
pos = elm_win_rotation_get(ad->win);
switch (pos) {
- case 0:
- case 180:
- evas_object_move(ctx, w/2, h);
- break;
- case 90:
- evas_object_move(ctx, h/2, w);
- break;
- case 270:
- evas_object_move(ctx, h/2, w);
- break;
+ case 0:
+ case 180:
+ evas_object_move(ctx, w/2, h);
+ break;
+ case 90:
+ evas_object_move(ctx, h/2, w);
+ break;
+ case 270:
+ evas_object_move(ctx, h/2, w);
+ break;
}
__MOBILE_AP_FUNC_EXIT__;
}
}
__MOBILE_AP_FUNC_ENTER__;
- if (ad->setup.navi_it == NULL) {
+ if (ad->setup.navi_it == NULL)
return;
- }
elm_naviframe_item_pop_cb_set(ad->setup.navi_it, _setting_back_btn_cb, (void *)ad);
ctxpopup = elm_ctxpopup_add(ad->naviframe);
if (!strcmp("elm.text.multiline", part)) {
device_name_utf = vconf_get_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR);
- if (device_name_utf == NULL) {
+ if (device_name_utf == NULL)
ERR("vconf_get_str failed \n");
- }
ptr = elm_entry_utf8_to_markup(device_name_utf);
if (ptr == NULL) {
return NULL;
}
- if (!strcmp("elm.text", part)) {
+ if (!strcmp("elm.text", part))
return strdup(STR_HIDE_MY_DEV);
- }
__MOBILE_AP_FUNC_EXIT__;
return NULL;
return NULL;
}
- if (!strcmp("elm.text", part)) {
+ if (!strcmp("elm.text", part))
return strdup(STR_SECURITY_TYPE);
- }
__MOBILE_AP_FUNC_EXIT__;
return NULL;
WIFI_PASSPHRASE_LENGTH_MIN, WIFI_PASSPHRASE_LENGTH_MAX);
ret = notification_status_message_post(buf);
- if (ret != NOTIFICATION_ERROR_NONE) {
+ if (ret != NOTIFICATION_ERROR_NONE)
ERR("notification_status_message_post() is failed : %d\n", ret);
- }
__MOBILE_AP_FUNC_EXIT__;
}
if (ret == false) {
g_strlcpy(st->wifi_passphrase_new, st->wifi_passphrase,
sizeof(st->wifi_passphrase_new));
- if(st->pw_item)
+ if (st->pw_item)
elm_genlist_item_update(st->pw_item);
} else {
g_strlcpy(st->wifi_passphrase, st->wifi_passphrase_new,
mh_appdata_t *ad = (mh_appdata_t *)data;
mh_wifi_setting_view_t *st = &ad->setup;
- if (st->visibility != st->visibility_new) {
+ if (st->visibility != st->visibility_new)
st->visibility_new = st->visibility;
- }
- if (st->security_type != st->security_type_new) {
+ if (st->security_type != st->security_type_new)
st->security_type_new = st->security_type;
- }
if (strcmp(st->wifi_passphrase_new, st->wifi_passphrase)) {
g_strlcpy(st->wifi_passphrase_new, st->wifi_passphrase,
int no_of_sp;
int i;
- if (item == st->hide_item) {
+ if (item == st->hide_item)
elm_object_item_signal_emit(item, "elm,state,top", "");
- } else if (item == st->security_item) {
+ else if (item == st->security_item)
elm_object_item_signal_emit(item, "elm,state,center", "");
- } else if (item == st->pw_item) {
+ else if (item == st->pw_item)
elm_object_item_signal_emit(item, "elm,state,bottom", "");
- } else if (item == st->name_item) {
- }
no_of_sp = sizeof(st->sp_item) / sizeof(st->sp_item[0]);
for (i = 0; i < no_of_sp; i++) {
elm_object_style_set(genlist, "dialogue");
elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
evas_object_smart_callback_add(genlist, "realized", __gl_realized, ad);
- //elm_genlist_realization_mode_set(genlist, EINA_TRUE);
__set_genlist_itc(ad);