int media_svc_check_pinyin_support(bool *support);
int media_svc_update_item_begin(int data_cnt);
int media_svc_update_item_end(uid_t uid);
-int media_svc_update_item_meta(MediaSvcHandle *handle, const char *file_path, int storage_type, uid_t uid);
+int media_svc_update_item_meta(MediaSvcHandle *handle, const char *file_path, const char *storage_id, int storage_type, uid_t uid);
int media_svc_insert_item_immediately_with_data(MediaSvcHandle *handle, media_svc_content_info_s *content_info, uid_t uid);
void media_svc_destroy_content_info(media_svc_content_info_s *content_info);
return MEDIA_SVC_PLUGIN_ERROR_NONE;
}
-int update_item_meta(void *handle, const char *file_path, int storage_type, uid_t uid, char **err_msg)
+int update_item_meta(void *handle, const char *file_path, const char *storage_id, int storage_type, uid_t uid, char **err_msg)
{
int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
return MEDIA_SVC_PLUGIN_ERROR;
}
- ret = media_svc_update_item_meta(handle, file_path, storage_type, uid);
+ if (storage_id == NULL) {
+ __set_error_message(ERR_HANDLE, err_msg);
+ return MEDIA_SVC_PLUGIN_ERROR;
+ }
+
+ ret = media_svc_update_item_meta(handle, file_path, storage_id, storage_type, uid);
if (ret < 0) {
__set_error_message(ret, err_msg);
return MEDIA_SVC_PLUGIN_ERROR;
return ret;
}
-int media_svc_update_item_meta(MediaSvcHandle *handle, const char *file_path, int storage_type, uid_t uid)
+int media_svc_update_item_meta(MediaSvcHandle *handle, const char *file_path, const char *storage_id, int storage_type, uid_t uid)
{
int ret = MS_MEDIA_ERR_NONE;
sqlite3 *db_handle = (sqlite3 *)handle;
memset(&content_info, 0, sizeof(media_svc_content_info_s));
/*Set media info*/
- ret = _media_svc_set_media_info(&content_info, DEFAULT_MEDIA_SVC_STORAGE_ID, storage_type, file_path, &media_type, FALSE);
+ ret = _media_svc_set_media_info(&content_info, storage_id, storage_type, file_path, &media_type, FALSE);
if (ret != MS_MEDIA_ERR_NONE) {
return ret;
}