FileSystemDummy.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:37k
源码类别:
MTK
开发平台:
C/C++
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * FileSystemDummy.c
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * Stub functions for WAP integration
- *
- * Author:
- * -------
- * -------
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- /*
- * We do not want to recompile WAP integration after MMI settings are changed.
- * As a result, we keep the code related to MMI settings here.
- *
- */
- #ifdef MMI_ON_WIN32
- #include "MMI_features.h"
- #include "stdC.h"
- #include "L4Dr1.h"
- #include "PixtelDataTypes.h"
- #include "wgui.h" /* for MMI_ID_TYPE */
- #include "fmt_def.h"
- #include "fmt_struct.h"
- #include "fat_fs.h"
- #include "Conversions.h"
- #include "time.h"
- #include "aud_id3_parser.h"
- #ifdef __MMI_FILE_MANAGER__
- extern void fmgr_copy_rsp_hdlr(void *info);
- extern void fmgr_delete_rsp_hdlr(void *info);
- #endif /* __MMI_FILE_MANAGER__ */
- //void FS_Read(){};
- //void FS_Seek(){};
- /*****************************************************************************
- * FUNCTION
- * kal_assert_fail
- * DESCRIPTION
- *
- * PARAMETERS
- * expr [?]
- * file [?]
- * line [IN]
- * isext [IN]
- * ex1 [IN]
- * ex2 [IN]
- * ex3 [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void kal_assert_fail(
- char *expr,
- char *file,
- kal_uint32 line,
- kal_bool isext,
- kal_uint32 ex1,
- kal_uint32 ex2,
- kal_uint32 ex3)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- //void FS_GetFileSize(){};
- //void FS_Open(){};
- //void FS_Close(){};
- //void mmi_audply_stop_playing(){};
- //void mmi_audply_show_playing_song_in_sub_LCD(){};
- //int g_audply(){return 0;};
- /*****************************************************************************
- * FUNCTION
- * mmiapi_enter_idle_screen_notify
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmiapi_enter_idle_screen_notify()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /* void mmi_audply_entry_main(){}; */
- #if 0
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif /* 0 */
- //void mmi_audply_save_volume(){};
- //void InitAudioPlayerApp(){};
- /*****************************************************************************
- * FUNCTION
- * evshed_resume_all_events
- * DESCRIPTION
- *
- * PARAMETERS
- * es [?]
- * RETURNS
- * void
- *****************************************************************************/
- void evshed_resume_all_events(event_scheduler *es)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * event_scheduler1_ptr
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void event_scheduler1_ptr()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * lcd_fb_update_to_memory
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void lcd_fb_update_to_memory()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /* void FS_GetDrive(){}; */
- /*****************************************************************************
- * FUNCTION
- * mmi_phb_image_check_drive
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_phb_image_check_drive()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- //void FS_Delete(){};
- //void FS_CreateDir(){};
- /*****************************************************************************
- * FUNCTION
- * writeRoamingStatusForMMS
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void writeRoamingStatusForMMS()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * setMmscVersion
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void setMmscVersion()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /* void FS_Write(){}; */
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_entry_forward_option
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_entry_forward_option()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vobj_entry_recv_object
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vobj_entry_recv_object()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vobj_get_file_buffer_size
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vobj_get_file_buffer_size()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * custom_get_fixed_ems_imelody_range
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void custom_get_fixed_ems_imelody_range()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_forward_option_select_card
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_forward_option_select_card()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_forward_option_my_card
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_forward_option_my_card()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_writer_v21_to_file
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_writer_v21_to_file()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_get_bday_to_buff
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_get_bday_to_buff()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vobj_fs_check_folder
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vobj_fs_check_folder()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_reader_retrive_bday
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_reader_retrive_bday()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_reader_retrive_org
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_reader_retrive_org()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_reader_retrive_email
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_reader_retrive_email()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_reader_retrive_number
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_reader_retrive_number()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_uti_get_line
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_uti_get_line()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_reader_get_field
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_reader_get_field()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_reader_check_header
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_reader_check_header()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_reader_check_version
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_reader_check_version()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_vcard_uti_get_single_line
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_vcard_uti_get_single_line()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- };
- //int mmi_audply_is_playing(){return 0;};
- //void InitStopwatchApp(){};
- //void InitStopwatchNVRAM(){};
- //void mmi_audply_is_play_activated(){};
- //void FS_SetAttributes() {};
- //void mmi_audply_press_dec_volume() {};
- //void mmi_audply_press_inc_volume() {};
- //void mmi_audply_single_play(){};
- //void mmi_audply_exit_subLCD() {};
- //void mmi_audply_redraw_subLCD(BOOL is_show) {};
- //void FS_FindClose() {};
- //void FS_FindNext() {};
- //void FS_FindFirst() {};
- /*****************************************************************************
- * FUNCTION
- * mmi_chset_convert
- * DESCRIPTION
- *
- * PARAMETERS
- * src_type [IN]
- * dest_type [IN]
- * src_buff [?]
- * dest_buff [?]
- * dest_size [IN]
- * RETURNS
- *
- *****************************************************************************/
- kal_int32 mmi_chset_convert(
- mmi_chset_enum src_type,
- mmi_chset_enum dest_type,
- char *src_buff,
- char *dest_buff,
- kal_int32 dest_size)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memcpy(dest_buff, src_buff, dest_size);
- return pfnUnicodeStrlen(dest_buff) * 2;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_chset_do_not_use_space_for_unknown_character
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_chset_do_not_use_space_for_unknown_character(void)
- {
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_chset_use_space_for_unknown_character
- * DESCRIPTION
- *
- * PARAMETERS
- * dest [?]
- * dest_size [IN]
- * src [?]
- * encoding [IN]
- * RETURNS
- *
- *****************************************************************************/
- void mmi_chset_use_space_for_unknown_character(void)
- {
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_chset_mixed_text_to_ucs2_str
- * DESCRIPTION
- *
- * PARAMETERS
- * dest [?]
- * dest_size [IN]
- * src [?]
- * encoding [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_chset_mixed_text_to_ucs2_str(kal_uint8 *dest, kal_int16 dest_size, kal_uint8 *src, mmi_chset_enum encoding)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memcpy(dest, src, dest_size);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_chset_text_to_ucs2
- * DESCRIPTION
- *
- * PARAMETERS
- * dest [?]
- * dest_size [IN]
- * src [?]
- * RETURNS
- *
- *****************************************************************************/
- kal_int32 mmi_chset_text_to_ucs2(kal_uint8 *dest, kal_int32 dest_size, kal_uint8 *src)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memcpy(dest, src, dest_size);
- return pfnUnicodeStrlen((const S8*)dest);
- }
- /*****************************************************************************
- * FUNCTION
- * kal_get_time
- * DESCRIPTION
- *
- * PARAMETERS
- * ticks_ptr [?]
- * RETURNS
- * void
- *****************************************************************************/
- void kal_get_time(kal_uint32 *ticks_ptr)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- time_t cur_time;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- time(&cur_time);
- *ticks_ptr = (kal_uint32) ((double)cur_time / 0.004615);
- }
- /*****************************************************************************
- * FUNCTION
- * kal_ticks_to_milli_secs
- * DESCRIPTION
- *
- * PARAMETERS
- * ticks [IN]
- * RETURNS
- * kal_uint32
- *****************************************************************************/
- kal_uint32 kal_ticks_to_milli_secs ( kal_uint32 ticks )
- {
- return( ticks * 4.615 );
- }
- /*****************************************************************************
- * FUNCTION
- * get_aud_info
- * DESCRIPTION
- *
- * PARAMETERS
- * path [IN]
- * id3 [?]
- * RETURNS
- *
- *****************************************************************************/
- int get_aud_info(char const *path, aud_info_struct *id3)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- FS_HANDLE fd = FS_Open((const WCHAR*)path, FS_READ_ONLY);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(id3, 0, sizeof(aud_info_struct));
- if (fd >= 0)
- {
- FS_GetFileSize(fd, (U32*) (&id3->size));
- FS_Close(fd);
- }
- return 0;
- }
- #ifdef __MMI_FILE_MANAGER__
- extern fmgr_filter_struct fmgr_filter[];
- /*****************************************************************************
- * FUNCTION
- * fmt_delete_by_filter_hdlr
- * DESCRIPTION
- *
- * PARAMETERS
- * path [?]
- * filter_mask [?]
- * RETURNS
- *
- *****************************************************************************/
- S32 fmt_delete_by_filter_hdlr(U8 *path, FMGR_FILTER *filter_mask)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- FS_HANDLE handle;
- FS_DOSDirEntry file_info;
- U8 file_name[40];
- S32 fs_ret;
- U8 i;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- pfnUnicodeStrcat((PS8) path, (PS8) L"*.*");
- handle = FS_FindFirst((WCHAR*) path, 0, 0, &file_info, (WCHAR*) file_name, 40);
- if (handle < 0)
- {
- return FS_NO_ERROR;
- }
- mmi_fmgr_remove_last_dir((char*)path);
- fs_ret = FS_SetCurrentDir((WCHAR*) path);
- if (fs_ret < 0)
- {
- return fs_ret;
- }
- while (1)
- {
- for (i = 0; i < FMGR_MAX_FILTER_COUNT; i++)
- {
- if (FMGR_FILTER_IS_SET(filter_mask, fmgr_filter[i].type))
- {
- if (strncmp((char*)file_info.Extension, (char*)fmgr_filter[i].ext, 3) == 0)
- {
- fs_ret = FS_Delete((WCHAR*) file_name);
- if (fs_ret < 0)
- {
- return fs_ret;
- }
- break;
- }
- }
- }
- fs_ret = FS_FindNext(handle, &file_info, (WCHAR*) file_name, 40);
- if (fs_ret < 0)
- {
- break;
- }
- }
- FS_FindClose(handle);
- return FS_NO_ERROR;
- }
- /*****************************************************************************
- * FUNCTION
- * fmt_delete_hdlr
- * DESCRIPTION
- *
- * PARAMETERS
- * local_para_ptr [?]
- * peer_buff_ptr [?]
- * RETURNS
- * void
- *****************************************************************************/
- void fmt_delete_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_fmt_delete_req_strcut *msg_ptr;
- mmi_fmt_delete_rsp_strcut param_ptr;
- S32 fs_ret;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- msg_ptr = (mmi_fmt_delete_req_strcut*) local_para_ptr;
- if (msg_ptr->type == FS_RECURSIVE_TYPE)
- {
- fs_ret = FS_XDelete((WCHAR*) msg_ptr->path, FS_FILE_TYPE | FS_DIR_TYPE | FS_RECURSIVE_TYPE, NULL, 0);
- }
- else if (msg_ptr->type == FS_DIR_TYPE)
- {
- if (FMGR_FILTER_IS_SET(((FMGR_FILTER*) (msg_ptr->filter)), FMGR_TYPE_ALL))
- {
- fs_ret = FS_XDelete((WCHAR*) msg_ptr->path, FS_FILE_TYPE, NULL, 0);
- }
- else
- {
- fs_ret = fmt_delete_by_filter_hdlr(msg_ptr->path, (FMGR_FILTER*) msg_ptr->filter);
- }
- }
- else if (msg_ptr->type == FS_FILE_TYPE)
- {
- fs_ret = FS_Delete((WCHAR*) msg_ptr->path);
- }
- param_ptr.result = fs_ret;
- fmgr_delete_rsp_hdlr(¶m_ptr);
- return;
- }
- /*****************************************************************************
- * FUNCTION
- * fmt_copy_hdlr
- * DESCRIPTION
- *
- * PARAMETERS
- * local_para_ptr [?]
- * peer_buff_ptr [?]
- * RETURNS
- * void
- *****************************************************************************/
- void fmt_copy_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_fmt_copy_req_strcut *msg_ptr;
- mmi_fmt_copy_rsp_strcut param_ptr;
- S32 fs_ret;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- msg_ptr = (mmi_fmt_copy_req_strcut*) local_para_ptr;
- if (msg_ptr->action == FMT_COPY)
- {
- fs_ret = FS_Move((WCHAR*) msg_ptr->src_file, (WCHAR*) msg_ptr->dest_file, FS_MOVE_COPY, NULL, NULL, 0);
- }
- else
- {
- fs_ret = FS_Move((WCHAR*) msg_ptr->src_file, (WCHAR*) msg_ptr->dest_file, FS_MOVE_KILL, NULL, NULL, 0);
- }
- param_ptr.result = fs_ret;
- fmgr_copy_rsp_hdlr(¶m_ptr);
- return;
- }
- #endif /* __MMI_FILE_MANAGER__ */
- int g_chset_text_encoding;
- #endif /* MMI_ON_WIN32 */