api to reset folder scan status 05/212605/1 accepted/tizen/unified/20190826.113235 submit/tizen/20190826.010935
authorchengyj1985 <yujie.cheng@samsung.com>
Fri, 23 Aug 2019 08:53:40 +0000 (16:53 +0800)
committerchengyj1985 <yujie.cheng@samsung.com>
Fri, 23 Aug 2019 08:58:12 +0000 (16:58 +0800)
Change-Id: I0fa2a86bf9a70bf484a2c7c4f2652c582bfc42b9

include_product/media_content_product.h
src/media_folder.c

index 7eafc89..ff2cf56 100755 (executable)
@@ -165,6 +165,7 @@ int media_info_set_app_data(media_info_h media, const char *app_data);
 int media_folder_foreach_media_from_db_by_union_select(const char* folder_id, filter_h filter1, filter_h filter2, media_info_cb callback, void* user_data);
 #endif
 int media_folder_get_scan_status(const char *storage_uuid, char* path, media_folder_scan_status_e *scan_status);
+int media_folder_reset_scan_status(const char *storage_uuid, const char* path);
 
 /**
  * @brief Sets the folder name.
index 26cfd54..cd56a86 100755 (executable)
@@ -505,4 +505,21 @@ int media_folder_get_scan_status(const char *storage_uuid, char* path, media_fol
 
        return ret;
 }
+
+int media_folder_reset_scan_status(const char *storage_uuid, const char* path)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       if (STRING_VALID(path)) {
+               ret = media_svc_set_folder_scan_status(storage_uuid, path, MEDIA_DIR_SCAN_NONE, _content_get_uid());
+               if (ret != MS_MEDIA_ERR_NONE) {
+                       media_content_error("media_folder_reset_scan_status failed");
+                       ret = _content_error_capi(ret);
+               }
+       } else {
+               media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+       }
+
+       return ret;
+}
 #endif