static GList *_dnd_alarm_id_list;
+static char *default_viewer;
+
typedef struct _dnd_alarm_id {
uid_t uid;
alarm_id_t dnd_start_id;
return ret;
}
+ if (default_viewer != NULL) {
+ ret = notification_launch_default_viewer(default_viewer, priv_id);
+ if (ret != NOTIFICATION_ERROR_NONE) {
+ ErrPrint("failed to launch (app_control error : %d)", ret);
+ return NOTIFICATION_ERROR_IO_ERROR;
+ }
+ }
+
*reply_body = g_variant_new("(i)", priv_id);
if (*reply_body == NULL) {
ErrPrint("cannot make reply_body");
int priv_id = NOTIFICATION_PRIV_ID_NONE;
print_noti(noti);
- notification_get_id(noti, NULL, &priv_id);
- DbgPrint("priv_id: [%d]", priv_id);
-
ret = notification_noti_update(noti);
- if (ret != NOTIFICATION_ERROR_NONE)
+ if (ret != NOTIFICATION_ERROR_NONE) {
+ ErrPrint("failed to update a notification:%d\n", ret);
return ret;
+ }
+
+ ret = notification_get_id(noti, NULL, &priv_id);
+ if (ret != NOTIFICATION_ERROR_NONE) {
+ ErrPrint("failed to gets priv_id:%d\n", ret);
+ return ret;
+ }
body = notification_ipc_make_gvariant_from_noti(noti, true);
if (body == NULL) {
return ret;
}
+ if (default_viewer != NULL) {
+ ret = notification_launch_default_viewer(default_viewer, priv_id);
+ if (ret != NOTIFICATION_ERROR_NONE) {
+ ErrPrint("failed to launch (app_control error : %d)", ret);
+ return NOTIFICATION_ERROR_IO_ERROR;
+ }
+ }
+
*reply_body = g_variant_new("(i)", priv_id);
if (*reply_body == NULL) {
ErrPrint("cannot make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
+
DbgPrint("_update_noti done !!");
return ret;
}
*/
HAPI int notification_service_init(void)
{
+#define DEFAULT_VIEWER_CONF_FILE "/usr/share/notification/notification.ini"
+
int ret, i;
int count = 0;
uid_t *uids = NULL;
return NOTIFICATION_ERROR_IO_ERROR;
}
+ notification_get_default_viewer(DEFAULT_VIEWER_CONF_FILE, &default_viewer);
+
_notification_data_init();
notification_system_setting_init_system_setting_table(tzplatform_getuid(TZ_SYS_DEFAULT_USER));