MTK平台学习--FileManager模块分析
2010-01-29 15:30
246 查看
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
一、 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
相关文章推荐
- 【6572】关于mtk平台display模块的学习探讨
- 日志分析系统和推荐平台的模块组成以及对应的开源技术简介
- MTK平台LCM驱动详细分析(一)
- 学习MTK需要的环境,平台,资料
- MTK平台闪光灯驱动分析
- 学习使用superset-大数据报表分析平台
- MTK平台下Battery驱动分析及充电流程
- 【嵌入式Linux学习七步曲之第五篇 Linux内核及驱动编程】PowerPC + Linux2.6.25平台下的I2C驱动架构分析
- MTK平台下Battery驱动分析及充电流程
- Linux netfilter 学习笔记 之九 ip层netfilter的连接跟踪模块代码分析
- MTK平台图片文件解析过程简单分析
- Swoole源代码学习记录(十五)——Timer模块分析
- Swoole源码学习记录(十五)——Timer模块分析
- 电商平台学习笔记(八)——面向接口编程案例分析
- Android FM模块学习之四源码分析(3)
- MTK平台CPU/GPU动态调频的实现之PerfService的源码分析
- Arm汇编学习笔记(二)——编写编译并执行依赖外部模块的汇编代码以及PIC代码分析
- [EntLib]微软企业库5.0 学习之路——第七步、Cryptographer加密模块简单分析、自定义加密接口及使用—上篇
- MTK平台图片文件解析过程简单分析
- 网上图书商城项目学习笔记-025分类管理模块分析及查询所有分类实现