From: Minje Ahn Date: Wed, 26 Jul 2017 01:44:44 +0000 (+0900) Subject: Remove Unused function X-Git-Tag: submit/tizen/20170728.070738~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F53%2F140653%2F2;p=platform%2Fcore%2Fmultimedia%2Flibmedia-service.git Remove Unused function Change-Id: Idc767ea6c1a2adb41d2f9177ad125e95d449271f Signed-off-by: Minje Ahn --- diff --git a/src/common/media-svc-media.c b/src/common/media-svc-media.c index ab7d109..4181dd5 100755 --- a/src/common/media-svc-media.c +++ b/src/common/media-svc-media.c @@ -954,26 +954,6 @@ int _media_svc_count_invalid_folder_items(sqlite3 *handle, const char *storage_i return MS_MEDIA_ERR_NONE; } -int _media_svc_get_thumbnail_count(sqlite3 *handle, const char *storage_id, const char *thumb_path, int *count) -{ - int ret = MS_MEDIA_ERR_NONE; - sqlite3_stmt *sql_stmt = NULL; - char *sql = sqlite3_mprintf("SELECT count(*) FROM '%s' WHERE thumbnail_path=%Q", storage_id, thumb_path); - - ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt); - - if (ret != MS_MEDIA_ERR_NONE) { - media_svc_error("error when _media_svc_get_thumbnail_count. err = [%d]", ret); - return ret; - } - - *count = sqlite3_column_int(sql_stmt, 0); - - SQLITE3_FINALIZE(sql_stmt); - - return MS_MEDIA_ERR_NONE; -} - int _media_svc_get_fileinfo_by_path(sqlite3 *handle, const char *storage_id, const char *path, time_t *modified_time, unsigned long long *size) { int ret = MS_MEDIA_ERR_NONE; diff --git a/src/common/media-svc-storage.c b/src/common/media-svc-storage.c index fb45861..3037b1e 100755 --- a/src/common/media-svc-storage.c +++ b/src/common/media-svc-storage.c @@ -26,38 +26,6 @@ #include "media-svc-util.h" #include "media-svc-storage.h" -int _media_svc_init_storage(sqlite3 *handle, uid_t uid) -{ - int ret = MS_MEDIA_ERR_NONE; - char *sql = NULL; - sqlite3_stmt *sql_stmt = NULL; - int storage_cnt = 0; - - /*Add Internal storage*/ - sql = sqlite3_mprintf("SELECT COUNT(*) FROM '%s' WHERE storage_uuid='%s' AND storage_name='%s'", MEDIA_SVC_DB_TABLE_STORAGE, MEDIA_SVC_DB_TABLE_MEDIA, MEDIA_SVC_DB_TABLE_MEDIA); - ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt); - media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); - - storage_cnt = sqlite3_column_int(sql_stmt, 0); - SQLITE3_FINALIZE(sql_stmt); - - if (storage_cnt == 0) { - char *internal_path = NULL; - ret = ms_user_get_internal_root_path(uid, &internal_path); - media_svc_retvm_if(ret != MS_MEDIA_ERR_NONE, ret, "Fail to get root path"); - - sql = sqlite3_mprintf("INSERT INTO %s (storage_uuid, storage_name, storage_path, storage_type) VALUES ('%s', '%s', '%s', 0);", - MEDIA_SVC_DB_TABLE_STORAGE, MEDIA_SVC_DB_TABLE_MEDIA, MEDIA_SVC_DB_TABLE_MEDIA, internal_path); - - ret = _media_svc_sql_query(sql, uid); - SQLITE3_SAFE_FREE(sql); - SAFE_FREE(internal_path); - media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); - } - - return ret; -} - int _media_svc_get_mmc_info(MediaSvcHandle *handle, char **storage_name, char **storage_path, int *validity, bool *info_exist) { int ret = MS_MEDIA_ERR_NONE; diff --git a/src/include/common/media-svc-media.h b/src/include/common/media-svc-media.h index 7e385d2..567e51c 100755 --- a/src/include/common/media-svc-media.h +++ b/src/include/common/media-svc-media.h @@ -47,7 +47,6 @@ int _media_svc_list_query_do(media_svc_query_type_e query_type, uid_t uid); int _media_svc_update_thumbnail_path(const char *storage_id, const char *path, const char *thumb_path, uid_t uid); int _media_svc_get_noti_info(sqlite3 *handle, const char *storage_id, const char *path, int update_item, media_svc_noti_item **item); int _media_svc_count_invalid_folder_items(sqlite3 *handle, const char *storage_id, const char *folder_path, int *count); -int _media_svc_get_thumbnail_count(sqlite3 *handle, const char *storage_id, const char *thumb_path, int *count); int _media_svc_get_fileinfo_by_path(sqlite3 *handle, const char *storage_id, const char *path, time_t *modified_time, unsigned long long *size); int _media_svc_update_meta_with_data(media_svc_content_info_s *content_info); diff --git a/src/include/common/media-svc-storage.h b/src/include/common/media-svc-storage.h index 7385fe0..500b4f8 100755 --- a/src/include/common/media-svc-storage.h +++ b/src/include/common/media-svc-storage.h @@ -24,7 +24,6 @@ #include -int _media_svc_init_storage(sqlite3 *handle, uid_t uid); int _media_svc_get_mmc_info(MediaSvcHandle *handle, char **storage_name, char **storage_path, int *validity, bool *info_exist); int _media_svc_check_storage(sqlite3 *handle, const char *storage_id, const char *storage_name, char **storage_path, int *validity, uid_t uid); int _media_svc_append_storage(const char *storage_id, const char *storage_name, const char *storage_path, media_svc_storage_type_e storage_type, uid_t uid);