remove usage of deprecated APIs 88/194288/2 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.035027 accepted/tizen/5.5/unified/mobile/hotfix/20201027.070755 accepted/tizen/5.5/unified/wearable/hotfix/20201027.094609 accepted/tizen/unified/20181204.152217 submit/tizen/20181203.143040 submit/tizen_5.5/20191031.000009 submit/tizen_5.5/20191031.000011 submit/tizen_5.5/20191031.000013 submit/tizen_5.5/20191031.000014 submit/tizen_5.5_mobile_hotfix/20201026.185109 submit/tizen_5.5_wearable_hotfix/20201026.184309 tizen_5.5.m2_release
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Sat, 1 Dec 2018 11:22:26 +0000 (12:22 +0100)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Mon, 3 Dec 2018 07:50:27 +0000 (08:50 +0100)
Some functionalities become broken after removal of APIs.
They will be restored in following patches.

Change-Id: I4da3499a10e0648a3dcb276274063fd1abe9adf8

include/data/folderdata.h
src/data/folderdata.c
src/view/viewer.c

index 79a6894..6750dba 100644 (file)
@@ -32,7 +32,6 @@ struct folder_info {
        char *id;
        char *name;
        char *path;
-       char *parent_id;
 
        int count;
 };
index d956e59..5232eec 100644 (file)
@@ -165,7 +165,6 @@ static void _destroy_folder_info(struct folder_info *fi)
        free(fi->id);
        free(fi->name);
        free(fi->path);
-       free(fi->parent_id);
 
        free(fi);
 }
@@ -245,12 +244,6 @@ static bool _get_each_folder_info(media_folder_h folder, void *data)
                goto err;
        }
 
-       if (media_folder_get_parent_folder_id(folder, &(fi->parent_id))
-               != MEDIA_CONTENT_ERROR_NONE) {
-               _ERR("failed to fetch parent folder id");
-               goto err;
-       }
-
        if (media_folder_get_media_count_from_db(fi->id, filter, &(fi->count))
                != MEDIA_CONTENT_ERROR_NONE) {
                _ERR("failed to get media count");
@@ -362,6 +355,8 @@ static bool _get_folder_list(struct folderdata *fd, char **path)
                        return false;
                }
 
+               //FIXME change a method of loading subfolder
+               //due to deprecation of FOLDER_PARENT_FOLDER_ID
                if (strlen(buf)) {
                        snprintf(s, sizeof(s),
                                        " OR FOLDER_PARENT_FOLDER_ID=\"%s\"",
index 43838be..4ab58ef 100644 (file)
@@ -459,7 +459,6 @@ static void _set_played_position(struct _priv *priv)
        app_media *am;
        int position;
        int duration;
-       int r;
 
        if (priv->viewer.cur != VIEWER_MOVIE)
                return;
@@ -484,75 +483,6 @@ static void _set_played_position(struct _priv *priv)
 
        /* TIZEN doesn't suppport function for storing played postion anymore */
 
-       r = video_meta_update_to_db(video);
-       if (r != MEDIA_CONTENT_ERROR_NONE) {
-               _ERR("failed to update db");
-               return;
-       }
-
-       app_media_update(am);
-}
-
-static void _set_image_orientation(struct _priv *priv)
-{
-       app_media *am;
-       app_media_info *mi;
-       image_meta_h image;
-       media_content_orientation_e orient;
-       int r;
-
-       if (priv->viewer.cur != VIEWER_PHOTO)
-               return;
-
-       am = eina_list_nth(priv->playlist.list, priv->playlist.cur);
-       if (!am) {
-               _ERR("failed to get app_media");
-               return;
-       }
-
-       mi = _get_current_media_info(priv);
-       if (!mi) {
-               _ERR("failed to getting media info");
-               return;
-       }
-
-       image = app_media_get_image_handle(am);
-       if (!image) {
-               _ERR("failed to getting image handle");
-               return;
-       }
-
-       switch (mi->image->orientation) {
-       case MEDIA_CONTENT_ORIENTATION_NORMAL:
-       case MEDIA_CONTENT_ORIENTATION_NOT_AVAILABLE:
-               orient = MEDIA_CONTENT_ORIENTATION_ROT_270;
-               break;
-       case MEDIA_CONTENT_ORIENTATION_ROT_90:
-               orient = MEDIA_CONTENT_ORIENTATION_NORMAL;
-               break;
-       case MEDIA_CONTENT_ORIENTATION_ROT_180:
-               orient = MEDIA_CONTENT_ORIENTATION_ROT_90;
-               break;
-       case MEDIA_CONTENT_ORIENTATION_ROT_270:
-               orient = MEDIA_CONTENT_ORIENTATION_ROT_180;
-               break;
-       default:
-               orient = MEDIA_CONTENT_ORIENTATION_NORMAL;
-               break;
-       }
-
-       r = image_meta_set_orientation(image, orient);
-       if (r != MEDIA_CONTENT_ERROR_NONE) {
-               _ERR("failed to set played position");
-               return;
-       }
-
-       r = image_meta_update_to_db(image);
-       if (r != MEDIA_CONTENT_ERROR_NONE) {
-               _ERR("failed to update db");
-               return;
-       }
-
        app_media_update(am);
 }
 
@@ -1141,8 +1071,6 @@ static void _callback_photo(void *data, const char *ev)
        } else if (!strcmp(ev, SRC_BTN_GALLERY_NEXT)) {
                _viewer_next(priv);
        } else if (!strcmp(ev, SRC_BTN_ROTATE)) {
-               _set_image_orientation(priv);
-
                priv->viewer.foc = BTN_LOC_ROTATE;
                _viewer_show(priv);
        } else if (!strcmp(ev, SRC_BTN_ZOOM)) {