#include <sys/stat.h>
#include <mm_file.h>
#include <media-thumbnail.h>
+#include <media-util.h>
#include "media-svc.h"
#include "media-svc-util.h"
return MEDIA_SVC_PLUGIN_ERROR;
}
#endif
+ int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
+
+ ret = dcm_svc_request_extract_all(uid);
+ if (ret < 0) {
+ return MEDIA_SVC_PLUGIN_ERROR;
+ }
return MEDIA_SVC_PLUGIN_ERROR_NONE;
}
return MEDIA_SVC_PLUGIN_ERROR_NONE;
}
-int check_db(void *handle, bool *need_full_scan, uid_t uid, char **err_msg)
+int check_db(void *handle, uid_t uid, char **err_msg)
{
int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
int user_version = -1;
}
} else {
/*check db version*/
- ret = media_svc_check_db_upgrade(handle, need_full_scan, user_version, uid);
+ ret = media_svc_check_db_upgrade(handle, user_version, uid);
if (ret < 0) {
__set_error_message(ret, err_msg);
return MEDIA_SVC_PLUGIN_ERROR;
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;
int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
int storage_status = 0;
- if(handle == NULL) {
+ if (handle == NULL) {
__set_error_message(ERR_HANDLE, err_msg);
return MEDIA_SVC_PLUGIN_ERROR;
}
ret = media_svc_get_folder_scan_status(handle, storage_id, path, &storage_status);
- if(ret < 0) {
+ if (ret < 0) {
__set_error_message(ret, err_msg);
return MEDIA_SVC_PLUGIN_ERROR;
}
int storage_status = status;
ret = media_svc_set_folder_scan_status(storage_id, path, storage_status, uid);
- if(ret < 0) {
+ if (ret < 0) {
__set_error_message(ret, err_msg);
return MEDIA_SVC_PLUGIN_ERROR;
}
int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
*modified = TRUE;
- if(handle == NULL) {
+ if (handle == NULL) {
__set_error_message(ERR_HANDLE, err_msg);
return MEDIA_SVC_PLUGIN_ERROR;
}
{
int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
- if(handle == NULL) {
+ if (handle == NULL) {
__set_error_message(ERR_HANDLE, err_msg);
return MEDIA_SVC_PLUGIN_ERROR;
}
- if(count == NULL) {
+ if (count == NULL) {
__set_error_message(ERR_HANDLE, err_msg);
return MEDIA_SVC_PLUGIN_ERROR;
}
ret = media_svc_get_null_scan_folder_list(handle, storage_id, folder_path, folder_list, count);
- if(ret < 0) {
+ if (ret < 0) {
__set_error_message(ret, err_msg);
return MEDIA_SVC_PLUGIN_ERROR;
}
int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
ret = media_svc_change_validity_item_batch(storage_id, path, des_validity, src_validity, uid);
- if(ret < 0) {
+ if (ret < 0) {
__set_error_message(ret, err_msg);
return MEDIA_SVC_PLUGIN_ERROR;
}
return MEDIA_SVC_PLUGIN_ERROR_NONE;
}
-int count_subfolder(void * handle, const char *storage_id, const char *folder_path, int *count, char **err_msg)
+int count_subfolder(void *handle, const char *storage_id, const char *folder_path, int *count, char **err_msg)
{
int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
int cnt = 0;