int msc_remove_extract_request(const ms_comm_msg_s *recv_msg);
int msc_set_cancel_extract_item(const char* path, int pid);
void msc_set_extract_blocked_path(const char *blocked_path);
-int msc_push_extract_request(ms_extract_type_e scan_type, ms_comm_msg_s *recv_msg);
#endif /*_MEDIA_SCANNER_EXTRACT_V2_H_*/
void msc_init_scanner(void);
void msc_deinit_scanner(void);
int msc_push_scan_request(ms_scan_type_e scan_type, ms_comm_msg_s *recv_msg);
-void msc_stop_scan_thread(void);
-int msc_get_remain_scan_request(ms_scan_type_e scan_type, int *remain_request);
-int msc_get_dir_scan_status(bool *scan_status);
#endif /*_MEDIA_SCANNER_SCAN_V2_H_*/
return ret;
}
-
-void msc_stop_scan_thread(void)
-{
- ms_comm_msg_s *data = NULL;
-
- msc_set_power_status(true);
-
- if (scan_queue2) {
- /*notify to scannig thread*/
- data = g_new0(ms_comm_msg_s, 1);
-
- data->pid = POWEROFF;
- msc_push_scan_request(MS_SCAN_DIRECTORY, data);
- }
-
- if (reg_queue2) {
- /*notify to register thread*/
- data = g_new0(ms_comm_msg_s, 1);
-
- data->pid = POWEROFF;
- msc_push_scan_request(MS_SCAN_REGISTER, data);
- }
-
- if (storage_queue2) {
- /*notify to register thread*/
- data = g_new0(ms_comm_msg_s, 1);
-
- data->pid = POWEROFF;
- msc_push_scan_request(MS_SCAN_STORAGE, data);
- }
-}
-
-int msc_get_remain_scan_request(ms_scan_type_e scan_type, int *remain_request)
-{
- int ret = MS_MEDIA_ERR_NONE;
-
- switch (scan_type) {
- case MS_SCAN_STORAGE:
- *remain_request = g_async_queue_length(storage_queue2);
- break;
- case MS_SCAN_DIRECTORY:
- *remain_request = g_async_queue_length(scan_queue2);
- break;
- case MS_SCAN_REGISTER:
- *remain_request = g_async_queue_length(reg_queue2);
- break;
- default:
- MS_DBG_ERR("invalid parameter");
- ret = MS_MEDIA_ERR_INVALID_PARAMETER;
- break;
- }
-
- return ret;
-}
-
-int msc_get_dir_scan_status(bool *scan_status)
-{
- *scan_status = g_directory_scan_processing2;
-
- return MS_MEDIA_ERR_NONE;
-}
-