From 5937c1fb1284b474dca9c1047aafe6bd45ce4f39 Mon Sep 17 00:00:00 2001 From: Haejeong Kim Date: Thu, 17 Aug 2017 16:30:39 +0900 Subject: [PATCH] Remove unused code Change-Id: Ic4f2f51960725438d645aca5b9624fb970cd8954 --- include/dcm_svc_db.h | 1 - src/dcm_svc_db.c | 52 -------------------------------------------- 2 files changed, 53 deletions(-) diff --git a/include/dcm_svc_db.h b/include/dcm_svc_db.h index 43e738d..e432410 100755 --- a/include/dcm_svc_db.h +++ b/include/dcm_svc_db.h @@ -64,7 +64,6 @@ typedef enum { int dcm_svc_db_connect(uid_t uid); int dcm_svc_db_disconnect(); int dcm_svc_db_get_scan_image_info_by_path(const char *file_path, dcm_svc_item_s **scan_item); -int dcm_svc_db_get_scan_image_list_by_path(GList **image_list, const char *file_path); int dcm_svc_db_get_scan_image_list_from_db(GList **image_list); int dcm_svc_db_insert_category_to_db(void *item); int dcm_svc_db_generate_uuid(dcm_face_item_s **face); diff --git a/src/dcm_svc_db.c b/src/dcm_svc_db.c index 10c16e8..334b5d0 100755 --- a/src/dcm_svc_db.c +++ b/src/dcm_svc_db.c @@ -252,58 +252,6 @@ int dcm_svc_db_get_scan_image_info_by_path(const char *file_path, dcm_svc_item_s return ret; } -int dcm_svc_db_get_scan_image_list_by_path(GList **image_list, const char *file_path) -{ - int ret = MS_MEDIA_ERR_NONE; - char *query_string = NULL; - sqlite3_stmt *sql_stmt = NULL; - - dcm_debug_fenter(); - - DCM_CHECK_VAL(db_handle, MS_MEDIA_ERR_INVALID_PARAMETER); - DCM_CHECK_VAL(file_path, MS_MEDIA_ERR_INVALID_PARAMETER); - - /* Make query */ - query_string = sqlite3_mprintf(SELECT_MEDIA_INFO_BY_FILE_PATH_FROM_DB, file_path); - DCM_CHECK_VAL(query_string, MS_MEDIA_ERR_OUT_OF_MEMORY); - - ret = __dcm_svc_sql_prepare_to_step_simple((sqlite3 *)db_handle, query_string, &sql_stmt); - if (ret != MS_MEDIA_ERR_NONE) { - dcm_error("error when __dcm_svc_sql_prepare_to_step. ret = [%d]", ret); - return TRUE; - } - - while (sqlite3_step(sql_stmt) == SQLITE_ROW) { - dcm_svc_item_s *scan_item = (dcm_svc_item_s *) g_malloc0(sizeof(dcm_svc_item_s)); - if (!scan_item) { - dcm_error("Failed to allocate memory for scan_item!"); - continue; - } - - scan_item->media_uuid = g_strdup((const char *)sqlite3_column_text(sql_stmt, 0)); - scan_item->file_path = g_strdup(file_path); - scan_item->storage_uuid = g_strdup((const char *)sqlite3_column_text(sql_stmt, 1)); - scan_item->image_width = sqlite3_column_int(sql_stmt, 2); - scan_item->image_height = sqlite3_column_int(sql_stmt, 3); - scan_item->image_orientation = sqlite3_column_int(sql_stmt, 4); - scan_item->mime_type = g_strdup((const char *)sqlite3_column_text(sql_stmt, 5)); - scan_item->modified_time = sqlite3_column_int(sql_stmt, 6); - - /* scan item retrieved by this function will be marked as SCAN_SINGLE */ - scan_item->scan_item_type = DCM_SCAN_ITEM_TYPE_SCAN_SINGLE; - - *image_list = g_list_append(*image_list, scan_item); - - dcm_sec_debug("media uuid: [%s] file path: [%s]", scan_item->media_uuid, scan_item->file_path); - } - - DCM_SQLITE3_FINALIZE(sql_stmt); - - dcm_debug_fleave(); - - return ret; -} - int dcm_svc_db_get_scan_image_list_from_db(GList **image_list) { int ret = MS_MEDIA_ERR_NONE; -- 2.34.1