int notification_noti_get_package_template(notification_h noti, char *app_id, char *template_name);
int notification_noti_delete_template(const char *pkg_id);
+void notification_noti_init_data(void);
+
#endif /* __NOTIFICATION_NOTI_H__ */
return ret;
}
+
+EXPORT_API void notification_noti_init_data(void)
+{
+ int ret;
+ sqlite3 *db = NULL;
+ char *query = NULL;
+
+ db = notification_db_open();
+ if (!db) {
+ ERR("db open");
+ return;
+ }
+
+ query = sqlite3_mprintf("DELETE FROM noti_list WHERE type = %d OR flags_for_property & %d",
+ NOTIFICATION_TYPE_ONGOING, NOTIFICATION_PROP_VOLATILE_DISPLAY);
+ if (!query) {
+ ERR("OOM - sql query");
+ notification_db_close(&db);
+ return;
+ }
+
+ ret = notification_db_exec(db, query, NULL);
+ if (ret != NOTIFICATION_ERROR_NONE)
+ ERR("notification_db_exec");
+
+ sqlite3_free(query);
+ notification_db_close(&db);
+}