typedef int (*INSERT_ITEM_END)(void*, uid_t, char **);
typedef int (*SET_ITEM_VALIDITY_BEGIN)(void*, int, char **);
typedef int (*SET_ITEM_VALIDITY_END)(void*, uid_t, char **);
-typedef int (*UPDATE_BEGIN)(void);
-typedef int (*UPDATE_END)(void);
typedef int (*SEND_DIR_UPDATE_NOTI)(void *, const char *, const char *, const char *, int, int, char **);
typedef int (*CHECK_ITEM_EXIST)(void*, const char *, const char *, bool *, char **);
typedef int (*INSERT_ITEM)(void *, const char *, const char *, int, uid_t, char **);
-typedef int (*INSERT_ITEM_IMMEDIATELY)(void *, const char *, const char *, int, uid_t, char **);
typedef int (*INSERT_BURST_ITEM)(void *, const char *, const char *, int, uid_t, char **);
typedef int (*SET_ALL_STORAGE_ITEMS_VALIDITY)(void *, const char *, int, int, uid_t, char **);
typedef int (*SET_FOLDER_ITEM_VALIDITY)(void *, const char *, const char *, int, int, uid_t, char**);
typedef int (*GET_FOLDER_LIST)(void *, const char *, char *, char ***, int **, int **, int *, char **);
typedef int (*UPDATE_FOLDER_TIME)(void *, const char *, const char *, uid_t, char **);
typedef int (*GET_STORAGE_ID)(void *, const char *, char *, uid_t uid, char **);
-typedef int (*GET_STORAGE_SCAN_STATUS)(void *, const char *, int *, char **);
typedef int (*SET_STORAGE_SCAN_STATUS)(void *, const char *, int, uid_t, char **);
typedef int (*GET_STORAGE_LIST)(void *, char ***, char ***, int **, int *, char **);
typedef int (*INSERT_FOLDER)(void *, const char *, const char *, int, uid_t, char **);
typedef int (*INSERT_FOLDER_BEGIN)(void *, int, char **);
typedef int (*INSERT_FOLDER_END)(void *, uid_t, char **);
typedef int (*INSERT_ITEM_SCAN)(void *, const char *, const char *, int, uid_t, char **);
-typedef int (*UPDATE_ITEM_EXTRACT)(void *, const char *, int, int, uid_t, const char *, int, char **);
typedef int (*GET_FOLDER_SCAN_STATUS)(void *, const char *, const char *, int *, char **);
typedef int (*SET_FOLDER_SCAN_STATUS)(void *, const char *, const char *, int, uid_t, char **);
typedef int (*CHECK_FOLDER_MODIFIED)(void *, const char *, const char *, bool *, char **);
typedef int (*GET_NULL_SCAN_FOLDER_LIST)(void *, const char *, const char *, char ***, int *, char **);
typedef int (*CHANGE_VALIDITY_ITEM_BATCH)(void *, const char *, const char *, int, int, uid_t, char **);
-//typedef int (*GET_SCAN_DONE_ITEMS)(void *, const char *, const char *, int, int *, char **);
typedef int (*CHECK_DB)(void*, uid_t, char **);
typedef int (*GET_UUID)(void *, char **, char **);
int ms_disconnect_db(void ***handle);
int ms_validate_item(void **handle, const char *storage_id, const char *path, uid_t uid);
int ms_insert_item_batch(void **handle, const char *storage_id, const char *path, uid_t uid);
-int ms_insert_item_pass2(void **handle, const char *storage_id, const char *path, int scan_type, int burst, uid_t uid);
-int ms_insert_item_immediately(void **handle, const char *storage_id, const char *path, uid_t uid);
int ms_insert_burst_item(void **handle, const char *storage_id, const char *path, uid_t uid);
bool ms_delete_all_items(void **handle, const char *storage_id, ms_storage_type_t storage_type, uid_t uid);
int ms_validaty_change_all_items(void **handle, const char *storage_id, ms_storage_type_t storage_type, bool validity, uid_t uid);
int ms_get_folder_list(void **handle, const char *storage_id, char *start_path, GArray **dir_array);
int ms_update_folder_time(void **handle, const char *storage_id, char *folder_path, uid_t uid);
int ms_get_storage_id(void **handle, const char *path, char *storage_id, uid_t uid);
-int ms_get_storage_scan_status(void **handle, char *storage_id, media_scan_status_e *scan_status);
int ms_set_storage_scan_status(void **handle, char *storage_id, media_scan_status_e scan_status, uid_t uid);
int ms_get_storage_list(void **handle, GArray **storage_array);
int ms_insert_folder(void **handle, const char *storage_id, const char *path, uid_t uid);
int ms_check_folder_modified(void **handle, const char *path, const char *storage_id, bool *modified);
int ms_get_null_scan_folder_list(void **handle, const char *stroage_id, const char *path, GArray **dir_array);
int ms_change_validity_item_batch(void **handle, const char *storage_id, const char *path, int des_validity, int src_validity, uid_t uid);
-//int ms_get_scan_done_items(void **handle, const char *storage_id, const char *path, int validity, int *count);
int ms_check_db_upgrade(void **handle, uid_t uid);
int ms_genarate_uuid(void **handle, char **uuid);
eINSERT_END,
eINSERT_BATCH,
eINSERT_SCAN,
- eUPDATE_EXTRACT,
- eINSERT_ITEM_IMMEDIATELY,
eSET_ALL_VALIDITY,
eSET_VALIDITY_BEGIN,
eSET_VALIDITY_END,
eSET_VALIDITY,
eDELETE_ALL,
eDELETE_INVALID_ITEMS,
- eUPDATE_BEGIN,
- eUPDATE_END,
eSET_FOLDER_ITEM_VALIDITY,
eDELETE_FOLDER,
eINSERT_BURST,
eGET_FOLDER_LIST,
eUPDATE_FOLDER_TIME,
eGET_STORAGE_ID,
- eGET_STORAGE_SCAN_STATUS,
eSET_STORAGE_SCAN_STATUS,
eGET_STORAGE_LIST,
eINSERT_FOLDER,
"insert_item_end",
"insert_item",
"insert_item_scan",
- "update_item_extract",
- "insert_item_immediately",
"set_all_storage_items_validity",
"set_item_validity_begin",
"set_item_validity_end",
"set_item_validity",
"delete_all_items_in_storage",
"delete_all_invalid_items_in_storage",
- "update_begin",
- "update_end",
"set_folder_item_validity",
"delete_all_invalid_items_in_folder",
"insert_burst_item",
"get_folder_list",
"update_folder_time",
"get_storage_id",
- "get_storage_scan_status",
"set_storage_scan_status",
"get_storage_list",
"insert_folder",
return res;
}
-int ms_insert_item_pass2(void **handle, const char* storage_id, const char *path, int scan_type, int burst, uid_t uid)
-{
- int lib_index;
- int res = MS_MEDIA_ERR_NONE;
- int ret = MS_MEDIA_ERR_NONE;
- char *err_msg = NULL;
- ms_user_storage_type_t storage_type;
-
- ret = ms_user_get_storage_type(uid, path, &storage_type);
- MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "Fail to get storage type");
-
- for (lib_index = 0; lib_index < lib_num; lib_index++) {
- ret = ((UPDATE_ITEM_EXTRACT)func_array[lib_index][eUPDATE_EXTRACT])(handle[lib_index], storage_id, storage_type, scan_type, uid, path, burst, &err_msg); /*dlopen*/
- if (ret != 0) {
- MS_DBG_ERR("error : %s [%s] %s", g_array_index(so_array, char*, lib_index), err_msg, path);
- MS_SAFE_FREE(err_msg);
- res = MS_MEDIA_ERR_DB_INSERT_FAIL;
- }
- }
-
- return res;
-}
-
int ms_get_extract_list(void** handle, const char* storage_id, int storage_type, int scan_type, const char* path, int burst, uid_t uid, void* array)
{
int lib_index;
return res;
}
-int ms_insert_item_immediately(void **handle, const char *storage_id, const char *path, uid_t uid)
-{
- int lib_index;
- int res = MS_MEDIA_ERR_NONE;
- int ret = MS_MEDIA_ERR_NONE;
- char *err_msg = NULL;
- ms_user_storage_type_t storage_type;
-
- ret = ms_user_get_storage_type(uid, path, &storage_type);
- MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "Fail to get storage type");
-
- for (lib_index = 0; lib_index < lib_num; lib_index++) {
- ret = ((INSERT_ITEM_IMMEDIATELY)func_array[lib_index][eINSERT_ITEM_IMMEDIATELY])(handle[lib_index], storage_id, path, storage_type, uid, &err_msg); /*dlopen*/
- if (ret != 0) {
- MS_DBG_ERR("error : %s [%s] %s", g_array_index(so_array, char*, lib_index), err_msg, path);
- MS_SAFE_FREE(err_msg);
- res = MS_MEDIA_ERR_DB_INSERT_FAIL;
- }
- }
-
- return res;
-}
-
int ms_insert_burst_item(void **handle, const char *storage_id, const char *path , uid_t uid)
{
int lib_index;
return res;
}
-int ms_get_storage_scan_status(void **handle, char *storage_id, media_scan_status_e *scan_status)
-{
- int lib_index;
- int res = MS_MEDIA_ERR_NONE;
- int ret;
- char *err_msg = NULL;
- int status = 0;
-
- MS_DBG_FENTER();
-
- for (lib_index = 0; lib_index < lib_num; lib_index++) {
- ret = ((GET_STORAGE_SCAN_STATUS)func_array[lib_index][eGET_STORAGE_SCAN_STATUS])(handle[lib_index], storage_id, &status, &err_msg); /*dlopen*/
- if (ret != 0) {
- MS_DBG_ERR("error : %s [%s]", g_array_index(so_array, char*, lib_index), err_msg);
- MS_SAFE_FREE(err_msg);
- res = MS_MEDIA_ERR_DB_INTERNAL;
- } else {
- *scan_status = status;
- }
- }
-
- MS_DBG("storage_id [%s], scan_status [%d]", storage_id, *scan_status);
-
- return res;
-}
-
int ms_set_storage_scan_status(void **handle, char *storage_id, media_scan_status_e scan_status, uid_t uid)
{
int lib_index;
return res;
}
-#if 0
-int ms_get_scan_done_items(void **handle, const char *storage_id, const char *path, int validity, int *count)
-{
- int lib_index;
- int res = MS_MEDIA_ERR_NONE;
- int ret;
- char *err_msg = NULL;
-
- for (lib_index = 0; lib_index < lib_num; lib_index++) {
- ret = ((GET_SCAN_DONE_ITEMS)func_array[lib_index][eGET_SCAN_DONE_ITEMS])(handle[lib_index], storage_id, path, validity, count, &err_msg); /*dlopen*/
- if (ret != 0) {
- MS_DBG_ERR("error : %s [%s] %s", g_array_index(so_array, char*, lib_index), err_msg, storage_id);
- MS_SAFE_FREE(err_msg);
- res = MS_MEDIA_ERR_DB_INSERT_FAIL;
- }
- }
-
- return res;
-}
-#endif
-
int ms_get_media_type(void **handle, const char *path, int *media_type)
{
int lib_index;