typedef int (*UPDATE_ONE_EXTRACT_ITEM)(sqlite3*, const char*, int, void *);
typedef int (*QUERY_DO_UPDATE_LIST)(sqlite3*);
typedef int (*GET_MEDIA_TYPE)(const char *, int *);
+typedef int (*REFRESH_ITEM)(sqlite3 *, const char *, const char *, uid_t);
int ms_load_functions(void);
void ms_unload_functions(void);
eGET_EXTRACT_LIST,
eUPDATE_ONE_EXTRACT_ITEM,
eQUERY_DO_UPDATE_LIST,
+ eREFRESH_ITEM,
eFUNC_MAX
};
"get_extract_list",
"update_one_extract_item",
"query_do_update_list",
+ "refresh_item",
};
/*init array for adding name of so*/
so_array = g_array_new(FALSE, FALSE, sizeof(char*));
MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "Error : %s [%s]", g_array_index(so_array, char*, lib_index), path);
} else {
/* the file has same name but it is changed, so we have to update DB */
- ret = ((DELETE_ITEM)func_array[lib_index][eDELETE_ITEM])(handle, storage_id, path, uid); /*dlopen*/
+ ret = ((REFRESH_ITEM)func_array[lib_index][eREFRESH_ITEM])(handle, storage_id, path, uid); /*dlopen*/
MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "Error : %s [%s]", g_array_index(so_array, char*, lib_index), path);
- ret = ms_insert_item_batch(handle, storage_id, path, uid);
}
} else {
MS_DBG_ERR("check_item_exist failed [%d]", ret);
MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "Error : %s [%s]", g_array_index(so_array, char*, lib_index), path);
} else {
/* the file has same name but it is changed, so we have to update DB */
- ret = ((DELETE_ITEM)func_array[lib_index][eDELETE_ITEM])(handle, storage_id, path, uid); /*dlopen*/
+ ret = ((REFRESH_ITEM)func_array[lib_index][eREFRESH_ITEM])(handle, storage_id, path, uid); /*dlopen*/
MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "Error : %s [%s]", g_array_index(so_array, char*, lib_index), path);
- ret = ms_scan_item_batch(handle, storage_id, path, uid);
}
} else {
MS_DBG_ERR("check_item_exist failed [%d]", ret);