Change folder_id to row id instead of uuid 42/282842/4 accepted/tizen/unified/20221102.020548
authorminje.ahn <minje.ahn@samsung.com>
Wed, 12 Oct 2022 07:18:04 +0000 (16:18 +0900)
committerMinje ahn <minje.ahn@samsung.com>
Thu, 13 Oct 2022 06:58:54 +0000 (06:58 +0000)
Change to row id instead of uuid for manageability.

Change-Id: I3ac10086173be81d2eb3f2b015f5e8003c9d7281
Signed-off-by: minje.ahn <minje.ahn@samsung.com>
src/common/media-svc-db-utils.c
src/common/media-svc-media-folder.c
src/common/media-svc-media.c
src/common/media-svc-util.c
src/common/media-svc.c
src/include/common/media-svc-media-folder.h
src/include/common/media-svc-media.h
src/include/common/media-svc-util.h

index 500e5e6..4b5e61f 100755 (executable)
@@ -367,7 +367,7 @@ int _media_svc_init_table_query(void)
        __add_column_info(&column_list[DB_LIST_MEDIA], "media_size", DB_TYPE_INT, "DEFAULT 0", false, false, true);
        __add_column_info(&column_list[DB_LIST_MEDIA], "media_added_time", DB_TYPE_INT, "DEFAULT 0", false, false, true);
        __add_column_info(&column_list[DB_LIST_MEDIA], "media_modified_time", DB_TYPE_INT, "DEFAULT 0", false, false, true);
-       __add_column_info(&column_list[DB_LIST_MEDIA], "folder_id", DB_TYPE_TEXT, "NOT NULL", false, false, false);
+       __add_column_info(&column_list[DB_LIST_MEDIA], "folder_id", DB_TYPE_INT, "DEFAULT 0", false, false, false);
        __add_column_info(&column_list[DB_LIST_MEDIA], "media_thumbnail_path", DB_TYPE_TEXT, NULL, false, false, true);
        __add_column_info(&column_list[DB_LIST_MEDIA], "media_title", DB_TYPE_TEXT, NULL, false, false, true);
        __add_column_info(&column_list[DB_LIST_MEDIA], "album_id", DB_TYPE_INT, "DEFAULT 0", false, false, false);
@@ -416,7 +416,7 @@ int _media_svc_init_table_query(void)
        __add_column_info(&column_list[DB_LIST_MEDIA], "media_360", DB_TYPE_INT, "DEFAULT 0", false, false, true);
 
        /*folder*/
-       __add_column_info(&column_list[DB_LIST_FOLDER], "folder_id", DB_TYPE_TEXT, "PRIMARY KEY", false, false, false);
+       __add_column_info(&column_list[DB_LIST_FOLDER], "folder_id", DB_TYPE_INT, "PRIMARY KEY AUTOINCREMENT", false, false, false);
        __add_column_info(&column_list[DB_LIST_FOLDER], "folder_path", DB_TYPE_TEXT, "NOT NULL", true, false, false);
        __add_column_info(&column_list[DB_LIST_FOLDER], "folder_name", DB_TYPE_TEXT, "NOT NULL", false, false, false);
        __add_column_info(&column_list[DB_LIST_FOLDER], "folder_modified_time", DB_TYPE_INT, "DEFAULT 0", false, false, false);
index e414906..45c673b 100755 (executable)
@@ -27,7 +27,7 @@
 #include "media-svc-util.h"
 #include "media-svc-db-utils.h"
 
