dup_app_id = strdup(app_id);
if (!dup_app_id)
- NOTIFICATION_ERR("Heap: %d\n", errno);
+ NOTIFICATION_ERR("Failed to strdup, errno[%d]", errno);
return dup_app_id;
}
break;
default:
- NOTIFICATION_ERR("Error. invalid variable type. : %d",
+ NOTIFICATION_ERR("Invalid variable type. : %d",
var_type);
noti_err = NOTIFICATION_ERROR_INVALID_PARAMETER;
break;
}
if ((ret = app_control_export_as_bundle(app_control, &b)) != APP_CONTROL_ERROR_NONE) {
- NOTIFICATION_ERR("Failed to convert appcontrol to bundle:%d", ret);
+ NOTIFICATION_ERR("Failed to convert appcontrol to bundle[%d]", ret);
err = NOTIFICATION_ERROR_INVALID_PARAMETER;
goto out;
}
*app_control = app_control_new;
} else {
app_control_destroy(app_control_new);
- NOTIFICATION_ERR("Failed to import app control from bundle:%d", ret);
+ NOTIFICATION_ERR("Failed to import app control from bundle[%d]", ret);
return NOTIFICATION_ERROR_IO_ERROR;
}
} else {
- NOTIFICATION_ERR("Failed to create app control:%d", ret);
+ NOTIFICATION_ERR("Failed to create app control[%d]", ret);
return NOTIFICATION_ERROR_IO_ERROR;
}
} else {
- NOTIFICATION_ERR("Failed to get execute option:%d", ret);
+ NOTIFICATION_ERR("Failed to get execute option[%d]", ret);
return ret;
}
if (noti == NULL) {
err = NOTIFICATION_ERROR_INVALID_PARAMETER;
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+ NOTIFICATION_ERR("Invalid notification handle");
goto out;
}
if (event_type < NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1
|| event_type > NOTIFICATION_EVENT_TYPE_MAX) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+ NOTIFICATION_ERR("Invalid event type");
err = NOTIFICATION_ERROR_INVALID_PARAMETER;
goto out;
}
if ((err = app_control_export_as_bundle(event_handler, &app_control_bundle)) != APP_CONTROL_ERROR_NONE) {
- NOTIFICATION_ERR("app_control_to_bundle failed [%d]", err);
+ NOTIFICATION_ERR("Failed to export app_control to bundle[%d]", err);
goto out;
}
if (noti == NULL || event_handler == NULL) {
err = NOTIFICATION_ERROR_INVALID_PARAMETER;
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+ NOTIFICATION_ERR("Invalid handle");
goto out;
}
if (event_type < NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1
|| event_type > NOTIFICATION_EVENT_TYPE_MAX) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+ NOTIFICATION_ERR("Invalid event type");
err = NOTIFICATION_ERROR_INVALID_PARAMETER;
goto out;
}
b = noti->b_event_handler[event_type];
if (b == NULL) {
- NOTIFICATION_DBG("No event handler\n");
+ NOTIFICATION_ERR("No event handler");
err = NOTIFICATION_ERROR_NOT_EXIST_ID;
goto out;
}
err = app_control_create(&app_control_new);
if (err != APP_CONTROL_ERROR_NONE || app_control_new == NULL) {
- NOTIFICATION_ERR("app_control_create failed [%d]", err);
+ NOTIFICATION_ERR("Failted to create app_control[%d]", err);
err = NOTIFICATION_ERROR_IO_ERROR;
goto out;
}
} else {
app_control_destroy(app_control_new);
app_control_new = NULL;
- NOTIFICATION_ERR("Failed to import app control from bundle [%d]", err);
+ NOTIFICATION_ERR("Failed to import app control from bundle[%d]", err);
err = NOTIFICATION_ERROR_IO_ERROR;
goto out;
}
int err;
if (type <= NOTIFICATION_TYPE_NONE || type > NOTIFICATION_TYPE_MAX) {
- NOTIFICATION_ERR("INVALID TYPE : %d", type);
+ NOTIFICATION_ERR("Invalid notification type[%d]", type);
set_last_result(NOTIFICATION_ERROR_INVALID_PARAMETER);
return NULL;
}
noti = (notification_h)calloc(1, sizeof(struct _notification));
if (noti == NULL) {
- NOTIFICATION_ERR("NO MEMORY : noti == NULL");
+ NOTIFICATION_ERR("Failed to alloc memory");
set_last_result(NOTIFICATION_ERROR_OUT_OF_MEMORY);
return NULL;
}
noti->auto_remove = true;
noti->caller_app_id = notification_get_app_id_by_pid(getpid());
if (noti->caller_app_id == NULL) {
- NOTIFICATION_ERR("get_app_id_by_pid is failed");
+ NOTIFICATION_ERR("Failed to get caller_app_id");
goto out;
}
err = _notification_get_app_name(pkg_id, &domain_name);
if (err != 0 || domain_name == NULL) {
- NOTIFICATION_WARN("_notification_get_app_name failed err[%d] domain_name[%p]",
+ NOTIFICATION_WARN("Failed to get app name domain_name[%p]",
err, domain_name);
goto out;
}
err = package_info_create(pkg_id, &package_info);
if (err != PACKAGE_MANAGER_ERROR_NONE || package_info == NULL) {
- NOTIFICATION_WARN("package_info_create failed err[%d] package_info[%p] pkg_id[%s]",
- err, package_info, pkg_id);
+ NOTIFICATION_WARN("Failted to create package_info err[%d] pkg_id[%s]",
+ err, pkg_id);
goto out;
}
err = package_info_get_root_path(package_info, &app_root_path);
if (err != PACKAGE_MANAGER_ERROR_NONE || app_root_path == NULL) {
- NOTIFICATION_WARN("package_info_get_root_path failed err[%d] app_root_path[%p]",
+ NOTIFICATION_WARN("Failed to get root path err[%d] path[%p]",
err, app_root_path);
goto out;
}
notification_h new_noti = NULL;
if (noti == NULL || clone == NULL) {
- NOTIFICATION_ERR("INVALID PARAMETER.");
+ NOTIFICATION_ERR("Invalid handle");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
new_noti = (notification_h) calloc(1, sizeof(struct _notification));
if (new_noti == NULL) {
- NOTIFICATION_ERR("NO MEMORY : noti == NULL");
+ NOTIFICATION_ERR("Failed to alloc memory");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
noti = (notification_h)calloc(1, sizeof(struct _notification));
if (noti == NULL) {
- NOTIFICATION_ERR("Failed to alloc a new notification");
+ NOTIFICATION_ERR("Failed to alloc memory");
set_last_result(NOTIFICATION_ERROR_OUT_OF_MEMORY);
return NULL;
}
SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE, NULL);
if (ret != SQLITE_OK) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("fail to open notification db %d", ret);
+ NOTIFICATION_ERR("Failed to open db[%d]", ret);
ret = NOTIFICATION_ERROR_FROM_DB;
goto out;
/* LCOV_EXCL_STOP */
ret = sqlite3_exec(db, CREATE_NOTIFICATION_TABLE, NULL, NULL, &errmsg);
if (ret != SQLITE_OK) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("sqlite3_exec error(%d)(%s)", ret, errmsg);
+ NOTIFICATION_ERR("Failed to exec sqlite[%d][%s]", ret, errmsg);
ret = NOTIFICATION_ERROR_FROM_DB;
goto out;
/* LCOV_EXCL_STOP */
ret = sqlite3_close(*db);
if (ret != SQLITE_OK) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("DB close error(%d)", ret);
+ NOTIFICATION_ERR("Failed to close db[%d]", ret);
return NOTIFICATION_ERROR_FROM_DB;
/* LCOV_EXCL_STOP */
}
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("DB err(%d) : %s", ret, sqlite3_errmsg(db));
+ NOTIFICATION_ERR("Sqlite3 err[%d][%s]", ret, sqlite3_errmsg(db));
return NOTIFICATION_ERROR_FROM_DB;
/* LCOV_EXCL_STOP */
}
ret = NOTIFICATION_ERROR_NONE;
} else {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("DB err(%d) : %s", ret,
+ NOTIFICATION_ERR("Sqlite err[%d][%s]", ret,
sqlite3_errmsg(db));
ret = NOTIFICATION_ERROR_FROM_DB;
/* LCOV_EXCL_STOP */
result = 0;
- NOTIFICATION_INFO("Check Data Inserted : query[%s], result : [%d]",
- query, result);
-
sqlite3_finalize(stmt);
if (result > 0)
return NOTIFICATION_ERROR_ALREADY_EXIST_ID;
+ NOTIFICATION_INFO("Check Data Inserted appid[%s] group_id[%d] result[%d]",
+ app_id, group_id, result);
+
return NOTIFICATION_ERROR_NONE;
}
/* LCOV_EXCL_STOP */
ret = sqlite3_prepare_v2(db, query, -1, &stmt, NULL);
if (ret != SQLITE_OK) {
- NOTIFICATION_ERR("Insert Query : %s", query);
- NOTIFICATION_ERR("Insert DB error(%d) : %s", ret,
- sqlite3_errmsg(db));
+ NOTIFICATION_ERR("Failed to insert data app_id[%s] err[%d][%s]",
+ app_id, ret, sqlite3_errmsg(db));
if (stmt)
sqlite3_finalize(stmt);
ret = sqlite3_prepare(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
- NOTIFICATION_ERR("Select Query : %s", query);
- NOTIFICATION_ERR("Select DB error(%d) : %s", ret,
- sqlite3_errmsg(db));
+ NOTIFICATION_ERR("Failed to insert data app_id[%s] err[%d][%s]",
+ app_id, ret, sqlite3_errmsg(db));
if (db)
notification_db_close(&db);
uid_t uid = 0;
if (!_is_authorized()) {
- _E("You are not an authorized user!");
+ _E("Not an authorized user");
return -1;
}
ret = notification_setting_refresh_setting_table(uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- _E("notification setting table refresh fail.");
+ _E("Failed to refresh setting table");
return ret;
}
ret = notification_system_setting_init_system_setting_table(uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- _E("notification system setting table init fail.");
+ _E("Failed to init system setting table");
return ret;
}
return;
if (op_list == NULL) {
- NOTIFICATION_ERR("invalid data");
+ NOTIFICATION_ERR("Invalid parameter");
return;
}
noti_cb_info_new = (notification_cb_info_s *)malloc(sizeof(notification_cb_info_s));
if (noti_cb_info_new == NULL) {
- NOTIFICATION_ERR("malloc failed");
+ NOTIFICATION_ERR("Failed to alloc memory");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
noti = (notification_h)calloc(1, sizeof(struct _notification));
if (noti == NULL) {
- NOTIFICATION_ERR("NO MEMORY : noti == NULL");
+ NOTIFICATION_ERR("Failed to alloc memory");
return NULL;
}
return ret;
noti->priv_id = id;
- NOTIFICATION_DBG("from master:%d", id);
/* If priv_id is valid data, set priv_id */
if (priv_id != NULL)
noti_cb_info_new = (notification_cb_info_s *)malloc(sizeof(notification_cb_info_s));
if (noti_cb_info_new == NULL) {
- NOTIFICATION_ERR("malloc failed");
+ NOTIFICATION_ERR("Failed to alloc memory");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
ret = notification_ipc_request_insert(noti, &id);
if (ret == NOTIFICATION_ERROR_NONE) {
noti->priv_id = id;
- NOTIFICATION_DBG("from master:%d", id);
+ NOTIFICATION_INFO("Posted notification id[%d]", id);
} else {
g_list_foreach(file_list, __remove_private_file, NULL);
}
char *caller_app_id;
if (tag == NULL) {
- NOTIFICATION_ERR("Invalid parameter");
+ NOTIFICATION_ERR("Invalid tag");
set_last_result(NOTIFICATION_ERROR_INVALID_PARAMETER);
return NULL;
}
noti = (notification_h)calloc(1, sizeof(struct _notification));
if (noti == NULL) {
- NOTIFICATION_ERR("Failed to alloc a new notification");
+ NOTIFICATION_ERR("Failed to alloc memory");
set_last_result(NOTIFICATION_ERROR_OUT_OF_MEMORY);
return NULL;
}
} else {
info = (notification_event_cb_info_s *)malloc(sizeof(notification_cb_info_s));
if (info == NULL) {
- NOTIFICATION_ERR("malloc failed");
+ NOTIFICATION_ERR("Failed to alloc memory");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
info->priv_id = priv_id;
ret = notification_get_id(noti, NULL, &priv_id);
if (ret != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("failed notification_get_id");
+ NOTIFICATION_ERR("Failed to get priv id");
return ret;
}
char *text = NULL;
char *content = NULL;
const char *tag = NULL;
- notification_vibration_type_e vib_type = NOTIFICATION_VIBRATION_TYPE_NONE;
notification_get_pkgname(noti, &app_id);
notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text);
notification_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, &content);
notification_get_tag(noti, &tag);
- notification_get_vibration(noti, &vib_type, NULL);
- NOTIFICATION_DBG("client print_noti app_id = %s ", app_id);
- NOTIFICATION_DBG("client print_noti title = %s ", text);
- NOTIFICATION_DBG("client print_noti content = %s ", content);
- NOTIFICATION_DBG("client print_noti tag = %s ", tag);
- NOTIFICATION_DBG("client print_noti priv_id = %d ", noti->priv_id);
- NOTIFICATION_DBG("client print_noti vibration_path = %s ", noti->vibration_path);
- NOTIFICATION_DBG("client print_noti vibration_type = %d ", vib_type);
+ NOTIFICATION_DBG("Noti-info : app_id[%s] title[%s] content[%s] tag[%s] priv_id[%d]",
+ app_id, text, content, tag, noti->priv_id);
}
static inline char *_string_get(char *string)
const gchar *name_owner,
gpointer user_data)
{
- NOTIFICATION_DBG("provider_appeared_cb name : %s, name_owner : %s", name, name_owner);
+ NOTIFICATION_INFO("name [%s] name_owner[%s]", name, name_owner);
notification_reset_event_handler_list();
}
const gchar *name,
gpointer user_data)
{
- NOTIFICATION_DBG("provider_vanished_cb name : %s", name);
+ NOTIFICATION_INFO("name [%s]", name);
}
static int _dbus_init()
if (_gdbus_conn == NULL) {
if (error != NULL) {
- NOTIFICATION_ERR("Failed to get dbus [%s]", error->message);
+ NOTIFICATION_ERR("Failed to get dbus[%s]",
+ error->message);
g_error_free(error);
}
return NOTIFICATION_ERROR_IO_ERROR;
}
_bus_name = g_dbus_connection_get_unique_name(_gdbus_conn);
- NOTIFICATION_DBG("bus name : %s", _bus_name);
+ NOTIFICATION_INFO("Connected bus name[%s]", _bus_name);
notification_error_quark();
}
__provider_vanished_cb,
NULL,
NULL);
- NOTIFICATION_DBG("Watching data-provider-master is %s, watcher_id : %d",
+ NOTIFICATION_DBG("Watching data-provider-master is [%s] watcher_id [%d]",
provider_watcher_id ? "success" : "fail", provider_watcher_id);
}
ret = _dbus_init();
if (ret != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", ret);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", ret);
is_master_started = 0;
return is_master_started;
}
if (err || (result == NULL)) {
if (err) {
- NOTIFICATION_ERR("No reply. error = %s", err->message);
+ NOTIFICATION_ERR("No reply[%s]", err->message);
g_error_free(err);
}
- NOTIFICATION_ERR("is master ready fail");
+ NOTIFICATION_ERR("Failed to ready master");
is_master_started = 0;
} else {
g_variant_get(result, "(b)", &name_exist);
if (!name_exist) {
- NOTIFICATION_ERR("Name not exist %s", PROVIDER_BUS_NAME);
- NOTIFICATION_ERR("the master has been stopped");
+ NOTIFICATION_ERR("The master has been stopped, Not exsited name[%s]", PROVIDER_BUS_NAME);
is_master_started = 0;
} else {
- NOTIFICATION_DBG("the master has been started");
+ NOTIFICATION_DBG("The master has been started");
is_master_started = 1;
}
}
op_list = (notification_op *)malloc(sizeof(notification_op) * num_op);
if (op_list == NULL) {
- NOTIFICATION_ERR("malloc failed");
+ NOTIFICATION_ERR("Failed to alloc memory");
return NULL;
}
ret = strdup(string);
if (!ret)
- NOTIFICATION_ERR("Error: %s\n", strerror_r(errno, err_buf, sizeof(err_buf)));
+ NOTIFICATION_ERR("Failed to strdup[%s]",
+ strerror_r(errno, err_buf, sizeof(err_buf)));
return ret;
}
NOTIFICATION_DBG("add noti notify");
noti = notification_create(NOTIFICATION_TYPE_NOTI);
if (!noti) {
- NOTIFICATION_ERR("failed to create a notification");
+ NOTIFICATION_ERR("Failed to create notification handle");
return;
}
notification_ipc_make_noti_from_gvariant(noti, body);
_print_noti(noti);
if (noti->flags_for_property & NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT) {
- NOTIFICATION_ERR("disable changed callback %d", noti->flags_for_property);
+ NOTIFICATION_ERR("Disable changed callback[%d]", noti->flags_for_property);
/* Disable changed cb */
} else {
/* Enable changed cb */
noti = notification_create(NOTIFICATION_TYPE_NOTI);
if (!noti) {
- NOTIFICATION_ERR("failed to create a notification");
+ NOTIFICATION_ERR("Failed to create notification handle");
return;
}
g_variant_get(parameters, "(a(i)i)", &iter, &uid);
while (g_variant_iter_loop(iter, "(i)", &buf[idx])) {
- NOTIFICATION_DBG("delete_noti_multiple priv_id : %d", buf[idx]);
+ NOTIFICATION_DBG("priv id[%d]", buf[idx]);
idx++;
}
g_variant_iter_free(iter);
- NOTIFICATION_DBG("data num deleted:%d", idx);
+ NOTIFICATION_DBG("Deleted count[%d]", idx);
noti_op = _ipc_create_op(NOTIFICATION_OP_DELETE, idx, buf, idx, NULL);
if (noti_op == NULL) {
- NOTIFICATION_ERR("_ipc_create_op failed");
+ NOTIFICATION_ERR("Failed to create op");
return;
}
gpointer user_data)
{
NOTIFICATION_DBG("own_name : %s signal_name: %s",
- g_dbus_connection_get_unique_name(connection), signal_name);
+ g_dbus_connection_get_unique_name(connection),
+ signal_name);
if (g_strcmp0(signal_name, "add_noti_notify") == 0)
_add_noti_notify(parameters);
noti = notification_create(NOTIFICATION_TYPE_NOTI);
if (noti == NULL) {
- NOTIFICATION_ERR("failed to create a notification");
+ NOTIFICATION_ERR("Failed to create notification handle");
return;
}
g_variant_unref(coupled_body);
g_variant_unref(body);
if (ret != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("failed to make notification handle from gvariant");
+ NOTIFICATION_ERR("Failed to make notification handle from gvariant");
notification_free(noti);
return;
}
NULL,
NULL);
- NOTIFICATION_DBG("subscribe id : %d", id);
+ NOTIFICATION_DBG("subscribe id[%d]", id);
if (id == 0) {
ret = NOTIFICATION_ERROR_IO_ERROR;
- NOTIFICATION_ERR("Failed to subscribe _dbus_event_handler_signal");
+ NOTIFICATION_ERR("Failed to subscribe connection signal");
} else {
event_monitor_id = id;
}
if (id == 0) {
/* LCOV_EXCL_START */
ret = NOTIFICATION_ERROR_IO_ERROR;
- NOTIFICATION_ERR("Failed to _register_noti_dbus_interface");
+ NOTIFICATION_ERR("Failed to register dbus_interface");
/* LCOV_EXCL_STOP */
} else {
monitor_id = id;
cmd);
if (!msg) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("Can't allocate new method call");
+ NOTIFICATION_ERR("Failed to alloc new method call");
if (body)
g_variant_unref(body);
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
/* LCOV_EXCL_START */
ret = NOTIFICATION_ERROR_SERVICE_NOT_READY;
if (err != NULL) {
- NOTIFICATION_ERR("No reply. cmd = %s, error = %s", cmd, err->message);
+ NOTIFICATION_ERR("No reply. cmd[%s] err[%s]", cmd, err->message);
if (err->code == G_DBUS_ERROR_ACCESS_DENIED)
ret = NOTIFICATION_ERROR_PERMISSION_DENIED;
g_error_free(err);
else
ret = err->code;
- NOTIFICATION_ERR("_send_sync_noti cmd = %s, err code = %d", cmd, ret);
+ NOTIFICATION_ERR("Failed to send message[%s] err[%d]", cmd, ret);
g_error_free(err);
return ret;
}
- NOTIFICATION_DBG("_send_sync_noti done !!");
+ NOTIFICATION_DBG("Success to send sync message");
return NOTIFICATION_ERROR_NONE;
}
if (!reply) {
/* LCOV_EXCL_START */
if (err != NULL) {
- NOTIFICATION_ERR("No reply. error = %s", err->message);
+ NOTIFICATION_ERR("No reply[%s]", err->message);
g_error_free(err);
}
result = NOTIFICATION_ERROR_SERVICE_NOT_READY;
else
result = err->code;
- NOTIFICATION_ERR("_send_async_noti error %s", err->message);
+ NOTIFICATION_ERR("Failed to send message[%s]", err->message);
g_error_free(err);
/* LCOV_EXCL_STOP */
}
- NOTIFICATION_DBG("_send_async_noti done !![%d]", result);
-
+ NOTIFICATION_INFO("Async message callback result[%d]", result);
if (result == NOTIFICATION_ERROR_NONE) {
body = g_dbus_message_get_body(reply);
g_variant_get(body, "(i)", &priv_id);
cmd);
if (!msg) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("Can't allocate new method call");
+ NOTIFICATION_ERR("Failed to alloc new method call");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
/* LCOV_EXCL_STOP */
}
if (msg)
g_object_unref(msg);
- NOTIFICATION_DBG("_send_async_noti done !!");
+ NOTIFICATION_DBG("Success to send async message");
return NOTIFICATION_ERROR_NONE;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
body = notification_ipc_make_gvariant_from_noti(noti, false);
if (body == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("cannot make gvariant");
+ NOTIFICATION_ERR("Failed to make gvariant from notification handle");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
/* LCOV_EXCL_STOP */
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_insert done [priv_id : %d, result: %d]", id, result);
+ NOTIFICATION_DBG("priv_id[%d] result[%d]", id, result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
/* LCOV_EXCL_STOP */
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_update done [result: %d, priv_id :%d]", result, priv_id);
+ NOTIFICATION_DBG("priv_id[%d] result[%d]", priv_id, result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
/* LCOV_EXCL_STOP */
}
body = notification_ipc_make_gvariant_from_noti(noti, false);
if (body == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("cannot make gvariant");
+ NOTIFICATION_ERR("Failed to make gvariant from notification handle");
free(cb_item);
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
/* LCOV_EXCL_STOP */
}
result = _send_async_noti(body, cb_item, "update_noti");
- NOTIFICATION_DBG("notification_ipc_request_update_async done [result: %d]", result);
+ NOTIFICATION_DBG("Update async result[%d]", result);
if (result != NOTIFICATION_ERROR_NONE) {
/* LCOV_EXCL_START */
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_ERR("notification_ipc_request_refresh done [result: %d]", result);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_delete_single done [result: %d]", result);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (result == NOTIFICATION_ERROR_NONE) {
reply_body = g_dbus_message_get_body(reply);
g_variant_get(reply_body, "(i)", &num_deleted);
- NOTIFICATION_DBG("num deleted:%d", num_deleted);
+ NOTIFICATION_DBG("Deleted count[%d]", num_deleted);
}
if (reply)
g_object_unref(reply);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_load_noti_by_tag done [result: %d]", result);
+ NOTIFICATION_DBG("tag[%s] result[%d]", tag, result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_load_noti_by_priv_id done [result: %d]", result);
+ NOTIFICATION_DBG("priv id[%d], result[%d]", priv_id, result);
return result;
}
/* LCOV_EXCL_STOP */
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
g_variant_get(reply_body, "(i)", &re_count);
*count = re_count;
- NOTIFICATION_DBG("noti count [%d]", re_count);
+ NOTIFICATION_DBG("notification count[%d]", re_count);
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_get_count done [result: %d]", result);
+ NOTIFICATION_DBG("Count notification result[%d]", result);
return result;
}
/* LCOV_EXCL_STOP */
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_load_noti_grouping_list done [result: %d]", result);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_load_noti_detail_list done [result: %d]", result);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_get_setting_array done [result: %d]", result);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_get_setting_by_app_id done [result: %d]", result);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_load_system_setting done [result: %d]", result);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_update_setting done [result: %d]", result);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_update_system_setting done [result: %d]", result);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
body = notification_ipc_make_gvariant_from_noti(noti, false);
if (body == NULL) {
- NOTIFICATION_ERR("cannot make gvariant");
+ NOTIFICATION_ERR("Failed to make gvariant from notification handle");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_save_as_template [result: %d]", result);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_create_from_template done [result: %d]", result);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
result = _dbus_init();
if (result != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", result);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", result);
return result;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_request_create_from_package_template [result: %d]", result);
+ NOTIFICATION_DBG("result[%d]", result);
return result;
}
ret = _dbus_init();
if (ret != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", ret);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", ret);
return ret;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_get_noti_block_state done");
+ NOTIFICATION_DBG("result[%d]", ret);
return ret;
}
ret = _dbus_init();
if (ret != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", ret);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", ret);
return ret;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_send_event done [%d]", ret);
+ NOTIFICATION_DBG("result[%d]", ret);
return ret;
}
ret = _dbus_init();
if (ret != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", ret);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", ret);
return ret;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("notification_ipc_check_event_receiver done");
+ NOTIFICATION_DBG("result[%d]", ret);
return ret;
}
ret = _dbus_init();
if (ret != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("Can't init dbus %d", ret);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", ret);
return;
}
char *tag = NULL;
if (noti == NULL) {
- NOTIFICATION_ERR("invalid data noti NULL");
+ NOTIFICATION_ERR("Invalid noti NULL");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
if (variant == NULL) {
- NOTIFICATION_ERR("invalid data variant NULL");
+ NOTIFICATION_ERR("Invalid variant NULL");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
int lock_screen_content_level;
if (noti_setting == NULL) {
- NOTIFICATION_ERR("invalid data");
+ NOTIFICATION_ERR("Invalid setting handle");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
&dnd_end_min,
&lock_screen_content_level);
- NOTIFICATION_DBG("system setting #### %d, %d, %d, %d, [%d:%d] [%d:%d], %d",
+ NOTIFICATION_DBG("system setting %d, %d, %d, %d, [%d:%d] [%d:%d], %d",
do_not_disturb, visibility_class, dnd_schedule_enabled,
dnd_schedule_day, dnd_start_hour, dnd_start_min,
dnd_end_hour, dnd_end_min, lock_screen_content_level);
EXPORT_API int notification_ipc_make_setting_from_gvariant(struct notification_setting *noti_setting,
GVariant *variant)
{
- NOTIFICATION_DBG("notification_ipc_make_setting_from_gvariant !!!!");
char *pkgname;
char *app_id;
int allow_to_notify;
noti_setting->lock_screen_content_level = lock_screen_content_level;
noti_setting->app_disabled = app_disabled;
- NOTIFICATION_DBG("setting from variant %s, %s",
+ NOTIFICATION_DBG("setting->pkgname[%s] pkgname[%s]",
noti_setting->package_name, pkgname);
return NOTIFICATION_ERROR_NONE;
int value;
if (dnd_allow_exception == NULL) {
- NOTIFICATION_ERR("invalid data");
+ NOTIFICATION_ERR("Invalid data");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
if (reply)
g_object_unref(reply);
- NOTIFICATION_DBG("_send_service_register done = %s, result = %d", _bus_name, result);
noti_op = _ipc_create_op(NOTIFICATION_OP_SERVICE_READY, 1, NULL, 1, NULL);
if (noti_op != NULL) {
notification_call_changed_cb_for_uid(noti_op, 1, uid);
free(noti_op);
+ } else {
+ NOTIFICATION_ERR("Failed to create op");
}
+ NOTIFICATION_DBG("bus name[%s] result[%d]", _bus_name, result);
return result;
}
{
int uid = GPOINTER_TO_INT(user_data);
- NOTIFICATION_DBG("name appeared [%d] : %s", uid, name);
+ NOTIFICATION_DBG("uid[%d] name[%s]", uid, name);
is_master_started = 1;
_ipc_monitor_register(uid);
{
int uid = GPOINTER_TO_INT(user_data);
- NOTIFICATION_DBG("name vanished [%d] : %s", uid, name);
+ NOTIFICATION_DBG("uid[%d] name[%s]", uid, name);
is_master_started = 0;
}
/* LCOV_EXCL_STOP */
ret = _dbus_init();
if (ret != NOTIFICATION_ERROR_NONE) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("Can't init dbus %d", ret);
+ NOTIFICATION_ERR("Failed to init dbus connection[%d]", ret);
return ret;
/* LCOV_EXCL_STOP */
}
ret = _dbus_signal_init();
if (ret != NOTIFICATION_ERROR_NONE) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("Can't signal_init %d", ret);
+ NOTIFICATION_ERR("Failed to init signal[%d]", ret);
return ret;
/* LCOV_EXCL_STOP */
}
ret = _ipc_monitor_register(uid);
if (ret != NOTIFICATION_ERROR_NONE) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("Can't init ipc_monitor_register %d", ret);
+ NOTIFICATION_ERR("Failed to register service[%d]", ret);
return ret;
/* LCOV_EXCL_STOP */
}
/* LCOV_EXCL_START */
g_dbus_connection_signal_unsubscribe(_gdbus_conn, monitor_id);
monitor_id = 0;
- NOTIFICATION_ERR("watch on name fail");
+ NOTIFICATION_ERR("Failed to watch name");
return NOTIFICATION_ERROR_IO_ERROR;
/* LCOV_EXCL_STOP */
}
list = (notification_list_h) malloc(sizeof(struct _notification_list));
if (list == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("NO MEMORY");
+ NOTIFICATION_ERR("Failed to alloc memory");
return NULL;
/* LCOV_EXCL_STOP */
}
notification_list_h cur_list = NULL;
if (list == NULL) {
- NOTIFICATION_ERR("INVALID DATA : list == NULL");
+ NOTIFICATION_ERR("Invalid parameter");
set_last_result(NOTIFICATION_ERROR_INVALID_PARAMETER);
return NULL;
}
notification_list_h cur_list = NULL;
if (list == NULL) {
- NOTIFICATION_ERR("INVALID DATA : list == NULL");
+ NOTIFICATION_ERR("Invalid paramter");
set_last_result(NOTIFICATION_ERROR_INVALID_PARAMETER);
return 0;
}
notification_list_h cur_list = NULL;
if (noti == NULL) {
- NOTIFICATION_ERR("INVALID DATA : data == NULL");
+ NOTIFICATION_ERR("Invalid parameter");
set_last_result(NOTIFICATION_ERROR_INVALID_PARAMETER);
return NULL;
}
new_list = _notification_list_create();
if (new_list == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("NO MEMORY");
+ NOTIFICATION_ERR("Failed to alloc memory");
set_last_result(NOTIFICATION_ERROR_OUT_OF_MEMORY);
return NULL;
/* LCOV_EXCL_STOP */
cur_list = _notification_list_create();
if (cur_list == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("NO MEMORY");
+ NOTIFICATION_ERR("Failed to alloc memory");
set_last_result(NOTIFICATION_ERROR_OUT_OF_MEMORY);
return NULL;
/* LCOV_EXCL_STOP */
"WHERE caller_app_id = %Q AND priv_id = %d",
noti->caller_app_id, noti->priv_id);
if (query == NULL) {
- NOTIFICATION_ERR("fail to alloc query"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc query"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto err;
}
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
- NOTIFICATION_ERR("sqlite3_prepare_v2 failed [%d][%s]", ret,
- sqlite3_errmsg(db));
+ NOTIFICATION_ERR("Failed to sqlite3_prepare_v2 Failed [%d][%s]",
+ ret, sqlite3_errmsg(db));
ret = NOTIFICATION_ERROR_FROM_DB;
goto err;
}
"WHERE caller_app_id = %Q AND priv_id = %d",
app_id, priv_id);
if (query == NULL) {
- NOTIFICATION_ERR("fail to alloc query"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc query"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto err;
}
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
- NOTIFICATION_ERR("sqlite3_prepare_v2 failed [%d][%s]", ret,
+ NOTIFICATION_ERR("sqlite3_prepare_v2 Failed [%d][%s]", ret,
sqlite3_errmsg(db));
ret = NOTIFICATION_ERROR_FROM_DB;
goto err;
sqlite3_free(query);
if (ret != NOTIFICATION_ERROR_NONE)
- NOTIFICATION_ERR("failed to internal group ID:%d", ret);
+ NOTIFICATION_ERR("Failed to get internal group ID [%d]", ret);
return result;
}
if (count != -1 && internal_count >= count) {
NOTIFICATION_INFO
- ("internal count %d >= count %d",
+ ("internal count[%d] count[%d]",
internal_count, count);
break;
}
NULL,
&b);
if (ret != NOTIFICATION_ERROR_NONE || b == NULL) {
- NOTIFICATION_WARN("Can't get or no the excute option [%x]", ret);
+ NOTIFICATION_WARN("Failed to get or no the excute option [%x]", ret);
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
ret = app_control_create(&app_control);
if (ret != APP_CONTROL_ERROR_NONE) {
- NOTIFICATION_ERR("app_control_create failed [%x]", ret);
+ NOTIFICATION_ERR("Failed to create app_control [%x]", ret);
goto out;
}
ret = app_control_import_from_bundle(app_control, b);
if (ret != APP_CONTROL_ERROR_NONE) {
- NOTIFICATION_ERR("app_control_import_from_bundle failed [%x]", ret);
+ NOTIFICATION_ERR("Failed to import from bundle to app_control [%x]", ret);
goto out;
}
ret = app_control_get_app_id(app_control, &app_id);
if (ret != APP_CONTROL_ERROR_NONE || app_id == NULL) {
- NOTIFICATION_ERR("app_control_get_app_id failed [%x]", ret);
+ NOTIFICATION_ERR("Failed to get app id from app_control [%x]", ret);
goto out;
}
ret = noti_setting_service_get_setting_by_app_id(app_id, &setting_new, noti->uid);
if (ret != APP_CONTROL_ERROR_NONE || setting == NULL) {
- NOTIFICATION_ERR("noti_setting_service_get_setting_by_app_id failed [%x]", ret);
+ NOTIFICATION_ERR("Failed to get setting by app id[%s][%x]",
+ app_id, ret);
goto out;
}
err = notification_setting_get_allow_to_notify(setting, &allow_to_notify);
if (err != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("get_allow_to_notify failed [%x]", err);
+ NOTIFICATION_ERR("Failed to get allow_to_notify [%x]", err);
goto out;
}
err = notification_setting_get_app_disabled(setting, &app_disabled);
if (err != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("get_app_disabled failed [%x]", err);
+ NOTIFICATION_ERR("Failed to get app_disabled [%x]", err);
goto out;
}
notification_system_setting_h system_setting = NULL;
if (noti == NULL) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+ NOTIFICATION_ERR("Invalid notification handle");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
/* Get system setting */
err = noti_system_setting_load_system_setting(&system_setting, noti->uid);
if (err != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("_load_system_setting failed [%d]", err);
+ NOTIFICATION_ERR("Failed to load system setting [%d]", err);
goto out;
}
err = notification_system_setting_get_do_not_disturb(system_setting,
&do_not_disturb);
if (err != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("_get_do_not_disturb failed [%d]", err);
+ NOTIFICATION_ERR("Failed to get do_not_disturb [%d]", err);
goto out;
}
/* Check exception option of the caller app_id */
err = noti_setting_service_get_setting_by_app_id(noti->caller_app_id, &setting, noti->uid);
if (err != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("_get_setting_by_app_id failed [%d]", err);
+ NOTIFICATION_ERR("Failed to get setting by app_id [%d]", err);
goto out;
}
err = notification_setting_get_do_not_disturb_except(setting, &do_not_disturb_exception);
if (err != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("notification_setting_get_allow_to_notify failed [%d]", err);
+ NOTIFICATION_ERR("Failed to get do_not_disturb_exception [%d]", err);
goto out;
}
err = noti_setting_service_get_setting_by_app_id(app_id, &setting, uid);
if (err != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_WARN("Can't get the setting for %s [%x]", app_id, err);
+ NOTIFICATION_WARN("Failed get the setting for [%s] [%x]", app_id, err);
goto out;
}
err = notification_setting_get_pop_up_notification(setting, &ret);
if (err != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("notification_setting_get_pop_up_notification failed");
+ NOTIFICATION_ERR("Failed to get pop_up_notification [%d]", err);
goto out;
}
char *query = NULL;
if (noti == NULL) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+ NOTIFICATION_ERR("Invalid notification handle");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
if (_is_allowed_to_notify(noti) == false) {
- NOTIFICATION_DBG("[%s] is not allowed to notify", noti->caller_app_id);
+ NOTIFICATION_ERR("[%s] is not allowed to notify", noti->caller_app_id);
return NOTIFICATION_ERROR_PERMISSION_DENIED;
}
if (_handle_do_not_disturb_option(noti) != NOTIFICATION_ERROR_NONE)
- NOTIFICATION_WARN("_handle_do_not_disturb_option failed");
+ NOTIFICATION_WARN("Failed to handle do_not_disturb");
if (_is_pop_up_notification((const char *)noti->caller_app_id, noti->uid) == false) {
noti->display_applist = (noti->display_applist & (~NOTIFICATION_DISPLAY_APP_ACTIVE));
query = sqlite3_mprintf("INSERT INTO noti_list (%s) VALUES (%s)",
NOTI_LIST_DB_ATTRIBUTES_INSERT, NOTI_LIST_INSERT_VALUES);
if (query == NULL) {
- NOTIFICATION_ERR("sqlite3_mprintf failed");
+ NOTIFICATION_ERR("sqlite3_mprintf Failed");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto err;
}
ret = sqlite3_prepare_v2(db, query, -1, &stmt, NULL);
if (ret != SQLITE_OK) {
- NOTIFICATION_ERR("sqlite3_prepare_v2 failed [%d][%s]", ret,
+ NOTIFICATION_ERR("sqlite3_prepare_v2 Failed [%d][%s]", ret,
sqlite3_errmsg(db));
ret = NOTIFICATION_ERROR_FROM_DB;
goto err;
char *query_where = NULL;
if (priv_id < 0 || noti == NULL) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+ NOTIFICATION_ERR("Invalid parameter");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
char *query_where;
if (tag == NULL || noti == NULL) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+ NOTIFICATION_ERR("Invalid paramter");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
char *query = NULL;
if (noti == NULL) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+ NOTIFICATION_ERR("Invalid parameter");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
}
if (_handle_do_not_disturb_option(noti) != NOTIFICATION_ERROR_NONE)
- NOTIFICATION_WARN("_handle_do_not_disturb_option failed");
+ NOTIFICATION_WARN("Failed to handle do_not_disturb");
if (_is_pop_up_notification((const char *)noti->caller_app_id, noti->uid) == false) {
noti->display_applist = (noti->display_applist & (~NOTIFICATION_DISPLAY_APP_ACTIVE));
/* Check private ID is exist */
ret = _notification_noti_check_priv_id(noti, db);
if (ret != NOTIFICATION_ERROR_ALREADY_EXIST_ID) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_NOT_EXIST_ID");
+ NOTIFICATION_ERR("The ID is not existed");
ret = NOTIFICATION_ERROR_NOT_EXIST_ID;
goto err;
}
ret = sqlite3_prepare_v2(db, query, -1, &stmt, NULL);
if (ret != SQLITE_OK) {
- NOTIFICATION_ERR("sqlite3_prepare_v2 failed [%d][%s]", ret,
+ NOTIFICATION_ERR("sqlite3_prepare_v2 Failed [%d][%s]", ret,
sqlite3_errmsg(db));
ret = NOTIFICATION_ERROR_FROM_DB;
goto err;
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
- NOTIFICATION_ERR("Select DB error(%d) : %s", ret,
- sqlite3_errmsg(db));
+ NOTIFICATION_ERR("Failed to sqlite3_prepare_V2 [%d][%s]",
+ ret, sqlite3_errmsg(db));
ret = NOTIFICATION_ERROR_FROM_DB;
goto err;
if (tmp) {
*list_deleted_rowid = tmp;
} else {
- NOTIFICATION_ERR("Heap: %s\n", strerror_r(errno, err_buf, sizeof(err_buf)));
+ NOTIFICATION_ERR("Failed to realloc memory [%s]", strerror_r(errno, err_buf, sizeof(err_buf)));
/*!
* \TODO
* How can I handle this?
ret = sqlite3_prepare_v2(db, query, -1, &stmt, NULL);
if (ret != SQLITE_OK) {
- NOTIFICATION_ERR("Select DB error(%d) : %s", ret,
- sqlite3_errmsg(db));
+ NOTIFICATION_ERR("Failed to sqlite3_prepare_v2[%d][%s]",
+ ret, sqlite3_errmsg(db));
ret = NOTIFICATION_ERROR_FROM_DB;
goto err;
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
- NOTIFICATION_ERR("sqlite3_prepare_v2 failed [%d][%s]", ret,
- sqlite3_errmsg(db));
+ NOTIFICATION_ERR("Failed to sqlite3_prepare_v2[%d][%s]",
+ ret, sqlite3_errmsg(db));
goto err;
}
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
- NOTIFICATION_ERR("sqlite3_prepare_v2 failed [%d][%s]", ret,
- sqlite3_errmsg(db));
+ NOTIFICATION_ERR("Failed to sqlite3_prepare_v2[%d][%s]",
+ ret, sqlite3_errmsg(db));
ret = NOTIFICATION_ERROR_FROM_DB;
goto err;
}
ret = sqlite3_prepare_v2(db, query, -1, &stmt, NULL);
if (ret != SQLITE_OK) {
- NOTIFICATION_ERR("sqlite3_prepare_v2 failed [%d][%s]", ret,
- sqlite3_errmsg(db));
+ NOTIFICATION_ERR("Failed to sqlite3_prepare_v2[%d][%s]",
+ ret, sqlite3_errmsg(db));
ret = NOTIFICATION_ERROR_FROM_DB;
goto err;
}
ret = _get_notification(query_where, noti);
if (ret != NOTIFICATION_ERROR_NONE)
- NOTIFICATION_ERR("_get_notification failed, %d", ret);
+ NOTIFICATION_ERR("Failed to get notification [%d]", ret);
if (query_where)
sqlite3_free(query_where);
info = calloc(1, sizeof(struct ongoing_info_s));
if (info == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("Out of memory");
+ NOTIFICATION_ERR("Failed to alloc memory");
return;
/* LCOV_EXCL_STOP */
}
if (app_id == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("app_id is null");
+ NOTIFICATION_ERR("app_id is NULL");
free(info);
return;
/* LCOV_EXCL_STOP */
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
if (conn == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("g_bus_get_sync() failed: %s", err->message);
+ NOTIFICATION_ERR("Failed to connect to the D-BUS Daemon[%s]",
+ err->message);
ret = NOTIFICATION_ERROR_FROM_DBUS;
goto end;
/* LCOV_EXCL_STOP */
param,
&err) == FALSE) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("g_dbus_connection_emit_signal() failed: %s",
+ NOTIFICATION_ERR("Failed to emit gdbus signal[%s]",
err->message);
ret = NOTIFICATION_ERROR_FROM_DBUS;
goto end;
if (g_dbus_connection_flush_sync(conn, NULL, &err) == FALSE) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("g_dbus_connection_flush_sync() failed: %s",
+ NOTIFICATION_ERR("Failed to flush connection sync[%s]",
err->message);
ret = NOTIFICATION_ERROR_FROM_DBUS;
goto end;
NULL);
if (od.subscribe_id == 0) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("g_dbus_connection_signal_subscribe() failed");
+ NOTIFICATION_ERR("Failed to subscribe signal");
g_object_unref(od.conn);
return NOTIFICATION_ERROR_FROM_DBUS;
/* LCOV_EXCL_STOP */
ret = __send_ongoing_update_signal(MEMBER_PROGRESS, param);
if (ret != NOTIFICATION_ERROR_NONE) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("notification_ongoing_update_progress failed %d",
- ret);
+ NOTIFICATION_ERR("Failed to update progress[%d]", ret);
return ret;
/* LCOV_EXCL_STOP */
}
ret = __send_ongoing_update_signal(MEMBER_SIZE, param);
if (ret != NOTIFICATION_ERROR_NONE) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("notification_ongoing_update_size failed %d",
- ret);
+ NOTIFICATION_ERR("Failed to update size[%d]", ret);
return ret;
/* LCOV_EXCL_STOP */
}
ret = __send_ongoing_update_signal(MEMBER_CONTENT, param);
if (ret != NOTIFICATION_ERROR_NONE) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("notification_ongoing_update_content failed %d",
+ NOTIFICATION_ERR("Failed to update content[%d]",
ret);
return ret;
/* LCOV_EXCL_STOP */
EXPORT_API int notification_setting_get_setting_array_for_uid(notification_setting_h *setting_array, int *count, uid_t uid)
{
if (setting_array == NULL || count == NULL) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+ NOTIFICATION_ERR("Invalid parameter");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
EXPORT_API int notification_setting_get_setting_by_appid_for_uid(const char *app_id, notification_setting_h *setting, uid_t uid)
{
if (app_id == NULL || setting == NULL) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+ NOTIFICATION_ERR("Invalid parameter");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
sql_ret = sqlite3_step(stmt);
if (sql_ret == SQLITE_DONE) {
- NOTIFICATION_INFO("no matched [%s] from package_name [%s], [%d]",
+ NOTIFICATION_INFO("No matched [%s] from package_name [%s], [%d]",
app_id, package_name, sql_ret);
err = false;
goto out;
ret = pkgmgrinfo_appinfo_get_appid(handle, &app_id);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- NOTIFICATION_ERR("pkgmgrinfo_appinfo_get_appid failed [%d]",
+ NOTIFICATION_ERR("Failed to get appid from pkgmgrinfo [%d]",
ret);
err = false;
goto out;
ret = pkgmgrinfo_appinfo_get_pkgname(handle, &package_name);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- NOTIFICATION_ERR("pkgmgrinfo_appinfo_get_pkgname failed [%d]",
+ NOTIFICATION_ERR("Failed to get pkgname from pkgmgrinfo[%d]",
ret);
goto out;
}
goto out;
}
- NOTIFICATION_INFO("uid %d package_name %s [%s] will be inserted",
- info->uid, package_name, app_id);
-
query = sqlite3_mprintf("INSERT INTO %s (uid, package_name, app_id) "
"VALUES (%d, %Q, %Q) ",
NOTIFICATION_SETTING_DB_TABLE,
ret = notification_db_exec(db, query, NULL);
if (ret != NOTIFICATION_ERROR_NONE)
err = false;
+ else
+ NOTIFICATION_INFO("uid [%d] package_name [%s] appid [%s] is inserted",
+ info->uid, package_name, app_id);
out:
if (query)
pkgmgr_ret = pkgmgrinfo_pkginfo_get_pkgname(package_info, &package_name);
if (pkgmgr_ret != PACKAGE_MANAGER_ERROR_NONE) {
- NOTIFICATION_ERR("package_info_get_package failed [%d]", pkgmgr_ret);
+ NOTIFICATION_ERR("Failed to get pkgname from pkgmgrinfo[%d]", pkgmgr_ret);
err = false;
goto out;
}
pkgmgr_ret = pkgmgrinfo_appinfo_filter_create(&handle);
if (pkgmgr_ret != PMINFO_R_OK) {
- NOTIFICATION_ERR("pkgmgrinfo_appinfo_filter_create failed [%d]", pkgmgr_ret);
+ NOTIFICATION_ERR("Failed to create appinofo[%d]",
+ pkgmgr_ret);
err = false;
goto out;
}
pkgmgr_ret = pkgmgrinfo_appinfo_filter_add_string(handle, PMINFO_APPINFO_PROP_APP_PACKAGE, package_name);
if (pkgmgr_ret != PMINFO_R_OK) {
- NOTIFICATION_ERR("pkgmgrinfo_appinfo_filter_add_string failed [%d]", pkgmgr_ret);
+ NOTIFICATION_ERR("Failed to add string to appinfo[%d]", pkgmgr_ret);
err = false;
goto out;
}
pkgmgr_ret = pkgmgrinfo_appinfo_usr_filter_foreach_appinfo(handle, _foreach_app_info_callback, info, info->uid);
if (pkgmgr_ret != PMINFO_R_OK) {
- NOTIFICATION_ERR("pkgmgrinfo_pkginfo_filter_foreach_appinfo failed [%d]", pkgmgr_ret);
+ NOTIFICATION_ERR("Failed to iterate appinfo[%d]", pkgmgr_ret);
err = false;
goto out;
}
pkgmgr_ret = pkgmgrinfo_pkginfo_filter_create(&handle);
if (pkgmgr_ret != PMINFO_R_OK) {
- NOTIFICATION_ERR("pkgmgrinfo_pkginfo_filter_create failed [%d]", pkgmgr_ret);
+ NOTIFICATION_ERR("Failed to create pkginfo_filter[%d]", pkgmgr_ret);
err = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
pkgmgr_ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_PRIVILEGE, NOTIFICATION_PRIVILEGE);
if (pkgmgr_ret != PMINFO_R_OK) {
- NOTIFICATION_ERR("pkgmgrinfo_pkginfo_filter_add_string failed [%d]", pkgmgr_ret);
+ NOTIFICATION_ERR("Failed to add string to pkginfo_filter[%d]", pkgmgr_ret);
err = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
pkgmgr_ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_ID, package_name);
if (pkgmgr_ret != PMINFO_R_OK) {
- NOTIFICATION_ERR("pkgmgrinfo_pkginfo_filter_add_string failed [%d]", pkgmgr_ret);
+ NOTIFICATION_ERR("Failed to add string to pkginfo_filter[%d]", pkgmgr_ret);
err = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
info.uid = uid;
pkgmgr_ret = pkgmgrinfo_pkginfo_usr_filter_foreach_pkginfo(handle, _foreach_package_info_callback, &info, uid);
if (pkgmgr_ret != PMINFO_R_OK) {
- NOTIFICATION_ERR("pkgmgrinfo_pkginfo_usr_filter_foreach_pkginfo failed [%d]", pkgmgr_ret);
+ NOTIFICATION_ERR("Failed to iterate pkginfo[%d]", pkgmgr_ret);
err = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
package_name);
if (query == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("fail to alloc query");
+ NOTIFICATION_ERR("Failed to alloc query");
err = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
/* LCOV_EXCL_STOP */
pkgmgrinfo_pkginfo_filter_h filter = NULL;
setting_local_info info;
- NOTIFICATION_INFO("refresh setting table [%d]", uid);
+ NOTIFICATION_INFO("Refresh setting table [%d]", uid);
db = notification_db_open(DBPATH);
if (!db)
pkgmgr_ret = pkgmgrinfo_pkginfo_filter_create(&filter);
if (pkgmgr_ret != PMINFO_R_OK) {
- NOTIFICATION_ERR("pkgmgrinfo_pkginfo_filter_create failed [%d]", pkgmgr_ret);
+ NOTIFICATION_ERR("Failed to create pkginfo_filter[%d]", pkgmgr_ret);
err = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
pkgmgr_ret = pkgmgrinfo_pkginfo_filter_add_string(filter, PMINFO_PKGINFO_PROP_PACKAGE_PRIVILEGE, NOTIFICATION_PRIVILEGE);
if (pkgmgr_ret != PMINFO_R_OK) {
- NOTIFICATION_ERR("pkgmgrinfo_pkginfo_filter_add_string failed [%d]", pkgmgr_ret);
+ NOTIFICATION_ERR("Failed to add string to pkginfo_filter[%d]", pkgmgr_ret);
err = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
info.uid = uid;
pkgmgr_ret = pkgmgrinfo_pkginfo_usr_filter_foreach_pkginfo(filter, _foreach_package_info_callback, &info, uid);
if (pkgmgr_ret != PMINFO_R_OK) {
- NOTIFICATION_ERR("pkgmgrinfo_pkginfo_usr_filter_foreach_pkginfo failed [%d]", pkgmgr_ret);
+ NOTIFICATION_ERR("Failed to foreach pkginfo[%d]", pkgmgr_ret);
err = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
dnd_allow_exception_data = (dnd_allow_exception_h)list->data;
*value = dnd_allow_exception_data->value;
} else {
- NOTIFICATION_ERR("Invalid parameter - type");
+ NOTIFICATION_ERR("Invalid type");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
noti_dnd_cb_list = (GList *)g_hash_table_lookup(_noti_dnd_cb_hash, GUINT_TO_POINTER(uid));
if (noti_dnd_cb_list == NULL) {
- NOTIFICATION_ERR("Invalide data");
+ NOTIFICATION_ERR("Invalid data");
return;
}
return NOTIFICATION_ERROR_INVALID_PARAMETER;
if (notification_ipc_monitor_init(uid) != NOTIFICATION_ERROR_NONE) {
- NOTIFICATION_ERR("notification_ipc_monitor_init error");
+ NOTIFICATION_ERR("Failed to init monitor");
return NOTIFICATION_ERROR_IO_ERROR;
}
NOTIFICATION_SYSTEM_SETTING_DB_TABLE, uid);
if (query == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("fail to alloc query");
+ NOTIFICATION_ERR("Failed to alloc query");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
/* LCOV_EXCL_STOP */
}
sql_ret = sqlite3_step(stmt);
if (sql_ret == SQLITE_DONE) {
- NOTIFICATION_INFO("no matched uid found[%d][%d]", uid, sql_ret);
+ NOTIFICATION_INFO("No matched uid[%d] err[%d]", uid, sql_ret);
err = false;
goto out;
}
return get_last_result(); /* LCOV_EXCL_LINE */
if (_is_uid_in_system_setting_table(db, uid) == true) {
- NOTIFICATION_DBG("table is already initialized.");
+ NOTIFICATION_INFO("Setting table is already initialized.");
goto out;
}
uid);
if (query_dnd_allow_exception == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("fail to alloc query");
+ NOTIFICATION_ERR("Failed to alloc query");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
/* LCOV_EXCL_STOP */
if (ret != NOTIFICATION_ERROR_NONE)
goto out;
- NOTIFICATION_DBG("initialization is success.");
+ NOTIFICATION_DBG("Initialization is success.");
out:
if (query_system_setting)
if (sLen) {
*buf = (char *)malloc(sLen + 1);
if (*buf == NULL) {
- NOTIFICATION_ERR("malloc is failed"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc memory"); /* LCOV_EXCL_LINE */
goto out;
}
memset(*buf, 0, sLen + 1);
notification_setting_h result_setting_array = NULL;
if (app_id == NULL || setting == NULL) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Invalid parameter"); /* LCOV_EXCL_LINE */
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
NOTIFICATION_SETTING_DB_ATTRIBUTES, NOTIFICATION_SETTING_DB_TABLE,
app_id, uid);
if (query == NULL) {
- NOTIFICATION_ERR("fail to alloc query"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc query"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
goto out;
}
- NOTIFICATION_DBG("row_count [%d] column_count [%d]", row_count, column_count);
+ NOTIFICATION_DBG("row_count[%d] column_count[%d]", row_count, column_count);
row_count = 1;
if (!(result_setting_array = (struct notification_setting *)malloc(sizeof(struct notification_setting) * row_count))) {
- NOTIFICATION_ERR("malloc failed..."); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc memory"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
"app_id ", NOTIFICATION_SETTING_DB_ATTRIBUTES,
NOTIFICATION_SETTING_DB_TABLE, uid, 0);
if (query == NULL) {
- NOTIFICATION_ERR("fail to alloc query"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc query"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
sql_ret = sqlite3_get_table(db, query, &query_result, &row_count, &column_count, NULL);
if (sql_ret != SQLITE_OK && sql_ret != -1) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_FROM_DB failed [%d][%s]",
+ NOTIFICATION_ERR("Failed to get db table [%d][%s]",
sql_ret, query); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
if (!row_count) {
- NOTIFICATION_DBG("No setting found..."); /* LCOV_EXCL_LINE */
+ NOTIFICATION_DBG("No setting found"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_NOT_EXIST_ID;
goto out;
}
- NOTIFICATION_DBG("row_count [%d] column_count [%d]", row_count, column_count);
+ NOTIFICATION_DBG("row_count[%d] column_count[%d]", row_count, column_count);
if (!(result_setting_array = (struct notification_setting *)malloc(sizeof(struct notification_setting) * row_count))) {
- NOTIFICATION_ERR("malloc failed..."); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc memory"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
notification_system_setting_h result_system_setting = NULL;
if (system_setting == NULL) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Invalid parameter"); /* LCOV_EXCL_LINE */
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
NOTIFICATION_SYSTEM_SETTING_DB_ATTRIBUTES,
NOTIFICATION_SYSTEM_SETTING_DB_TABLE, uid);
if (query == NULL) {
- NOTIFICATION_ERR("fail to alloc query"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc query"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
sql_ret = sqlite3_get_table(db, query, &query_result, &row_count, &column_count, NULL);
if (sql_ret != SQLITE_OK && sql_ret != -1) {
- NOTIFICATION_ERR("sqlite3_get_table failed [%d][%s]", sql_ret, query); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to get db table [%d][%s]", sql_ret, query); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
result_system_setting = (struct notification_system_setting *)malloc(sizeof(struct notification_system_setting));
if (result_system_setting == NULL) {
- NOTIFICATION_ERR("malloc failed..."); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc memory"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
/* no system setting record. allow everyting */
if (!row_count) {
- NOTIFICATION_DBG("No setting found..."); /* LCOV_EXCL_LINE */
+ NOTIFICATION_DBG("No setting found"); /* LCOV_EXCL_LINE */
result_system_setting->do_not_disturb = 0;
result_system_setting->visibility_class = 0;
result_system_setting->dnd_schedule_enabled = 0;
int ret = NOTIFICATION_ERROR_NONE;
if (package_name == NULL || app_id == NULL) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Invalid paramter"); /* LCOV_EXCL_LINE */
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
NOTIFICATION_SYSTEM_SETTING_DB_TABLE,
do_not_disturb, uid);
if (query == NULL) {
- NOTIFICATION_ERR("fail to alloc query"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc query"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
ret = sqlite3_get_table(db, query, &query_result, &row_count, &column_count, NULL);
if (ret != SQLITE_OK && ret != -1) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_FROM_DB failed [%d][%s]", ret, query); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to get DB table [%d][%s]", ret, query); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
}
if (!(result_uids = (uid_t *)malloc(sizeof(int) * row_count))) {
- NOTIFICATION_ERR("Memory allocation fail");
+ NOTIFICATION_ERR("Failed to alloc memory");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
NOTIFICATION_SETTING_DB_TABLE, app_id,
uid, tzplatform_getuid(TZ_SYS_GLOBALAPP_USER));
if (query_setting == NULL) {
- NOTIFICATION_ERR("fail to alloc query");
+ NOTIFICATION_ERR("Failed to alloc memory");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
"WHERE uid = %d",
NOTIFICATION_SYSTEM_SETTING_DB_TABLE, uid);
if (query_system_setting == NULL) {
- NOTIFICATION_ERR("fail to alloc query");
+ NOTIFICATION_ERR("Failed to alloc memory");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
sql_ret = sqlite3_get_table(db, query_setting, &query_setting_result, &row_count, &col_count, NULL);
if (sql_ret != SQLITE_OK && sql_ret != -1) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_FROM_DB failed [%d][%s]", sql_ret, query_setting);
+ NOTIFICATION_ERR("Failed to get DB table [%d][%s]", sql_ret, query_setting);
ret = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
sql_ret = sqlite3_get_table(db, query_system_setting, &query_system_setting_result, &row_count, &col_count, NULL);
if (sql_ret != SQLITE_OK && sql_ret != -1) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_FROM_DB failed [%d][%s]", sql_ret, query_setting);
+ NOTIFICATION_ERR("Failed to get DB table [%d][%s]", sql_ret, query_setting);
ret = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
dnd_allow_exception_h dnd_allow_exception_data = NULL;
if (dnd_allow_exception == NULL) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_INVALID_PARAMETER"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Invalid paramter"); /* LCOV_EXCL_LINE */
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
query = sqlite3_mprintf("SELECT type, value FROM %s WHERE uid = %d",
NOTIFICATION_DND_ALLOW_EXCEPTION, uid);
if (query == NULL) {
- NOTIFICATION_ERR("fail to alloc query"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc memory"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
sql_ret = sqlite3_get_table(db, query, &query_result, &row_count, &column_count, NULL);
if (sql_ret != SQLITE_OK && sql_ret != -1) {
- NOTIFICATION_ERR("sqlite3_get_table failed [%d][%s]", sql_ret, query); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to get DB table [%d][%s]", sql_ret, query); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
if (!row_count) {
- NOTIFICATION_DBG("No setting found..."); /* LCOV_EXCL_LINE */
+ NOTIFICATION_DBG("No setting found"); /* LCOV_EXCL_LINE */
goto out;
} else {
dnd_allow_exception_data = (dnd_allow_exception_h)malloc(sizeof(struct notification_system_setting_dnd_allow_exception) * row_count);
if (dnd_allow_exception_data == NULL) {
- NOTIFICATION_ERR("failed to malloc");
+ NOTIFICATION_ERR("Failed to alloc memory");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
NOTIFICATION_DND_ALLOW_EXCEPTION,
uid, type, value);
if (query == NULL) {
- NOTIFICATION_ERR("fail to alloc query"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc memory"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
query = sqlite3_mprintf("SELECT do_not_disturb FROM %s WHERE uid = %d",
NOTIFICATION_SYSTEM_SETTING_DB_TABLE, uid);
if (query == NULL) {
- NOTIFICATION_ERR("fail to alloc query");
+ NOTIFICATION_ERR("Failed to alloc memory");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
ret = sqlite3_get_table(db, query, &query_result, &row_count, &col_count, NULL);
if (ret != SQLITE_OK && ret != -1) {
- NOTIFICATION_ERR("NOTIFICATION_ERROR_FROM_DB failed [%d][%s]", ret, query);
+ NOTIFICATION_ERR("Failed to get DB table [%d][%s]", ret, query);
ret = NOTIFICATION_ERROR_FROM_DB;
goto out;
}
NOTIFICATION_SETTING_DB_TABLE, value,
app_id, uid);
if (query == NULL) {
- NOTIFICATION_ERR("fail to alloc query"); /* LCOV_EXCL_LINE */
+ NOTIFICATION_ERR("Failed to alloc memory"); /* LCOV_EXCL_LINE */
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
}
noti_dir = g_file_new_for_path(dir);
if (g_file_make_directory(noti_dir, NULL, &g_err) == false) {
if (g_err) {
- NOTIFICATION_ERR("make_directory fail (%s)",
+ NOTIFICATION_ERR("Failed to make sharing dir[%s]",
g_err->message);
g_error_free(g_err);
}
dst = g_file_new_for_path(dst_path);
if (dst == NULL) {
- NOTIFICATION_ERR("des is wrong path [%s]", dst_path);
+ NOTIFICATION_ERR("dst path is wrong [%s]", dst_path);
ret = NOTIFICATION_ERROR_IO_ERROR;
goto out;
}
if (g_file_query_exists(dst, NULL) == true) {
ret = NOTIFICATION_ERROR_ALREADY_EXIST_ID;
- NOTIFICATION_INFO("dst_path existed [%s]", dst_path);
+ NOTIFICATION_INFO("dst path existed [%s]", dst_path);
goto out;
}
src = g_file_new_for_path(src_path);
if (src == NULL) {
- NOTIFICATION_ERR("src is wrong path [%s]", src_path);
+ NOTIFICATION_ERR("src path is wrong [%s]", src_path);
ret = NOTIFICATION_ERROR_IO_ERROR;
goto out;
}
ut.modtime = time(NULL);
if (g_utime(dst_path, &ut) != 0)
- NOTIFICATION_DBG("failed to set g_utime %d ", errno);
+ NOTIFICATION_DBG("Failed to set g_utime %d ", errno);
out:
if (src)
__free_file_info(file_info));
if (stat(dst_path, &stat_buf) != 0)
- NOTIFICATION_ERR("fail to get stat info");
+ NOTIFICATION_ERR("Failed to get stat info");
file_info->modification_time = stat_buf.st_mtime;
*new_file_list = g_list_append(*new_file_list, file_info);
file_info = (sharing_file_info_s *)tmp->data;
if (stat(file_info->dst_path, &stat_buf) != 0)
- NOTIFICATION_ERR("fail to get stat info");
+ NOTIFICATION_ERR("Failed to get stat info");
if (file_info->modification_time != stat_buf.st_mtime) {
dup_file_info = __dup_file_info(file_info);
path = noti->priv_vibration_path;
if (path == NULL) {
- NOTIFICATION_DBG("failed to find priv path");
+ NOTIFICATION_DBG("No private resource");
return NULL;
}
index = __last_index_of(path, "/");
if (index == NULL) {
- NOTIFICATION_ERR("failed to find directory separator");
+ NOTIFICATION_ERR("Failed to find directory separator");
return NULL;
}
if (target_app == NULL) {
app_id = notification_get_app_id_by_pid((int)pid);
if (app_id == NULL) {
- NOTIFICATION_ERR("out of memory");
+ NOTIFICATION_ERR("Failed to get app id by pid");
return;
}
target_info = (target_app_info_s *)calloc(1, sizeof(target_app_info_s));
if (target_info == NULL) {
- NOTIFICATION_ERR("out of memory");
+ NOTIFICATION_ERR("Failed to alloc memory");
free(app_id);
return;
}
target_info->app_id = app_id;
target_info->dbus_sender_name = strdup(sender);
if (target_info->dbus_sender_name == NULL) {
- NOTIFICATION_ERR("out of memory");
+ NOTIFICATION_ERR("Failed to alloc memory");
free(target_info);
free(app_id);
return;
size = smack_new_label_from_path(file_path, XATTR_NAME_SMACK,
TRUE, &smack_label);
if (size <= 0) {
- NOTIFICATION_ERR("fail to get smack info");
+ NOTIFICATION_ERR("Failed to get smack info");
return NULL;
}
if (dst_path == NULL && __is_private_file(smack_label, pkg_id)) {
dst_path = strdup(file_path);
if (dst_path == NULL)
- NOTIFICATION_ERR("out of memory");
+ NOTIFICATION_ERR("Failed to strdup");
}
free(smack_label);
ret = security_manager_private_sharing_req_new(&handle);
if (ret != SECURITY_MANAGER_SUCCESS) {
ret = NOTIFICATION_ERROR_IO_ERROR;
- NOTIFICATION_ERR("Failed to create private sharing request handle");
+ NOTIFICATION_ERR("Failed to create private sharing request handle[%d]", ret);
goto out;
}
ret = security_manager_private_sharing_req_set_owner_appid(handle,
req_data->app_id);
if (ret != SECURITY_MANAGER_SUCCESS) {
- NOTIFICATION_ERR("Failed to set owner appid(%s) %d",
+ NOTIFICATION_ERR("Failed to set owner appid[%s][%d]",
req_data->app_id, ret);
ret = NOTIFICATION_ERROR_IO_ERROR;
goto out;
ret = security_manager_private_sharing_req_add_paths(handle,
(const char **)path_array, len);
if (ret != SECURITY_MANAGER_SUCCESS) {
- NOTIFICATION_ERR("Failed to add paths %d", ret);
+ NOTIFICATION_ERR("Failed to add paths [%d]", ret);
ret = NOTIFICATION_ERROR_IO_ERROR;
goto out;
}
ret = security_manager_private_sharing_req_set_target_appid(
handle, (const char *)iter->data);
if (ret != SECURITY_MANAGER_SUCCESS) {
- NOTIFICATION_ERR("Failed to set target appid(%s)",
+ NOTIFICATION_ERR("Failed to set target appid [%s]",
(const char *)iter->data);
ret = NOTIFICATION_ERROR_IO_ERROR;
goto out;
ret = security_manager_private_sharing_drop(handle);
if (ret != SECURITY_MANAGER_SUCCESS) {
- NOTIFICATION_ERR("Failed to drop %d", ret);
+ NOTIFICATION_ERR("Failed to drop [%d]", ret);
ret = NOTIFICATION_ERROR_IO_ERROR;
goto out;
}
ret = security_manager_private_sharing_req_set_target_appid(handle,
(const char *)iter->data);
if (ret != SECURITY_MANAGER_SUCCESS) {
- NOTIFICATION_ERR("Failed to set target appid(%s)",
+ NOTIFICATION_ERR("Failed to set target appid [%s]",
(const char *)iter->data);
ret = NOTIFICATION_ERROR_IO_ERROR;
goto out;
ret = security_manager_private_sharing_apply(handle);
if (ret != SECURITY_MANAGER_SUCCESS) {
- NOTIFICATION_ERR("Failed to apply PS %d", ret);
+ NOTIFICATION_ERR("Failed to apply PS [%d]", ret);
ret = NOTIFICATION_ERROR_IO_ERROR;
goto out;
}
ret = NOTIFICATION_ERROR_IO_ERROR;
goto out;
}
- NOTIFICATION_INFO("PS success [%d] [%d] [%d]", noti->priv_id,
+ NOTIFICATION_INFO("PS success priv id[%d] shared file count[%d] target app count[%d]",
+ noti->priv_id,
g_list_length(req_data->shared_file_list),
g_list_length(req_data->target_app_table));
iter = req_data->shared_file_list;
for (; iter != NULL; iter = g_list_next(iter)) {
if (g_remove(((sharing_file_info_s *)(iter->data))->dst_path) != 0)
- NOTIFICATION_ERR("failed [%s] [%d]", iter->data, errno);
+ NOTIFICATION_ERR("Failed [%s] [%d]", iter->data, errno);
}
g_rmdir(req_data->dir);
g_variant_get(parameters, "(&s)", &message);
if (strlen(message) <= 0) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("message has only NULL");
+ NOTIFICATION_ERR("message is NULL");
return;
/* LCOV_EXCL_STOP */
}
if (!md.callback) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("no callback");
+ NOTIFICATION_ERR("No callback");
return;
/* LCOV_EXCL_STOP */
}
md.conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
if (md.conn == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("Failed to connect to the D-BUS Daemon: %s",
+ NOTIFICATION_ERR("Failed to connect to the D-BUS Daemon[%s]",
error->message);
g_error_free(error);
return NOTIFICATION_ERROR_FROM_DBUS;
NULL);
if (md.message_id == 0) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("g_dbus_connection_signal_subscribe() failed.");
+ NOTIFICATION_ERR("Failed to subscribe signal");
g_object_unref(md.conn);
return NOTIFICATION_ERROR_FROM_DBUS;
/* LCOV_EXCL_STOP */
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
if (conn == NULL) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("g_bus_get_sync() failed: %s", err->message);
+ NOTIFICATION_ERR("Failed to connect to the D-BUS Daemon[%s]",
+ err->message);
ret = NOTIFICATION_ERROR_FROM_DBUS;
goto end;
/* LCOV_EXCL_STOP */
param,
&err) == FALSE) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("g_dbus_connection_emit_signal() failed: %s",
+ NOTIFICATION_ERR("Failed to emit signal[%s]",
err->message);
ret = NOTIFICATION_ERROR_FROM_DBUS;
goto end;
if (g_dbus_connection_flush_sync(conn, NULL, &err) == FALSE) {
/* LCOV_EXCL_START */
- NOTIFICATION_ERR("g_dbus_connection_flush_sync() failed: %s",
+ NOTIFICATION_ERR("Failed to flush connection sync[%s]",
err->message);
ret = NOTIFICATION_ERROR_FROM_DBUS;
goto end;
ret = app_control_create(&app_control);
if (ret != APP_CONTROL_ERROR_NONE) {
- NOTIFICATION_ERR("app_control_create failed [%x]", ret);
+ NOTIFICATION_ERR("Failed to create app_control[%x]", ret);
goto out;
}
ret = app_control_set_app_id(app_control, default_viewer);
if (ret != APP_CONTROL_ERROR_NONE) {
- NOTIFICATION_ERR("app_control_set_app_id failed [%x]", ret);
+ NOTIFICATION_ERR("Failed to set app id to app_control[%x]", ret);
goto out;
}
ret = app_control_add_extra_data(app_control, "NOTIFICATION_PRIVATE_ID", buf);
if (ret != APP_CONTROL_ERROR_NONE) {
- NOTIFICATION_ERR("app_control_set_extra_data failed [%x]", ret);
+ NOTIFICATION_ERR("Failed to add extra data to app_control[%x]", ret);
goto out;
}
ret = app_control_send_launch_request(app_control, NULL, NULL);
if (ret != APP_CONTROL_ERROR_NONE) {
- NOTIFICATION_ERR("app_control_send_launch_request failed [%x]", ret);
+ NOTIFICATION_ERR("Failed to request app launch[%x]", ret);
goto out;
}