#define WIDGET_COUNT_OF_SIZE_TYPE 13
#endif
-#if !defined(SECURE_LOGD)
-#define SECURE_LOGD LOGD
-#endif
-
-#if !defined(SECURE_LOGW)
-#define SECURE_LOGW LOGW
-#endif
-
-#if !defined(SECURE_LOGE)
-#define SECURE_LOGE LOGE
-#endif
-
#if !defined(S_)
#define S_(str) dgettext("sys_string", str)
#endif
#define _(str) gettext(str)
#endif
-#if !defined(DbgPrint)
-#define DbgPrint(format, arg...) SECURE_LOGD(format, ##arg)
-#endif
-
-#if !defined(ErrPrint)
-#define ErrPrint(format, arg...) SECURE_LOGE(format, ##arg)
-#endif
-
-#if !defined(WarnPrint)
-#define WarnPrint(format, arg...) SECURE_LOGW(format, ##arg)
-#endif
-
#if !defined(WIDGET_VIEWER_EVAS_RESOURCE_EDJ)
#define WIDGET_VIEWER_EVAS_RESOURCE_EDJ "/usr/share/widget_viewer_evas/res/edje/widget_viewer_evas.edj"
#endif
ret = system_info_get_platform_bool(
"http://tizen.org/feature/shell.appwidget", &feature);
if (ret != SYSTEM_INFO_ERROR_NONE) {
- ErrPrint("failed to get system info");/* LCOV_EXCL_LINE */
+ LOGE("failed to get system info");/* LCOV_EXCL_LINE */
return false;/* LCOV_EXCL_LINE */
}
ret = read(fd, subject_label, SMACK_LABEL_LEN);
if (ret < 0) {
- ErrPrint("read is failed");/* LCOV_EXCL_LINE */
+ LOGE("read is failed");/* LCOV_EXCL_LINE */
close(fd);/* LCOV_EXCL_LINE */
goto ERROR;
}
static void __smart_callback_call(Evas_Object *obj, const char *signal, void *cbdata)
{
if (!obj) {
- DbgPrint("widget is deleted, ignore smart callback call");/* LCOV_EXCL_LINE */
+ LOGD("widget is deleted, ignore smart callback call");/* LCOV_EXCL_LINE */
return;/* LCOV_EXCL_LINE */
}
evas_object_smart_callback_call(obj, signal, cbdata);
Evas_Object *preview;
if (!image) {
- ErrPrint("Invalid parameters");/* LCOV_EXCL_LINE */
+ LOGE("Invalid parameters");/* LCOV_EXCL_LINE */
return;/* LCOV_EXCL_LINE */
}
info = (struct widget_info *)data;
if (!info) {
- ErrPrint("Unable to find a proper object");/* LCOV_EXCL_LINE */
+ LOGE("Unable to find a proper object");/* LCOV_EXCL_LINE */
evas_object_del(image);/* LCOV_EXCL_LINE */
return;
}
if (info->restart || (info->instance_id == NULL) || (strcmp(info->instance_id, instance_id) != 0)) {
- ErrPrint("Wrong added info, %s %s", appid, info->widget_id);/* LCOV_EXCL_LINE */
+ LOGE("Wrong added info, %s %s", appid, info->widget_id);/* LCOV_EXCL_LINE */
return;/* LCOV_EXCL_LINE */
}
aul_widget_write_log(LOG_TAG, "[%s:%d] %s",
__FUNCTION__, __LINE__, info->instance_id);
- DbgPrint("widget added: %s, widget_id : %s, instance : %s, (%p)",
+ LOGD("widget added: %s, widget_id : %s, instance : %s, (%p)",
appid, info->widget_id, info->instance_id, image);
evas_object_geometry_get(image, &x, &y, &w, &h);
- DbgPrint("widget geometry:%d %d %d %d", x, y, w, h);
+ LOGD("widget geometry:%d %d %d %d", x, y, w, h);
elm_object_part_content_set(info->layout, "tbm,widget", image);
if (!info->disable_preview) {
info = (struct widget_info *)data;
if (!info) {
- ErrPrint("Unable to find a proper object");/* LCOV_EXCL_LINE */
+ LOGE("Unable to find a proper object");/* LCOV_EXCL_LINE */
return;/* LCOV_EXCL_LINE */
}
if (info->restart)
return;
- DbgPrint("widget removed: %s", appid);
+ LOGD("widget removed: %s", appid);
elm_object_part_content_set(info->layout, "tbm,widget", NULL);
if (info->disable_preview) {
static void __display_overlay_text(struct widget_info *info)
{
if (!info) {
- ErrPrint("Unable to get the info");
+ LOGE("Unable to get the info");
return;
}
if (!info->disable_overlay) {
info->event_queue = g_queue_new();
if (info->event_queue == NULL) {
- ErrPrint("out of memory");
+ LOGE("out of memory");
return;
}
- DbgPrint("add event to queue:%d", event);
+ LOGD("add event to queue:%d", event);
g_queue_push_tail(info->event_queue, GINT_TO_POINTER(event));
}
restart_instance_id = s_info.restart_list->data;
info = g_hash_table_lookup(s_info.widget_table, restart_instance_id);
evas_object_geometry_get(info->layout, NULL, NULL, &w, &h);
- DbgPrint("Widget launch %s, %d, %d", info->instance_id, w, h);
+ LOGD("Widget launch %s, %d, %d", info->instance_id, w, h);
ops.added_cb = __screen_connector_toolkit_evas_added_cb;
ops.removed_cb = __screen_connector_toolkit_evas_removed_cb;
}
if (target_pid == 0) {
- DbgPrint("can not find widget(%s)", widget_id);
+ LOGD("can not find widget(%s)", widget_id);
return 0;
}
{
char *restart_instance_id = (char *)user_data;
- WarnPrint("Timeout called !! %s", restart_instance_id);
+ LOGW("Timeout called !! %s", restart_instance_id);
__remove_restart_info(restart_instance_id);
__restart_instance();
return G_SOURCE_REMOVE;
}
if (target_pid == 0) {
- WarnPrint("can not find widget (%s)", widget_id);
+ LOGW("can not find widget (%s)", widget_id);
return 0;
}
widget_instance_info->restart = true;
}
aul_terminate_pid_async(target_pid);
- DbgPrint("Widget __handle_restart_widget_request id : %s, pid : %d",
+ LOGD("Widget __handle_restart_widget_request id : %s, pid : %d",
widget_id, target_pid);
aul_widget_write_log(LOG_TAG, "[%s:%d] %s, targetpid : %d",
__FUNCTION__, __LINE__, widget_id, target_pid);
widget_instance_h handle;
int err;
- DbgPrint("widget_id : %s (%d)", widget_id, event);
+ LOGD("widget_id : %s (%d)", widget_id, event);
if (event == WIDGET_INSTANCE_EVENT_APP_RESTART_REQUEST) {
__handle_restart_widget_request(widget_id);
return 0;
info = g_hash_table_lookup(s_info.widget_table, instance_id);
if (!info) {
- ErrPrint("Unable to find a proper object");/* LCOV_EXCL_LINE */
+ LOGE("Unable to find a proper object");/* LCOV_EXCL_LINE */
return -1;/* LCOV_EXCL_LINE */
}
}
}
- DbgPrint("update: %s (%d)", instance_id, event);
+ LOGD("update: %s (%d)", instance_id, event);
event_info.error = WIDGET_ERROR_NONE;
event_info.widget_app_id = info->widget_id;
smart_signal = WIDGET_SMART_SIGNAL_EXTRA_INFO_UPDATED;
handle = widget_instance_get_instance(info->widget_id, info->instance_id);
if (!handle) {
- ErrPrint("instance handle of widget(%s) is invalid data", info->instance_id);
+ LOGE("instance handle of widget(%s) is invalid data", info->instance_id);
break;
}
if (widget_instance_get_content(handle, &content_info) < 0) {
- ErrPrint("Failed to get content of widget(%s)", info->instance_id);
+ LOGE("Failed to get content of widget(%s)", info->instance_id);
widget_instance_unref(handle);
break;
}
widget_instance_unref(handle);
break;
case WIDGET_INSTANCE_EVENT_FAULT:
- WarnPrint("widget faulted (%s)", instance_id);
+ LOGW("widget faulted (%s)", instance_id);
event_info.error = WIDGET_ERROR_FAULT;
event_info.event = WIDGET_FAULT_DEACTIVATED;
smart_signal = WIDGET_SMART_SIGNAL_WIDGET_FAULTED;
__display_overlay_text(info);
break;
case WIDGET_INSTANCE_EVENT_CREATE_ABORTED:
- WarnPrint("widget aborted (%s)", instance_id);
+ LOGW("widget aborted (%s)", instance_id);
handle = widget_instance_get_instance(info->widget_id,
info->instance_id);
if (!handle) {
- ErrPrint("instance handle of widget(%s) is invalid data",/* LCOV_EXCL_LINE */
+ LOGE("instance handle of widget(%s) is invalid data",/* LCOV_EXCL_LINE */
info->instance_id);/* LCOV_EXCL_LINE */
break;/* LCOV_EXCL_LINE */
}
}
if (!info->layout) {
- ErrPrint("object is not ready");
+ LOGE("object is not ready");
return 0;
}
static int __lifecycle_event_cb(const char *widget_id, widget_lifecycle_event_e lifecycle_event, const char *widget_instance_id, void *data)
{
- DbgPrint("__lifecycle_event_cb %s (%d)", widget_id, lifecycle_event);
+ LOGD("__lifecycle_event_cb %s (%d)", widget_id, lifecycle_event);
if (lifecycle_event == WIDGET_LIFE_CYCLE_EVENT_APP_DEAD) {
__restart_terminated_widget(widget_id);
}
static void __flush_event_queue(struct widget_info *info)
{
if (!info->event_queue) {
- DbgPrint("event queue is empty. nothing to flush");
+ LOGD("event queue is empty. nothing to flush");
return;
}
while (!g_queue_is_empty(info->event_queue)) {
int event = GPOINTER_TO_INT(g_queue_pop_head(info->event_queue));
- DbgPrint("call pending event %d", event);
+ LOGD("call pending event %d", event);
__instance_event_cb(info->widget_id, info->instance_id, event, NULL);
}
return WIDGET_ERROR_PERMISSION_DENIED;
if (!win) {
- ErrPrint("win object is invalid");
+ LOGE("win object is invalid");
return WIDGET_ERROR_INVALID_PARAMETER;
}
if (s_info.initialized) {
- ErrPrint("Already initialized");/* LCOV_EXCL_LINE */
+ LOGE("Already initialized");/* LCOV_EXCL_LINE */
return WIDGET_ERROR_ALREADY_EXIST;
}
if (!bindtextdomain(PKGNAME, WIDGET_VIEWER_EVAS_RESOURCE_PO))
- ErrPrint("bindtextdomain: %d", errno);
+ LOGE("bindtextdomain: %d", errno);
else
- DbgPrint("%s - %s", PKGNAME, WIDGET_VIEWER_EVAS_RESOURCE_PO);
+ LOGD("%s - %s", PKGNAME, WIDGET_VIEWER_EVAS_RESOURCE_PO);
s_info.win = win;
screen_connector_toolkit_evas_start_visibility_notify();
if (aul_app_get_appid_bypid(getpid(), app_id, sizeof(app_id)) != AUL_R_OK) {
- ErrPrint("failed to get appid of pid:%d", getpid());/* LCOV_EXCL_LINE */
+ LOGE("failed to get appid of pid:%d", getpid());/* LCOV_EXCL_LINE */
return WIDGET_ERROR_INVALID_PARAMETER;
}
return WIDGET_ERROR_PERMISSION_DENIED;
if (!s_info.initialized) {
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return WIDGET_ERROR_FAULT;
}
return WIDGET_ERROR_NOT_SUPPORTED;
if (!s_info.initialized) {
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return WIDGET_ERROR_FAULT;
}
ret = __instance_resume(info);
if (ret < 0) {
- ErrPrint("Fail to resume the widget(%s):(%d)",
+ LOGE("Fail to resume the widget(%s):(%d)",
info->instance_id, ret);
}
} else {
return WIDGET_ERROR_NOT_SUPPORTED;
if (!s_info.initialized) {
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return WIDGET_ERROR_FAULT;
}
if (info->is_created) {
ret = __instance_pause(info);
if (ret < 0) {
- ErrPrint("Fail to pause the widget(%s):(%d)",
+ LOGE("Fail to pause the widget(%s):(%d)",
info->instance_id, ret);
}
} else {
return WIDGET_ERROR_NOT_SUPPORTED;
if (!s_info.initialized) {
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return WIDGET_ERROR_FAULT;
}
return WIDGET_ERROR_PERMISSION_DENIED;
if (orientation < 0 || orientation > 360) {
- ErrPrint("orientation is invalid parameter");
+ LOGE("orientation is invalid parameter");
return WIDGET_ERROR_INVALID_PARAMETER;
}
char *widget_id;
char *instance_id;
- DbgPrint("delete: layout(%p)", layout);
+ LOGD("delete: layout(%p)", layout);
aul_widget_write_log(LOG_TAG, "[%s:%d] %s",
__FUNCTION__, __LINE__, info->instance_id);
widget_id = strdup(info->widget_id);
if (widget_id == NULL) {
- ErrPrint("out of memory");
+ LOGE("out of memory");
return;
}
instance_id = strdup(info->instance_id);
if (instance_id == NULL) {
- ErrPrint("out of memory");
+ LOGE("out of memory");
free(widget_id);
return;
}
if (info->pid < 0) {
/* LCOV_EXCL_START */
struct widget_evas_event_info event_info;
- ErrPrint("Failed to launch an widget");
+ LOGE("Failed to launch an widget");
event_info.error = info->pid;
event_info.widget_app_id = info->widget_id;
event_info.event = WIDGET_EVENT_CREATED;
* Layout will be resized, consequently, the tbm object also will be resized.
*/
if (info->is_created) {
- DbgPrint("send resize : %s, w %d h %d", info->instance_id, w, h);
+ LOGD("send resize : %s, w %d h %d", info->instance_id, w, h);
widget_instance_resize(info->instance_id, w, h);
} else {
item = __create_pending_item("resize", w, h);
if (x >= 0 && x < window_w &&
y >= 0 && y < window_h &&
(rotation == 0 || rotation == 180)) {
- DbgPrint("x %d, y %d w %d h %d, window_w %d window_h %d rotation %d",
+ LOGD("x %d, y %d w %d h %d, window_w %d window_h %d rotation %d",
x, y, w, h, window_w, window_h, rotation);
return true;
} else if (x >= 0 && x < window_h &&
y >= 0 && y < window_w &&
(rotation == 90 || rotation == 270)) {
- DbgPrint("x %d, y %d w %d h %d, window_w %d window_h %d rotation %d",
+ LOGD("x %d, y %d w %d h %d, window_w %d window_h %d rotation %d",
x, y, w, h, window_w, window_h, rotation);
return true;
}
if (__obj_is_visible(layout)) {
if (info->pid < 0) {
info->restart = true;
- DbgPrint("restart! %s", info->widget_id);
+ LOGD("restart! %s", info->widget_id);
if (!info->disable_preview) {
__create_preview_image(info->layout, info->widget_id);
elm_object_signal_emit(info->layout, "enable", "preview");
info = (struct widget_info *)calloc(1, sizeof(*info));
if (!info) {
- ErrPrint("malloc: %s", strerror_r(errno, err_buf, sizeof(err_buf)));/* LCOV_EXCL_LINE */
+ LOGE("malloc: %s", strerror_r(errno, err_buf, sizeof(err_buf)));/* LCOV_EXCL_LINE */
goto out;/* LCOV_EXCL_LINE */
}
int *cur_instance_cnt;
if (!__is_widget_feature_enabled()) {
- ErrPrint("widget is not supported");/* LCOV_EXCL_LINE */
+ LOGE("widget is not supported");/* LCOV_EXCL_LINE */
set_last_result(WIDGET_ERROR_NOT_SUPPORTED);/* LCOV_EXCL_LINE */
return NULL;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
set_last_result(WIDGET_ERROR_PERMISSION_DENIED);/* LCOV_EXCL_LINE */
return NULL;
}
max_instance_cnt = widget_service_get_widget_max_count(widget_id);
if (max_instance_cnt < 0) {
set_last_result(WIDGET_ERROR_FAULT);/* LCOV_EXCL_LINE */
- ErrPrint("get widget max instance count fail");/* LCOV_EXCL_LINE */
+ LOGE("get widget max instance count fail");/* LCOV_EXCL_LINE */
return NULL;
}
if (cur_instance_cnt == NULL) {
cur_instance_cnt = (int *)calloc(1, sizeof(int));
if (cur_instance_cnt == NULL) {
- ErrPrint("Fail to calloc instance cnt");
+ LOGE("Fail to calloc instance cnt");
set_last_result(WIDGET_ERROR_FAULT);
return NULL;
}
if (max_instance_cnt != 0 && max_instance_cnt <= *cur_instance_cnt) {
set_last_result(WIDGET_ERROR_MAX_EXCEEDED);
- ErrPrint("already have max count instances");
+ LOGE("already have max count instances");
return NULL;
}
if (!__is_widget_feature_enabled()) {
set_last_result(WIDGET_ERROR_NOT_SUPPORTED);/* LCOV_EXCL_LINE */
- ErrPrint("Widget Feature is disabled");/* LCOV_EXCL_LINE */
+ LOGE("Widget Feature is disabled");/* LCOV_EXCL_LINE */
return NULL;
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("Widget viewer evas is not initialized");
+ LOGE("Widget viewer evas is not initialized");
return NULL;
}
if (!parent) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("parent(window) object is invalid");
+ LOGE("parent(window) object is invalid");
return NULL;
}
if (!widget_id) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget package id is invalid");
+ LOGE("widget package id is invalid");
return NULL;
}
if (!instance_id) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("Failed to get instance_id: %s", widget_id);
+ LOGE("Failed to get instance_id: %s", widget_id);
return NULL;
}
widget_instance_info = create_info(parent, widget_id, instance_id, content_info);
if (!widget_instance_info) {
set_last_result(WIDGET_ERROR_FAULT);/* LCOV_EXCL_LINE */
- ErrPrint("Unable to create an information object");/* LCOV_EXCL_LINE */
+ LOGE("Unable to create an information object");/* LCOV_EXCL_LINE */
widget_instance_destroy(instance_id);/* LCOV_EXCL_LINE */
return NULL;
}
return WIDGET_ERROR_PERMISSION_DENIED;
if (type < WIDGET_VIEWER_EVAS_MANUAL_PAUSE_RESUME || type > WIDGET_VIEWER_EVAS_UNKNOWN) {
- ErrPrint("type is invalid");
+ LOGE("type is invalid");
return WIDGET_ERROR_INVALID_PARAMETER;
}
return WIDGET_ERROR_NOT_SUPPORTED;
if (!s_info.initialized) {
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return WIDGET_ERROR_FAULT;
}
return WIDGET_ERROR_PERMISSION_DENIED;
if (!widget) {
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return WIDGET_ERROR_INVALID_PARAMETER;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
if (info->visibility_freeze) {
- ErrPrint("widget(%p) is freezing visibility(%d)", widget, info->visibility_freeze);
+ LOGE("widget(%p) is freezing visibility(%d)", widget, info->visibility_freeze);
return WIDGET_ERROR_DISABLED;
}
if (info->is_created) {
ret = __instance_pause(info);
if (ret < 0) {
- ErrPrint("Fail to pause the widget(%p):(%d)", widget, ret);
+ LOGE("Fail to pause the widget(%p):(%d)", widget, ret);
return ret;
}
} else {
return WIDGET_ERROR_NOT_SUPPORTED;
if (!s_info.initialized) {
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return WIDGET_ERROR_FAULT;
}
return WIDGET_ERROR_PERMISSION_DENIED;
if (!widget) {
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return WIDGET_ERROR_INVALID_PARAMETER;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
if (info->visibility_freeze) {
- ErrPrint("widget(%p) is freezing visibility(%d)", widget, info->visibility_freeze);
+ LOGE("widget(%p) is freezing visibility(%d)", widget, info->visibility_freeze);
return WIDGET_ERROR_DISABLED;
}
if (info->is_created) {
ret = __instance_resume(info);
if (ret < 0) {
- ErrPrint("Fail to resume the widget(%p):(%d)", widget, ret);
+ LOGE("Fail to resume the widget(%p):(%d)", widget, ret);
return ret;
}
} else {
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return NULL;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
set_last_result(WIDGET_ERROR_PERMISSION_DENIED);/* LCOV_EXCL_LINE */
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return NULL;/* LCOV_EXCL_LINE */
}
if (!widget) {
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
return NULL;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return NULL;
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return NULL;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
set_last_result(WIDGET_ERROR_PERMISSION_DENIED);/* LCOV_EXCL_LINE */
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return NULL;/* LCOV_EXCL_LINE */
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return NULL;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return NULL;
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return NULL;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
set_last_result(WIDGET_ERROR_PERMISSION_DENIED);/* LCOV_EXCL_LINE */
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return NULL;/* LCOV_EXCL_LINE */
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return NULL;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return NULL;
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return -1.0f;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
set_last_result(WIDGET_ERROR_PERMISSION_DENIED);/* LCOV_EXCL_LINE */
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return -1.0f;/* LCOV_EXCL_LINE */
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return -1.0f;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return -1.0f;
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
set_last_result(WIDGET_ERROR_PERMISSION_DENIED);/* LCOV_EXCL_LINE */
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return;/* LCOV_EXCL_LINE */
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return;
}
remote_obj = elm_object_part_content_get(widget, "tbm,widget");
if (!remote_obj) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return;
}
return WIDGET_ERROR_NOT_SUPPORTED;
if (!s_info.initialized) {
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return WIDGET_ERROR_FAULT;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return WIDGET_ERROR_PERMISSION_DENIED;/* LCOV_EXCL_LINE */
}
if (!widget) {
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return WIDGET_ERROR_INVALID_PARAMETER;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
- ErrPrint("widget(%p) don't have the info", widget);
+ LOGE("widget(%p) don't have the info", widget);
return WIDGET_ERROR_INVALID_PARAMETER;
}
remote_obj = elm_object_part_content_get(widget, "tbm,widget");
if (!remote_obj) {
- ErrPrint("widget object is invalid");/* LCOV_EXCL_LINE */
+ LOGE("widget object is invalid");/* LCOV_EXCL_LINE */
return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return;/* LCOV_EXCL_LINE */
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return;/* LCOV_EXCL_LINE */
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return;/* LCOV_EXCL_LINE */
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return;
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return;/* LCOV_EXCL_LINE */
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return;
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
set_last_result(WIDGET_ERROR_PERMISSION_DENIED);/* LCOV_EXCL_LINE */
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return;/* LCOV_EXCL_LINE */
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return;
}
info->is_faulted = false;
info->pid = widget_instance_launch(info->instance_id, info->content_info, w, h);
if (info->pid < 0) {
- ErrPrint("Failed to launch an widget");
+ LOGE("Failed to launch an widget");
event_info.error = info->pid;
event_info.widget_app_id = info->widget_id;
event_info.event = WIDGET_EVENT_CREATED;
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return false;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
set_last_result(WIDGET_ERROR_PERMISSION_DENIED);/* LCOV_EXCL_LINE */
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return false;/* LCOV_EXCL_LINE */
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return false;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return false;/* LCOV_EXCL_LINE */
}
return WIDGET_ERROR_NOT_SUPPORTED;
if (!s_info.initialized) {
- ErrPrint("widget viewer evas is not initialized");/* LCOV_EXCL_LINE */
+ LOGE("widget viewer evas is not initialized");/* LCOV_EXCL_LINE */
return WIDGET_ERROR_FAULT;/* LCOV_EXCL_LINE */
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return WIDGET_ERROR_PERMISSION_DENIED;/* LCOV_EXCL_LINE */
}
if (!widget) {
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return WIDGET_ERROR_INVALID_PARAMETER;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
- ErrPrint("widget(%p) don't have the info", widget);
+ LOGE("widget(%p) don't have the info", widget);
return WIDGET_ERROR_INVALID_PARAMETER;
}
tbm_obj = elm_object_part_content_get(widget, "tbm,widget");
if (!tbm_obj) {
- ErrPrint("widget object is invalid\n");/* LCOV_EXCL_LINE */
+ LOGE("widget object is invalid\n");/* LCOV_EXCL_LINE */
return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
if (status == WIDGET_VISIBILITY_STATUS_SHOW_FIXED) {
ret = screen_connector_toolkit_evas_freeze_visibility(tbm_obj, VISIBILITY_TYPE_UNOBSCURED);
if (ret < 0) {
- ErrPrint("Fail to resume the widget(%p):(%d)", widget, ret);
+ LOGE("Fail to resume the widget(%p):(%d)", widget, ret);
return ret;
}
info->visibility_freeze = status;
} else if (status == WIDGET_VISIBILITY_STATUS_HIDE_FIXED) {
ret = screen_connector_toolkit_evas_freeze_visibility(tbm_obj, VISIBILITY_TYPE_FULLY_OBSCURED);
if (ret < 0) {
- ErrPrint("Fail to pause the widget(%p):(%d)", widget, ret);
+ LOGE("Fail to pause the widget(%p):(%d)", widget, ret);
return ret;
}
info->visibility_freeze = status;
} else {
- ErrPrint("status value is invalid");
+ LOGE("status value is invalid");
return WIDGET_ERROR_INVALID_PARAMETER;
}
return WIDGET_ERROR_NOT_SUPPORTED;
if (!s_info.initialized) {
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return WIDGET_ERROR_FAULT;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return WIDGET_ERROR_PERMISSION_DENIED;/* LCOV_EXCL_LINE */
}
if (!widget) {
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return WIDGET_ERROR_INVALID_PARAMETER;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
tbm_obj = elm_object_part_content_get(widget, "tbm,widget");
if (!tbm_obj) {
- ErrPrint("widget object is invalid\n");/* LCOV_EXCL_LINE */
+ LOGE("widget object is invalid\n");/* LCOV_EXCL_LINE */
return WIDGET_ERROR_INVALID_PARAMETER;/* LCOV_EXCL_LINE */
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return false;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
set_last_result(WIDGET_ERROR_PERMISSION_DENIED);/* LCOV_EXCL_LINE */
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return false;/* LCOV_EXCL_LINE */
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return false;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return false;/* LCOV_EXCL_LINE */
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return false;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
set_last_result(WIDGET_ERROR_PERMISSION_DENIED);/* LCOV_EXCL_LINE */
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return false;/* LCOV_EXCL_LINE */
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return false;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return false;/* LCOV_EXCL_LINE */
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return;
}
if (__check_privilege(WIDGET_PRIVILEGE) < 0) {
set_last_result(WIDGET_ERROR_PERMISSION_DENIED);/* LCOV_EXCL_LINE */
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return;/* LCOV_EXCL_LINE */
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return;/* LCOV_EXCL_LINE */
}
if (__check_privilege("http://tizen.org/privilege/widget.viewer") < 0) {
set_last_result(WIDGET_ERROR_PERMISSION_DENIED);/* LCOV_EXCL_LINE */
- ErrPrint("Permission deny");/* LCOV_EXCL_LINE */
+ LOGE("Permission deny");/* LCOV_EXCL_LINE */
return NULL;/* LCOV_EXCL_LINE */
}
if (!s_info.initialized) {
set_last_result(WIDGET_ERROR_FAULT);
- ErrPrint("widget viewer evas is not initialized");
+ LOGE("widget viewer evas is not initialized");
return NULL;
}
if (!widget) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
- ErrPrint("widget object is invalid");
+ LOGE("widget object is invalid");
return NULL;
}
info = evas_object_data_get(widget, WIDGET_INFO_TAG);
if (!info) {
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);/* LCOV_EXCL_LINE */
- ErrPrint("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
+ LOGE("widget(%p) don't have the info", widget);/* LCOV_EXCL_LINE */
return NULL;/* LCOV_EXCL_LINE */
}
widget_id = widget_viewer_evas_get_widget_id(widget);
if (!widget_id) {
- ErrPrint("cannot get widget id from object");
+ LOGE("cannot get widget id from object");
return WIDGET_ERROR_INVALID_PARAMETER;
}
setup_appid = widget_service_get_app_id_of_setup_app(widget_id);
if (!setup_appid) {
- ErrPrint("widget[%s] does not have setup appid", widget_id);
+ LOGE("widget[%s] does not have setup appid", widget_id);
return WIDGET_ERROR_NOT_EXIST;
}
app_control_add_extra_data(service, APP_CONTROL_DATA_WIDGET_CONTENT, content_info);
if (app_control_send_launch_request(service, NULL, NULL) != APP_CONTROL_ERROR_NONE)
- ErrPrint("Failed to launch setup app[%s]", setup_appid);
+ LOGE("Failed to launch setup app[%s]", setup_appid);
app_control_destroy(service);
free(setup_appid);