Remove unused function 66/175166/3 submit/tizen/20180411.083552
authorMinje Ahn <minje.ahn@samsung.com>
Mon, 9 Apr 2018 06:13:35 +0000 (15:13 +0900)
committerhj kim <backto.kim@samsung.com>
Wed, 11 Apr 2018 08:38:00 +0000 (08:38 +0000)
1. Remove the code for scanner v2 only
2. Remove unused plugin function

Change-Id: I4498a02e2e48f007625af3d568790598394ea112
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
include/media-svc.h
plugin/media-content-plugin.c
src/common/media-svc-db-utils.c
src/common/media-svc-media-folder.c
src/common/media-svc-media.c
src/common/media-svc-storage.c
src/common/media-svc.c
src/include/common/media-svc-db-utils.h
src/include/common/media-svc-media-folder.h
src/include/common/media-svc-media.h
src/include/common/media-svc-storage.h

index 468f702..f547521 100755 (executable)
@@ -49,7 +49,6 @@ int media_svc_set_item_validity_begin(int data_cnt);
 int media_svc_set_item_validity_end(uid_t uid);
 int media_svc_set_item_validity(const char *storage_id, const char *path, int validity, uid_t uid);
 int media_svc_delete_item_by_path(MediaSvcHandle *handle, const char *storage_id, const char *path, uid_t uid);
-int media_svc_delete_all_items_in_storage(const char *storage_id, media_svc_storage_type_e storage_type, uid_t uid);
 int media_svc_delete_invalid_items_in_storage(MediaSvcHandle *handle, const char *storage_id, media_svc_storage_type_e storage_type, uid_t uid);
 int media_svc_set_all_storage_items_validity(const char *storage_id, media_svc_storage_type_e storage_type, int validity, uid_t uid);
 int media_svc_set_folder_items_validity(MediaSvcHandle *handle, const char *storage_id, const char *folder_path, int validity, int recursive, uid_t uid);
