1. First letter to uppercase.
2. Period at the end.
3. Rearrange parameters.
Change-Id: I5fd9968f4a0ec22a6c4f2e88f355e72238fd4233
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
dbus_message_iter_append_basic(iter, DBUS_TYPE_INT32, &int_type);
break;
default:
- _E("ERROR: %s %c", sig, *ch);
+ _E("Failed to append. signal=%s ch=%c", sig, *ch);
return -EINVAL;
}
}
conn = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
if (!conn) {
ret = 0;
- _E("dbus_bus_get error");
+ _E("Failed to dbus_bus_get.");
return -EPERM;
}
msg = dbus_message_new_method_call(dest, path, interface, method);
if (!msg) {
- _E("dbus_message_new_method_call(%s:%s-%s)", path, interface, method);
+ _E("Failed to dbus_message_new_method_call(%s:%s-%s).", path, interface, method);
return -EBADMSG;
}
for (i = 0 ; i < size ; i = i + 2) {
key = param[i];
value = param[i+1];
- _I("key(%s), value(%s)", key, value);
+ _I("key=%s value=%s", key, value);
dbus_message_iter_open_container(&aiter, DBUS_TYPE_DICT_ENTRY, NULL, &piter);
dbus_message_iter_append_basic(&piter, DBUS_TYPE_STRING, &key);
dbus_message_iter_append_basic(&piter, DBUS_TYPE_STRING, &value);
reply = dbus_connection_send_with_reply_and_block(conn, msg, DBUS_REPLY_TIMEOUT, &err);
dbus_message_unref(msg);
if (!reply) {
- _E("dbus_connection_send error(%s:%s) %s %s:%s-%s", err.name, err.message, dest, path, interface, method);
+ _E("Failed to dbus_connection_send. dest=%s %s:%s-%s. err.name=%s: %s", dest, path, interface, method, err.name, err.message);
dbus_error_free(&err);
return -ECOMM;
}
ret = dbus_message_get_args(reply, &err, DBUS_TYPE_INT32, &result, DBUS_TYPE_INVALID);
dbus_message_unref(reply);
if (!ret) {
- _E("no message : [%s:%s] %s %s:%s-%s", err.name, err.message, dest, path, interface, method);
+ _E("No message dest=%s %s:%s-%s. err.name=%s: %s", dest, path, interface, method, err.name, err.message);
dbus_error_free(&err);
return -ENOMSG;
}
i++;
} while (i < RETRY_MAX);
if (!msg) {
- _E("fail to call dbus method");
+ _E("Failed to call dbus method.");
return -ECONNREFUSED;
}
dbus_error_init(&err);
r = dbus_message_get_args(msg, &err, DBUS_TYPE_INT32, &ret_val, DBUS_TYPE_INVALID);
if (!r) {
- _E("no message : [%s:%s]", err.name, err.message);
+ _E("No message. err.name=%s: %s", err.name, err.message);
ret_val = -EBADMSG;
}
cErr = (char *)bundle_get_val(b, SIGNAL_SENDER_ERROR_TYPE);
if (!cErr) {
- _E("Failed to get error type");
+ _E("Failed to get error type.");
return -ENOMEM;
}
spc = (char *)bundle_get_val(b, SIGNAL_SENDER_MEMORY_SPACE);
if (!spc) {
- _E("Failed to get memory space");
+ _E("Failed to get memory space.");
return -ENOMEM;
}
snprintf(error, error_len, "%s_operation_failed", type);
break;
default:
- _E("Unknown type (%d)", iErr);
+ _E("Unknown type: %d", iErr);
return -EINVAL;
}
ret = aul_launch_app(setting_ug, b);
bundle_free(b);
if (ret <= 0) {
- _E("Failed to launch app (%s)(%d)", setting_ug, ret);
+ _E("Failed to launch app(%s): %d", setting_ug, ret);
return ret;
}
type = (char *)bundle_get_val(b, SIGNAL_SENDER_TYPE);
if (!type) {
- _E("FAIL: bundle_get_val()");
+ _E("Failed to bundle_get_val().");
ret = -ENOMEM;
goto out;
}
strlen(SIGNAL_SENDER_TYPE_USBSTORAGE_UNMOUNT))) {
path = (char *)bundle_get_val(b, "_DEVICE_PATH_");
if (!path) {
- _E("FAIL: bundle_get_val()");
+ _E("Failed to bundle_get_val().");
ret = -ENOMEM;
goto out;
}
static void remove_other_lowbattery_popups(const struct popup_ops *ops)
{
- _D("remove_other_lowbattery_popups() is finished");
+ _D("remove_other_lowbattery_popups() is finished.");
if (ops != &lowbattery_poweroff_ops)
unload_simple_popup(&lowbattery_poweroff_ops);
}
static int remove_other_charge_popups(bundle *b, const struct popup_ops *ops)
{
- _D("remove_other_charge_popups() is finished");
+ _D("remove_other_charge_popups() is finished.");
if (ops != &charge_error_low_ops)
unload_simple_popup(&charge_error_low_ops);
int status;
const struct popup_ops *ops = data;
- _D("charger_status_changed() is finished");
+ _D("charger_status_changed() is finished.");
status = vconf_keynode_get_int(key);
if (status != VCONFKEY_SYSMAN_CHARGER_CONNECTED)
return;
if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
charger_status_changed) < 0)
- _E("Failed to release vconf key handler");
+ _E("Failed to release vconf key handler.");
unload_simple_popup(ops);
if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_LEVEL_STATUS,
battery_status_changed) < 0)
- _E("Failed to release vconf key handler");
+ _E("Failed to release vconf key handler.");
unload_simple_popup(ops);
{
if (vconf_notify_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
charger_status_changed, (void *)ops) < 0)
- _E("Failed to register vconf key handler");
+ _E("Failed to register vconf key handler.");
}
static void register_battery_status_handler(const struct popup_ops *ops)
{
if (vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_LEVEL_STATUS,
battery_status_changed, (void *)ops) < 0)
- _E("Failed to register vconf key handler");
+ _E("Failed to register vconf key handler.");
}
static int lowbattery_launch(bundle *b, const struct popup_ops *ops)
REBOOT_METHOD,
"si", param);
if (ret < 0)
- _E("Failed to request poweroff to deviced (%d)", ret);
+ _E("Failed to request poweroff to deviced: %d", ret);
}
static void charge_error_ok_clicked(const struct popup_ops *ops)
{
- _I("OK is selected");
+ _I("OK is selected.");
unload_simple_popup(ops);
if (broadcast_dbus_signal(DEVICED_PATH_SYSNOTI,
DEVICED_INTERFACE_SYSNOTI,
SIGNAL_CHARGEERR_RESPONSE,
NULL, NULL) < 0)
- _E("Failed to send signal");
+ _E("Failed to send signal.");
terminate_if_no_popup();
}
static int remove_battery_popups(bundle *b, const struct popup_ops *ops)
{
- _I("Remove battery related popups");
+ _I("Remove battery related popups.");
unload_simple_popup(&lowbattery_poweroff_ops);
unload_simple_popup(&charge_error_low_ops);
unload_simple_popup(&charge_error_high_ops);
if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
charger_status_changed) < 0)
- _E("Failed to release vconf key handler");
+ _E("Failed to release vconf key handler.");
unload_simple_popup(ops);
if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_LEVEL_STATUS,
battery_status_changed) < 0)
- _E("Failed to release vconf key handler");
+ _E("Failed to release vconf key handler.");
unload_simple_popup(ops);
{
if (vconf_notify_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
charger_status_changed, (void *)ops) < 0)
- _E("Failed to register vconf key handler");
+ _E("Failed to register vconf key handler.");
}
static void register_battery_status_handler(const struct popup_ops *ops)
{
if (vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_LEVEL_STATUS,
battery_status_changed, (void *)ops) < 0)
- _E("Failed to register vconf key handler");
+ _E("Failed to register vconf key handler.");
}
static int lowbattery_launch(bundle *b, const struct popup_ops *ops)
REBOOT_METHOD,
"si", param);
if (ret < 0)
- _E("Failed to request poweroff to deviced (%d)", ret);
+ _E("Failed to request poweroff to deviced: %d", ret);
}
static void charge_error_ok_clicked(const struct popup_ops *ops)
{
- _I("OK is selected");
+ _I("OK is selected.");
unload_simple_popup(ops);
if (broadcast_dbus_signal(DEVICED_PATH_SYSNOTI,
DEVICED_INTERFACE_SYSNOTI,
SIGNAL_CHARGEERR_RESPONSE,
NULL, NULL) < 0)
- _E("Failed to send signal");
+ _E("Failed to send signal.");
terminate_if_no_popup();
}
static int remove_battery_popups(bundle *b, const struct popup_ops *ops)
{
- _I("Remove battery related popups");
+ _I("Remove battery related popups.");
unload_simple_popup(&lowbattery_poweroff_ops);
unload_simple_popup(&charge_error_low_ops);
unload_simple_popup(&charge_error_high_ops);
struct object_ops *obj;
if (!ops) {
- _E("Invalid parameter");
+ _E("Invalid parameter.");
return;
}
obj = (struct object_ops *)calloc(1, sizeof(struct object_ops));
if (!obj) {
- _E("calloc() fialed");
+ _E("Failed to calloc().");
return;
}
for (l = popup_list ; l ; l = g_list_next(l)) {
obj = (struct object_ops *)(l->data);
if (obj->popup) {
- _I("popup exists(%s)", obj->ops->name);
+ _I("Popup(%s) exists.", obj->ops->name);
return;
}
}
type = (char *)bundle_get_val(b, SYSPOPUP_CONTENT);
if (!type) {
- _E("FAIL: bundle_get_val()");
+ _E("Failed to bundle_get_val().");
return -ENOMEM;
}
app_info = (appdata_s *)data;
if (appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR) != 0)
- _E("FAIL: appcore_set_i18n()");
+ _E("Failed to appcore_set_i18n().");
ret = set_dbus_connection();
if (ret < 0)
- _E("Failed to set dbus connection (%d)", ret);
+ _E("Failed to set dbus connection: %d", ret);
if (!feedback_init_processed) {
init_multi_feedback();
ret = syspopup_create(b, &handler, win, NULL);
if (ret < 0) {
- _E("FAIL: syspopup_create(): %d", ret);
+ _E("Failed to syspopup_create(): %d", ret);
goto out;
}
ret = feedback_initialize();
if (ret != FEEDBACK_ERROR_NONE) {
- _E("Cannot initialize feedback");
+ _E("Cannot initialize feedback.");
return;
}
ret = feedback_play(pattern);
break;
default:
- _E("Play type is unknown");
+ _E("Play type is unknown.");
ret = 0;
}
if (ret != FEEDBACK_ERROR_NONE)
- _E("Cannot play feedback: %d", pattern);
+ _E("Cannot play feedback(%d).", pattern);
ret = feedback_deinitialize();
if (ret != FEEDBACK_ERROR_NONE)
- _E("Cannot deinitialize feedback");
+ _E("Cannot deinitialize feedback.");
}
void init_multi_feedback(void)
ret = feedback_initialize();
if (ret != FEEDBACK_ERROR_NONE)
- _E("Cannot initialize feedback");
+ _E("Cannot initialize feedback.");
}
void play_multi_feedback(int pattern)
ret = feedback_play(pattern);
if (ret != FEEDBACK_ERROR_NONE)
- _E("Cannot play feedback: %d", pattern);
+ _E("Cannot play feedback(%d).", pattern);
}
void stop_multi_feedback(void)
ret = feedback_deinitialize();
if (ret != FEEDBACK_ERROR_NONE)
- _E("Cannot deinitialize feedback");
+ _E("Cannot deinitialize feedback.");
}
static void *thread_feedback(void* data)
static void *thread_display(void* data)
{
if (display_change_state(LCD_NORMAL) < 0)
- _E("FAIL: display_change_state()");
+ _E("Failed to display_change_state().");
return NULL;
}
ret = pthread_create(&th, NULL, operation, data);
if (ret < 0) {
- _E("Failed to create pthread(%d)", ret);
+ _E("Failed to create pthread: %d", ret);
return;
}
pthread_detach(th);
edbus_conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
if (!edbus_conn) {
- _E("Failed to get dbus bus");
+ _E("Failed to get dbus bus.");
e_dbus_shutdown();
return -ENOMEM;
}
conn = get_dbus_connection();
if (!conn) {
- _E("Failed to get dbus connection");
+ _E("Failed to get dbus connection.");
return -ENOMEM;
}
msg = dbus_message_new_signal(path, interface, name);
if (!msg) {
- _E("FAIL: dbus_message_new_signal()");
+ _E("Failed to dbus_message_new_signal().");
return -ENOMEM;
}
dbus_message_iter_init_append(msg, &iter);
ret = append_variant(&iter, sig, param);
if (ret < 0) {
- _E("append_variant error(%d)", ret);
+ _E("Failed to append_variant: %d", ret);
goto out;
}
pc = e_dbus_message_send(conn, msg, NULL, -1, NULL);
if (!pc) {
- _E("FAIL: e_dbus_message_send()");
+ _E("Failed to e_dbus_message_send().");
ret = -ECONNREFUSED;
goto out;
}
conn = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
if (!conn) {
- _E("dbus_bus_get error");
+ _E("Failed to dbus_bus_get.");
return -EPERM;
}
msg = dbus_message_new_method_call(dest, path, interface, method);
if (!msg) {
- _E("dbus_message_new_method_call(%s:%s-%s)",
+ _E("dbus_message_new_method_call(%s:%s-%s).",
path, interface, method);
ret = -EBADMSG;
goto out;
dbus_message_iter_init_append(msg, &iter);
ret = append_variant(&iter, sig, param);
if (ret < 0) {
- _E("append_variant error(%d)", ret);
+ _E("Failed to append_variant: %d", ret);
goto out;
}
ret = dbus_message_get_args(reply, &err,
DBUS_TYPE_INT32, &result, DBUS_TYPE_INVALID);
if (!ret) {
- _E("no message : [%s:%s]", err.name, err.message);
+ _E("No message. err.name=%s: %s", err.name, err.message);
dbus_error_free(&err);
ret = -ENOMSG;
goto out;
conn = get_dbus_connection();
if (!conn) {
- _E("Failed to get dbus connection");
+ _E("Failed to get dbus connection.");
return;
}
conn = get_dbus_connection();
if (!conn) {
- _E("Failed to get dbus connection");
+ _E("Failed to get dbus connection.");
return -ENOMEM;
}
ret = get_object_by_ops(ops, &obj);
if (ret < 0) {
- _E("Failed to get object (%d)", ret);
+ _E("Failed to get object: %d", ret);
return -EINVAL;
}
win = get_window();
if (win) {
- _D("unregister event back key, ops->name=%s", ops->name);
+ _D("Unregister event back key. ops->name=%s", ops->name);
eext_object_event_callback_del(obj, EEXT_CALLBACK_BACK, event_back_key_up);
}
ret = get_object_by_ops(ops, &obj);
if (ret < 0) {
- _E("Failed to get object (%d)", ret);
+ _E("Failed to get object: %d", ret);
return -EINVAL;
}
eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
if (!eo) {
- _E("FAIL: elm_win_add()");
+ _E("Failed to elm_win_add().");
return -ENOMEM;;
}
ret = get_object_by_ops(ops, &obj);
if (ret < 0) {
- _E("Failed to get object (%d)", ret);
+ _E("Failed to get object: %d", ret);
return -ENOENT;
}
obj->b = bundle_dup(b);
static int remove_other_cooldown_popups(bundle *b, const struct popup_ops *ops)
{
if (!ops) {
- _E("Invalid removal request for cooldown");
+ _E("Invalid removal request for cooldown.");
return 0;
}
conn = get_dbus_connection();
if (!conn) {
- _E("Failed to get dbus connection");
+ _E("Failed to get dbus connection.");
return -ENOMEM;
}
(void *)ops);
if (!release_handler) {
- _E("Failed to add signal handler");
+ _E("Failed to add signal handler.");
return -ENOMEM;
}
SIGNAL_COOL_DOWN_RESPONSE,
NULL, NULL);
if (ret < 0)
- _E("Failed to broadcast signal(%d)", ret);
+ _E("Failed to broadcast signal: %d", ret);
}
static void cooldown_poweroff(const struct popup_ops *ops)
char data[8];
int ret;
- _I("Poweroff is selected");
+ _I("Poweroff is selected.");
unload_simple_popup(ops);
param[0] = REBOOT_OPERATION_OFF;
"si", param);
if (ret < 0)
- _E("Failed to request poweroff to deviced (%d)", ret);
+ _E("Failed to request poweroff to deviced: %d", ret);
}
static void cooldown_poweroff_terminate(const struct popup_ops *ops)
static void cooldown_warning(const struct popup_ops *ops)
{
- _I("Warning is selected");
+ _I("Warning is selected.");
unload_simple_popup(ops);
}
timer = ecore_timer_add(beep[index].timeout, beep_time_expired, ops);
if (!timer)
- _E("Failed to add timer");
+ _E("Failed to add timer.");
notify_feedback(beep[index].type);
timer = ecore_timer_add(TIMEOUT_BEEP_40, beep_time_expired, ops);
if (!timer)
- _E("Failed to add timer");
+ _E("Failed to add timer.");
ret = add_dbus_signal_handler(ops);
if (ret < 0)
- _E("Failed to add dbus handler(%d)", ret);
+ _E("Failed to add dbus handler: %d", ret);
return 0;
}
timer = ecore_timer_add(TIMEOUT_POWEROFF, poweroff_time_expired, ops);
if (!timer)
- _E("Failed to add timer");
+ _E("Failed to add timer.");
return 0;
}
ret = get_object_by_ops(ops, &obj);
if (ret < 0) {
- _E("Failed to get object (%d)", ret);
+ _E("Failed to get object: %d", ret);
return -EINVAL;
}
ret = get_object_by_ops(ops, &obj);
if (ret < 0) {
- _E("Failed to get object (%d)", ret);
+ _E("Failed to get object: %d", ret);
return -EINVAL;
}
char *label;
int ret;
- _D("appinfo_get_appname_func() is entered");
+ _D("appinfo_get_appname_func() is entered.");
if (!data)
return PMINFO_R_ERROR;
(*(char**)data) = label;
- _D("appinfo_get_appname_func() is finished");
+ _D("appinfo_get_appname_func() is finished.");
return PMINFO_R_OK;
}
int count, ret;
char *name = NULL;
- _D("get_app_name() is entered");
+ _D("get_app_name() is entered.");
ret = pkgmgrinfo_appinfo_filter_create(&handle);
if (ret != PMINFO_R_OK)
goto out;
snprintf(tname, len, "%s", name);
free(name);
- _D("get_app_name() is finished");
+ _D("get_app_name() is finished.");
return 0;
}
ret = get_object_by_ops(ops, &obj);
if (ret < 0) {
- _E("Failed to get object (%d)", ret);
+ _E("Failed to get object: %d", ret);
return -ENOENT;
}
name = (char *)bundle_get_val(obj->b, "_PROCESS_NAME_");
if (!name) {
- _E("Failed to get process name");
+ _E("Failed to get process name.");
return -ENOENT;
}
path = (char *)bundle_get_val(obj->b, "_EXEPATH_");
if (!path) {
- _E("Failed to get execution path");
+ _E("Failed to get execution path.");
return -ENOENT;
}
if (ret < 0)
snprintf(tname, l, "%s", name);
- _I("name(%s), path(%s), tname(%s)", name, path, tname);
+ _I("name=%s path='%s' tname=%s", name, path, tname);
text = _("WDS_TPLATFORM_BODY_PS_HAS_STOPPED");
snprintf(content, len, text, tname);
ret = aul_launch_app(appname, b);
if (ret <= 0)
- _E("FAIL: aul_launch_app(%s)", appname);
+ _E("Failed to aul_launch_app(%s).", appname);
out:
bundle_free(b);
int ret;
if (!path || access(path, X_OK) != 0) {
- _E("Cannot execute (%s)", path);
+ _E("Cannot execute '%s'.", path);
return -EINVAL;
}
pid = fork();
if (pid < 0) {
- _E("Failed to fork (%d)", errno);
+ _E("Failed to fork: %d", errno);
return -errno;
}
ret = execvp(path, argv);
/* Failed */
- _E("Failed execvp(ret: %d, errno: %d)", ret, errno);
+ _E("Failed execvp. return=%d: %d", ret, errno);
return -errno;
}
goto out;
}
- _I("launch app (%s)", appname);
+ _I("Launch app(%s).", appname);
ret = launch_app(appname, NULL, NULL, NULL, NULL, NULL, NULL);
if (ret < 0)
- _E("FAIL: launch_app(): %d", ret);
+ _E("Failed to launch_app(): %d", ret);
out:
reply = dbus_message_new_method_return(msg);
goto out;
}
- _I("launch app (%s)", appname);
+ _I("Launch app(%s).", appname);
dbus_error_init(&err);
DBUS_TYPE_STRING, &key,
DBUS_TYPE_STRING, &value,
DBUS_TYPE_INVALID)) {
- _E("there is no message");
+ _E("There is no message.");
ret = -EINVAL;
goto out;
}
if (!key || !value) {
- _E("message is invalid!");
+ _E("Message is invalid.");
ret = -EINVAL;
goto out;
}
ret = launch_app(appname, key, value, NULL, NULL, NULL, NULL);
if (ret < 0)
- _E("FAIL: launch_app(): %d", ret);
+ _E("Failed to launch_app(): %d", ret);
out:
reply = dbus_message_new_method_return(msg);
if (!dbus_message_get_args(msg, &err,
DBUS_TYPE_INT32, &pid,
DBUS_TYPE_INVALID)) {
- _E("there is no message");
+ _E("There is no message.");
ret = -EINVAL;
goto out;
}
if (pid < 0) {
- _E("message is invalid!");
+ _E("Message is invalid.");
ret = -EINVAL;
goto out;
}
ret = aul_terminate_pid(pid);
if (ret < 0)
- _E("FAIL: aul_terminate_pid(): %d", ret);
+ _E("Failed to aul_terminate_pid(): %d", ret);
out:
reply = dbus_message_new_method_return(msg);
goto out;
}
- _I("launch app raw(%s)", argv[0]);
+ _I("Launch app raw(%s).", argv[0]);
ret = launch_app_raw(argv[0], argv);
if (ret < 0)
- _E("FAIL: launch_app_raw: %d", ret);
+ _E("Failed to launch_app_raw: %d", ret);
out:
reply = dbus_message_new_method_return(msg);
edbus_objects[i].methods[j].reply_signature,
edbus_objects[i].methods[j].func);
if (!ret) {
- _E("fail to add method %s!", edbus_objects[i].methods[j].member);
+ _E("Failed to add method(%s).", edbus_objects[i].methods[j].member);
return -ECONNREFUSED;
}
}
if (e_dbus_init())
break;
if (++retry == RETRY_MAX) {
- _E("fail to init edbus");
+ _E("Failed to init edbus.");
return -ECONNREFUSED;
}
} while (retry <= RETRY_MAX);
if (edbus_conn)
break;
if (++retry == RETRY_MAX) {
- _E("fail to get edbus");
+ _E("Failed to get edbus.");
ret = -ECONNREFUSED;
goto out1;
}
if (edbus_request_name)
break;
if (++retry == RETRY_MAX) {
- _E("fail to request edbus name");
+ _E("Failed to request edbus name.");
ret = -ECONNREFUSED;
goto out2;
}
for (i = 0; i < ARRAY_SIZE(edbus_objects); i++) {
edbus_objects[i].obj = e_dbus_object_add(edbus_conn, edbus_objects[i].path, NULL);
if (!(edbus_objects[i].obj)) {
- _E("fail to add edbus obj");
+ _E("Failed to add edbus obj.");
ret = -ECONNREFUSED;
goto out2;
}
edbus_objects[i].iface = e_dbus_interface_new(edbus_objects[i].interface);
if (!(edbus_objects[i].iface)) {
- _E("fail to add edbus interface");
+ _E("Failed to add edbus interface.");
ret = -ECONNREFUSED;
goto out2;
}
noti = notification_create(type);
if (!noti) {
- _E("FAIL: notification_create()");
+ _E("Failed to notification_create().");
return -ENOMEM;
}
noti_err = notification_set_text_domain(noti, LANG_DOMAIN, LOCALE_DIR);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_text_domain()");
+ _E("Failed to notification_set_text_domain().");
priv_id = -ENOMEM;
goto out;
}
noti_err = notification_set_layout(noti, layout);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_layout()");
+ _E("Failed to notification_set_layout().");
priv_id = -ENOMEM;
goto out;
}
if (layout == NOTIFICATION_LY_ONGOING_PROGRESS) {
noti_err = notification_set_progress(noti, (double)0.0);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_setprogress()");
+ _E("Failed to notification_setprogress().");
priv_id = -ENOMEM;
goto out;
}
title,
NOTIFICATION_VARIABLE_TYPE_NONE);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_text()");
+ _E("Failed to notification_set_text().");
priv_id = -ENOMEM;
goto out;
}
}
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_text()");
+ _E("Failed to notification_set_text().");
priv_id = -ENOMEM;
goto out;
}
NOTIFICATION_IMAGE_TYPE_ICON,
icon);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_image()");
+ _E("Failed to notification_set_image().");
priv_id = -ENOMEM;
goto out;
}
NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR,
icon_indi);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_image()");
+ _E("Failed to notification_set_image().");
priv_id = -ENOMEM;
goto out;
}
noti_err = notification_set_property(noti, prop);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_property()");
+ _E("Failed to notification_set_property().");
priv_id = -ENOMEM;
goto out;
}
noti_err = notification_set_execute_option(noti,
NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, b);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_pkgname()");
+ _E("Failed to notification_set_pkgname().");
priv_id = -ENOMEM;
goto out;
}
noti_err = notification_set_display_applist(noti, applist);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_display_applist()");
+ _E("Failed to notification_set_display_applist().");
priv_id = -ENOMEM;
goto out;
}
noti_err = notification_set_pkgname(noti, APPNAME);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_pkgname()");
+ _E("Failed to notification_set_pkgname().");
priv_id = -ENOMEM;
goto out;
}
priv_id = -1;
noti_err = notification_insert(noti, &priv_id);
if (noti_err != NOTIFICATION_ERROR_NONE)
- _E("FAIL: notification_insert()");
+ _E("Failed to notification_insert().");
out:
if (noti)
ret = notification_status_message_post(content);
if (ret != NOTIFICATION_ERROR_NONE)
- _E("FAIL: notification_status_message_post(text)");
+ _E("Failed to notification_status_message_post(text).");
return ret;
}
title = "IDS_ST_BODY_READ_ONLY_USB_DEV_CONNECTED_M_NOUN_ABB";
break;
default:
- _E("Unknown type(%d)", type);
+ _E("Unknown type(%d).", type);
return -EINVAL;
}
} else if (!strncmp(dev, "unknown", strlen(dev))) {
title = "IDS_COM_POP_UNKNOWN_USB_DEVICE_CONNECTED";
} else {
- _E("Invalid device");
+ _E("Invalid device.");
return -EINVAL;
}
ret = notification_status_message_post(content);
if (ret != NOTIFICATION_ERROR_NONE)
- _E("FAIL: notification_status_message_post(text)");
+ _E("Failed to notification_status_message_post(text).");
return ret;
}
ret = notification_status_message_post(content);
if (ret != NOTIFICATION_ERROR_NONE)
- _E("FAIL: notification_status_message_post(text)");
+ _E("Failed to notification_status_message_post(text).");
return ret;
}
NULL,
NULL);
} else
- _E("Unknown type(%d)", type);
+ _E("Unknown type(%d).", type);
return ret;
}
NULL,
NULL);
} else
- _E("Unknown type(%d)", type);
+ _E("Unknown type(%d).", type);
return ret;
}
case TEMP_COOLDOWN:
return launch_temp_cooldown_notification(type);
default:
- _E("Noti type is unknown");
+ _E("Noti type is unknown.");
return -EINVAL;
}
}
case BATTERY_CRITICAL_ACT:
return launch_battery_discharge_active_notification(data, type);
default:
- _E("Noti type is unknown");
+ _E("Noti type is unknown.");
return -EINVAL;
}
}
case USB_DEVICE:
return launch_usb_device_notification(data1, data2);
default:
- _E("Noti type is unknown");
+ _E("Noti type is unknown.");
return -EINVAL;
}
}
case ODE_ERROR:
return launch_ode_error_notification(data1, data2, data3);
default:
- _E("Noti type is unknown");
+ _E("Noti type is unknown.");
return -EINVAL;
}
}
DBusMessage *reply;
int priv_id;
- _D("Load notification");
+ _D("Load notification.");
// event noti should be supported in mobile profile only
priv_id = launch_notification_no_param_by_type(type);
if (priv_id < 0)
- _E("FAIL: launch_noti_by_type()");
+ _E("Failed to launch_noti_by_type().");
reply = dbus_message_new_method_return(msg);
dbus_message_iter_init_append(reply, &iter);
int priv_id;
char *value;
- _D("Load notification");
+ _D("Load notification.");
dbus_error_init(&err);
if (!dbus_message_get_args(msg, &err,
DBUS_TYPE_STRING, &value,
DBUS_TYPE_INVALID)) {
- _E("there is no message");
+ _E("There is no message.");
priv_id = -EINVAL;
goto out;
}
priv_id = launch_notification_single_param_by_type(type, value);
if (priv_id < 0)
- _E("FAIL: launch_noti_single_param_by_type()");
+ _E("Failed to launch_noti_single_param_by_type().");
out:
reply = dbus_message_new_method_return(msg);
DBUS_TYPE_STRING, &str1,
DBUS_TYPE_STRING, &str2,
DBUS_TYPE_INVALID)) {
- _E("there is no message");
+ _E("There is no message.");
priv_id = -EINVAL;
goto out;
}
priv_id = launch_notification_double_param_by_type(type, str1, str2);
if (priv_id < 0)
- _E("FAIL: launch_notification_double_param_by_type()");
+ _E("Failed to launch_notification_double_param_by_type().");
out:
reply = dbus_message_new_method_return(msg);
DBUS_TYPE_INT32, &data2,
DBUS_TYPE_INT32, &data3,
DBUS_TYPE_INVALID)) {
- _E("there is no message");
+ _E("There is no message.");
priv_id = -EINVAL;
goto out;
}
priv_id = launch_notification_triple_param_by_type(type, (void *)data1, (void *)data2, (void *)data3);
if (priv_id < 0)
- _E("FAIL: launch_noti_single_param_by_type()");
+ _E("Failed to launch_noti_single_param_by_type().");
out:
reply = dbus_message_new_method_return(msg);
if (!dbus_message_get_args(msg, &err,
DBUS_TYPE_INT32, &value,
DBUS_TYPE_INVALID)) {
- _E("there is no message");
+ _E("There is no message.");
ret = -EINVAL;
goto out;
}
noti_err = notification_delete_by_priv_id(APPNAME,
NOTIFICATION_TYPE_NOTI, value);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_delete_by_priv_id(): %d", noti_err);
+ _E("Failed to notification_delete_by_priv_id(): %d", noti_err);
ret = -EBADF;
goto out;
}
notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
if (rate < 0 || rate > 100) {
- _E("Improper rate: %d", rate);
+ _E("Improper rate(%d).", rate);
return -EINVAL;
}
noti = notification_load(APPNAME, priv_id);
if (!noti) {
- _E("FAIL: notification_load()");
+ _E("Failed to notification_load().");
return -ENOMEM;
}
noti_err = notification_set_progress(noti, rate/100.f);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_progress()");
+ _E("Failed to notification_set_progress().");
ret = -ENOMEM;
goto out;
}
noti_err = notification_update(noti);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_update()");
+ _E("Failed to notification_update().");
ret = -ENOMEM;
goto out;
}
out:
noti_err = notification_free(noti);
if (noti_err != NOTIFICATION_ERROR_NONE)
- _E("FAIL: notification_free()");
+ _E("Failed to notification_free().");
return ret;
}
DBUS_TYPE_INT32, &priv_id,
DBUS_TYPE_INT32, &rate,
DBUS_TYPE_INVALID)) {
- _E("there is no message");
+ _E("There is no message.");
ret = -EINVAL;
goto out;
}
ret = progress_update_notification_by_progress_rate(priv_id, rate);
if (ret < 0)
- _E("FAIL: progress_update_notification()");
+ _E("Failed to progress_update_notification().");
out:
reply = dbus_message_new_method_return(msg);
} else if (!strncmp(str1, "unknown", strlen(str1))) {
title = "IDS_COM_POP_UNKNOWN_USB_DEVICE_CONNECTED";
} else {
- _E("Invalid device");
+ _E("Invalid device.");
return -EINVAL;
}
noti = notification_load(APPNAME, id);
if (!noti) {
- _E("FAIL: notification_load()");
+ _E("Failed to notification_load().");
return -ENOMEM;
}
noti_err = notification_set_text_domain(noti, LANG_DOMAIN, LOCALE_DIR);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_text_domain()");
+ _E("Failed to notification_set_text_domain().");
ret = -ENOMEM;
goto out;
}
NOTIFICATION_VARIABLE_TYPE_NONE);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_text()");
+ _E("Failed to notification_set_text().");
ret = -ENOMEM;
goto out;
}
content,
NOTIFICATION_VARIABLE_TYPE_NONE);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_set_text()");
+ _E("Failed to notification_set_text().");
ret = -ENOMEM;
goto out;
}
}
noti_err = notification_update(noti);
if (noti_err != NOTIFICATION_ERROR_NONE) {
- _E("FAIL: notification_update()");
+ _E("Failed to notification_update().");
ret = -ENOMEM;
goto out;
}
out:
noti_err = notification_free(noti);
if (noti_err != NOTIFICATION_ERROR_NONE)
- _E("FAIL: notification_free()");
+ _E("Failed to notification_free().");
return ret;
}
DBUS_TYPE_STRING, &str1,
DBUS_TYPE_STRING, &str2,
DBUS_TYPE_INVALID)) {
- _E("there is no message");
+ _E("There is no message.");
ret = -EINVAL;
goto out;
}
ret = text_update_notification(type, id, data, str1, str2);
if (ret < 0)
- _E("FAIL: progress_update_notification()");
+ _E("Failed to progress_update_notification().");
out:
reply = dbus_message_new_method_return(msg);
goto out;
}
- _I("launch popup (%s)", name);
+ _I("Launch popup(%s).", name);
b = bundle_create();
if (!b) {
dbus_message_iter_get_basic(&piter, &value);
dbus_message_iter_next(&aiter);
- _I("key(%s), value(%s)", key, value);
+ _I("key=%s value=%s", key, value);
ret = bundle_add(b, key, value);
if (ret < 0) {
- _E("Failed to add bundle (%s,%s) (ret:%d)", key, value, ret);
+ _E("Failed to add bundle(key=%s value=%s): %d", key, value, ret);
goto out;
}
}
ret = syspopup_launch(name, b);
if (ret < 0)
- _E("Failed to launch popup(%d)", ret);
+ _E("Failed to launch popup: %d", ret);
out:
if (b)
signal,
NULL, NULL);
if (ret < 0)
- _E("FAIL: broadcast_dbus_signal(%s:%d)", signal, ret);
+ _E("Failed to broadcast_dbus_signal(%s): %d", signal, ret);
}
static void launch_app(int type)
app_control_add_extra_data(app_control, MAPPINGNODE_KEY, Mapping_Node);
ret = app_control_set_app_id(app_control, ODE_APPNAME);
} else {
- _E("No matched type(%d)", type);
+ _E("No matched type(%d).", type);
goto out;
}
if (ret != APP_CONTROL_ERROR_NONE) {
- _E("Fail to set app id");
+ _E("Failed to set app id.");
goto out;
}
ret = app_control_send_launch_request(app_control, NULL, NULL);
if (ret != APP_CONTROL_ERROR_NONE)
- _E("Fail to send launch request");
+ _E("Failed to send launch request.");
out:
if (app_control) {
mmc_removed,
(void*)ops);
if (ret < 0)
- _E("Failed to register mmc removed signal handler(%d)", ret);
+ _E("Failed to register mmc removed signal handler: %d", ret);
}
static void mmc_mount_status_changed(keynode_t *in_key, void *data)
{
if (vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_MOUNT,
mmc_mount_status_changed, (void *)ops) != 0)
- _E("Failed to register mmc mount handler");
+ _E("Failed to register mmc mount handler.");
}
static void unregister_mmc_mount_handler(const struct popup_ops *ops)
{
if (vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_UNMOUNT,
mmc_unmount_status_changed, (void *)ops) != 0)
- _E("Failed to register mmc mount handler");
+ _E("Failed to register mmc mount handler.");
}
static void unregister_mmc_unmount_handler(const struct popup_ops *ops)
Mapping_Node = (char *)bundle_get_val(b, MAPPINGNODE_KEY);
if (!View_Type || !Dev_Path || !Mapping_Node) {
- _E("Failed to get data for ode");
+ _E("Failed to get data for ode.");
return -ENOENT;
}
ret = get_object_by_ops(ops, &obj);
if (ret < 0) {
- _E("Failed to get object (%d)", ret);
+ _E("Failed to get object: %d", ret);
return -ENOENT;
}
Sdcard_ID = (char *)bundle_get_val(obj->b, SDCARD_KEY);
if (!Sdcard_ID) {
- _E("Failed to get SDCARD ID");
+ _E("Failed to get SDCARD ID.");
return -ENOENT;
}
ret = dbus_message_is_signal(msg, OVERHEAT_INTERFACE, SIGNAL_OVERHEAT_TIME);
if (!ret) {
- _E("No overheat SIG");
+ _E("No overheat SIG.");
return;
}
REBOOT_METHOD,
"si", param);
if (ret < 0)
- _E("Failed to request poweroff to deviced (%d)", ret);
+ _E("Failed to request poweroff to deviced: %d", ret);
}
static int overheat_poweroff_warning_launch(bundle *b, const struct popup_ops *ops)
conn = get_dbus_connection();
if (!conn) {
- _E("Failed to get dbus connection");
+ _E("Failed to get dbus connection.");
return -ENOMEM;
}
update_overtemp_time,
(void *)ops);
if (!overheat_sig_handler) {
- _E("Failed to add signal handler");
+ _E("Failed to add signal handler.");
return -ENOMEM;
}
E_DBus_Connection *conn;
if (!overheat_sig_handler) {
- _E("No available sig handler for overheat");
+ _E("No available sig handler for overheat.");
return;
}
conn = get_dbus_connection();
if (!conn) {
overheat_sig_handler = NULL;
- _E("No Dbus connection for overheat sig");
+ _E("No Dbus connection for overheat sig.");
return;
}
ret = add_dbus_signal_handler(ops);
if (ret < 0)
- _E("Failed to add dbus handler(%d)", ret);
+ _E("Failed to add dbus handler: %d", ret);
return 0;
}
ret = get_object_by_ops(ops, &obj);
if (ret < 0) {
- _E("Failed to get object (%d)", ret);
+ _E("Failed to get object: %d", ret);
return -EINVAL;
}
METHOD_LOCK_TIMEOUT_INPUT,
"si", param);
if (ret < 0)
- _E("Failed to deliver the result (%d)", ret);
+ _E("Failed to deliver the result: %d", ret);
}
static int power_lock_expired_get_content(const struct popup_ops *ops, char *content, unsigned int len)
ret = get_object_by_ops(ops, &obj);
if (ret < 0) {
- _E("Failed to get object (%d)", ret);
+ _E("Failed to get object: %d", ret);
return -ENOENT;
}
pid_str = (char *)bundle_get_val(obj->b, APP_PID);
if (!pid_str) {
- _E("Failed to get app pid");
+ _E("Failed to get app pid.");
return -ENOENT;
}
request_id = (char *)bundle_get_val(obj->b, REQ_ID);
if (!request_id) {
- _E("Failed to get request id");
+ _E("Failed to get request id.");
return -ENOENT;
}
if (ret != APP_MANAGER_ERROR_NONE) {
name = (char *)bundle_get_val(obj->b, APP_COMM);
if (!name) {
- _E("Failed to get app command");
+ _E("Failed to get app command.");
return -ENOENT;
}
}
static void power_lock_expired_allow_app(const struct popup_ops *ops)
{
- _I("Allow is selected");
+ _I("Allow is selected.");
unload_simple_popup(ops);
static void power_lock_expired_close_app(const struct popup_ops *ops)
{
- _I("Close is selected");
+ _I("Close is selected.");
unload_simple_popup(ops);
REBOOT_METHOD,
"si", param);
- if (ret < 0) _E("Failed to request restart to deviced (%d)", ret);
+ if (ret < 0) _E("Failed to request restart to deviced: %d", ret);
}
static char* gl_text_get_cb(void *data, Evas_Object *obj, const char *part)
unload_simple_popup(data);
if (clicked_index == 0) {
- _D("poweroff is chosen");
+ _D("Poweroff is chosen.");
load_simple_popup(b, &poweroff_ops);
} else if (clicked_index == 1) {
- _D("restart is chosen");
+ _D("Restart is chosen.");
load_simple_popup(b, &restart_ops);
} else
- _E("Wrong button is pressed");
+ _E("Wrong button is pressed.");
}
static Evas_Object* gl_image_get_cb(void *data, Evas_Object *obj, const char *part)
Evas_Coord w, h;
if (!img) {
- _E("BAD image");
+ _E("BAD image.");
return NULL;
}
elm_image_file_set(img, RESDIR"/core_power_off.png", NULL);
elm_image_object_size_get(img, &w, &h);
evas_object_size_hint_min_set(img, w, h);
- _D("Power off img");
+ _D("Power off img.");
return img;
} else if (!strncmp(part, "elm.swallow.icon.end", sizeof("elm.swallow.icon.end"))) {
check = elm_check_add(obj);
elm_image_file_set(img, RESDIR"/core_restart.png", NULL);
elm_image_object_size_get(img, &w, &h);
evas_object_size_hint_min_set(img, w, h);
- _D("Restart img");
+ _D("Restart img.");
return img;
} else if (!strncmp(part, "elm.swallow.icon.end", sizeof("elm.swallow.icon.end"))) {
check = elm_check_add(obj);
return NULL;
default:
- _E("BAD data!");
+ _E("BAD data.");
return NULL;
}
}
const struct popup_ops *ops = data;
if (!strncmp(e->key, BACK_KEY, sizeof(BACK_KEY)) || !strncmp(e->key, HOME_KEY, sizeof(HOME_KEY))) {
- _D("HOME_KEY or BACK KEY is pressed");
+ _D("HOME_KEY or BACK KEY is pressed.");
if (ops)
unload_simple_popup(ops);
terminate_if_no_popup();
VCONFKEY_PM_STATE,
pm_state_changed,
(void *)ops) != 0)
- _E("Failed to register vconf");
+ _E("Failed to register vconf.");
}
static void unregister_handlers(const struct popup_ops *ops)
REBOOT_INTERFACE_NAME,
REBOOT_METHOD,
"si", param);
- if (ret < 0) _E("Failed to request poweroff to deviced (%d)", ret);
+ if (ret < 0) _E("Failed to request poweroff to deviced: %d", ret);
}
static const struct popup_ops restart_ops = {
const struct popup_ops *ops = data;
if (!strncmp(e->key, BACK_KEY, sizeof(BACK_KEY)) || !strncmp(e->key, HOME_KEY, sizeof(HOME_KEY))) {
- _D("HOME_KEY or BACK KEY is pressed");
+ _D("HOME_KEY or BACK KEY is pressed.");
if (ops)
unload_simple_popup(ops);
terminate_if_no_popup();
VCONFKEY_PM_STATE,
pm_state_changed,
(void *)ops) != 0)
- _E("Failed to register vconf");
+ _E("Failed to register vconf.");
}
static void unregister_handlers(const struct popup_ops *ops)
REBOOT_INTERFACE_NAME,
REBOOT_METHOD,
"si", param);
- if (ret < 0) _E("Failed to request poweroff to deviced (%d)", ret);
+ if (ret < 0) _E("Failed to request poweroff to deviced: %d", ret);
}
static const struct popup_ops powerkey_ops = {
bool res;
if (system_info_get_platform_bool(path, &res) != SYSTEM_INFO_ERROR_NONE) {
- _E("Fail to get TELEPHONY INFO");
+ _E("Failed to get TELEPHONY INFO.");
return -1;
}
{
const struct popup_ops *ops = data;
- _D("poweroff is chosen");
+ _D("Poweroff is chosen.");
elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
poweroff_clicked(ops);
elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
- _D("flight mode is chosen");
+ _D("Flight mode is chosen.");
ret = vconf_get_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &is_flight_mode);
if (ret < 0) {
- _E("Error in getting VCONFKEY_TELEPHONY_FLIGHT_MODE");
+ _E("Failed to get VCONFKEY_TELEPHONY_FLIGHT_MODE.");
return;
}
int ret = 0;
if (!strncmp(part, "elm.icon", sizeof("elm.icon"))) {
- _D("index = AIRPLANE_MODE");
+ _D("Index=AIRPLANE_MODE");
check = elm_check_add(obj);
if (!check) {
- _E("BAD check!");
+ _E("BAD check.");
return NULL;
}
flight_icon = check;
ret = vconf_get_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &is_value);
if (ret < 0) {
- _E("Error in getting VCONFKEY_TELEPHONY_FLIGHT_MODE");
+ _E("Failed to get VCONFKEY_TELEPHONY_FLIGHT_MODE.");
return NULL;
}
elm_check_state_set(check, (is_value) ? EINA_TRUE : EINA_FALSE);
Evas_Coord w = 56, h = 56;
if (!strncmp(part, "elm.icon", sizeof("elm.icon"))) {
- _D("index = POWEROFF_MODE");
+ _D("Index=POWEROFF_MODE");
table = elm_table_add(obj);
img1 = elm_image_add(table);
img2 = elm_image_add(table);
if (!img1 || !img2) {
- _E("BAD image!");
+ _E("BAD image.");
return NULL;
}
elm_image_file_set(img1, RESDIR"/gear_device_options_bg.png", NULL);
VCONFKEY_PM_STATE,
pm_state_changed,
(void *)ops) != 0)
- _E("Failed to register vconf");
+ _E("Failed to register vconf.");
}
static void unregister_handlers(const struct popup_ops *ops)
REBOOT_INTERFACE_NAME,
REBOOT_METHOD,
"si", param);
- if (ret < 0) _E("Failed to request poweroff to deviced (%d)", ret);
+ if (ret < 0) _E("Failed to request poweroff to deviced: %d", ret);
}
static int powerkey_launch(bundle *b, const struct popup_ops *ops)
appdata_s *ad = application_info;
if (ad == NULL) {
- _E("No appdata");
+ _E("No appdata.");
return -1;
}
/* Window */
ad->win = get_window();
if (!ad->win) {
- _E("Error in creating window!");
+ _E("Failed to create window.");
return -1;
}
elm_win_conformant_set(ad->win, EINA_TRUE);
ad->popup = elm_popup_add(ad->win);
if (!ad->popup) {
- _E("Error in creating popup!");
+ _E("Failed to create popup.");
return -1;
}
int ret = 0;
if (value > 1 || value < 0) {
- _E("Invalid VCONFKEY_TELEPHONY_FLIGHT_MODE value");
+ _E("Invalid VCONFKEY_TELEPHONY_FLIGHT_MODE value.");
return;
}
ret = vconf_set_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, value);
if (ret < 0) {
- _E("Fail in setting VCONFKEY_TELEPHONY_FLIGHT_MODE");
+ _E("Failed to set VCONFKEY_TELEPHONY_FLIGHT_MODE.");
return;
}
static __attribute__ ((constructor)) void powerkey_register_popup(void)
{
telephony_supported = is_supported(TELEPHONY_PATH);
- _I("TELEPHONY = %d", telephony_supported);
+ _I("TELEPHONY=%d", telephony_supported);
if (telephony_supported > 1 || telephony_supported < 0) {
- _E("Cannot decide powerkey type!");
+ _E("Cannot decide powerkey type.");
telephony_supported = 0;
}
USD_USB_DEVICE_CONFIRM_SIGNAL,
"i", param);
if (ret < 0)
- _E("FAIL: broadcast_dbus_signal(%d)", ret);
+ _E("Failed to broadcast_dbus_signal: %d", ret);
}
static void send_usbhost_result_dbus_signal(int result)
USBHOST_APP_CONFIRM_SIGNAL,
"ii", param);
if (ret < 0)
- _E("FAIL: broadcast_dbus_signal(%d)", ret);
+ _E("Failed to broadcast_dbus_signal: %d", ret);
}
static void usb_device_confirm_ok_clicked(const struct popup_ops *ops)
{
- _I("OK is selected");
+ _I("OK is selected.");
unload_simple_popup(ops);
send_result_dbus_signal(USB_DEVICE_CONFIRM_OK);
terminate_if_no_popup();
static void usb_device_confirm_cancel_clicked(const struct popup_ops *ops)
{
- _I("CANCEL is selected");
+ _I("CANCEL is selected.");
unload_simple_popup(ops);
send_result_dbus_signal(USB_DEVICE_CONFIRM_NOK);
terminate_if_no_popup();
static void usb_device_confirm_terminate(const struct popup_ops *ops)
{
- _I("terminate usb device confirm popup");
+ _I("Terminate usb device confirm popup.");
send_result_dbus_signal(USB_DEVICE_CONFIRM_NOK);
terminate_if_no_popup();
}
static void usbhost_confirm_terminate(const struct popup_ops *ops)
{
- _I("terminate usb device confirm popup");
+ _I("Terminate usb device confirm popup.");
terminate_if_no_popup();
}
{
const struct popup_ops *ops = data;
- _I("OK is selected");
+ _I("OK is selected.");
unload_simple_popup(ops);
send_usbhost_result_dbus_signal(USB_DEVICE_CONFIRM_OK);
terminate_if_no_popup();
{
const struct popup_ops *ops = data;
- _I("CANCEL is selected");
+ _I("CANCEL is selected.");
unload_simple_popup(ops);
send_usbhost_result_dbus_signal(USB_DEVICE_CONFIRM_NOK);
terminate_if_no_popup();
pid_t pid;
if (!b) {
- _E("bundle is null return -EINVAL");
+ _E("Bundle is null return -EINVAL.");
return -EINVAL;
}
app_pid = (char *)bundle_get_val(b, "_APP_PID_");
if (!app_pid) {
- _E("Failed to get pid");
+ _E("Failed to get pid.");
return -ENOENT;
}
ret = app_manager_get_app_id(pid, &app_name);
if (ret != APP_MANAGER_ERROR_NONE) {
- _E("Failed to get app id(%d)", ret);
+ _E("Failed to get app id: %d", ret);
return -ENOENT;
}
ret = get_object_by_ops(ops, &obj);
if (ret < 0) {
- _E("Failed to get object (%d)", ret);
+ _E("Failed to get object: %d", ret);
return -EINVAL;
}
switch (state) {
case VCONFKEY_SYSMAN_USB_DISCONNECTED:
- _I("USB cabel is disconnected");
+ _I("USB cabel is disconnected.");
unload_simple_popup(ops);
if (state_handler == 0) {
vconf_ignore_key_changed(
VCONFKEY_SYSMAN_USB_STATUS,
usb_state_changed, (void *)ops);
if (state_handler != 0)
- _E("Failed to register usb state change event()");
+ _E("Failed to register usb state change event().");
}
return 0;
break;
}
if (i == type_len) {
- _E("Invalid type (%d)", type);
+ _E("Invalid type(%d).", type);
return;
}
else if (type == 1)
ret = app_control_set_app_id(app_control, GALLERY_APPNAME);
else {
- _E("No matched type(%d)", type);
+ _E("No matched type(%d).", type);
goto out;
}
if (ret != APP_CONTROL_ERROR_NONE) {
- _E("Fail to set app id");
+ _E("Failed to set app id.");
goto out;
}
ret = app_control_send_launch_request(app_control, NULL, NULL);
if (ret != APP_CONTROL_ERROR_NONE)
- _E("Fail to send launch request");
+ _E("Fail to send launch request.");
out:
if (app_control) {
DEVICED_IFACE_USBHOST,
SIGNAL_NAME_UNMOUNT, "s", param);
if (ret < 0)
- _E("FAIL: broadcast_dbus_signal()");
+ _E("Failed to broadcast_dbus_signal().");
memset(removed_path, 0, sizeof(removed_path));
path = (char *)bundle_get_val(b, USB_MOUNT_PATH);
if (!path) {
- _E("Failed to get mount path");
+ _E("Failed to get mount path.");
return -2;
}
- _I("USB storage mount path (%s)", path);
+ _I("USB storage mount path(%s).", path);
snprintf(added_path, sizeof(added_path), "%s", path);
return 0;
}
path = (char *)bundle_get_val(b, USB_MOUNT_PATH);
if (!path) {
- _E("Failed to get mount path");
+ _E("Failed to get mount path.");
return -2;
}
path = (char *)bundle_get_val(b, USB_MOUNT_PATH);
if (!path) {
- _E("Failed to get mount path");
+ _E("Failed to get mount path.");
return -ENOENT;
}
case CHARGER_CONNECTION:
return play_notification(type, FEEDBACK_PATTERN_CHARGERCONN);
default:
- _E("Unknown type(%d)", type);
+ _E("Unknown type(%d).", type);
return -EINVAL;
}
}
case CHARGER_CONNECTION:
return 0;
default:
- _E("Unknown type(%d)", type);
+ _E("Unknown type(%d).", type);
return -EINVAL;
}
}
ret = appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR);
if (ret != 0)
- _E("FAIL: appcore_set_i18n()");
+ _E("Failed to appcore_set_i18n().");
if (argc <= 1)
return 0;
ret = init_main_loop(looptype);
if (ret < 0) {
- _E("Failed to init main loop (%d)", ret);
+ _E("Failed to init main loop: %d", ret);
return ret;
}
ret = app_create(type);
if (ret < 0) {
- _E("Failed to register handlers");
+ _E("Failed to register handlers.");
goto out;
}
out:
ret = app_terminate(type);
if (ret < 0)
- _E("Failed to release handlers(%d)", ret);
+ _E("Failed to release handlers: %d", ret);
finalize_main_loop(looptype);