- When pkgname is NULL dbus pass invalid utf-8 instead of NULL
- Vibration type is ignored when vibration type is NONE
Change-Id: I52f81a87669d1e387cc752997a2fc976f9c00b4c
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
char *text = NULL;
char *content = NULL;
const char *tag = NULL;
char *text = NULL;
char *content = NULL;
const char *tag = NULL;
+ notification_vibration_type_e vib_type = NOTIFICATION_VIBRATION_TYPE_NONE;
notification_get_pkgname(noti, &pkgname);
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_pkgname(noti, &pkgname);
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 pkgname = %s ", pkgname );
NOTIFICATION_DBG("client print_noti title = %s ", text );
NOTIFICATION_DBG("client print_noti pkgname = %s ", pkgname );
NOTIFICATION_DBG("client print_noti title = %s ", text );
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 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);
}
static inline char *_string_get(char *string)
}
static inline char *_string_get(char *string)
+ if (!pkgname)
+ pkgname = "";
+
body = g_variant_new("(si)", pkgname, type);
result = _send_sync_noti(body, &reply, "del_noti_multiple");
body = g_variant_new("(si)", pkgname, type);
result = _send_sync_noti(body, &reply, "del_noti_multiple");
+ if (!pkgname)
+ pkgname = "";
+
body = g_variant_new("(ss)", pkgname, tag);
result = _send_sync_noti(body, &reply, "load_noti_by_tag");
body = g_variant_new("(ss)", pkgname, tag);
result = _send_sync_noti(body, &reply, "load_noti_by_tag");
+ if (!pkgname)
+ pkgname = "";
+
body = g_variant_new("(si)", pkgname, priv_id);
result = _send_sync_noti(body, &reply, "load_noti_by_priv_id");
body = g_variant_new("(si)", pkgname, priv_id);
result = _send_sync_noti(body, &reply, "load_noti_by_priv_id");
+ if (!pkgname)
+ pkgname = "";
+
body = g_variant_new("(isii)", type, pkgname, group_id, priv_id);
result = _send_sync_noti(body, &reply, "get_noti_count");
body = g_variant_new("(isii)", type, pkgname, group_id, priv_id);
result = _send_sync_noti(body, &reply, "get_noti_count");
if (noti->sound_path)
g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_SOUND_PATH, g_variant_new_string((const gchar *)noti->sound_path));
if (noti->sound_path)
g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_SOUND_PATH, g_variant_new_string((const gchar *)noti->sound_path));
- if (noti->vibration_type != NOTIFICATION_VIBRATION_TYPE_NONE)
- g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_VIBRATION_TYPE, g_variant_new_int32(noti->vibration_type));
+ g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_VIBRATION_TYPE, g_variant_new_int32(noti->vibration_type));
if (noti->vibration_path)
g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_VIBRATION_PATH, g_variant_new_string((const gchar *)noti->vibration_path));
if (noti->vibration_path)
g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_VIBRATION_PATH, g_variant_new_string((const gchar *)noti->vibration_path));
notification_list_h get_list = NULL;
int ret = 0;
notification_list_h get_list = NULL;
int ret = 0;
+ if (list == NULL || pkgname == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
ret =
return NOTIFICATION_ERROR_INVALID_PARAMETER;
ret =
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, auto_remove "
"from noti_list ";
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, auto_remove "
"from noti_list ";
+ if (pkgname != NULL && strlen(pkgname) != 0)
query = sqlite3_mprintf("%s where caller_pkgname = '%s' and priv_id = %d",
base_query, pkgname, priv_id);
else
query = sqlite3_mprintf("%s where caller_pkgname = '%s' and priv_id = %d",
base_query, pkgname, priv_id);
else
if (!db)
return get_last_result();
if (!db)
return get_last_result();
+ if (pkgname != NULL && strlen(pkgname) != 0) {
ret = sqlite3_prepare_v2(db, "select "
"type, layout, caller_pkgname, launch_pkgname, image_path, group_id, priv_id, "
"tag, b_text, b_key, b_format_args, num_format_args, "
ret = sqlite3_prepare_v2(db, "select "
"type, layout, caller_pkgname, launch_pkgname, image_path, group_id, priv_id, "
"tag, b_text, b_key, b_format_args, num_format_args, "
snprintf(query_base, sizeof(query_base),
"select count(*) from noti_list ");
snprintf(query_base, sizeof(query_base),
"select count(*) from noti_list ");
+ if (pkgname != NULL && strlen(pkgname) != 0) {
if (group_id == NOTIFICATION_GROUP_ID_NONE) {
if (priv_id == NOTIFICATION_PRIV_ID_NONE) {
snprintf(query_where, sizeof(query_where),
if (group_id == NOTIFICATION_GROUP_ID_NONE) {
if (priv_id == NOTIFICATION_PRIV_ID_NONE) {
snprintf(query_where, sizeof(query_where),