Remove unused plugin API 27/150627/1
authorMinje Ahn <minje.ahn@samsung.com>
Mon, 18 Sep 2017 06:04:43 +0000 (15:04 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Mon, 18 Sep 2017 06:04:43 +0000 (15:04 +0900)
Change-Id: Ic52583c3217d9bba3cc23b5da8b6267d9a40a373
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.c
src/include/common/media-svc-db-utils.h

index 40f2912..0f407d4 100755 (executable)
@@ -60,7 +60,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_check_db_corrupt(MediaSvcHandle *handle);
 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);
index f40aa14..5fb0484 100755 (executable)
@@ -461,20 +461,6 @@ int check_db(void *handle, uid_t uid, char **err_msg)
        return MEDIA_SVC_PLUGIN_ERROR_NONE;
 }
 
-int check_db_corrupt(void *handle, char **err_msg)
-{
-       int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
-
-       /*check db version*/
-       ret = media_svc_check_db_corrupt(handle);
-       if (ret < 0) {
-               __set_error_message(ret, err_msg);
-               return MEDIA_SVC_PLUGIN_ERROR;
-       }
-
-       return MEDIA_SVC_PLUGIN_ERROR_NONE;
-}
-
 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;
index 7f97472..14625ff 100755 (executable)
@@ -1504,35 +1504,6 @@ int _media_svc_check_db_upgrade(sqlite3 *db_handle, int user_version, uid_t uid)
        }
 }
 
-int _media_db_check_corrupt(sqlite3 *db_handle)
-{
-       int ret = MS_MEDIA_ERR_NONE;
-       char *sql = sqlite3_mprintf("PRAGMA quick_check(1)");
-       sqlite3_stmt *sql_stmt = NULL;
-       char *result = NULL;
-
-       ret = _media_svc_sql_prepare_to_step(db_handle, sql, &sql_stmt);
-       if (ret != MS_MEDIA_ERR_NONE) {
-               media_svc_error("error when check db. err = [%d]", ret);
-               return ret;
-       }
-
-       result = (char *)sqlite3_column_text(sql_stmt, 0);
-       SQLITE3_FINALIZE(sql_stmt);
-
-       if (result != NULL) {
-               media_svc_debug("result %s", result);
-               if (strcasecmp(result, "OK"))
-                       ret = MS_MEDIA_ERR_DB_CORRUPT;
-       } else {
-               media_svc_error("result is NULL");
-               ret = MS_MEDIA_ERR_DB_INTERNAL;
-       }
-
-       return ret;
-}
-
-
 int _media_svc_create_media_table_with_id(const char *table_id, uid_t uid)
 {
        int ret = MS_MEDIA_ERR_NONE;
index 2a139e6..c7968a1 100755 (executable)
@@ -1110,17 +1110,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_check_db_corrupt(MediaSvcHandle *handle)
-{
-       sqlite3 *db_handle = (sqlite3 *)handle;
-
-       media_svc_debug_fenter();
-
-       media_svc_retvm_if(db_handle == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Handle is NULL");
-
-       return _media_db_check_corrupt(db_handle);
-}
-
 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;
index 7881ec7..0ed80a9 100755 (executable)
@@ -48,6 +48,5 @@ int _media_svc_sql_query_list(GList **query_list, uid_t uid);
 void _media_svc_sql_query_add(GList **query_list, char **query);
 void _media_svc_sql_query_release(GList **query_list);
 int _media_svc_check_db_upgrade(sqlite3 *db_handle, int user_version, uid_t uid);
-int _media_db_check_corrupt(sqlite3 *db_handle);
 
 #endif /*_MEDIA_SVC_DB_UTILS_H_*/