#define NOTIFICATION_EMPTY_STR ""
#define NOTIFICATION_CHECK_STR(p) ((p) ? (p) : NOTIFICATION_EMPTY_STR)
-sqlite3 *notification_db_open(const char *dbfile);
+sqlite3 *notification_db_open();
int notification_db_close(sqlite3 **db);
int notification_db_exec(sqlite3 *db, const char *query, int *num_changes);
char *notification_db_column_text(sqlite3_stmt *stmt, int col);
return ret;
}
-sqlite3 *notification_db_open(const char *dbfile)
+sqlite3 *notification_db_open()
{
int ret = 0;
sqlite3 *db = 0;
- ret = access(dbfile, R_OK | W_OK);
+ ret = access(DBPATH, R_OK | W_OK);
if (ret != 0) {
/* LCOV_EXCL_START */
set_last_result(NOTIFICATION_ERROR_FROM_DB);
/* LCOV_EXCL_STOP */
}
- ret = sqlite3_open_v2(dbfile, &db, SQLITE_OPEN_READWRITE, NULL);
+ ret = sqlite3_open_v2(DBPATH, &db, SQLITE_OPEN_READWRITE, NULL);
if (ret != SQLITE_OK) {
/* LCOV_EXCL_START */
if (ret == SQLITE_PERM)
int ret;
int result;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
int ret;
int col = 0;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
if (query_where == NULL || noti == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
if (query_where == NULL || list == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
noti->group_id = NOTIFICATION_GROUP_ID_NONE;
noti->internal_group_id = NOTIFICATION_GROUP_ID_NONE;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
noti->caller_app_id, noti->display_applist);
}
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
int i = 0;
int data_cnt = 0;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
if (app_id == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
char *query = NULL;
int ret = NOTIFICATION_ERROR_NONE;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
if (ret < 0)
return NOTIFICATION_ERROR_IO_ERROR;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (db == NULL) {
ret = get_last_result();
NOTIFICATION_ERR("Failed to open db [%d]", ret);
if (ret < 0)
return NOTIFICATION_ERROR_IO_ERROR;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
if (noti->tag == NULL)
return NOTIFICATION_ERROR_NOT_EXIST_ID;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
if (noti == NULL || count == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
noti->group_id = NOTIFICATION_GROUP_ID_NONE;
noti->internal_group_id = NOTIFICATION_GROUP_ID_NONE;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
if (pkg_id == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
setting_local_info info;
pkgmgrinfo_pkginfo_filter_h handle = NULL;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
int err = NOTIFICATION_ERROR_NONE;
bool is_package_in_setting_table = false;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
NOTIFICATION_INFO("Refresh setting table [%d]", uid);
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
NOTIFICATION_INFO("init system setting table [%d]", uid);
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (db == NULL)
return get_last_result(); /* LCOV_EXCL_LINE */
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
int ret = NOTIFICATION_ERROR_NONE;
int num_changes = 0;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
char *query = NULL;
int ret = NOTIFICATION_ERROR_NONE;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
sqlite3 *db = NULL;
uid_t *result_uids;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
if (app_id == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
int ret = NOTIFICATION_ERROR_NONE;
int num_changes = 0;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
char **query_result = NULL;
sqlite3 *db = NULL;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();
if (app_id == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
- db = notification_db_open(DBPATH);
+ db = notification_db_open();
if (!db)
return get_last_result();