Apply media-content api deprecation 68/181768/2 accepted/tizen/unified/20180619.141945 submit/tizen/20180619.001651
authorsinikang <sinikang@samsung.com>
Mon, 18 Jun 2018 07:07:44 +0000 (16:07 +0900)
committersinikang <sinikang@samsung.com>
Mon, 18 Jun 2018 07:34:50 +0000 (16:34 +0900)
Change-Id: I6c47ecb5c41abd6d824328d809d4e7e6369d692e

module/src/callmgr-vr.c
packaging/call-manager.spec

index 4943742493e027059e1821d21e61eee02f7100c3..9b11e2b49c4146ca3faf314135fe1e45c742b364 100644 (file)
@@ -976,7 +976,7 @@ static bool __callmgr_vr_media_info_cb(media_info_h media, void *user_data)
 
        return FALSE;
 }
-static void __callmgr_vr_get_oldest_file(char **media_id, char **file_path)
+static void __callmgr_vr_get_oldest_file(char **file_path)
 {
        media_info_h media = NULL;
        int ret = MEDIA_CONTENT_ERROR_NONE;
@@ -998,13 +998,6 @@ static void __callmgr_vr_get_oldest_file(char **media_id, char **file_path)
 
                media_filter_destroy(filter);
 
-               if (media_id) {
-                       ret = media_info_get_media_id(media, media_id);
-                       if (ret != MEDIA_CONTENT_ERROR_NONE) {
-                               err("media_info_get_media_id() failed : [%d]", ret);
-                       }
-               }
-
                if (file_path) {
                        ret = media_info_get_file_path(media, file_path);
                        if (ret != MEDIA_CONTENT_ERROR_NONE) {
@@ -1043,18 +1036,18 @@ static int __callmgr_vr_del_read_file(void)
        dbg("File count from DB : [%d]", count);
 
        if (count == CM_VR_FILE_NUMBER_MAX) {
-               char *media_id = NULL;
+
                char *file_path = NULL;
                int ret = MEDIA_CONTENT_ERROR_NONE;
 
                ret = media_content_connect();
                if (ret == MEDIA_CONTENT_ERROR_NONE) {
-                       __callmgr_vr_get_oldest_file(&media_id, &file_path);
+                       __callmgr_vr_get_oldest_file(&file_path);
 
                        if (__callmgr_vr_files_remove_file_real(file_path) >= 0) {
-                               int err = media_info_delete_from_db(media_id);
+                               int err = media_content_scan_file(file_path);
                                if (err != MEDIA_CONTENT_ERROR_NONE) {
-                                       err("media_info_delete_from_db Failed : [%d]", err);
+                                       err("media_content_scan_file Failed : [%d]", err);
                                        result = -1;
                                }
                        } else {
@@ -1066,10 +1059,6 @@ static int __callmgr_vr_del_read_file(void)
                                free(file_path);
                                file_path = NULL;
                        }
-                       if (media_id) {
-                               free(media_id);
-                               media_id = NULL;
-                       }
 
                        media_content_disconnect();
                } else {
index 883e6adf6eea7d90353a61957ad6e0cb076365c7..8e28cecd08bd6b57c1b11d946f625353dd88b78c 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 2
-%define patchlevel 52
+%define patchlevel 53
 %define ext_feature 0
 
 Name:           call-manager