*
* Copyright 2012 Samsung Electronics Co., Ltd
-* Licensed under the Flora License, Version 1.0 (the "License");
+* Licensed under the Flora License, Version 1.1 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
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 (vconf_key == VCONFKEY_SYSMAN_USB_DISCONNECTED) {
if (ad->type == TETHERING_TYPE_USB && ad->popup) {
evas_object_del(ad->popup);
ad->popup = NULL;
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) {
}
ret = connection_get_cellular_state(handle, &cellular_state);
if (ret != CONNECTION_ERROR_NONE) {
- ERR("connection_get_cellular_state() is failed : %d\n");
+ ERR("connection_get_cellular_state() is failed : %d\n", ret);
connection_destroy(handle);
return CONNECTION_CELLULAR_STATE_OUT_OF_SERVICE;
}
return value ? true : false;
}
-
-int _send_signal_qp(const char *cmd)
-{
- DBG("+\n");
-
- if (cmd == NULL) {
- ERR("Invalid param");
- return -1;
- }
-
- GDBusConnection *conn = NULL;
- int ret = 0;
- GVariant *message = NULL;
- GError *err = NULL;
-
- DBG("Sent dbus signal : %s\n", cmd);
-
- conn = g_bus_get_sync(DBUS_BUS_SYSTEM, NULL, &err);
- if (err != NULL) {
- ERR("Failed connection to system bus[%s]", err->message);
- g_error_free(err);
- err = NULL;
- return -1;
- }
- message = g_variant_new("(ss)", "wifi_hotspot", cmd);
- g_dbus_connection_emit_signal(conn, NULL, "/Org/Tizen/Quickpanel",
- "org.tizen.quickpanel", "ACTIVITY", message, &err);
- if (err) {
- ERR("g_dbus_connection_emit_signal is failed and error is %s\n", err->message);
- g_error_free(err);
- ret = -1;
- }
- g_variant_unref(message);
-
- if (conn)
- g_object_unref(conn);
-
- DBG("-\n");
- return ret;
-}