media_svc_error("user_version update fail.");
goto ERROR;
}
-
- _media_svc_destroy_table_query();
-
- media_svc_debug_fleave();
-
- return MS_MEDIA_ERR_NONE;
ERROR:
_media_svc_destroy_table_query();
int media_svc_check_item_exist_by_path(sqlite3 *handle, const char *storage_id, const char *path)
{
- int ret = MS_MEDIA_ERR_NONE;
- int count = -1;
-
- ret = _media_svc_count_record_with_path(handle, path, &count);
- media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
-
- if (count > 0) {
- media_svc_debug("item is exist in database");
- return MS_MEDIA_ERR_NONE;
- } else {
- media_svc_debug("item is not exist in database");
- return MS_MEDIA_ERR_DB_NO_RECORD;
- }
-
- return MS_MEDIA_ERR_NONE;
+ return _media_svc_check_data_by_path(handle, path);
}
int media_svc_get_modified_time(sqlite3 *handle, const char *storage_id, const char *path, int *modified_time)
if (g_insert_with_noti) {
media_svc_debug("sending noti list");
_media_svc_publish_noti_list();
- _media_svc_initialize_noti_list();
g_insert_with_noti = false;
_media_svc_set_noti_from_pid(-1);
}
ret = _media_svc_list_query_do(MEDIA_SVC_QUERY_SCANNER, uid);
media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, &content_info);
- if (g_insert_with_noti) {
+ if (g_insert_with_noti)
_media_svc_publish_noti_list();
- _media_svc_initialize_noti_list();
- }
g_media_svc_cur_data_cnt = 0;
}
int media_svc_check_folder_exist_by_path(sqlite3 *handle, const char *storage_id, const char *folder_path)
{
- int ret = MS_MEDIA_ERR_NONE;
- int count = -1;
-
- ret = _media_svc_count_folder_with_path(handle, storage_id, folder_path, &count);
- media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
-
- if (count > 0) {
- media_svc_debug("item is exist in database");
- return MS_MEDIA_ERR_NONE;
- } else {
- media_svc_debug("item is not exist in database");
- return MS_MEDIA_ERR_DB_NO_RECORD;
- }
-
- return MS_MEDIA_ERR_NONE;
+ return _media_svc_check_folder_by_path(handle, storage_id, folder_path);
}
int media_svc_append_query(const char *query, uid_t uid)