}
#endif
-int ms_set_db_status(ms_db_status_type_t status, ms_user_storage_type_e storage_type)
+int ms_set_db_status(ms_db_status_type_t status)
{
int ret = MS_MEDIA_ERR_NONE;
if (status == MS_DB_UPDATING) {
if (!ms_config_set_int(VCONFKEY_FILEMANAGER_DB_STATUS, VCONFKEY_FILEMANAGER_DB_UPDATING))
goto ERROR;
-
- if (storage_type == MS_USER_STORAGE_EXTERNAL) {
- if (!ms_config_set_int(VCONFKEY_FILEMANAGER_MMC_STATUS, VCONFKEY_FILEMANAGER_MMC_LOADING))
- goto ERROR;
- }
} else {
if (!ms_config_set_int(VCONFKEY_FILEMANAGER_DB_STATUS, VCONFKEY_FILEMANAGER_DB_UPDATED))
goto ERROR;
-
- if (storage_type == MS_USER_STORAGE_EXTERNAL) {
- if (!ms_config_set_int(VCONFKEY_FILEMANAGER_MMC_STATUS, VCONFKEY_FILEMANAGER_MMC_LOADED))
- goto ERROR;
- }
}
ret = ms_set_power_mode(status);
int ret = MS_MEDIA_ERR_NONE;
ms_comm_msg_s *scan_data = NULL;
sqlite3 *handle = NULL;
- ms_user_storage_type_e storage_type = MS_USER_STORAGE_INTERNAL;
while (1) {
scan_data = g_async_queue_pop(storage_queue2);
goto NEXT;
}
- ret = ms_user_get_storage_type(scan_data->uid, scan_data->msg, &storage_type);
- if (ret != MS_MEDIA_ERR_NONE) {
- MS_DBG_ERR("ms_user_get_storage_type failed");
- goto NEXT;
- }
-
ret = __msc_check_memory_status(scan_data->uid);
if (ret != MS_MEDIA_ERR_NONE) {
ms_set_storage_scan_status(handle, scan_data->storage_id, MEDIA_SCAN_STOP, scan_data->uid);
ms_set_storage_scan_status(handle, scan_data->storage_id, MEDIA_SCAN_PROCESSING, scan_data->uid);
- ms_set_db_status(MS_DB_UPDATING, storage_type);
+ ms_set_db_status(MS_DB_UPDATING);
if (scan_data->msg_type != MS_MSG_STORAGE_INVALID)
ms_register_start(false, 0);
if (ret == MS_MEDIA_ERR_SCANNER_FORCE_STOP) {
ms_set_storage_scan_status(handle, scan_data->storage_id, MEDIA_SCAN_STOP, scan_data->uid);
- ms_set_db_status(MS_DB_STOPPED, storage_type);
+ ms_set_db_status(MS_DB_STOPPED);
} else {
ms_set_storage_scan_status(handle, scan_data->storage_id, MEDIA_SCAN_COMPLETE, scan_data->uid);
- ms_set_db_status(MS_DB_UPDATED, storage_type);
+ ms_set_db_status(MS_DB_UPDATED);
}
MS_DBG_WARN("storage_id = [%s]", scan_data->storage_id);
return NULL;
}
-static int __msc_storage_scan_partial(ms_comm_msg_s *scan_data, ms_user_storage_type_e storage_type)
+static int __msc_storage_scan_partial(ms_comm_msg_s *scan_data)
{
int ret = MS_MEDIA_ERR_NONE;
sqlite3 *handle = NULL;
ret = ms_connect_db(&handle, scan_data->uid);
MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "ms_connect_db failed");
- ms_set_db_status(MS_DB_UPDATING, storage_type);
+ ms_set_db_status(MS_DB_UPDATING);
ret = ms_validity_change_all_items(handle, scan_data->storage_id, false, scan_data->uid);
if (ret != MS_MEDIA_ERR_NONE) {
return ret;
}
-static int __msc_storage_scan_all(ms_comm_msg_s *scan_data, ms_user_storage_type_e storage_type)
+static int __msc_storage_scan_all(ms_comm_msg_s *scan_data)
{
int ret = MS_MEDIA_ERR_NONE;
sqlite3 *handle = NULL;
ret = ms_connect_db(&handle, scan_data->uid);
MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "ms_connect_db failed");
- ms_set_db_status(MS_DB_UPDATING, storage_type);
+ ms_set_db_status(MS_DB_UPDATING);
ms_register_start(false, 0);
ret = __msc_db_update(handle, scan_data->storage_id, scan_data);
{
int ret = MS_MEDIA_ERR_NONE;
ms_comm_msg_s *scan_data = NULL;
- ms_user_storage_type_e storage_type = MS_USER_STORAGE_INTERNAL;
while (1) {
scan_data = g_async_queue_pop(storage_queue);
goto NEXT;
}
- ret = ms_user_get_storage_type(scan_data->uid, scan_data->msg, &storage_type);
- if (ret != MS_MEDIA_ERR_NONE) {
- MS_DBG_ERR("ms_user_get_storage_type failed");
- goto NEXT;
- }
-
if (scan_data->msg_type == MS_MSG_STORAGE_PARTIAL) {
- ret = __msc_storage_scan_partial(scan_data, storage_type);
+ ret = __msc_storage_scan_partial(scan_data);
} else if (scan_data->msg_type == MS_MSG_STORAGE_ALL || scan_data->msg_type == MS_MSG_STORAGE_INVALID) {
- ret = __msc_storage_scan_all(scan_data, storage_type);
+ ret = __msc_storage_scan_all(scan_data);
} else {
MS_DBG_ERR("Invalid request[%d]", scan_data->msg_type);
ret = MS_MEDIA_ERR_INVALID_PARAMETER;
ms_send_dir_update_noti(scan_data->msg, NULL, MS_ITEM_UPDATE, scan_data->pid);
if (ret == MS_MEDIA_ERR_SCANNER_FORCE_STOP)
- ms_set_db_status(MS_DB_STOPPED, storage_type);
+ ms_set_db_status(MS_DB_STOPPED);
else
- ms_set_db_status(MS_DB_UPDATED, storage_type);
+ ms_set_db_status(MS_DB_UPDATED);
NEXT:
if (__msc_is_power_off())
goto _POWEROFF;