MTK平台学习--FileManager模块分析
来源:互联网 发布:qq抓取软件 编辑:程序博客网 时间:2024/05/16 17:16
FileManager模块分析
一、 External Interface
1. 给其他模块使用的接口函数 作用
mmi_fmgr_init initialize file manager context
mmi_fmgr_select_path_and_entry entry point to file manager for other applications
mmi_fmgr_reset_app_select reset selection from other application
GetFileSystemErrorString convert file system return error code to error messgae pop up
2. 分析mmi_fmgr_select_path_and_entry, mmi_fmgr_reset_app_selec
函数原型: void mmi_fmgr_select_path_and_entry(U8 app_id, U8 sel_type, U32 filter, PS8 start_path, PsFuncPtr callback) ;
(1) 主要分析callback函数
A. excute mmi_fmgr_select_path_and_entry(......)
start_path
---> callback(.....)
---> callback内部检查: N
start_path=NULL? ---> the selection is completed
|
| Y
the selection is aborted
B. FMGR_SELECT_REPEAT对于callback函数的影响以及
使用FMGR_SELECT_REPEAT可以多次选择文件/文件夹
a. Each Select
select target
start_path
---> callback(......)
---> callback内部检查 N
start_path=NULL? ---> user abort ( the selection is aborted )
|
| Y Y
reach application's condition? ---> application abort ( the selection is aborted )
|
|
the selection is completed
b. 两种abort
user abort:
will cause a callback with NULL parameter and File Manager will automatically reset ;
application abort:
needs to call the mmi_fmgr_reset_app_select( ) to terminate the process
(2) FMGR_SELECT_BROWSE参数
drive option
folder option
file option
3. Utility Functions
BOOL mmi_fmgr_get_default_folder_path(S8 * folder,S8 * path,U16 length);
void mmi_fmgr_remove_last_dir(S8 * path);
S8 * mmi_fmgr_extract_file_name(S8 * path );
S8 * mmi_fmgr_extract_ext_file_name(S8 * path);
void mmi_fmgr_hide_ext_name(S8 * path);
mmi_fmgr_check_file_present
二、 Cache
1. First Time Enter a Floder
A. 一般流程
first time enter a floder
--> call fmgr_kenmel: init the cache
--> load file frome FS until the cache is filled
--> 不管是否有sort选项, file manager都会获取 file list
B. 关于 sort API
当目录项内文件数超过255, file manager can't use sort API to get file list from file system
but linear find first/find next instead.
C. filter
2. Request for File Info
A. Function: fmgr_kernel_get_file_info
B. call fmgr_kernel_get_file_info with a index
--> get a structe of data filled with useful file information
--> this funciton will use the passed in index to see Y
if the desired file info is already in chached or not ---> from cache
|
| N
|
reload cache and return file info
3. Image Cache
A. File Manger模块的预览图Cache
B. 一般流程
Draw Thumb Image
Y
--> Is in cache? -----> Draw it from cache
|
| N
|
Decord Image -----> Decord Done -----> Cache the Image -----> Draw it from cache
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=2151076
- MTK平台学习--FileManager模块分析
- FileManager模块分析
- mtk平台hw_get_module分析
- MTK平台学习
- MTK平台闪光灯驱动分析
- MTK平台系统稳定性分析
- MTK平台学习--History管理机制与EntryNewScreen函数的关系
- MTK短信模块分析(一)
- 基于MTK平台kpd驱动初步分析
- MTK手机平台驱动“含金量分析”
- MTK平台 UART驱动代码分析
- MTK平台下Battery驱动分析
- MTK平台下Battery驱动分析
- MTK平台一个花屏重启问题的分析
- MTK平台tp触摸屏驱动分析
- MTK 平台lcm驱动框架分析1
- MTK平台下Battery驱动分析
- MTK平台待机功耗分析流程
- 那一段时间真的好想家!
- oracle使用子查询插入和修改数据
- PHP——运算符和关键字
- orale中sql语句对null值的处理
- 关于如何学习MTK的问题
- MTK平台学习--FileManager模块分析
- oracle事务处理
- document 文挡对象 - JavaScript脚本语言描述
- 使用 XBMC 和插件看高清电影
- 基于对话框的图像打印程序
- 高性能web开发 - HTTP服务器篇
- ImageToAccess/FormImageAccess.Designer.cs
- J2ME中处理日期相关问题以及收藏一个日期处理类(忽略时间)
- JAZZ Terminology