return ret;
}
-int insert_item_begin(void *handle, int item_cnt, int with_noti, int from_pid)
+int insert_item_begin(int item_cnt, int with_noti, int from_pid)
{
return media_svc_insert_item_begin(item_cnt, with_noti, from_pid);
}
-int insert_item_end(void *handle, uid_t uid)
+int insert_item_end(uid_t uid)
{
return media_svc_insert_item_end(uid);
}
return media_svc_insert_item_bulk(handle, storage_id, storage_type, file_path, uid);
}
-int set_all_storage_items_validity(void *handle, const char *storage_id, int storage_type, int validity, uid_t uid)
+int set_all_storage_items_validity(const char *storage_id, int storage_type, int validity, uid_t uid)
{
return media_svc_set_all_storage_items_validity(storage_id, storage_type, validity, uid);
}
return media_svc_set_folder_items_validity(handle, storage_id, folder_path, validity, recursive, uid);
}
-int set_item_validity_begin(void *handle, int item_cnt)
+int set_item_validity_begin(int item_cnt)
{
return media_svc_set_item_validity_begin(item_cnt);
}
-int set_item_validity_end(void *handle, uid_t uid)
+int set_item_validity_end(uid_t uid)
{
return media_svc_set_item_validity_end(uid);
}
-int set_item_validity(void *handle, const char *storage_id, const char *file_path, int storage_type, int validity, uid_t uid)
+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);
}
return MS_MEDIA_ERR_NONE;
}
-int get_uuid(void * handle, char **uuid)
+int get_uuid(char **uuid)
{
return media_svc_generate_uuid(uuid);
}
return media_svc_get_storage_list(handle, storage_list, storage_id_list, count);
}
-int update_item_begin(void *handle, int item_cnt)
+int update_item_begin(int item_cnt)
{
return media_svc_update_item_begin(item_cnt);
}
-int update_item_end(void *handle, uid_t uid)
+int update_item_end(uid_t uid)
{
return media_svc_update_item_end(uid);
}
-int update_item_meta(void *handle, const char *file_path, const char *storage_id, int storage_type, uid_t uid)
+int update_item_meta(const char *file_path, const char *storage_id, int storage_type, uid_t uid)
{
- return media_svc_update_item_meta(handle, file_path, storage_id, storage_type, uid);
+ return media_svc_update_item_meta(file_path, storage_id, storage_type, uid);
}
-int insert_item_scan(void * handle, const char *storage_id, const char *file_path, int storage_type, uid_t uid)
+int insert_item_scan(void *handle, const char *storage_id, const char *file_path, int storage_type, uid_t uid)
{
/* For scanner V2 */
return MS_MEDIA_ERR_NONE;
return MS_MEDIA_ERR_NONE;
}
-int insert_folder_begin(void * handle, int item_cnt)
+int insert_folder_begin(int item_cnt)
{
return media_svc_insert_folder_begin(item_cnt);
}
-int insert_folder_end(void *handle, uid_t uid)
+int insert_folder_end(uid_t uid)
{
return media_svc_insert_folder_end(uid);
}
-int insert_folder(void * handle, const char *storage_id, const char *file_path, int storage_type, uid_t uid)
+int insert_folder(void *handle, const char *storage_id, const char *file_path, int storage_type, uid_t uid)
{
return media_svc_insert_folder(handle, storage_id, storage_type, file_path, uid);
}
-int delete_invalid_folder(void * handle, const char *storage_id, int storage_type, uid_t uid)
+int delete_invalid_folder(const char *storage_id, int storage_type, uid_t uid)
{
return media_svc_delete_invalid_folder(storage_id, storage_type, uid);
}
-int set_folder_validity(void * handle, const char *storage_id, const char* start_path, int validity, bool is_recursive, uid_t uid)
+int set_folder_validity(void *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 MS_MEDIA_ERR_NONE;
}
-int check_folder_exist(void * handle, const char *storage_id, const char *folder_path)
+int check_folder_exist(void *handle, const char *storage_id, const char *folder_path)
{
return media_svc_check_folder_exist_by_path(handle, storage_id, folder_path);
}
-int get_folder_id(void * handle, const char *storage_id, const char *path, char *folder_id)
+int get_folder_id(void *handle, const char *storage_id, const char *path, char *folder_id)
{
return media_svc_get_folder_id(handle, storage_id, path, folder_id);
}
-int get_media_type(void *handle, const char *path, int *mediatype)
+int get_media_type(const char *path, int *mediatype)
{
return media_svc_get_media_type(path, mediatype);
}
|| (media_type == MEDIA_SVC_MEDIA_TYPE_SCSA))
media_svc_debug("Do nothing[%d]", media_type);
else if (media_type == MEDIA_SVC_MEDIA_TYPE_IMAGE)
- ret = _media_svc_extract_image_metadata(db_handle, &content_info);
+ ret = _media_svc_extract_image_metadata(&content_info);
else
ret = _media_svc_extract_media_metadata(db_handle, &content_info, uid);
media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, &content_info);
|| (media_type == MEDIA_SVC_MEDIA_TYPE_SCSA)) {
/*Do nothing.*/
} else if (media_type == MEDIA_SVC_MEDIA_TYPE_IMAGE) {
- ret = _media_svc_extract_image_metadata(db_handle, &content_info);
+ ret = _media_svc_extract_image_metadata(&content_info);
} else {
ret = _media_svc_extract_media_metadata(db_handle, &content_info, uid);
}
|| (media_type == MEDIA_SVC_MEDIA_TYPE_SCSA))
media_svc_debug("Do nothing [%d]", media_type);
else if (media_type == MEDIA_SVC_MEDIA_TYPE_IMAGE)
- ret = _media_svc_extract_image_metadata(db_handle, &content_info);
+ ret = _media_svc_extract_image_metadata(&content_info);
else
ret = _media_svc_extract_media_metadata(db_handle, &content_info, uid);
return ret;
}
-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_update_item_meta(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;
-
- media_svc_retvm_if(db_handle == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Handle is NULL");
-
media_svc_media_type_e media_type;
+
media_svc_retvm_if(!STRING_VALID(file_path), MS_MEDIA_ERR_INVALID_PARAMETER, "path is NULL");
media_svc_retvm_if(__media_svc_check_storage(storage_type) != TRUE, MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid storage_type");
return ret;
if (media_type == MEDIA_SVC_MEDIA_TYPE_MUSIC)
- ret = _media_svc_extract_music_metadata_for_update(db_handle, &content_info, media_type);
+ ret = _media_svc_extract_music_metadata_for_update(&content_info, media_type);
else {
_media_svc_destroy_content_info(&content_info);
return MS_MEDIA_ERR_NONE;
int _media_svc_set_default_value(media_svc_content_info_s *content_info, bool refresh);
int _media_svc_set_media_info(media_svc_content_info_s *content_info, const char *storage_id, ms_user_storage_type_e storage_type,
const char *path, media_svc_media_type_e *media_type, bool refresh);
-int _media_svc_extract_image_metadata(sqlite3 *handle, media_svc_content_info_s *content_info);
+int _media_svc_extract_image_metadata(media_svc_content_info_s *content_info);
int _media_svc_extract_media_metadata(sqlite3 *handle, media_svc_content_info_s *content_info, uid_t uid);
time_t __media_svc_get_timeline_from_str(const char *timstr);
void _media_svc_destroy_content_info(media_svc_content_info_s *content_info);
int _media_svc_create_thumbnail(const char *path, char *thumb_path, int max_length, media_svc_media_type_e media_type, uid_t uid);
int _media_svc_get_pinyin_str(const char *src_str, char **pinyin_str);
bool _media_svc_check_pinyin_support(void);
-int _media_svc_extract_music_metadata_for_update(sqlite3 *handle, media_svc_content_info_s *content_info, media_svc_media_type_e media_type);
+int _media_svc_extract_music_metadata_for_update(media_svc_content_info_s *content_info, media_svc_media_type_e media_type);
int _media_svc_get_media_type(const char *path, int *mediatype);
#ifdef __cplusplus