@@ -60,7 +59,6 @@ int media_svc_get_storage_type(const char *path, media_svc_storage_type_e *stora
 int media_svc_get_file_info(MediaSvcHandle *handle, const char *storage_id, const char *path, time_t *modified_time, unsigned long long *size);
 int media_svc_send_dir_update_noti(MediaSvcHandle *handle, const char *storage_id, const char *dir_path, const char *folder_id, media_item_update_type_e update_type, int pid);
 int media_svc_check_db_upgrade(MediaSvcHandle *handle, int user_version, uid_t uid);
-int media_svc_update_folder_time(MediaSvcHandle *handle, const char *storage_id, const char *folder_path, uid_t uid);
 int media_svc_publish_noti(media_item_type_e update_item, media_item_update_type_e update_type, const char *path, media_type_e media_type, const char *uuid, const char *mime_type);
 int media_svc_get_pinyin(const char *src_str, char **pinyin_str);
 int media_svc_check_pinyin_support(bool *support);
@@ -74,26 +72,16 @@ int media_svc_generate_uuid(char **uuid);
 int media_svc_check_storage(MediaSvcHandle *handle, const char *storage_id, char **storage_path, int *validity, uid_t uid);
 int media_svc_insert_storage(MediaSvcHandle *handle, const char *storage_id, const char *storage_name, const char *storage_path, media_svc_storage_type_e storage_type, uid_t uid);
 int media_svc_update_storage(MediaSvcHandle *handle, const char *storage_id, const char *storage_path, uid_t uid);
-int media_svc_delete_storage(MediaSvcHandle *handle, const char *storage_id, uid_t uid);
 int media_svc_set_storage_validity(MediaSvcHandle *handle, const char *storage_id, int validity, uid_t uid);
 int media_svc_get_storage_id(MediaSvcHandle *handle, const char *path, char *storage_id, uid_t uid);
 int media_svc_get_storage_path(MediaSvcHandle *handle, const char *storage_uuid, char **storage_path);
-int media_svc_get_storage_scan_status(MediaSvcHandle *handle, const char *storage_uuid, media_svc_scan_status_type_e *storage_status);
-int media_svc_set_storage_scan_status(const char *storage_uuid, media_svc_scan_status_type_e storage_status, uid_t uid);
 int media_svc_get_storage_list(MediaSvcHandle *handle, char ***storage_list, char ***storage_id_list, int **scan_status_list, int *count);
 int media_svc_delete_invalid_folder(const char *storage_id, int storage_type, uid_t uid);
 int media_svc_set_folder_validity(MediaSvcHandle *handle, const char *storage_id, const char *start_path, int validity, bool is_recursive, uid_t uid);
 
-int media_svc_insert_item_pass1(MediaSvcHandle *handle, const char *storage_id, media_svc_storage_type_e storage_type, const char *path, int is_burst, uid_t uid);
-
 int media_svc_insert_folder_begin(int data_cnt);
 int media_svc_insert_folder_end(uid_t uid);
 
-int media_svc_get_folder_scan_status(MediaSvcHandle *handle, const char *storage_id, const char *path, int *storage_status);
-int media_svc_set_folder_scan_status(const char *storage_id, const char *path, int storage_status, uid_t uid);
-int media_svc_get_folder_modified_time(MediaSvcHandle *handle, const char *path, const char *storage_id, bool *modified);
-int media_svc_get_null_scan_folder_list(MediaSvcHandle *handle, const char *storage_id, const char *folder_path, char ***folder_list, int *count);
-int media_svc_change_validity_item_batch(const char *storage_id, const char *path, int des_validity, int src_validity, uid_t uid);
 int media_svc_check_folder_exist_by_path(MediaSvcHandle *handle, const char *storage_id, const char *folder_path);
 int media_svc_get_folder_id(MediaSvcHandle *handle, const char *storage_id, const char *path, char *folder_id);
 
index 0042727..5514a46 100755 (executable)
@@ -371,24 +371,6 @@ int delete_item(void *handle, const char *storage_id, const char *file_path, uid
        return MEDIA_SVC_PLUGIN_ERROR;
 }
 
-int delete_all_items_in_storage(void *handle, const char *storage_id, int storage_type, uid_t uid, char **err_msg)
-{
-       int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
-
-       if (!STORAGE_VALID(storage_type)) {
-               __set_error_message(ERR_STORAGE_TYPE, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       ret = media_svc_delete_all_items_in_storage(storage_id, storage_type, uid);
-       if (ret < 0) {
-               __set_error_message(ret, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       return MEDIA_SVC_PLUGIN_ERROR_NONE;
-}
-
 int delete_all_invalid_items_in_storage(void *handle, const char *storage_id, int storage_type, uid_t uid, char **err_msg)
 {
        int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
@@ -462,24 +444,7 @@ int check_db(void *handle, uid_t uid, char **err_msg)
 
 int update_folder_time(void *handle, const char *storage_id, char *folder_path, uid_t uid, char **err_msg)
 {
-       int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
-
-       if (handle == NULL) {
-               __set_error_message(ERR_HANDLE, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       if (folder_path == NULL) {
-               __set_error_message(ERR_HANDLE, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       ret = media_svc_update_folder_time(handle, storage_id, folder_path, uid);
-       if (ret < 0) {
-               __set_error_message(ret, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
+       /* For scanner V2 */
        return MEDIA_SVC_PLUGIN_ERROR_NONE;
 }
 
@@ -550,24 +515,6 @@ int update_storage(void *handle, const char *storage_id, const char *storage_pat
        return MEDIA_SVC_PLUGIN_ERROR_NONE;
 }
 
-int delete_storage(void * handle, const char *storage_id, uid_t uid, char **err_msg)
-{
-       int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
-
-       if (handle == NULL) {
-               __set_error_message(ERR_HANDLE, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       ret = media_svc_delete_storage(handle, storage_id, uid);
-       if (ret < 0) {
-               __set_error_message(ret, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       return MEDIA_SVC_PLUGIN_ERROR_NONE;
-}
-
 int set_storage_validity(void * handle, const char *storage_id, int validity, uid_t uid, char **err_msg)
 {
        int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
@@ -624,15 +571,7 @@ int get_storage_id(void * handle, const char *path, char *storage_id, uid_t uid,
 
 int set_storage_scan_status(void *handle, const char *storage_id, int status, uid_t uid, char **err_msg)
 {
-       int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
-       media_svc_scan_status_type_e storage_status = status;
-
-       ret = media_svc_set_storage_scan_status(storage_id, storage_status, uid);
-       if (ret < 0) {
-               __set_error_message(ret, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
+       /* For scanner V2 */
        return MEDIA_SVC_PLUGIN_ERROR_NONE;
 }
 
@@ -715,29 +654,7 @@ int update_item_meta(void *handle, const char *file_path, const char *storage_id
 
 int insert_item_scan(void * handle, const char *storage_id, const char *file_path, int storage_type, uid_t uid, char **err_msg)
 {
-       int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
-
-       if (handle == NULL) {
-               __set_error_message(ERR_HANDLE, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       if (!STRING_VALID(file_path)) {
-               __set_error_message(ERR_FILE_PATH, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       if (!STORAGE_VALID(storage_type)) {
-               __set_error_message(ERR_STORAGE_TYPE, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       ret = media_svc_insert_item_pass1(handle, storage_id, storage_type, file_path, FALSE, uid);
-       if (ret < 0) {
-               __set_error_message(ret, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
+       /* For scanner V2 */
        return MEDIA_SVC_PLUGIN_ERROR_NONE;
 }
 
@@ -858,97 +775,32 @@ int set_folder_validity(void * handle, const char *storage_id, const char* start
 
 int get_folder_scan_status(void *handle, const char *storage_id, const char *path, int *status, char **err_msg)
 {
-       int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
-       int storage_status = 0;
-
-       if (handle == NULL) {
-               __set_error_message(ERR_HANDLE, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       ret = media_svc_get_folder_scan_status(handle, storage_id, path, &storage_status);
-       if (ret < 0) {
-               __set_error_message(ret, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       *status = storage_status;
-
-       return ret;
+       /* For scanner V2 */
+       return MEDIA_SVC_PLUGIN_ERROR_NONE;
 }
 
 int set_folder_scan_status(void *handle, const char *storage_id, const char *path, int status, uid_t uid, char **err_msg)
 {
-       int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
-       int storage_status = status;
-
-       ret = media_svc_set_folder_scan_status(storage_id, path, storage_status, uid);
-       if (ret < 0) {
-               __set_error_message(ret, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       return ret;
+       /* For scanner V2 */
+       return MEDIA_SVC_PLUGIN_ERROR_NONE;
 }
 
 int check_folder_modified(void *handle, const char *path, const char *storage_id, bool *modified, char **err_msg)
 {
-       int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
-       *modified = TRUE;
-
-       if (handle == NULL) {
-               __set_error_message(ERR_HANDLE, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       if (!STRING_VALID(path)) {
-               __set_error_message(ERR_FILE_PATH, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       ret = media_svc_get_folder_modified_time(handle, path, storage_id, modified);
-       if (ret < 0) {
-               __set_error_message(ret, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       return ret;
+       /* For scanner V2 */
+       return MEDIA_SVC_PLUGIN_ERROR_NONE;
 }
 
 int get_null_scan_folder_list(void *handle, const char *storage_id, const char *folder_path, char ***folder_list, int *count, char **err_msg)
 {
-       int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
-
-       if (handle == NULL) {
-               __set_error_message(ERR_HANDLE, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       if (count == NULL) {
-               __set_error_message(ERR_HANDLE, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       ret = media_svc_get_null_scan_folder_list(handle, storage_id, folder_path, folder_list, count);
-       if (ret < 0) {
-               __set_error_message(ret, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       return ret;
+       /* For scanner V2 */
+       return MEDIA_SVC_PLUGIN_ERROR_NONE;
 }
 
 int change_validity_item_batch(void **handle, const char *storage_id, const char *path, int des_validity, int src_validity, uid_t uid, char **err_msg)
 {
-       int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
-
-       ret = media_svc_change_validity_item_batch(storage_id, path, des_validity, src_validity, uid);
-       if (ret < 0) {
-               __set_error_message(ret, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       return ret;
+       /* For scanner V2 */
+       return MEDIA_SVC_PLUGIN_ERROR_NONE;
 }
 
 int check_folder_exist(void * handle, const char *storage_id, const char *folder_path, char **err_msg)
index b1dfd9f..f8b01df 100755 (executable)
@@ -1548,18 +1548,6 @@ ERROR:
        return ret;
 }
 
-int _media_svc_drop_media_table(const char *storage_id, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-
-       char *sql = sqlite3_mprintf("DROP TABLE IF EXISTS '%q'", storage_id);
-
-       ret = _media_svc_sql_query(sql, uid);
-       SQLITE3_SAFE_FREE(sql);
-
-       return ret;
-}
-
 int _media_svc_update_media_view(sqlite3 *db_handle, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
index f8003ba..ff7bb37 100755 (executable)
@@ -296,32 +296,6 @@ int _media_svc_get_and_append_folder_id_by_path(sqlite3 *handle, const char *sto
        return ret;
 }
 
-int _media_svc_get_folder_info_by_foldername(sqlite3 *handle, const char *storage_id, const char *folder_name, char *folder_id, time_t *modified_time)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       sqlite3_stmt *sql_stmt = NULL;
-
-       char *sql = sqlite3_mprintf("SELECT folder_uuid, modified_time FROM %q WHERE (storage_uuid = '%q' AND path = '%q');", MEDIA_SVC_DB_TABLE_FOLDER, storage_id, folder_name);
-
-       ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
-
-       if (ret != MS_MEDIA_ERR_NONE) {
-               if (ret == MS_MEDIA_ERR_DB_NO_RECORD)
-                       media_svc_debug("there is no folder.");
-               else
-                       media_svc_error("error when _media_svc_get_folder_id_by_foldername. err = [%d]", ret);
-
-               return ret;
-       }
-
-       SAFE_STRLCPY(folder_id, (const char *)sqlite3_column_text(sql_stmt, 0), MEDIA_SVC_UUID_SIZE + 1);
-       *modified_time = (int)sqlite3_column_int(sql_stmt, 1);
-
-       SQLITE3_FINALIZE(sql_stmt);
-
-       return ret;
-}
-
 int _media_svc_get_and_append_folder_id_by_folder_path(sqlite3 *handle, const char *storage_id, const char *path, media_svc_storage_type_e storage_type, char *folder_id, bool stack_query, uid_t uid)
 {
        char *path_name = NULL;
@@ -390,203 +364,11 @@ int _media_svc_set_folder_validity(sqlite3 *handle, const char *storage_id, cons
        return ret;
 }
 
-int _media_svc_delete_folder_by_storage_id(const char *storage_id, media_svc_storage_type_e storage_type, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       char *sql = NULL;
-
-       sql = sqlite3_mprintf("DELETE FROM %q WHERE storage_uuid = '%q' AND storage_type = %d;", MEDIA_SVC_DB_TABLE_FOLDER, storage_id, storage_type);
-       ret = _media_svc_sql_query(sql, uid);
-
-       SQLITE3_SAFE_FREE(sql);
-
-       return ret;
-}
-
 GList **_media_svc_get_folder_list_ptr(void)
 {
        return &g_media_svc_insert_folder_query_list;
 }
 
-int _media_svc_get_folder_scan_status(sqlite3 *handle, const char *storage_id, const char *path, int *scan_status)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       sqlite3_stmt *sql_stmt = NULL;
-       char *sql = NULL;
-
-       media_svc_retvm_if(!STRING_VALID(path), MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid path");
-
-       sql = sqlite3_mprintf("SELECT scan_status FROM %q WHERE path = '%q' AND storage_uuid = '%q'", MEDIA_SVC_DB_TABLE_FOLDER, path, storage_id);
-
-       ret = _media_svc_sql_prepare_to_step_simple(handle, sql, &sql_stmt);
-
-       media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
-
-       while (sqlite3_step(sql_stmt) == SQLITE_ROW)
-               *scan_status = sqlite3_column_int(sql_stmt, 0);
-
-       SQLITE3_FINALIZE(sql_stmt);
-
-       return ret;
-}
-
-int _media_svc_set_folder_scan_status(const char *storage_id, const char *path, int scan_status, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       char *sql = NULL;
-
-       if (path)
-               sql = sqlite3_mprintf("UPDATE %q SET scan_status=%d WHERE path = '%q' AND storage_uuid = '%q'", MEDIA_SVC_DB_TABLE_FOLDER, scan_status, path, storage_id);
-       else
-               sql = sqlite3_mprintf("UPDATE %q SET scan_status=%d WHERE storage_uuid = '%q'", MEDIA_SVC_DB_TABLE_FOLDER, scan_status, storage_id);
-
-       ret = _media_svc_sql_query(sql, uid);
-       SQLITE3_SAFE_FREE(sql);
-
-       return ret;
-}
-
-int _media_svc_get_folder_modified_time_by_path(sqlite3 *handle, const char *path, const char *storage_id, time_t *modified_time)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       sqlite3_stmt *sql_stmt = NULL;
-
-       char *sql = sqlite3_mprintf("SELECT modified_time FROM %q WHERE path = '%q' AND storage_uuid = '%q';", MEDIA_SVC_DB_TABLE_FOLDER, path, storage_id);
-
-       ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
-
-       if (ret != MS_MEDIA_ERR_NONE) {
-               if (ret == MS_MEDIA_ERR_DB_NO_RECORD)
-                       media_svc_debug("there is no folder.");
-               else
-                       media_svc_error("error when _media_svc_get_folder_modified_time_by_path. err = [%d]", ret);
-
-               return ret;
-       }
-
-       *modified_time = (int)sqlite3_column_int(sql_stmt, 0);
-
-       SQLITE3_FINALIZE(sql_stmt);
-
-       return ret;
-}
-
-int _media_svc_get_null_scan_folder_list(sqlite3 *handle, const char *storage_id, const char *path, char ***folder_list, int *count)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       int idx = 0;
-       int cnt = 0;
-       char *sql = NULL;
-       sqlite3_stmt *sql_stmt = NULL;
-
-       if (path == NULL) {
-               sql = sqlite3_mprintf("SELECT count(*) FROM %q WHERE storage_uuid = '%q' AND scan_status!=%d", MEDIA_SVC_DB_TABLE_FOLDER, storage_id, FOLDER_SCAN_DONE);
-               ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
-
-               if (ret != MS_MEDIA_ERR_NONE) {
-                       if (ret == MS_MEDIA_ERR_DB_NO_RECORD)
-                               media_svc_debug("there is no folder.");
-                       else
-                               media_svc_error("error when get folder_id by path. err = [%d]", ret);
-
-                       *folder_list = NULL;
-                       *count = 0;
-
-                       return ret;
-               }
-
-               cnt = sqlite3_column_int(sql_stmt, 0);
-               SQLITE3_FINALIZE(sql_stmt);
-               if (cnt > 0) {
-                       sql = sqlite3_mprintf("SELECT path FROM %q WHERE storage_uuid = '%q' AND scan_status!=%d", MEDIA_SVC_DB_TABLE_FOLDER, storage_id, FOLDER_SCAN_DONE);
-               } else {
-                       *folder_list = NULL;
-                       *count = 0;
-
-                       return MS_MEDIA_ERR_INTERNAL;
-               }
-
-               ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
-
-               if (ret != MS_MEDIA_ERR_NONE) {
-                       media_svc_error("prepare error [%s]", sqlite3_errmsg(handle));
-
-                       *folder_list = NULL;
-                       *count = 0;
-
-                       return ret;
-               }
-       } else {
-               sql = sqlite3_mprintf("SELECT count(*) FROM %q WHERE path IN (SELECT DISTINCT '%q/'||name from '%s' WHERE path LIKE '%q/%%')",
-                       MEDIA_SVC_DB_TABLE_FOLDER, path, MEDIA_SVC_DB_TABLE_FOLDER, 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_sql_prepare_to_step. err = [%d]", ret);
-                       return ret;
-               }
-
-               cnt = sqlite3_column_int(sql_stmt, 0);
-               SQLITE3_FINALIZE(sql_stmt);
-               if (cnt > 0) {
-                       sql = sqlite3_mprintf("SELECT path FROM %q WHERE path IN (SELECT DISTINCT '%q/'||name from '%s' WHERE path LIKE '%q/%%')",
-                               MEDIA_SVC_DB_TABLE_FOLDER, path, MEDIA_SVC_DB_TABLE_FOLDER, path);
-               } else {
-                       *folder_list = NULL;
-                       *count = 0;
-
-                       return MS_MEDIA_ERR_NONE;
-               }
-
-               ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
-
-               if (ret != MS_MEDIA_ERR_NONE) {
-                       media_svc_error("prepare error [%s]", sqlite3_errmsg(handle));
-
-                       *folder_list = NULL;
-                       *count = 0;
-
-                       return ret;
-               }
-       }
-
-       *folder_list = malloc(sizeof(char *) * cnt);
-       if (*folder_list == NULL) {
-               media_svc_error("Allocation failed");
-
-               *folder_list = NULL;
-               *count = 0;
-
-               return MS_MEDIA_ERR_OUT_OF_MEMORY;
-       }
-
-       while (1) {
-               (*folder_list)[idx] = strdup((char *)sqlite3_column_text(sql_stmt, 0));
-
-               if (sqlite3_step(sql_stmt) != SQLITE_ROW)
-                       break;
-               idx++;
-       }
-
-       if (cnt == idx + 1) {
-               *count = cnt;
-               media_svc_debug("OK");
-       } else {
-               /* free all data */
-               int i = 0;
-               for (i  = 0; i < idx; i++)
-                       SAFE_FREE((*folder_list)[i]);
-
-               SAFE_FREE(*folder_list);
-               *count = 0;
-               ret = MS_MEDIA_ERR_INTERNAL;
-       }
-
-       SQLITE3_FINALIZE(sql_stmt);
-
-       return ret;
-}
-
 int _media_svc_count_folder_with_path(sqlite3 *handle, const char *storage_id, const char *path, int *count)
 {
        int ret = MS_MEDIA_ERR_NONE;
index 1f45f5c..43754f2 100755 (executable)
@@ -465,18 +465,6 @@ int _media_svc_delete_item_by_path(const char *storage_id, const char *path, boo
        return ret;
 }
 
-int _media_svc_truncate_table(const char *storage_id, media_svc_storage_type_e storage_type, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-
-       char *sql = sqlite3_mprintf("DELETE FROM '%q' where storage_type=%d;", storage_id, storage_type);
-
-       ret = _media_svc_sql_query(sql, uid);
-       SQLITE3_SAFE_FREE(sql);
-
-       return ret;
-}
-
 int _media_svc_delete_invalid_items(sqlite3 *handle, const char *storage_id, media_svc_storage_type_e storage_type, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
@@ -790,55 +778,3 @@ int _media_svc_get_fileinfo_by_path(sqlite3 *handle, const char *storage_id, con
 
        return MS_MEDIA_ERR_NONE;
 }
-
-int _media_svc_change_validity_item_batch(const char *storage_id, const char *path, int des_validity, int src_validity, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-
-       char *sql = sqlite3_mprintf("UPDATE '%q' SET validity=%d WHERE validity=%d AND path LIKE '%q%%'", storage_id, des_validity, src_validity, path);
-
-       ret = _media_svc_sql_query(sql, uid);
-       SQLITE3_SAFE_FREE(sql);
-
-       return ret;
-}
-
-int _media_svc_insert_item_pass1(sqlite3 *handle, const char *storage_id, media_svc_content_info_s *content_info, int is_burst, bool stack_query, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-
-       char * db_fields = (char *)"media_uuid, folder_uuid, path, file_name, media_type, mime_type, size, added_time, modified_time, is_drm, storage_type, timeline, storage_uuid";
-
-       char *sql = sqlite3_mprintf("INSERT INTO '%q' (%q) VALUES (%Q, %Q, %Q, %Q, %d, %Q, %lld, %d, %d, %d, %d, %d, %Q);",
-               storage_id, db_fields,
-               content_info->media_uuid,
-               content_info->folder_uuid,
-               content_info->path,
-               content_info->file_name,
-               content_info->media_type,
-               content_info->mime_type,
-               content_info->size,
-               content_info->added_time,
-               content_info->modified_time,
-               content_info->is_drm,
-               content_info->storage_type,
-               content_info->timeline,
-               storage_id
-               );
-
-       media_svc_debug("MAKE PASS 1 QUERY END");
-
-       if (!stack_query) {
-               ret = _media_svc_sql_query(sql, uid);
-               SQLITE3_SAFE_FREE(sql);
-               if (ret != MS_MEDIA_ERR_NONE) {
-                       media_svc_error("failed to insert item");
-                       return ret;
-               }
-       } else {
-               media_svc_debug("query : %s", sql);
-               _media_svc_sql_query_add(&g_media_svc_insert_item_query_list, &sql);
-       }
-       media_svc_debug("END");
-       return MS_MEDIA_ERR_NONE;
-}
index 6222904..65e211a 100755 (executable)
@@ -120,20 +120,6 @@ int _media_svc_update_storage_path(sqlite3 *handle, const char *storage_id, cons
        return ret;
 }
 
-int _media_svc_delete_storage(const char *storage_id, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       char *sql = NULL;
-
-       if (storage_id != NULL)
-               sql = sqlite3_mprintf("DELETE FROM '%q' WHERE storage_uuid=%Q;", MEDIA_SVC_DB_TABLE_STORAGE, storage_id);
-
-       ret = _media_svc_sql_query(sql, uid);
-       SQLITE3_SAFE_FREE(sql);
-
-       return ret;
-}
-
 int _media_svc_delete_invalid_storage(sqlite3 *handle, media_svc_storage_type_e storage_type, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
@@ -277,34 +263,6 @@ int _media_svc_get_storage_uuid(sqlite3 *handle, const char *path, char *storage
        return ret;
 }
 
-int _media_svc_get_storage_type(sqlite3 *handle, const char *storage_id, media_svc_storage_type_e *storage_type)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       sqlite3_stmt *sql_stmt = NULL;
-       char *sql = NULL;
-
-       media_svc_retvm_if(!STRING_VALID(storage_id), MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid storage_id");
-
-       sql = sqlite3_mprintf("SELECT storage_type FROM '%q' WHERE storage_uuid=%Q", MEDIA_SVC_DB_TABLE_STORAGE, storage_id);
-
-       ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
-
-       if (ret != MS_MEDIA_ERR_NONE) {
-               if (ret == MS_MEDIA_ERR_DB_NO_RECORD)
-                       media_svc_debug("there is no storage.");
-               else
-                       media_svc_error("error when _media_svc_get_storage_type. err = [%d]", ret);
-
-               return ret;
-       }
-
-       *storage_type = sqlite3_column_int(sql_stmt, 0);
-
-       SQLITE3_FINALIZE(sql_stmt);
-
-       return ret;
-}
-
 int _media_svc_get_storage_path(sqlite3 *handle, const char *storage_id, char **storage_path)
 {
        int ret = MS_MEDIA_ERR_NONE;
@@ -333,52 +291,6 @@ int _media_svc_get_storage_path(sqlite3 *handle, const char *storage_id, char **
        return ret;
 }
 
-int _media_svc_get_storage_scan_status(sqlite3 *handle, const char *storage_id, media_svc_scan_status_type_e *scan_status)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       sqlite3_stmt *sql_stmt = NULL;
-       char *sql = NULL;
-
-       if (!STRING_VALID(storage_id)) {
-               media_svc_error("Invalid storage_id");
-               return MS_MEDIA_ERR_INVALID_PARAMETER;
-       }
-
-       sql = sqlite3_mprintf("SELECT scan_status FROM '%q' WHERE (storage_uuid=%Q AND validity=1)", MEDIA_SVC_DB_TABLE_STORAGE, storage_id);
-
-       ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
-       if (ret != MS_MEDIA_ERR_NONE) {
-               if (ret == MS_MEDIA_ERR_DB_NO_RECORD)
-                       media_svc_debug("there is no storage.");
-               else
-                       media_svc_error("error when _media_svc_get_storage_scan_status. err = [%d]", ret);
-
-               return ret;
-       }
-
-       *scan_status = sqlite3_column_int(sql_stmt, 0);
-
-       SQLITE3_FINALIZE(sql_stmt);
-
-       return ret;
-}
-
-int _media_svc_set_storage_scan_status(const char *storage_id, media_svc_scan_status_type_e scan_status, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       char *sql = NULL;
-
-       if (storage_id == NULL)
-               sql = sqlite3_mprintf("UPDATE '%q' SET scan_status=%d WHERE storage_uuid != 'media';", MEDIA_SVC_DB_TABLE_STORAGE, scan_status);
-       else
-               sql = sqlite3_mprintf("UPDATE '%q' SET scan_status=%d WHERE storage_uuid=%Q;", MEDIA_SVC_DB_TABLE_STORAGE, scan_status, storage_id);
-
-       ret = _media_svc_sql_query(sql, uid);
-       SQLITE3_SAFE_FREE(sql);
-
-       return ret;
-}
-
 static int __media_svc_count_all_storage(sqlite3 *handle, int *count)
 {
        int ret = MS_MEDIA_ERR_NONE;
index 5db097c..bd13e0b 100755 (executable)
@@ -678,34 +678,6 @@ int media_svc_delete_item_by_path(MediaSvcHandle *handle, const char *storage_id
        return MS_MEDIA_ERR_NONE;
 }
 
-int media_svc_delete_all_items_in_storage(const char *storage_id, media_svc_storage_type_e storage_type, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       char *thumb_path = NULL;
-
-       media_svc_debug("media_svc_delete_all_items_in_storage [%d]", storage_type);
-
-       media_svc_retvm_if(!STRING_VALID(storage_id), MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
-       media_svc_retvm_if(__media_svc_check_storage(storage_type) != TRUE, MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid storage_type");
-
-       ret = _media_svc_truncate_table(storage_id, storage_type, uid);
-       media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
-
-       if (storage_type != MEDIA_SVC_STORAGE_EXTERNAL_USB) {
-               ret = ms_user_get_thumb_store_path(uid, (ms_user_storage_type_e)storage_type, storage_id, &thumb_path);
-               if (!STRING_VALID(thumb_path)) {
-                       media_svc_error("fail to get thumbnail path");
-                       return MS_MEDIA_ERR_INTERNAL;
-               }
-
-               ret = _media_svc_remove_dir(storage_type, thumb_path);
-               SAFE_FREE(thumb_path);
-               media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
-       }
-
-       return MS_MEDIA_ERR_NONE;
-}
-
 int media_svc_delete_invalid_items_in_storage(MediaSvcHandle *handle, const char *storage_id, media_svc_storage_type_e storage_type, uid_t uid)
 {
        sqlite3 *db_handle = (sqlite3 *)handle;
@@ -1032,25 +1004,6 @@ int media_svc_check_db_upgrade(MediaSvcHandle *handle, int user_version, uid_t u
        return _media_svc_check_db_upgrade(db_handle, user_version, uid);
 }
 
-int media_svc_update_folder_time(MediaSvcHandle *handle, const char *storage_id, const char *folder_path, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       sqlite3 *db_handle = (sqlite3 *)handle;
-       time_t sto_time = 0;
-       int cur_time = _media_svc_get_file_time(folder_path);
-       char folder_uuid[MEDIA_SVC_UUID_SIZE + 1] = {0, };
-
-       media_svc_retvm_if(db_handle == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Handle is NULL");
-
-       ret = _media_svc_get_folder_info_by_foldername(db_handle, storage_id, folder_path, folder_uuid, &sto_time);
-       if (ret == MS_MEDIA_ERR_NONE) {
-               if (sto_time != cur_time)
-                       ret = _media_svc_update_folder_modified_time_by_folder_uuid(folder_uuid, folder_path, uid);
-       }
-
-       return ret;
-}
-
 int media_svc_update_item_begin(int data_cnt)
 {
        media_svc_debug("Transaction data count : [%d]", data_cnt);
@@ -1203,28 +1156,6 @@ int media_svc_get_storage_path(MediaSvcHandle *handle, const char *storage_uuid,
        return ret;
 }
 
-int media_svc_get_storage_scan_status(MediaSvcHandle *handle, const char *storage_uuid, media_svc_scan_status_type_e *storage_status)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       sqlite3 * db_handle = (sqlite3 *)handle;
-
-       media_svc_retvm_if(db_handle == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Handle is NULL");
-       media_svc_retvm_if(storage_uuid == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "storage_uuid is NULL");
-
-       ret = _media_svc_get_storage_scan_status(db_handle, storage_uuid, storage_status);
-
-       return ret;
-}
-
-int media_svc_set_storage_scan_status(const char *storage_uuid, media_svc_scan_status_type_e storage_status, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-
-       ret = _media_svc_set_storage_scan_status(storage_uuid, storage_status, uid);
-
-       return ret;
-}
-
 int media_svc_get_storage_list(MediaSvcHandle *handle, char ***storage_list, char ***storage_id_list, int **scan_status_list, int *count)
 {
        sqlite3 * db_handle = (sqlite3 *)handle;
@@ -1475,36 +1406,6 @@ int media_svc_insert_storage(MediaSvcHandle *handle, const char *storage_id, con
        return ret;
 }
 
-int media_svc_delete_storage(MediaSvcHandle *handle, const char *storage_id, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       sqlite3 *db_handle = (sqlite3 *)handle;
-       media_svc_storage_type_e storage_type;
-
-       media_svc_retvm_if(db_handle == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Handle is NULL");
-       media_svc_retvm_if(storage_id == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
-
-       ret = _media_svc_get_storage_type(db_handle, storage_id, &storage_type);
-       media_svc_retvm_if(ret != MS_MEDIA_ERR_NONE, ret, "_media_svc_get_storage_type failed : %d", ret);
-
-       ret = _media_svc_delete_storage(storage_id, uid);
-       media_svc_retvm_if(ret != MS_MEDIA_ERR_NONE, ret, "remove storage failed : %d", ret);
-
-       ret = _media_svc_delete_folder_by_storage_id(storage_id, storage_type, uid);
-       if (ret != MS_MEDIA_ERR_NONE)
-               media_svc_error("fail to _media_svc_delete_folder_by_storage_id. error : [%d]", ret);
-
-       if (storage_type != MEDIA_SVC_STORAGE_INTERNAL) {
-               ret = _media_svc_drop_media_table(storage_id, uid);
-               media_svc_retvm_if(ret != MS_MEDIA_ERR_NONE, ret, "drop table failed : %d", ret);
-
-               ret = _media_svc_update_media_view(db_handle, uid);
-               media_svc_retvm_if(ret != MS_MEDIA_ERR_NONE, ret, "update media view failed : %d", ret);
-       }
-
-       return ret;
-}
-
 int media_svc_insert_folder_begin(int data_cnt)
 {
        media_svc_debug("Transaction data count : [%d]", data_cnt);
@@ -1593,151 +1494,6 @@ int media_svc_set_folder_validity(MediaSvcHandle *handle, const char *storage_id
        return ret;
 }
 
-int media_svc_insert_item_pass1(MediaSvcHandle *handle, const char *storage_id, media_svc_storage_type_e storage_type, const char *path, int is_burst, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       sqlite3 * db_handle = (sqlite3 *)handle;
-       char folder_uuid[MEDIA_SVC_UUID_SIZE+1] = {0,};
-       media_svc_media_type_e media_type;
-
-       media_svc_retvm_if(db_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");
-       media_svc_retvm_if(!STRING_VALID(path), MS_MEDIA_ERR_INVALID_PARAMETER, "path is NULL");
-       media_svc_retvm_if(__media_svc_check_storage(storage_type) != TRUE, MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid storage_type");
-
-       media_svc_content_info_s content_info;
-       memset(&content_info, 0, sizeof(media_svc_content_info_s));
-
-       /*Set basic media info*/
-       ret = _media_svc_set_media_info(&content_info, storage_id, storage_type, path, &media_type, FALSE);
-       if (ret != MS_MEDIA_ERR_NONE) {
-               media_svc_error("_media_svc_set_media_info fail %d", ret);
-               return ret;
-       }
-
-       /*Set or Get folder id*/
-       ret = _media_svc_get_and_append_folder_id_by_path(db_handle, storage_id, path, storage_type, folder_uuid, 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);
-
-       if (g_media_svc_insert_item_data_cnt == 1) {
-
-               ret = _media_svc_insert_item_pass1(db_handle, storage_id, &content_info, is_burst, FALSE, uid);
-               media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, &content_info);
-
-               if (g_insert_with_noti)
-                       _media_svc_insert_item_to_noti_list(&content_info, g_media_svc_insert_item_cur_data_cnt++);
-       } else if (g_media_svc_insert_item_cur_data_cnt < (g_media_svc_insert_item_data_cnt - 1)) {
-
-               ret = _media_svc_insert_item_pass1(db_handle, storage_id, &content_info, is_burst, TRUE, uid);
-               media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, &content_info);
-
-               if (g_insert_with_noti)
-                       _media_svc_insert_item_to_noti_list(&content_info, g_media_svc_insert_item_cur_data_cnt);
-
-               media_svc_debug("g_media_svc_insert_item_cur_data_cnt %d", g_media_svc_insert_item_cur_data_cnt);
-               g_media_svc_insert_item_cur_data_cnt++;
-
-       } else if (g_media_svc_insert_item_cur_data_cnt == (g_media_svc_insert_item_data_cnt - 1)) {
-
-               ret = _media_svc_insert_item_pass1(db_handle, storage_id, &content_info, is_burst, TRUE, uid);
-               media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, &content_info);
-
-               if (g_insert_with_noti)
-                       _media_svc_insert_item_to_noti_list(&content_info, g_media_svc_insert_item_cur_data_cnt);
-
-               ret = _media_svc_list_query_do(MEDIA_SVC_QUERY_INSERT_ITEM, uid);
-               media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, &content_info);
-
-               media_svc_debug("_media_svc_list_query_do over");
-
-               if (g_insert_with_noti) {
-                       media_svc_debug("publish noti list %d", g_media_svc_insert_item_cur_data_cnt);
-                       _media_svc_publish_noti_list(g_media_svc_insert_item_cur_data_cnt + 1);
-                       _media_svc_destroy_noti_list(g_media_svc_insert_item_cur_data_cnt + 1);
-
-                       /* Recreate noti list */
-                       ret = _media_svc_create_noti_list(g_media_svc_insert_item_data_cnt);
-                       media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, &content_info);
-               }
-
-               g_media_svc_insert_item_cur_data_cnt = 0;
-
-       } else {
-               media_svc_error("Error in media_svc_insert_item_pass1");
-               _media_svc_destroy_content_info(&content_info);
-               return MS_MEDIA_ERR_INTERNAL;
-       }
-
-       _media_svc_destroy_content_info(&content_info);
-
-       return MS_MEDIA_ERR_NONE;
-}
-
-int media_svc_get_folder_scan_status(MediaSvcHandle *handle, const char *storage_id, const char *path, int *storage_status)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       sqlite3 * db_handle = (sqlite3 *)handle;
-
-       media_svc_retvm_if(db_handle == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Handle is NULL");
-       media_svc_retvm_if(path == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "path is NULL");
-
-       ret = _media_svc_get_folder_scan_status(db_handle, storage_id, path, storage_status);
-
-       return ret;
-}
-
-int media_svc_set_folder_scan_status(const char *storage_id, const char *path, int storage_status, uid_t uid)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-
-       ret = _media_svc_set_folder_scan_status(storage_id, path, storage_status, uid);
-
-       return ret;
-}
-
-int media_svc_get_folder_modified_time(MediaSvcHandle *handle, const char *path, const char *storage_id, bool *modified)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       sqlite3 * db_handle = (sqlite3 *)handle;
-       time_t modified_time = 0;
-       int system_time = 0;
-
-       media_svc_retvm_if(db_handle == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Handle is NULL");
-
-       ret = _media_svc_get_folder_modified_time_by_path(db_handle, path, storage_id, &modified_time);
-
-       system_time = _media_svc_get_file_time(path);
-       media_svc_error("modified_time = [%ld], system_time = [%d], path = [%s]", modified_time, system_time, path);
-
-       if (system_time != modified_time && system_time != 0)
-               *modified = TRUE;
-       else
-               *modified = FALSE;
-
-       return ret;
-}
-
-int media_svc_get_null_scan_folder_list(MediaSvcHandle *handle, const char *storage_id, const char *folder_path, char ***folder_list, int *count)
-{
-       sqlite3 * db_handle = (sqlite3 *)handle;
-
-       media_svc_retvm_if(db_handle == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Handle is NULL");
-       media_svc_retvm_if(count == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "count is NULL");
-
-       return _media_svc_get_null_scan_folder_list(db_handle, storage_id, folder_path, folder_list, count);
-}
-
-int media_svc_change_validity_item_batch(const char *storage_id, const char *path, int des_validity, int src_validity, uid_t uid)
-{
-       media_svc_retvm_if(storage_id == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
-       media_svc_retvm_if(path == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "path is NULL");
-
-       return _media_svc_change_validity_item_batch(storage_id, path, des_validity, src_validity, uid);
-}
-
 int media_svc_check_folder_exist_by_path(MediaSvcHandle *handle, const char *storage_id, const char *folder_path)
 {
        int ret = MS_MEDIA_ERR_NONE;
index 6b68895..f9117f8 100755 (executable)
@@ -34,7 +34,6 @@ int _media_svc_upgrade_table_query(sqlite3 *db_handle, const char *table_name, m
 int _media_svc_init_table_query(const char *event_table_name);
 void _media_svc_destroy_table_query();
 int _media_svc_create_media_table_with_id(const char *table_id, uid_t uid);
-int _media_svc_drop_media_table(const char *storage_id, uid_t uid);
 int _media_svc_update_media_view(sqlite3 *db_handle, uid_t uid);
 int _media_svc_sql_query(const char *sql_str, uid_t uid);
 int _media_svc_get_user_version(sqlite3 *db_handle, int *user_version);
index 5a7bc11..c52fa27 100755 (executable)
@@ -32,16 +32,10 @@ int _media_svc_update_folder_modified_time_by_folder_uuid(const char *folder_uui
 int _media_svc_get_and_append_folder(sqlite3 *handle, const char *storage_id, const char *path, media_svc_storage_type_e storage_type, char *folder_id, uid_t uid);
 int _media_svc_get_and_append_folder_id_by_path(sqlite3 *handle, const char *storage_id, const char *path, media_svc_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, media_svc_storage_type_e storage_type, char *folder_id, bool stack_query, uid_t uid);
-int _media_svc_get_folder_info_by_foldername(sqlite3 *handle, const char *storage_id, const char *folder_name, char *folder_id, time_t *modified_time);
 int _media_svc_delete_invalid_folder(const char *storage_id, int storage_type, uid_t uid);
 int _media_svc_set_folder_validity(sqlite3 *handle, const char *storage_id, const char *start_path, int validity, bool is_recursive, uid_t uid);
-int _media_svc_delete_folder_by_storage_id(const char *storage_id, media_svc_storage_type_e storage_type, uid_t uid);
 GList ** _media_svc_get_folder_list_ptr(void);
 
-int _media_svc_get_folder_scan_status(sqlite3 *handle, const char *storage_id, const char *path, int *scan_status);
-int _media_svc_set_folder_scan_status(const char *storage_id, const char *path, int scan_status, uid_t uid);
-int _media_svc_get_folder_modified_time_by_path(sqlite3 *handle, const char *path, const char *storage_id, time_t *modified_time);
-int _media_svc_get_null_scan_folder_list(sqlite3 *handle, const char *storage_id, const char *path, char ***folder_list, int *count);
 int _media_svc_count_folder_with_path(sqlite3 *handle, const char *storage_id, const char *path, int *count);
 int _media_svc_get_folder_uuid(sqlite3 *handle, const char *storage_id, const char *path, char *folder_id);
 
index 815bcfb..97e4d9d 100755 (executable)
@@ -35,7 +35,6 @@ int _media_svc_get_thumbnail_path_by_path(sqlite3 *handle, const char *path, cha
 int _media_svc_get_media_type_by_path(sqlite3 *handle, const char *storage_id, const char *path, int *media_type);
 int _media_svc_get_burst_id(sqlite3 *handle, const char *storage_id, int *id);
 int _media_svc_delete_item_by_path(const char *storage_id, const char *path, bool stack_query, uid_t uid);
-int _media_svc_truncate_table(const char *storage_id, media_svc_storage_type_e storage_type, uid_t uid);
 int _media_svc_delete_invalid_items(sqlite3 *handle, const char *storage_id, media_svc_storage_type_e storage_type, uid_t uid);
 int _media_svc_update_storage_item_validity(const char *storage_id, media_svc_storage_type_e storage_type, int validity, uid_t uid);
 int _media_svc_update_folder_item_validity(sqlite3 *handle, const char *storage_id, const char *folder_path, int validity, uid_t uid);
@@ -48,9 +47,6 @@ int _media_svc_get_noti_info(sqlite3 *handle, const char *storage_id, const char
 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);
 
-int _media_svc_change_validity_item_batch(const char *storage_id, const char *path, int des_validity, int src_validity, uid_t uid);
-int _media_svc_insert_item_pass1(sqlite3 *handle, const char *storage_id, media_svc_content_info_s *content_info, int is_burst, bool stack_query, uid_t uid);
-
 int _media_svc_append_query_list(const char *query, uid_t uid);
 
 #endif /*_MEDIA_SVC_MEDIA_H_*/
index 76ed4f8..6276e15 100755 (executable)
 int _media_svc_check_storage(sqlite3 *handle, const char *storage_id, 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);
 int _media_svc_update_storage_path(sqlite3 *handle, const char *storage_id, const char *path, uid_t uid);
-int _media_svc_delete_storage(const char *storage_id, uid_t uid);
 int _media_svc_delete_invalid_storage(sqlite3 *handle, media_svc_storage_type_e storage_type, uid_t uid);
 int _media_svc_update_storage_validity(const char *storage_id, int validity, uid_t uid);
 int _media_svc_get_storage_uuid(sqlite3 *handle, const char *path, char *storage_id, uid_t uid);
-int _media_svc_get_storage_type(sqlite3 *handle, const char *storage_id, media_svc_storage_type_e *storage_type);
 int _media_svc_get_storage_path(sqlite3 *handle, const char *storage_id, char **storage_path);
-int _media_svc_get_storage_scan_status(sqlite3 *handle, const char*storage_id, media_svc_scan_status_type_e *scan_status);
-int _media_svc_set_storage_scan_status(const char*storage_id, media_svc_scan_status_type_e scan_status, uid_t uid);
 int _media_svc_get_all_storage(sqlite3 *handle, char ***storage_list, char ***storage_id_list, int **scan_status_list, int *count);
 
 #endif /*_MEDIA_SVC_STORAGE_H_*/