-static int __media_svc_get_folder_id(sqlite3 *handle, const char *path, char *folder_id)
+static int __media_svc_get_folder_id(sqlite3 *handle, const char *path, long long int *folder_id)
 {
        int ret = MS_MEDIA_ERR_NONE;
        sqlite3_stmt *sql_stmt = NULL;
@@ -38,14 +38,14 @@ static int __media_svc_get_folder_id(sqlite3 *handle, const char *path, char *fo
        ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
        media_svc_retvm_if(ret != MS_MEDIA_ERR_NONE, ret, "_media_svc_sql_prepare_to_step failed [%d]", ret);
 
-       SAFE_STRLCPY(folder_id, (const char *)sqlite3_column_text(sql_stmt, 0), MEDIA_SVC_UUID_SIZE + 1);
+       *folder_id = sqlite3_column_int64(sql_stmt, 0);
 
        SQLITE3_FINALIZE(sql_stmt);
 
        return ret;
 }
 
-static int __media_svc_append_folder(bool is_direct, const char *storage_id, ms_user_storage_type_e storage_type, const char *folder_id, const char *folder_path, uid_t uid)
+static int __media_svc_append_folder(bool is_direct, const char *storage_id, ms_user_storage_type_e storage_type, const char *folder_path, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
        char *folder_name = NULL;
@@ -59,8 +59,8 @@ static int __media_svc_append_folder(bool is_direct, const char *storage_id, ms_
        if (_media_svc_check_pinyin_support())
                _media_svc_get_pinyin_str(folder_name, &folder_name_pinyin);
        /* Sometime SQLITE3 returns NO_RECORD, so need to consider conflict case.. */
-       char *sql = sqlite3_mprintf("INSERT OR IGNORE INTO %q (folder_id, folder_path, folder_name, storage_uuid, folder_storage_type, folder_modified_time, folder_name_pinyin) VALUES (%Q, %Q, %Q, %Q, '%d', '%d', %Q);",
-                               DB_TABLE_FOLDER, folder_id, folder_path, folder_name, storage_id, storage_type, folder_modified_date, folder_name_pinyin);
+       char *sql = sqlite3_mprintf("INSERT OR IGNORE INTO %q (folder_path, folder_name, storage_uuid, folder_storage_type, folder_modified_time, folder_name_pinyin) VALUES (%Q, %Q, %Q, '%d', '%d', %Q);",
+                               DB_TABLE_FOLDER, folder_path, folder_name, storage_id, storage_type, folder_modified_date, folder_name_pinyin);
 
        if (is_direct)
                ret = _media_svc_sql_query_direct(sql, uid);
@@ -90,14 +90,13 @@ int _media_svc_update_folder_modified_time(const char *folder_path, uid_t uid)
        return ret;
 }
 
-static int __media_svc_get_and_append_parent_folder(sqlite3 *handle, bool is_direct, const char *storage_id, const char *path, ms_user_storage_type_e storage_type, char *folder_id, uid_t uid)
+static int __media_svc_append_parent_folder(sqlite3 *handle, bool is_direct, const char *storage_id, const char *path, ms_user_storage_type_e storage_type, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
        unsigned int next_pos = 0;
        char *next = NULL;
        char *dir_path = NULL;
        const char *token = "/";
-       char *folder_uuid = NULL;
        char *internal_path = NULL;
 
        if (storage_type == MS_USER_STORAGE_INTERNAL) {
@@ -123,36 +122,20 @@ static int __media_svc_get_and_append_parent_folder(sqlite3 *handle, bool is_dir
 
                ret = _media_svc_check_folder_by_path(handle, dir_path);
                if (ret == MS_MEDIA_ERR_DB_NO_RECORD) {
-                       g_free(folder_uuid);
-                       folder_uuid = _media_info_generate_uuid();
-                       if (folder_uuid == NULL) {
-                               media_svc_error("Invalid UUID");
-                               g_free(dir_path);
-                               return MS_MEDIA_ERR_INTERNAL;
-                       }
-
-                       ret = __media_svc_append_folder(is_direct, storage_id, storage_type, folder_uuid, dir_path, uid);
+                       ret = __media_svc_append_folder(is_direct, storage_id, storage_type, dir_path, uid);
                        if (ret != MS_MEDIA_ERR_NONE)
                                media_svc_error("__media_svc_append_folder is failed");
                        else
-                               media_svc_sec_debug("Append new folder path[%s] uuid[%s]", dir_path, folder_uuid);
+                               media_svc_sec_debug("Append new folder path[%s]", dir_path);
                }
 
                g_free(dir_path);
        } while (next);
 
-       if (STRING_VALID(folder_uuid)) {
-               SAFE_STRLCPY(folder_id, folder_uuid, MEDIA_SVC_UUID_SIZE + 1);
-               g_free(folder_uuid);
-       } else {
-               media_svc_error("Fail to get folder_uuid");
-               return MS_MEDIA_ERR_INTERNAL;
-       }
-
        return MS_MEDIA_ERR_NONE;
 }
 
-int _media_svc_get_and_append_folder_id_by_path(sqlite3 *handle, bool is_direct, const char *storage_id, const char *path, ms_user_storage_type_e storage_type, char *folder_id, uid_t uid)
+int _media_svc_get_and_append_folder_id_by_path(sqlite3 *handle, bool is_direct, const char *storage_id, const char *path, ms_user_storage_type_e storage_type, long long int *folder_id, uid_t uid)
 {
        char *dir_path = NULL;
        int ret = MS_MEDIA_ERR_NONE;
@@ -160,22 +143,28 @@ int _media_svc_get_and_append_folder_id_by_path(sqlite3 *handle, bool is_direct,
        dir_path = g_path_get_dirname(path);
 
        ret = __media_svc_get_folder_id(handle, dir_path, folder_id);
-       if (ret == MS_MEDIA_ERR_DB_NO_RECORD)
-               ret = __media_svc_get_and_append_parent_folder(handle, is_direct, storage_id, dir_path, storage_type, folder_id, uid);
+       if (ret == MS_MEDIA_ERR_DB_NO_RECORD) {
+               ret = __media_svc_append_parent_folder(handle, is_direct, storage_id, dir_path, storage_type, uid);
+               if (ret != MS_MEDIA_ERR_NONE) {
+                       media_svc_error("__media_svc_append_parent_folder failed");
+                       goto FINALIZE;
+               }
 
+               ret = __media_svc_get_folder_id(handle, dir_path, folder_id);
+       }
+FINALIZE:
        g_free(dir_path);
 
        return ret;
 }
 
-int _media_svc_get_and_append_folder_id_by_folder_path(sqlite3 *handle, const char *storage_id, const char *path, ms_user_storage_type_e storage_type, uid_t uid)
+int _media_svc_append_by_folder_path(sqlite3 *handle, const char *storage_id, const char *path, ms_user_storage_type_e storage_type, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
-       char folder_id[MEDIA_SVC_UUID_SIZE + 1] = {0, };
 
        ret = _media_svc_check_folder_by_path(handle, path);
        if (ret == MS_MEDIA_ERR_DB_NO_RECORD)
-               ret = __media_svc_get_and_append_parent_folder(handle, true, storage_id, path, storage_type, folder_id, uid);
+               ret = __media_svc_append_parent_folder(handle, true, storage_id, path, storage_type, uid);
        else
                ret = _media_svc_set_folder_validity(true, path, 1, false, uid);
 
index 16414c0..ef0d598 100755 (executable)
@@ -110,7 +110,7 @@ int _media_svc_insert_item_with_data(bool is_direct, media_svc_content_info_s *c
                        _media_svc_get_pinyin_str(content_info->media_meta.description, &content_info->media_meta.description_pinyin);
        }
 
-       char *sql = sqlite3_mprintf("INSERT INTO %q(%q) VALUES (%Q, %Q, %Q, %d, %Q, %lld, %d, %d, %Q, \
+       char *sql = sqlite3_mprintf("INSERT INTO %q(%q) VALUES (%Q, %Q, %Q, %d, %Q, %lld, %d, %d, %lld, \
                %Q, %Q, %d, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, \
                %d, %d, %d, %d, %d, %.6f, %.6f, %.6f, %Q, %.6f, %d, %Q, %d, %d, %Q, %d, \
                %d, %d, %d, %d, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %d);",
@@ -123,7 +123,7 @@ int _media_svc_insert_item_with_data(bool is_direct, media_svc_content_info_s *c
                                content_info->size,
                                content_info->added_time,
                                content_info->modified_time,
-                               content_info->folder_uuid,                      /* 1st line */
+                               content_info->folder_id,                        /* 1st line */
                                content_info->thumbnail_path,
                                content_info->media_meta.title,
                                content_info->album_id,
@@ -175,7 +175,7 @@ int _media_svc_insert_item_with_data(bool is_direct, media_svc_content_info_s *c
                media_svc_debug("Query length is over %d byte.. So, remake query using only basic information..", MEDIA_SVC_QUERY_LEN_MAX - 1);
                SQLITE3_SAFE_FREE(sql);
 
-               sql = sqlite3_mprintf("INSERT INTO %q(%q) VALUES (%Q, %Q, %Q, %d, %Q, %lld, %d, %d, %Q, %Q, %d, %d, %d, %d, %d, %d, %Q, %Q, %d);",
+               sql = sqlite3_mprintf("INSERT INTO %q(%q) VALUES (%Q, %Q, %Q, %d, %Q, %lld, %d, %d, %lld, %Q, %d, %d, %d, %d, %d, %d, %Q, %Q, %d);",
                                                DB_TABLE_MEDIA, db_fields_basic,
                                                content_info->media_uuid,
                                                content_info->path,
@@ -185,7 +185,7 @@ int _media_svc_insert_item_with_data(bool is_direct, media_svc_content_info_s *c
                                                content_info->size,
                                                content_info->added_time,
                                                content_info->modified_time,
-                                               content_info->folder_uuid,
+                                               content_info->folder_id,
                                                content_info->thumbnail_path,
                                                content_info->album_id,
                                                content_info->is_drm,
@@ -404,12 +404,12 @@ int _media_svc_update_thumbnail_path(const char *path, const char *thumb_path, u
        return ret;
 }
 
-int _media_svc_update_item_by_path(const char *src_path, const char *dst_storage_id, ms_user_storage_type_e dest_storage, const char *dest_path, const char *file_name, int modified_time, const char *folder_uuid, uid_t uid)
+int _media_svc_update_item_by_path(const char *src_path, const char *dst_storage_id, ms_user_storage_type_e dest_storage, const char *dest_path, const char *file_name, int modified_time, long long int folder_id, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
 
-       char *query = sqlite3_mprintf("UPDATE %q SET media_path=%Q, media_display_name=%Q, media_modified_time=%d, folder_id=%Q, media_storage_type=%d, storage_uuid='%q' WHERE media_path=%Q;",
-                               DB_TABLE_MEDIA, dest_path, file_name, modified_time, folder_uuid, dest_storage, dst_storage_id, src_path);
+       char *query = sqlite3_mprintf("UPDATE %q SET media_path=%Q, media_display_name=%Q, media_modified_time=%d, folder_id=%lld, media_storage_type=%d, storage_uuid='%q' WHERE media_path=%Q;",
+                               DB_TABLE_MEDIA, dest_path, file_name, modified_time, folder_id, dest_storage, dst_storage_id, src_path);
 
        ret = _media_svc_sql_query(query, uid);
        SQLITE3_SAFE_FREE(query);
index 529d74e..da38a00 100644 (file)
@@ -137,7 +137,7 @@ static const char sound_mime_table[SOUND_MIME_NUM][MIME_LENGTH] = {
        "text/x-iMelody"
 };
 
-char *_media_info_generate_uuid(void)
+static char *__media_info_generate_uuid(void)
 {
        uuid_t uuid_value;
        char uuid_unparsed[37];
@@ -596,7 +596,7 @@ int _media_svc_set_media_info(media_svc_content_info_s *content_info, const char
        content_info->storage_type = storage_type;
        time(&content_info->added_time);
 
-       content_info->media_uuid = _media_info_generate_uuid();
+       content_info->media_uuid = __media_info_generate_uuid();
        media_svc_retv_del_if(content_info->media_uuid == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
 
        content_info->file_name = g_path_get_basename(path);
@@ -1440,7 +1440,6 @@ void _media_svc_destroy_content_info(media_svc_content_info_s *content_info)
        g_free(content_info->path);
        g_free(content_info->file_name);
        g_free(content_info->mime_type);
-       g_free(content_info->folder_uuid);
        g_free(content_info->thumbnail_path);
        g_free(content_info->storage_uuid);
 
index 2b8231e..5f28f29 100755 (executable)
@@ -189,7 +189,7 @@ int media_svc_insert_item_end(uid_t uid)
 int media_svc_insert_item_bulk(sqlite3 *handle, const char *storage_id, ms_user_storage_type_e storage_type, const char *path, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
-       char folder_uuid[MEDIA_SVC_UUID_SIZE + 1] = {0, };
+       long long int folder_id = 0;
 
        media_svc_retvm_if(handle == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Handle is NULL");
        media_svc_retvm_if(!STRING_VALID(storage_id), MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
@@ -231,11 +231,11 @@ int media_svc_insert_item_bulk(sqlite3 *handle, const char *storage_id, ms_user_
        media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, &content_info);
 
        /*Set or Get folder id*/
-       ret = _media_svc_get_and_append_folder_id_by_path(handle, true, storage_id, path, storage_type, folder_uuid, uid);
+       ret = _media_svc_get_and_append_folder_id_by_path(handle, true, storage_id, path, storage_type, &folder_id, uid);
        media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, &content_info);
 
-       content_info.folder_uuid = g_strdup(folder_uuid);
-       media_svc_retv_del_if(content_info.folder_uuid == NULL, MS_MEDIA_ERR_INTERNAL, &content_info);
+       content_info.folder_id = folder_id;
+       media_svc_retv_del_if(content_info.folder_id <= 0, MS_MEDIA_ERR_INTERNAL, &content_info);
 
        ret = _media_svc_insert_item_with_data(true, &content_info, true, uid);
        media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, &content_info);
@@ -262,7 +262,7 @@ int media_svc_insert_item_bulk(sqlite3 *handle, const char *storage_id, ms_user_
 int media_svc_insert_item_immediately(sqlite3 *handle, const char *storage_id, ms_user_storage_type_e storage_type, const char *path, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
-       char folder_uuid[MEDIA_SVC_UUID_SIZE + 1] = {0, };
+       long long int folder_id = 0;
 
        media_svc_retvm_if(handle == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Handle is NULL");
        media_svc_retvm_if(!STRING_VALID(storage_id), MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
@@ -303,11 +303,11 @@ int media_svc_insert_item_immediately(sqlite3 *handle, const char *storage_id, m
        media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, &content_info);
 
        /*Set or Get folder id*/
-       ret = _media_svc_get_and_append_folder_id_by_path(handle, false, storage_id, path, storage_type, folder_uuid, uid);
+       ret = _media_svc_get_and_append_folder_id_by_path(handle, false, storage_id, path, storage_type, &folder_id, uid);
        media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, &content_info);
 
-       content_info.folder_uuid = g_strdup(folder_uuid);
-       media_svc_retv_del_if(content_info.folder_uuid == NULL, MS_MEDIA_ERR_INTERNAL, &content_info);
+       content_info.folder_id = folder_id;
+       media_svc_retv_del_if(content_info.folder_id <= 0, MS_MEDIA_ERR_INTERNAL, &content_info);
 
        /* Extracting thumbnail */
        if (content_info.thumbnail_path == NULL) {
@@ -345,7 +345,7 @@ int media_svc_move_item(sqlite3 *handle,
        char *file_name = NULL;
        char *folder_path = NULL;
        int modified_time = 0;
-       char folder_uuid[MEDIA_SVC_UUID_SIZE + 1] = {0, };
+       long long int folder_id = 0;
        char old_thumb_path[MEDIA_SVC_PATHNAME_SIZE] = {0, };
        char dst_stg_id[MEDIA_SVC_UUID_SIZE + 1] = {0, };
        ms_user_storage_type_e org_stg_type = MS_USER_STORAGE_INTERNAL;
@@ -369,7 +369,7 @@ int media_svc_move_item(sqlite3 *handle,
        media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
 
        /*check and update folder*/
-       ret = _media_svc_get_and_append_folder_id_by_path(handle, false, dst_stg_id, dest_path, dst_stg_type, folder_uuid, uid);
+       ret = _media_svc_get_and_append_folder_id_by_path(handle, false, dst_stg_id, dest_path, dst_stg_type, &folder_id, uid);
        media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
 
        /*get filename*/
@@ -389,7 +389,7 @@ int media_svc_move_item(sqlite3 *handle,
        _media_svc_remove_file(old_thumb_path);
 
        /*move item*/
-       ret = _media_svc_update_item_by_path(src_path, dst_stg_id, dst_stg_type, dest_path, file_name, modified_time, folder_uuid, uid);
+       ret = _media_svc_update_item_by_path(src_path, dst_stg_id, dst_stg_type, dest_path, file_name, modified_time, folder_id, uid);
        g_free(file_name);
        media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
 
@@ -708,7 +708,7 @@ int media_svc_insert_folder(sqlite3 *handle, const char *storage_id, ms_user_sto
        media_svc_retvm_if(!STRING_VALID(path), MS_MEDIA_ERR_INVALID_PARAMETER, "path is NULL");
        media_svc_retvm_if(!_media_svc_is_valid_storage_type(storage_type), MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid storage_type");
 
-       return _media_svc_get_and_append_folder_id_by_folder_path(handle, storage_id, path, storage_type, uid);
+       return _media_svc_append_by_folder_path(handle, storage_id, path, storage_type, uid);
 }
 
 int media_svc_set_folder_validity(const char *start_path, int validity, bool is_recursive, uid_t uid)
index 437b223..3321cd6 100755 (executable)
@@ -27,8 +27,8 @@
 #include <media-util.h>
 
 int _media_svc_update_folder_modified_time(const char *folder_path, uid_t uid);
-int _media_svc_get_and_append_folder_id_by_path(sqlite3 *handle, bool is_direct, const char *storage_id, const char *path, ms_user_storage_type_e storage_type, char *folder_id, uid_t uid);
-int _media_svc_get_and_append_folder_id_by_folder_path(sqlite3 *handle, const char *storage_id, const char *path, ms_user_storage_type_e storage_type, uid_t uid);
+int _media_svc_get_and_append_folder_id_by_path(sqlite3 *handle, bool is_direct, const char *storage_id, const char *path, ms_user_storage_type_e storage_type, long long int *folder_id, uid_t uid);
+int _media_svc_append_by_folder_path(sqlite3 *handle, const char *storage_id, const char *path, ms_user_storage_type_e storage_type, uid_t uid);
 int _media_svc_set_folder_validity(bool is_direct, const char *start_path, int validity, bool is_recursive, uid_t uid);
 int _media_svc_check_folder_by_path(sqlite3 *handle, const char *path);
 
index 5ade78d..5288ef4 100755 (executable)
@@ -34,7 +34,7 @@ int _media_svc_update_item_with_data(bool is_direct, media_svc_content_info_s *c
 int _media_svc_get_thumbnail_path_by_path(sqlite3 *handle, const char *path, char *thumbnail_path);
 int _media_svc_delete_item_by_path(const char *path, uid_t uid);
 int _media_svc_update_item_validity(const char *path, int validity, bool stack_query, uid_t uid);
-int _media_svc_update_item_by_path(const char *src_path, const char *dst_storage_id, ms_user_storage_type_e dest_storage, const char *dest_path, const char *file_name, int modified_time, const char *folder_uuid, uid_t uid);
+int _media_svc_update_item_by_path(const char *src_path, const char *dst_storage_id, ms_user_storage_type_e dest_storage, const char *dest_path, const char *file_name, int modified_time, long long int folder_id, uid_t uid);
 int _media_svc_list_query_do(media_svc_query_type_e query_type, uid_t uid);
 int _media_svc_update_thumbnail_path(const char *path, const char *thumb_path, uid_t uid);
 int _media_svc_get_noti_info(sqlite3 *handle, const char *path, media_svc_noti_item **item);
index 5d1c912..1eb8adb 100755 (executable)
@@ -104,7 +104,7 @@ typedef struct {
        time_t  added_time;                                     /**< added time, time_t */
        time_t  modified_time;                          /**< modified time, time_t */
        time_t  timeline;                                       /**< timeline of media, time_t */
-       char            *folder_uuid;                                   /**< Unique ID of folder */
+       long long int folder_id;                                        /**< Unique ID of folder */
        int             album_id;                                       /**< Unique ID of album */
        char            *thumbnail_path;                                /**< Thumbnail image file path */
        int             is_drm;                                         /**< is_drm. o or 1 */
@@ -130,7 +130,6 @@ typedef enum {
        MEDIA_SVC_SEARCH_TYPE_DB,
 } media_svc_search_type_e;
 
-char * _media_info_generate_uuid(void);
 void _media_svc_remove_file(const char *path);
 int _media_svc_get_thumbnail_path(char *thumb_path, const char *pathname, const char *img_format, uid_t uid);
 int _media_svc_get_file_time(const char *full_path);