Change folder_id to row id instead of uuid 43/282843/2 accepted/tizen/unified/20221102.020551
authorminje.ahn <minje.ahn@samsung.com>
Wed, 12 Oct 2022 07:24:32 +0000 (16:24 +0900)
committerminje.ahn <minje.ahn@samsung.com>
Thu, 13 Oct 2022 04:35:50 +0000 (13:35 +0900)
Change to row id instead of uuid for manageability.

Change-Id: Ic7f78f20980e72397ab55405fbc436f25cda1419
Signed-off-by: minje.ahn <minje.ahn@samsung.com>
include/media_content_type.h
include_product/media_content_type.h
src/media_db.c

index d13d0ac..9923333 100755 (executable)
@@ -321,7 +321,7 @@ typedef void (*media_scan_completed_cb)(media_content_error_e error, void * user
  * @param[in] update_item The update item of notification
  * @param[in] update_type The update type of notification
  * @param[in] media_type The type of the media content (#media_content_type_e)
- * @param[in] uuid The UUID of media or directory, which is updated
+ * @param[in] uuid The ID of media or directory, which is updated
  * @param[in] path The path of the media or directory
  * @param[in] mime_type The MIME of the media info
  * @param[in] user_data The user data passed from the foreach function
@@ -335,7 +335,7 @@ typedef void (*media_content_db_update_cb)(
                                media_content_db_update_item_type_e update_item,
                                media_content_db_update_type_e update_type,
                                media_content_type_e media_type,
-                               char *uuid,
+                               char *id,
                                char *path,
                                char *mime_type,
                                void *user_data);
index 4066a59..2c7887c 100755 (executable)
@@ -381,7 +381,7 @@ typedef void (*media_scan_completed_cb)(media_content_error_e error, void * user
  * @param[in] update_item The update item of notification
  * @param[in] update_type The update type of notification
  * @param[in] media_type The type of the media content (#media_content_type_e)
- * @param[in] uuid The UUID of media or directory, which is updated
+ * @param[in] uuid The ID of media or directory, which is updated
  * @param[in] path The path of the media or directory
  * @param[in] mime_type The MIME of the media info
  * @param[in] user_data The user data passed from the foreach function
@@ -395,7 +395,7 @@ typedef void (*media_content_db_update_cb)(
                                media_content_db_update_item_type_e update_item,
                                media_content_db_update_type_e update_type,
                                media_content_type_e media_type,
-                               char *uuid,
+                               char *id,
                                char *path,
                                char *mime_type,
                                void *user_data);
index f382923..e9a125f 100755 (executable)
@@ -670,8 +670,11 @@ int _media_db_get_folder(filter_h filter, media_folder_cb callback, void *user_d
 
        while (sqlite3_step(stmt) == SQLITE_ROW) {
                media_folder_s *_folder = g_new0(media_folder_s, 1);
-
+#ifdef _USE_TVPD_MODE
                _folder->folder_id = g_strdup((const char *)sqlite3_column_text(stmt, 0));
+#else
+               _folder->folder_id = g_strdup_printf("%lld", sqlite3_column_int64(stmt, 0));
+#endif
                _folder->path = g_strdup((const char *)sqlite3_column_text(stmt, 1));
                _folder->name = g_strdup((const char *)sqlite3_column_text(stmt, 2));
                _folder->storage_type = sqlite3_column_int(stmt, 3);