return MS_MEDIA_ERR_NONE;
}
-int insert_item_begin(int item_cnt, int with_noti, int from_pid)
+int insert_item_begin(int item_cnt, bool with_noti, int from_pid)
{
- return media_svc_insert_item_begin(item_cnt, with_noti, from_pid);
+ return media_svc_insert_item_begin(with_noti, from_pid);
}
int insert_item_end(uid_t uid)
return media_svc_insert_item_bulk(handle, storage_id, storage_type, file_path, uid);
}
-int set_folder_item_validity(sqlite3 *handle, const char *storage_id, const char *folder_path, int validity, int recursive, uid_t uid)
-{
- return media_svc_set_folder_items_validity(handle, storage_id, folder_path, validity, recursive, uid);
-}
-
int set_item_validity_begin(int item_cnt)
{
- return media_svc_set_item_validity_begin(item_cnt);
+ /* No more need in v1 */
+ return MS_MEDIA_ERR_NONE;
}
int set_item_validity_end(uid_t uid)
{
- return media_svc_set_item_validity_end(uid);
+ /* No more need in v1 */
+ return MS_MEDIA_ERR_NONE;
}
int set_item_validity(const char *storage_id, const char *file_path, int storage_type, int validity, uid_t uid)
{
- return media_svc_set_item_validity(storage_id, file_path, validity, uid);
-}
-
-int delete_item(sqlite3 *handle, const char *storage_id, const char *file_path, uid_t uid)
-{
- return media_svc_delete_item_by_path(handle, storage_id, file_path, uid);
+ return media_svc_set_item_validity(file_path, validity, uid);
}
-int send_dir_update_noti(sqlite3 *handle, const char *storage_id, const char *dir_path, const char *folder_id, int update_type, int pid)
+int send_dir_update_noti(const char *dir_path, const char *folder_id, int update_type, int pid)
{
- return media_svc_send_dir_update_noti(handle, storage_id, dir_path, folder_id, (media_item_update_type_e)update_type, pid);
+ return media_svc_send_dir_update_noti(dir_path, folder_id, (media_item_update_type_e)update_type, pid);
}
int check_db(sqlite3 *handle, uid_t uid)
int get_uuid(char **uuid)
{
- return media_svc_generate_uuid(uuid);
+ /* For scanner V2 */
+ return MS_MEDIA_ERR_NONE;
}
int check_storage(sqlite3 *handle, const char *storage_id, char **storage_path, int *validity, uid_t uid)
{
- return media_svc_check_storage(handle, storage_id, storage_path, validity, uid);
+ return media_svc_check_storage(handle, storage_id, storage_path, validity);
}
int insert_storage(sqlite3 *handle, const char *storage_id, int storage_type, const char *storage_path, uid_t uid)
return MS_MEDIA_ERR_NONE;
}
-int update_item_begin(int item_cnt)
-{
- return media_svc_update_item_begin(item_cnt);
-}
-
-int update_item_end(uid_t uid)
-{
- return media_svc_update_item_end(uid);
-}
-
-int update_item_meta(const char *file_path, const char *storage_id, int storage_type, uid_t uid)
+int update_item_meta(sqlite3 *handle, uid_t uid)
{
- return media_svc_update_item_meta(file_path, storage_id, storage_type, uid);
+ return media_svc_update_item_meta(handle, uid);
}
int insert_item_scan(sqlite3 *handle, const char *storage_id, const char *file_path, int storage_type, uid_t uid)
int insert_folder_begin(int item_cnt)
{
- return media_svc_insert_folder_begin(item_cnt);
+ /* For scanner V2 */
+ return MS_MEDIA_ERR_NONE;
}
int insert_folder_end(uid_t uid)
{
- return media_svc_insert_folder_end(uid);
+ /* For scanner V2 */
+ return MS_MEDIA_ERR_NONE;
}
int insert_folder(sqlite3 *handle, const char *storage_id, const char *file_path, int storage_type, uid_t uid)
int set_folder_validity(sqlite3 *handle, const char *storage_id, const char* start_path, int validity, bool is_recursive, uid_t uid)
{
- return media_svc_set_folder_validity(handle, storage_id, start_path, validity, is_recursive, uid);
+ return media_svc_set_folder_validity(storage_id, start_path, validity, is_recursive, uid);
}
int get_folder_scan_status(sqlite3 *handle, const char *storage_id, const char *path, int *status)
{
return media_svc_get_media_type(path, mediatype);
}
+
+int refresh_item(sqlite3 *handle, const char *storage_id, const char *path, uid_t uid)
+{
+ int ret = MS_MEDIA_ERR_NONE;
+ ms_user_storage_type_e storage_type = MS_USER_STORAGE_INTERNAL;
+
+ ret = ms_user_get_storage_type(uid, path, &storage_type);
+ if (ret != MS_MEDIA_ERR_NONE)
+ return ret;
+
+ return media_svc_refresh_item(handle, true, storage_id, storage_type, path, uid);
+}