AL_Multimedia_FileSystem_IF.h 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949
  1. /******************************************************************************/
  2. /*! @addtogroup AL_Multimeidia_FileSystem
  3. * @{
  4. ******************************************************************************/
  5. /******************************************************************************/
  6. /*!
  7. * @file AL_Multimeidia_FileSystem_IF.h
  8. *
  9. * @brief This file specifies the APIs used to control filesystem to provided\n
  10. * file, folder and partition list information.
  11. *
  12. * @note Copyright (c) 2013 S2 Technology Co., Ltd. \n
  13. * All rights reserved.
  14. ********************************************************************************/
  15. #ifndef __AL_MULTIMEDIA_FILESYSTEM_IF_H__
  16. #define __AL_MULTIMEDIA_FILESYSTEM_IF_H__
  17. /*******************************************************************************
  18. * Header include
  19. ******************************************************************************/
  20. #include "AL_Multimedia_FileSystem_Types.h"
  21. /*******************************************************************************
  22. * Marco
  23. ******************************************************************************/
  24. #define FOLDER_DISPLAY_MAX (21)
  25. #define FILE_DISPLAY_MAX (21)
  26. #define ACTIVE_FOLDER_LAYER_INDEX_MAX (253)
  27. #define VIDEO_FILENAME_EXTENSION_MPG ".MPG\0"
  28. #define VIDEO_FILENAME_EXTENSION_MPEG ".MPEG\0"
  29. #define VIDEO_FILENAME_EXTENSION_AVI ".AVI\0"
  30. #define VIDEO_FILENAME_EXTENSION_DIVX ".DIVX\0"
  31. #define VIDEO_FILENAME_EXTENSION_VOB ".VOB\0"
  32. #define VIDEO_FILENAME_EXTENSION_DAT ".DAT\0"
  33. #define VIDEO_FILENAME_EXTENSION_M2V ".M2V\0"
  34. #define VIDEO_FILENAME_EXTENSION_M4V ".M4V\0"
  35. #define VIDEO_FILENAME_EXTENSION_MP4 ".MP4\0"
  36. #define VIDEO_FILENAME_EXTENSION_QT ".MOV\0"
  37. #define VIDEO_FILENAME_EXTENSION_ASF ".ASF\0"
  38. #define VIDEO_FILENAME_EXTENSION_MKV ".MKV\0"
  39. #define VIDEO_FILENAME_EXTENSION_WMV ".WMV\0"
  40. #define VIDEO_FILENAME_EXTENSION_FLV ".FLV\0"
  41. #define VIDEO_FILENAME_EXTENSION_SWF ".SWF\0"
  42. #define VIDEO_FILENAME_EXTENSION_RM ".RM\0"
  43. #define VIDEO_FILENAME_EXTENSION_RV ".RV\0"
  44. #define VIDEO_FILENAME_EXTENSION_RMVB ".RMVB\0"
  45. #define VIDEO_FILENAME_EXTENSION_TS ".TS\0"
  46. #define VIDEO_FILENAME_EXTENSION_TP ".TP\0"
  47. #define VIDEO_FILENAME_EXTENSION_TRP ".TRP\0"
  48. #define VIDEO_FILENAME_EXTENSION_M2TS ".M2TS\0"
  49. #define VIDEO_FILENAME_EXTENSION_MTS ".MTS\0"
  50. #define AUDIO_FILENAME_EXTENSION_MP3 ".MP3\0"
  51. #define AUDIO_FILENAME_EXTENSION_DTS ".DTS\0"
  52. #define AUDIO_FILENAME_EXTENSION_WMA ".WMA\0"
  53. #define AUDIO_FILENAME_EXTENSION_WAV ".WAV\0"
  54. #define AUDIO_FILENAME_EXTENSION_M4A ".M4A\0"
  55. #define PHOTO_FILENAME_EXTENSION_JPG ".JPG\0"
  56. #define PHOTO_FILENAME_EXTENSION_BMP ".BMP\0"
  57. #define PHOTO_FILENAME_EXTENSION_TIFF ".TIFF\0"
  58. #define PHOTO_FILENAME_EXTENSION_GIF ".GIF\0"
  59. #define PHOTO_FILENAME_EXTENSION_PNG ".PNG\0"
  60. #define PHOTO_FILENAME_EXTENSION_JPE ".JPE\0"
  61. #define PHOTO_FILENAME_EXTENSION_JPEG ".JPEG\0"
  62. #ifdef CONFIG_CIPLUS_SUPPORT_PVR
  63. #if 0
  64. #define PVR_FILENAME_EXTENSION_PLT ".PLT\0"
  65. #endif
  66. #endif
  67. #define GAME_FILENAME_EXTENSION_SMF ".SMF\0"
  68. #define GAME_FILENAME_EXTENSION_NES ".NES\0"
  69. #define EBOOK_FILENAME_EXTENSION_TXT ".TXT\0"
  70. #define EBOOK_FILENAME_EXTENSION_EPUB ".EPUB\0"
  71. #define EXTERNAL_SUBTITLE_FILENAME_EXTENSION_SRT ".SRT\0"
  72. #define EXTERNAL_SUBTITLE_FILENAME_EXTENSION_SSA ".SSA\0"
  73. #define EXTERNAL_SUBTITLE_FILENAME_EXTENSION_ASS ".ASS\0"
  74. #define EXTERNAL_SUBTITLE_FILENAME_EXTENSION_PSB ".PSB\0"
  75. #define EXTERNAL_SUBTITLE_FILENAME_EXTENSION_SMI ".SMI\0"
  76. #define EXTERNAL_SUBTITLE_FILENAME_EXTENSION_TXT ".TXT\0"
  77. #define EXTERNAL_SUBTITLE_FILENAME_EXTENSION_SUB ".SUB\0"
  78. #define MUSIC_PLAYLIST_FILENAME_EXTENSION_M3U ".M3U\0"
  79. #define MUSIC_PLAYLIST_FILENAME_EXTENSION_CUE ".CUE\0"
  80. #define USB_LABEL_SIZE 64 /*VOLUME_ID_LABEL_SIZE*/
  81. /*******************************************************************************
  82. * enumeration
  83. ******************************************************************************/
  84. typedef enum
  85. {
  86. AL_FS_SUCCESS = 0, //!<uccessful
  87. AL_FS_ERR_FAILURE = 1, //!< operation failed
  88. AL_FS_ERR_INVALID_PARAM = 2,//!< invalid parameter
  89. AL_FS_ERR_FREE_SPACE_LACK = 3,
  90. } AL_FS_t;
  91. typedef enum
  92. {
  93. ALL_PATH_ILLEGAL = 0x00,
  94. ONLY_ACTIVE_PATH_VALID = 0x01,
  95. ONLY_BG_MUSIC_PATH_VALID = 0x02,
  96. ALL_PATH_VALID = 0x03,
  97. } Path_Vaild_Status_t;
  98. typedef enum
  99. {
  100. FS_COPY_FILE = 0,
  101. FS_COPY_FOLDER = 1,
  102. } FileSystem_Copy_Type_t;
  103. typedef enum
  104. {
  105. FS_COPY_STATUS_STOP = 0,
  106. FS_COPY_STATUS_CHECKING,
  107. FS_COPY_STATUS_COPYING,
  108. FS_COPY_STATUS_FINISH,
  109. FS_COPY_STATUS_FREE_SPACE_LACK,
  110. FS_COPY_STATUS_ERROR,
  111. } FileSystem_Copy_Status_t;
  112. typedef enum
  113. {
  114. FS_COPY_EVENT_STATUS = 0,
  115. FS_COPY_EVENT_PROGRESS_TOTAL_FILE_NUM,
  116. FS_COPY_EVENT_PROGRESS_TOTAL_FILE_SIZE,
  117. FS_COPY_EVENT_PROGRESS_COPIED_FILE_NUM,
  118. FS_COPY_EVENT_PROGRESS_COPIED_FILE_SIZE,
  119. FS_COPY_EVENT_PROGRESS_COPIED_FILE_NAME,
  120. } FileSystem_Copy_Event_Type_t;
  121. /*******************************************************************************
  122. * Structure
  123. ******************************************************************************/
  124. typedef UINT16 AL_FS_Handle_t;
  125. typedef struct
  126. {
  127. char Name[MAX_FULL_PATH]; //!<File Name
  128. } FileName_t;
  129. typedef struct
  130. {
  131. FileDetail_t FileList[FILE_DISPLAY_MAX];
  132. FileSystem_FileType_t u8FileType; //!<File List Type, eg. if u8FileType = PHOTO_FILETYPE, this means that all of the file list are photo
  133. UINT32 u32StartIdx; //!<File Name[0] 's Index in Storage device
  134. UINT16 ValidCount; /*!<Total File Number in this File List Struct Max(ValidCount) = FILE_DISPLAY_MAX,\n
  135. It's not equal to Total File Number in the Storage Driver.*/
  136. } FileSystem_File_t;
  137. typedef struct
  138. {
  139. FileName_t FolderName[FOLDER_DISPLAY_MAX]; //!<Folder Name(Short Name)
  140. UINT32 u32StartIdx; //!<Folder Name[0] 's Index in Storage device
  141. UINT16 ValidCount; /*!<Total Folder Number in this Folder List Struct Max(ValidCount) = FOLDER_DISPLAY_MAX,\n
  142. It's not equal to Total Folder Number in the Storage Driver.*/
  143. } FileSystem_Folder_t;
  144. typedef struct
  145. {
  146. UINT32 Size;
  147. FileSystem_Cache_t* Addr;
  148. } FileSystem_Cache_Info_t;
  149. typedef struct
  150. {
  151. FileSystem_Cache_Info_t Cache;
  152. UINT16 Max_External_Subtitle_Num;
  153. UINT16 Max_FileSystem_Number;
  154. FileSystem_Preference_Setup_t Preference_Setup;
  155. } FileSystem_Config_Parameter_t;
  156. typedef struct
  157. {
  158. UINT32 TotalFileNum;
  159. UINT32 CopiedFileNum;
  160. UINT64 TotalSize;
  161. UINT64 CopiedSize;
  162. char CopiedFileName[MAX_FULL_PATH];
  163. } FileSystem_Copy_Progress_Info_t;
  164. typedef struct
  165. {
  166. FileSystem_Copy_Status_t Status;
  167. FileSystem_Copy_Progress_Info_t Progress;
  168. } FileSystem_Copy_Status_Info_t;
  169. /*******************************************************************************
  170. * Program
  171. ******************************************************************************/
  172. /******************************************************************************/
  173. /**
  174. * @brief FileSystem Initial
  175. * @param FileSystem_Config_Parameter_t* const Setup : Initial Setup, Detail please ref. FileSystem_Config_Parameter_t
  176. * @return AL_FS_SUCCESS if successful\n
  177. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  178. * AL_FS_ERR_FAILURE if Exception Error occurred.
  179. ******************************************************************************/
  180. AL_FS_t AL_Multimedia_FileSystem_Init(FileSystem_Config_Parameter_t* const Setup);
  181. AL_FS_t AL_Multimedia_FileSystem_Create(AL_FS_Handle_t* Handle);
  182. AL_FS_t AL_Multimedia_FileSystem_Destory(AL_FS_Handle_t Handle);
  183. /******************************************************************************/
  184. /**
  185. * @brief FileSystem Uninitial
  186. ******************************************************************************/
  187. void AL_Multimedia_FileSystem_Uninit(Boolean bFreeFS);
  188. /******************************************************************************/
  189. /**
  190. * @brief Use to copy the file system environment to the other file system mode
  191. * @param FileSystem_Mode_t Src_Mode: Source File System Mode
  192. * FileSystem_Mode_t Dest_Mode: Destination File System Mode
  193. ******************************************************************************/
  194. void AL_Multimedia_FileSystem_Copy_FileSystem_Environment(AL_FS_Handle_t Src_Handle, AL_FS_Handle_t Dest_Handle);
  195. /******************************************************************************/
  196. /**
  197. * @brief Get Partition List Information, eg. total partition number, and partition name\n
  198. * please call this func. after AL_Multimedia_FileSystem_UpdatePartitions().
  199. * @return Partition List Information, the detail please ref. struct PartitionName_t.
  200. *
  201. ******************************************************************************/
  202. const FileSystem_Partition_t* AL_Multimedia_FileSystem_GetPartitionList(void);
  203. /******************************************************************************/
  204. /**
  205. * @brief Get Folder List Information, eg. total Folder number in this Folder list, and Folder name, Folder's index in the storage device.
  206. * @return Folder List Information, the detail please ref. struct FileSystem_Folder_t.
  207. *
  208. ******************************************************************************/
  209. const FileSystem_Folder_t* AL_Multimedia_FileSystem_GetFolderList(AL_FS_Handle_t Handle);
  210. /******************************************************************************/
  211. /**
  212. * @brief Get File List Information, eg. total file number in this file list, and file name, file's index in the storage device and file type.
  213. * @return File List Information, the detail please ref. struct FileSystem_File_t.
  214. *
  215. ******************************************************************************/
  216. const FileSystem_File_t* AL_Multimedia_FileSystem_GetFileList(AL_FS_Handle_t Handle);
  217. /******************************************************************************/
  218. /**
  219. * @brief Get Select File name(Short Name)
  220. * @return File name(Short Name), eg. APPLE_~1.MP4
  221. *
  222. ******************************************************************************/
  223. const char* AL_Multimedia_FileSystem_GetSelectedFileName(AL_FS_Handle_t Handle);
  224. const FileDetail_t* AL_Multimedia_FileSystem_GetSelectedFileDetails(AL_FS_Handle_t Handle);
  225. /******************************************************************************/
  226. /**
  227. * @brief Get Active Folder Path
  228. * @return Full Folder Path(Short Name), eg. /sda1/DECODE~1/SUNPLUS
  229. *
  230. ******************************************************************************/
  231. const char* AL_Multimedia_FileSystem_GetActiveFolderPath(AL_FS_Handle_t Handle);
  232. /******************************************************************************/
  233. /**
  234. * @brief Update the selected video file's External Subtitle information\n
  235. * @param char* const Folder_Path: Target Video File's Folder Path
  236. * char* const Video_File_Name: Target Video File Name
  237. * @return AL_FS_SUCCESS if successful\n
  238. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  239. * AL_FS_ERR_FAILURE if Exception Error occurred.
  240. ******************************************************************************/
  241. void AL_Multimedia_FIleSystem_Update_External_Subtitle_Info(char* const Folder_Path, char* const Video_File_Name);
  242. /******************************************************************************/
  243. /**
  244. * @brief Get Selected Video File's External Subtitle File Number
  245. * @return Selected Video File's External Subtitle File Number
  246. *
  247. ******************************************************************************/
  248. UINT16 AL_Multimedia_FileSystem_GetExternalSubtitleFileNumber(void);
  249. /******************************************************************************/
  250. /**
  251. * @brief Get Selected Video File's External Subtitle File Name
  252. * @param UINT8 External_Subtitle_Idx: External Subtitle File Index, must be lesss than Total Subtitle File Number
  253. * @return Selected Video File's External Subtitle File Name\n
  254. * when selected video file without the subtitle file it will report NULL
  255. *
  256. ******************************************************************************/
  257. const char* AL_Multimedia_FileSystem_GetExternalSubtitleFileName(UINT16 External_Subtitle_Idx);
  258. /******************************************************************************/
  259. /**
  260. * @brief Get Previously Folder Index
  261. * @return Previously Folder Index, it be stored before u into folder/partition.
  262. *
  263. ******************************************************************************/
  264. UINT32 AL_Multimedia_FileSystem_GetPrevFolderIndex(AL_FS_Handle_t Handle);
  265. /******************************************************************************/
  266. /**
  267. * @brief Register File System's File Type Filter
  268. * @param FileSystem_FileType_t FileType : Register's File Type, detail please ref. FileSystem_FileType_t\n
  269. * const char* const FilterTable : Filter Table\n
  270. * UINT8 TableSize : Filter Table Size\n
  271. * UINT8 Extension_Len : File Extension's Length
  272. * @return AL_FS_SUCCESS if successful\n
  273. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  274. * AL_FS_ERR_FAILURE if Exception Error occurred.
  275. *
  276. ******************************************************************************/
  277. AL_FS_t AL_Multimedia_FileSystem_RegisterFileTypeFilter(FileSystem_FileType_t FileType, const char* const FilterTable, UINT16 TableSize, UINT16 Extension_Len);
  278. /******************************************************************************/
  279. /**
  280. * @brief Get Active Fodler Layer, root = 0, eg. if Active Folder Path = /sda1/MUSIC/SUNPLUS then Active Layer = 3
  281. * @return Get Active Fodler Layer Number
  282. *
  283. ******************************************************************************/
  284. UINT16 AL_Multimedia_FileSystem_GetActiveLayer(AL_FS_Handle_t Handle);
  285. /******************************************************************************/
  286. /**
  287. * @brief Get Select File Type
  288. * @return File Type, the detail please ref. struct FileSystem_FileType_t.
  289. *
  290. ******************************************************************************/
  291. FileSystem_FileType_t AL_Multimedia_FileSystem_GetSelectedFileType(AL_FS_Handle_t Handle);
  292. /******************************************************************************/
  293. /**
  294. * @brief Get File Type
  295. * @param UINT32 File_Index : Input File Number, that u want to know the file type.\n
  296. * FileSystem_FileType_t* const FileType : Output File Type, detail please ref. FileSystem_FileType_t.
  297. * @return AL_FS_SUCCESS if successful\n
  298. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  299. * AL_FS_ERR_FAILURE if Exception Error occurred.
  300. *
  301. ******************************************************************************/
  302. AL_FS_t AL_Multimedia_FileSystem_GetFileType(AL_FS_Handle_t Handle, UINT32 File_Index, FileSystem_FileType_t* const File_Type);
  303. /******************************************************************************/
  304. /**
  305. * @brief Update FileSystem Data, It is only be used in USB, when any storage device mount success.
  306. *
  307. ******************************************************************************/
  308. void AL_Multimedia_FileSystem_UpdateEnvironmentSetting(AL_FS_Handle_t Handle);
  309. /******************************************************************************/
  310. /**
  311. * @brief Clear FileSystem Data, It is be used in USB and FileSystem, when storage device remove, or exit partition.
  312. *
  313. ******************************************************************************/
  314. void AL_Multimedia_FileSystem_ClearEnvironmentSetting(AL_FS_Handle_t Handle);
  315. /*ports begin*/
  316. /******************************************************************************/
  317. /**
  318. * @brief ports api
  319. *
  320. ******************************************************************************/
  321. const FileSystem_Partition_t* AL_Multimedia_FileSystem_GetPartitionsListByPath(UINT8 *cpath, UINT32 pathlen);
  322. /******************************************************************************/
  323. /**
  324. * @brief ports api
  325. *
  326. ******************************************************************************/
  327. const FileSystem_PortsLayer_t* AL_Multimedia_FileSystem_GetUsbPortsListByPath(UINT8 *cpath, LayerType flag, UINT32 pathlen);
  328. /******************************************************************************/
  329. /**
  330. * @brief ports api
  331. *
  332. ******************************************************************************/
  333. int AL_Multimedia_FileSystem_GetUsbDeviceNameByPartitionName(const char *PartitionName,char *pDevName, INT32 DevNameSize);
  334. /******************************************************************************/
  335. /**
  336. * @brief ports api
  337. *
  338. ******************************************************************************/
  339. AL_FS_t AL_Multimedia_FileSystem_SetIntoPartitionByPort(AL_FS_Handle_t Handle,const FileSystem_Partition_t *Partitions, UINT16 Partition_Index);
  340. /*ports end*/
  341. /******************************************************************************/
  342. /**
  343. * @brief Updata FileSystem Partition List Information.
  344. * @param UINT8* const Get_Partition_Number : Output Total GetPartitionNum, if u don't want to get it, please set this param = NULL
  345. *
  346. ******************************************************************************/
  347. void AL_Multimedia_FileSystem_UpdatePartitions(UINT16* const Get_Partition_Number);
  348. AL_FS_t AL_Multimedia_FileSystem_GetPartitionFreeSize(char* const Partition_Name, UINT64* Free_Size);
  349. /******************************************************************************/
  350. /**
  351. * @brief Control FileSystem to Into Partition.
  352. * @param UINT8 Partition_Index : Input Partition Number, that u want to into.
  353. *
  354. ******************************************************************************/
  355. AL_FS_t AL_Multimedia_FileSystem_SetIntoPartition(AL_FS_Handle_t Handle, UINT16 Partition_Index);
  356. /******************************************************************************/
  357. /**
  358. * @brief Control FileSystem to exit Partition.
  359. *
  360. ******************************************************************************/
  361. void AL_Multimedia_FileSystem_SetExitPartition(AL_FS_Handle_t Handle);
  362. /******************************************************************************/
  363. /**
  364. * @brief Get Total Partition Number
  365. * @return FileSystem can support the total partition number of Storage Device
  366. *
  367. ******************************************************************************/
  368. UINT16 AL_Multimedia_FileSystem_GetTotalPartitionCount(void);
  369. /******************************************************************************/
  370. /**
  371. * @brief Control FileSystem to update Folder List Information.
  372. * @param UINT32 Folder_Start_Index : Input the first Folder Index in the storage device, u want to get\n
  373. * UINT8 Total_Number : Input how many folder information u want to get, this vale must < FOLDER_DISPLAY_MAX.\n
  374. * UINT8* const Get_Folder_Number : Output total folder list number be obtained .
  375. * @return AL_FS_SUCCESS if successful\n
  376. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.
  377. *
  378. ******************************************************************************/
  379. AL_FS_t AL_Multimedia_FileSystem_UpdateFolders(AL_FS_Handle_t Handle, UINT32 Folder_Start_Index, UINT16 Total_Number, UINT16* const Get_Folder_Number);
  380. /******************************************************************************/
  381. /**
  382. * @brief Control FileSystem to Into Folder.
  383. * @param UINT32 Folder_Index : Input Folder Index, that u want to into.
  384. * @return AL_FS_SUCCESS if successful\n
  385. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  386. * AL_FS_ERR_FAILURE if Exception Error occurred.
  387. *
  388. ******************************************************************************/
  389. AL_FS_t AL_Multimedia_FileSystem_SetIntoFolder(AL_FS_Handle_t Handle, UINT32 Folder_Index);
  390. /******************************************************************************/
  391. /**
  392. * @brief Direct into folder that u want.
  393. * @param char* const Full_Folder_Path : Input folder path\n
  394. * @return AL_FS_SUCCESS if successful\n
  395. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  396. * AL_FS_ERR_FAILURE if Exception Error occurred.
  397. *
  398. ******************************************************************************/
  399. AL_FS_t AL_Multimedia_FileSystem_SetIntoFolder_By_Path(AL_FS_Handle_t Handle, char* const Full_Folder_Path);
  400. /******************************************************************************/
  401. /**
  402. * @brief Direct into folder that u want.
  403. * @param char* const Full_Folder_Path : Input Partition path\n
  404. * @return AL_FS_SUCCESS if successful\n
  405. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  406. * AL_FS_ERR_FAILURE if Exception Error occurred.
  407. *
  408. ******************************************************************************/
  409. AL_FS_t AL_Multimedia_FileSystem_SetPartitionRoot_By_Path(AL_FS_Handle_t Handle, char* const Full_Folder_Path);
  410. /******************************************************************************/
  411. /**
  412. * @brief Control FileSystem to exit Folder.
  413. * @return AL_FS_SUCCESS if successful\n
  414. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  415. * AL_FS_ERR_FAILURE if Exception Error occurred.
  416. *
  417. ******************************************************************************/
  418. AL_FS_t AL_Multimedia_FileSystem_SetExitFolder(AL_FS_Handle_t Handle);
  419. /******************************************************************************/
  420. /**
  421. * @brief Control FileSystem to exit Folder.
  422. * @return AL_FS_SUCCESS if successful\n
  423. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  424. * AL_FS_ERR_FAILURE if Exception Error occurred.
  425. *
  426. ******************************************************************************/
  427. AL_FS_t AL_Multimedia_FileSystem_GetTotalFolderCount(AL_FS_Handle_t Handle, UINT32* const u32TotalFolderCount);
  428. /******************************************************************************/
  429. /**
  430. * @brief Control FileSystem to update File List Information.
  431. * @param UINT32 File_Start_Index : Input the first File Index in the storage device, u want to get\n
  432. * UINT8 Total_Number : Input how many file information u want to get, this vale must < FILE_DISPLAY_MAX.\n
  433. * UINT8* const Get_File_Number : Output total file list number be obtained .
  434. * @return AL_FS_SUCCESS if successful\n
  435. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.
  436. *
  437. ******************************************************************************/
  438. AL_FS_t AL_Multimedia_FileSystem_UpdateFiles(AL_FS_Handle_t Handle, UINT32 File_Start_Index, UINT16 Total_Number, UINT16* const Get_File_Number);
  439. /******************************************************************************/
  440. /**
  441. * @brief Select File.
  442. * @param UINT32 File_Index : Input File Number, that u want to Select.
  443. * @return AL_FS_SUCCESS if successful\n
  444. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  445. * AL_FS_ERR_FAILURE if Exception Error occurred.
  446. *
  447. ******************************************************************************/
  448. AL_FS_t AL_Multimedia_FileSystem_SetSelectFile(AL_FS_Handle_t Handle, UINT32 File_Index);
  449. /******************************************************************************/
  450. /**
  451. * @brief Get Total File Number in the avtive path of the storage device.
  452. * @param UINT32* const Total_File_Number :Output Total File Number in the avtive path of the storage device.
  453. * @return AL_FS_SUCCESS if successful\n
  454. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  455. * AL_FS_ERR_FAILURE if Exception Error occurred.
  456. *
  457. ******************************************************************************/
  458. AL_FS_t AL_Multimedia_FileSystem_GetTotalFileCount(AL_FS_Handle_t Handle, UINT32* const Total_File_Number);
  459. /******************************************************************************/
  460. /**
  461. * @brief Get file size of FS file details.
  462. * @param char* const FolderPath : folder path
  463. * char* const FileName : file name
  464. * UINT64* FileSize : return file size
  465. * If get file size fail that FileSize will return 0x0
  466. * @return AL_FS_SUCCESS if successful\n
  467. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  468. * AL_FS_ERR_FAILURE if Exception Error occurred.
  469. *
  470. ******************************************************************************/
  471. AL_FS_t AL_Multimedia_FileSystem_Get_FileSize(char* const FolderPath, char* const FileName, UINT64* FileSize);
  472. /******************************************************************************/
  473. /**
  474. * @brief Get file date of FS file details.
  475. * @param char* FolderPath : folder path
  476. * char* FileName : file name
  477. * struct tm* UTC_time : return Last file status change time
  478. * struct tm* UTM_time : return Last data modification time
  479. * If get date info fail that UTC_time and UTM_time will return 0x0
  480. * @return AL_FS_SUCCESS if successful\n
  481. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  482. * AL_FS_ERR_FAILURE if Exception Error occurred.
  483. *
  484. ******************************************************************************/
  485. AL_FS_t AL_Multimedia_FileSystem_Get_FileDate(char* FolderPath, char* FileName, struct tm* UTC_time, struct tm* UTM_time);
  486. /******************************************************************************/
  487. /**
  488. * @brief Control FileSystem to Filter File Type. If u want to get Video File List only please set Mediamode = VIDEO_FILETYPE
  489. * @param FileSystem_FileType_t File_Type : Input File Type. the detail please ref. struct FileSystem_FileType_t.
  490. * @return AL_FS_SUCCESS if successful\n
  491. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  492. * AL_FS_ERR_FAILURE if Exception Error occurred.
  493. *
  494. ******************************************************************************/
  495. AL_FS_t AL_Multimedia_FileSystem_SetMediaMode(AL_FS_Handle_t Handle, FileSystem_FileType_t File_Type);
  496. /******************************************************************************/
  497. /**
  498. * @brief Analyse File Type.
  499. * @param const char* const FileName : Input File Name.
  500. * @return File Type Information, detail please ref. FileSystem_FileType_t.
  501. *
  502. ******************************************************************************/
  503. FileSystem_FileType_t AL_Multimedia_FileSystem_FileTypeAnalyze(const char* const FileName);
  504. /******************************************************************************/
  505. /**
  506. * @brief Combine FolderPath and FileName.\n
  507. * eg. /sda1/Folder + a.mp3 => /sda1/Folder/a.mp3
  508. * @param const char* const Folder_Path : Input Folder Path\n
  509. * const char* const File_Name : Input File Name\n
  510. * char* Full_Path_Buf : Output FullName\n
  511. * UINT16 Buf_Len : Buffer Size
  512. * @return AL_FS_SUCCESS if successful\n
  513. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.
  514. *
  515. ******************************************************************************/
  516. AL_FS_t AL_Multimedia_FileSystem_CombineFolderPathAndFileName(const char* const Folder_Path,
  517. const char* const File_Name,
  518. char* Full_Path_Buf,
  519. UINT16 Buf_Len);
  520. /******************************************************************************/
  521. /**
  522. * @brief Rename Selected File, if u want to display file list after call this func.\n
  523. * Please call AL_Multimedia_FileSystem_UpdateFiles() again.
  524. * @param char* const New_File_Name : New File Name\n
  525. * FileSystem_CodePage_Kind_t CodePage_Type : New File Name's CodePage, detial please ref. FileSystem_CodePage_Kind_t.
  526. * @return AL_FS_SUCCESS if successful\n
  527. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  528. * AL_FS_ERR_FAILURE if Exception Error occurred.
  529. *
  530. ******************************************************************************/
  531. AL_FS_t AL_Multimedia_FileSystem_RenameSelectedFile(AL_FS_Handle_t Handle, char* const New_File_Name, FileSystem_CodePage_Kind_t CodePage_Type);
  532. /******************************************************************************/
  533. /**
  534. * @brief Rename Folder, if u want to display folder list after call this func.\n
  535. * Please call AL_Multimedia_FileSystem_UpdateFolders() again.
  536. * @param UINT32 FolderIdx : Input Folder Index, that u want to rename this folde\n
  537. * char* const New_Folder_Name : New Folder Name\n
  538. * FileSystem_CodePage_Kind_t CodePage_Type : New File Name's CodePage, detial please ref. FileSystem_CodePage_Kind_t.
  539. * @return AL_FS_SUCCESS if successful\n
  540. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  541. * AL_FS_ERR_FAILURE if Exception Error occurred.
  542. *
  543. ******************************************************************************/
  544. AL_FS_t AL_Multimedia_FileSystem_RenameFolder(AL_FS_Handle_t Handle,
  545. UINT32 FolderIdx,
  546. char* const New_Folder_Name,
  547. FileSystem_CodePage_Kind_t CodePage_Type);
  548. /******************************************************************************/
  549. /**
  550. * @brief Delete specified file/folder.
  551. * it will cause this modile's environment reset to the root path, after u call this func.
  552. * @param char* const Full_Path : Full Path, that u want to delete.
  553. * @return AL_FS_SUCCESS if successful\n
  554. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  555. * AL_FS_ERR_FAILURE if Exception Error occurred.
  556. *
  557. ******************************************************************************/
  558. AL_FS_t AL_Multimedia_FileSystem_DeleteData(char* const Full_Path);
  559. AL_FS_t AL_Multimedia_FileSystem_DeleteFileByName(AL_FS_Handle_t Handle, char* FileName);
  560. /******************************************************************************/
  561. /**
  562. * @brief Delete Selected File
  563. * @return AL_FS_SUCCESS if successful\n
  564. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  565. * AL_FS_ERR_FAILURE if Exception Error occurred.
  566. *
  567. ******************************************************************************/
  568. AL_FS_t AL_Multimedia_FileSystem_DeleteSelectedFile(AL_FS_Handle_t Handle);
  569. /******************************************************************************/
  570. /**
  571. * @brief Delete Folder
  572. * @param UINT32 Folder_Index : Input Folder Index, that u want to delete
  573. * @return AL_FS_SUCCESS if successful\n
  574. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  575. * AL_FS_ERR_FAILURE if Exception Error occurred.
  576. *
  577. ******************************************************************************/
  578. AL_FS_t AL_Multimedia_FileSystem_DeleteFolder(AL_FS_Handle_t Handle, UINT32 Folder_Index);
  579. /******************************************************************************/
  580. /**
  581. * @brief Check the status of specified file.
  582. * @param char* const File_Path : Full File Path, that u want to check.
  583. * @return TRUE : File is exist\n
  584. * FALSE : File is not exist
  585. *
  586. ******************************************************************************/
  587. BOOL AL_Multimedia_FileSystem_IsFileExist(char* const File_Path);
  588. /******************************************************************************/
  589. /**
  590. * @brief Check Folder Path Exist
  591. * @param char* const Folder_Path : Folder Path
  592. * @return TRUE : Folder is exist\n
  593. * FALSE : Folder is not exist
  594. *
  595. ******************************************************************************/
  596. BOOL AL_Multimedia_FileSystem_IsFolderExist(char* const Folder_Path);
  597. /******************************************************************************/
  598. /**
  599. * @brief For decide folders and files sort mode and u can input new sort rule\n
  600. * @param FileSystem_File_Compare_Mode_t File_Sort_Mode : File sort rule, detail please ref. FileSystem_File_Compare_Mode_t
  601. * FileSystem_Folder_Compare_Mode_t Folder_Sort_Mode : Folder sort rule, detail please ref. FileSystem_Folder_Compare_Mode_t
  602. * FileSystem_Hook_Compare_Rule_t File_Expand_Compare_Rule : File Expand Sort Rule(Call back function)
  603. * UINT16 File_BufSize : (Can be 0)For Expand Sort Method Use, consider every item sort will use a lot of time to get some info.
  604. * So u can use a buffer to keep the information, after u get.
  605. * FileSystem_Hook_Compare_Rule_t Folder_Expand_Compare_Rule : Folder Expand Sort Rule(Call back function)
  606. * UINT16 Folder_BufSize : (Can be 0)For Expand Sort Method Use, consider every item sort will use a lot of time to get some info.
  607. * So u can use a buffer to keep the information, after u get.
  608. * @return AL_FS_SUCCESS if successful\n
  609. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  610. * AL_FS_ERR_FAILURE if Exception Error occurred.
  611. *
  612. ******************************************************************************/
  613. AL_FS_t AL_Multimedia_FileSystem_SetSortRule(FileSystem_File_Compare_Mode_t File_Sort_Mode, FileSystem_Folder_Compare_Mode_t Folder_Sort_Mode,
  614. FileSystem_Hook_Compare_Rule_t File_Expand_Compare_Rule, UINT16 File_BufSize, FileSystem_Hook_Compare_Rule_t Folder_Expand_Compare_Rule, UINT16 Folder_BufSize);
  615. #ifdef FILESEARCH_SUPPORT
  616. /******************************************************************************/
  617. /**
  618. * @brief Start searching FileSystem. If u call the function and the return value is AL_FS_SUCCESS, u MUST CALL AL_Multimedia_FileSystem_StopSearch() to STOP the searching task.
  619. * @param FileSystem_Search_Hook_Function_t* Search_Hook_Function : It contains four call back functions. the detail please ref. struct FileSystem_Search_Hook_Function_t.
  620. * char* const Start_Path : Input Start searching path.
  621. * UINT8 Search_Layer_Number : Input search layer number. If u want to search only current layer, please input 1. If you want to search all of layers under the start path, please input ACTIVE_FOLDER_LAYER_INDEX_MAX.
  622. * FileSystem_FileType_t File_Type : Input File Type. the detail please ref. struct FileSystem_FileType_t.
  623. * UINT32 Max_Search_Number : Input Max file number that u want to search
  624. * FileSystem_Search_Mode_t Search_Mode : Input Search_Mode. the detail please ref. struct FileSystem_Search_Mode_t.
  625. * char* const Last_Time_Search_Folder_Path : Input Folder path, which is found at last time search. If u don't hava this infomation, input NULL.
  626. * char* const Last_Time_Search_File_Name : Input File name, which is found at last time search . If u don't hava this infomation, input NULL.
  627. *
  628. * @return AL_FS_SUCCESS if successful\n
  629. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  630. * AL_FS_ERR_FAILURE if Exception Error occurred.
  631. ******************************************************************************/
  632. AL_FS_t AL_Multimedia_FileSystem_StartSearch(FileSystem_Search_Hook_Function_t* Search_Hook_Function,
  633. char* const Start_Path,
  634. UINT16 Search_Layer_Number,
  635. FileSystem_FileType_t File_Type,
  636. UINT32 Max_Search_Number,
  637. FileSystem_Search_Mode_t Search_Mode,
  638. char* const Last_Time_Search_Folder_Path,
  639. char* const Last_Time_Search_File_Name);
  640. /******************************************************************************/
  641. /**
  642. * @brief U can ask the current search status information.
  643. * @param FileSystem_Search_Status_Info_t* Current_Search_Status_Info : Output current search status information, the detail please ref. struct FileSystem_Search_Status_Info_t
  644. * @return AL_FS_SUCCESS if successful\n
  645. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  646. * AL_FS_ERR_FAILURE if Exception Error occurred.
  647. ******************************************************************************/
  648. AL_FS_t AL_Multimedia_FileSystem_Search_Status_Info_Post(FileSystem_Search_Status_Info_t* Current_Search_Status_Info);
  649. /******************************************************************************/
  650. /**
  651. * @brief U can ask the current search status.
  652. * @param FileSystem_Search_Status_t* Current_Search_Status : Output current search status, the detail please ref. struct FileSystem_Search_Status_t
  653. * @return AL_FS_SUCCESS if successful\n
  654. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  655. * AL_FS_ERR_FAILURE if Exception Error occurred.
  656. ******************************************************************************/
  657. AL_FS_t AL_Multimedia_FileSystem_Search_Status_Post(FileSystem_Search_Status_t* Current_Search_Status);
  658. /******************************************************************************/
  659. /**
  660. * @brief Stop FileSystem searching Task, please call this func. after AL_Multimedia_FileSystem_StartSearch().
  661. * But if AL_Multimedia_FileSystem_StartSearch() return value is not AL_FS_SUCCESS, do not call this func.
  662. * @return AL_FS_SUCCESS if successful\n
  663. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  664. * AL_FS_ERR_FAILURE if Exception Error occurred.
  665. ******************************************************************************/
  666. AL_FS_t AL_Multimedia_FileSystem_StopSearch(void);
  667. /******************************************************************************/
  668. /**
  669. * @brief Pause FileSystem searching Task
  670. * @return AL_FS_SUCCESS if successful\n
  671. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  672. * AL_FS_ERR_FAILURE if Exception Error occurred.
  673. ******************************************************************************/
  674. AL_FS_t AL_Multimedia_FileSystem_PauseSearch(void);
  675. /******************************************************************************/
  676. /**
  677. * @brief Resume FileSystem searching Task
  678. * @return AL_FS_SUCCESS if successful\n
  679. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  680. * AL_FS_ERR_FAILURE if Exception Error occurred.
  681. ******************************************************************************/
  682. AL_FS_t AL_Multimedia_FileSystem_ResumeSearch(void);
  683. #endif
  684. /******************************************************************************/
  685. /**
  686. * @brief Set folder or file Attribute
  687. * @param char* const Full_Path : Full Path can be folder path or file path.\n
  688. * FileSystem_Attribute_t* const FileSystem_Attribute: Attribute that u want to set, detail please ref. FileSystem_Attribute_t
  689. * @return AL_FS_SUCCESS if successful\n
  690. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  691. * AL_FS_ERR_FAILURE if Exception Error occurred.
  692. *
  693. ******************************************************************************/
  694. AL_FS_t AL_Multimedia_FileSystem_Set_Data_Attribute(char* const Full_Path, FileSystem_Attribute_t* const FileSystem_Attribute);
  695. /******************************************************************************/
  696. /**
  697. * @brief Get File Index in cache
  698. * @param char* const Folder_Path: [IN] folder path.
  699. * char* const File_Name: [IN] file name.
  700. * FileSystem_FileType_t FileType: [IN] Reference FileType.(If the filter table of filetype not define, it will use all type to count file index)
  701. * UINT32* File_Index: [OUT] file index.
  702. * @return AL_FS_SUCCESS if successful\n
  703. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  704. * AL_FS_ERR_FAILURE if Exception Error occurred.
  705. *
  706. ******************************************************************************/
  707. AL_FS_t AL_Multimedia_FileSystem_Get_File_Index(char* const Folder_Path, char* const File_Name, FileSystem_FileType_t FileType, UINT32* File_Index);
  708. /******************************************************************************/
  709. /**
  710. * @brief Get Folder Index in cache
  711. * @param char* const Folder_Path : Input folder path\n
  712. * char* const Folder_Name : Input folder name\n
  713. * UINT32 Folder_Index : Ouput Folder Index\n
  714. * @return AL_FS_SUCCESS if successful\n
  715. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.\n
  716. * AL_FS_ERR_FAILURE if Exception Error occurred.
  717. *
  718. ******************************************************************************/
  719. AL_FS_t AL_Multimedia_FileSystem_Get_Folder_Index(char* const Folder_Path, char* const Folder_Name, UINT32* Folder_Index);
  720. /******************************************************************************/
  721. /**
  722. * @brief Use to get partiton path length.
  723. * @param char* const File_Path: Input file path.
  724. * @return partiton path length.
  725. *
  726. ******************************************************************************/
  727. UINT16 AL_Multimedia_FileSystem_GetFilePathPartitionLength(char* const File_Path);
  728. #ifdef FILECOPY_SUPPORT
  729. /******************************************************************************/
  730. /**
  731. * @brief Copy selected file to another folder
  732. * @param UINT64 TotalSize : Copied file's total size
  733. * char* const Source_FolderPath : Copied file's folder path
  734. * char* const Source_FileName : Copied file's file name
  735. * char* const Destination_FolderPath : Copy destination folder path
  736. * char* const New_File_Name : If the selected file already existed,
  737. * give a new name for selected file
  738. * BOOL (*SendMsg_Func) : callback function for posting Msg
  739. * @return AL_FS_SUCCESS if successful\n
  740. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.
  741. * AL_FS_ERR_FAILURE if Exception Error occurred.
  742. *
  743. ******************************************************************************/
  744. AL_FS_t AL_Multimedia_FileSystem_Copy_File_Start(UINT64 TotalSize,
  745. char* const Source_FolderPath,
  746. char* const Source_FileName,
  747. char* const Destination_FolderPath,
  748. char* const New_File_Name,
  749. UINT8 *Copy_Buffer_Addr,
  750. UINT32 Copy_Buffer_Size,
  751. BOOL (*SendMsg_Func)(FileSystem_Copy_Event_Type_t, FileSystem_Copy_Status_Info_t *));
  752. /******************************************************************************/
  753. /**
  754. * @brief Use to stop srarch task that for copy application
  755. * @return AL_FS_SUCCESS if successful\n
  756. * AL_FS_ERR_FAILURE if Create Stop Fail
  757. *
  758. ******************************************************************************/
  759. AL_FS_t AL_Multimedia_FileSystem_Copy_File_Stop(void);
  760. /******************************************************************************/
  761. /**
  762. * @brief Copy selected folder to another folder
  763. * @param UINT64 TotalSize : Folder's total size
  764. * char* const Source_FolderPath : Source folder path
  765. * char* const Destination_FolderPath : Copy destination folder path
  766. * char* const New_Folder_Name : If the selected folder already existed,
  767. * give a new name for selected folder
  768. * BOOL (*SendMsg_Func) : callback function for posting Msg
  769. * @return AL_FS_SUCCESS if successful\n
  770. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.
  771. * AL_FS_ERR_FAILURE if Exception Error occurred.
  772. *
  773. ******************************************************************************/
  774. AL_FS_t AL_Multimedia_FileSystem_Copy_Folder_Start(UINT64 TotalSize,
  775. char* const Source_FolderPath,
  776. char* const Destination_FolderPath,
  777. char* const New_Folder_Name,
  778. UINT8 *Copy_Buffer_Addr,
  779. UINT32 Copy_Buffer_Size,
  780. BOOL (*SendMsg_Func)(FileSystem_Copy_Event_Type_t, FileSystem_Copy_Status_Info_t *));
  781. /******************************************************************************/
  782. /**
  783. * @brief Use to stop srarch task that for copy application
  784. * @return AL_FS_SUCCESS if successful\n
  785. * AL_FS_ERR_FAILURE if Create Stop Fail
  786. *
  787. ******************************************************************************/
  788. AL_FS_t AL_Multimedia_FileSystem_Copy_Folder_Stop(void);
  789. /******************************************************************************/
  790. /**
  791. * @brief Get the folder's total size
  792. * @param char* const Source_FolderPath : Folder path that want to get total size
  793. * BOOL (*SendMsg_Func) : callback function for posting Msg
  794. * @return AL_FS_SUCCESS if successful\n
  795. * AL_FS_ERR_INVALID_PARAM if parameters is invalid.
  796. * AL_FS_ERR_FAILURE if Exception Error occurred.
  797. *
  798. ******************************************************************************/
  799. AL_FS_t AL_Multimedia_FileSystem_Get_Folder_TotalSize_Start(char* const Source_FolderPath,
  800. BOOL (*SendMsg_Func)(FileSystem_Copy_Event_Type_t, FileSystem_Copy_Status_Info_t *));
  801. /******************************************************************************/
  802. /**
  803. * @brief Use to stop srarch task that for getting folder's total size
  804. * @return AL_FS_SUCCESS if successful\n
  805. * AL_FS_ERR_FAILURE if Create Stop Fail
  806. *
  807. ******************************************************************************/
  808. AL_FS_t AL_Multimedia_FileSystem_Get_Folder_TotalSize_Stop(void);
  809. /******************************************************************************/
  810. /**
  811. * @brief Report copy status info
  812. * Note:
  813. * If perform AL_Multimedia_FileSystem_Get_Folder_TotalSize_Start() to
  814. * get folder total size, must perform this API BEFORE performing
  815. * AL_Multimedia_FileSystem_Get_Folder_TotalSize_Stop() !
  816. * Otherwise, the total size value will be clear.
  817. * @return copy status info, detail please ref. FileSystem_Copy_Status_Info_t.
  818. *
  819. ******************************************************************************/
  820. const FileSystem_Copy_Status_Info_t* const AL_Multimedia_FileSystem_Get_Copy_Status_Info(void);
  821. #endif
  822. /******************************************************************************/
  823. /**
  824. * @brief Use to get the USB Version
  825. * @param char* const UsbName : USB Mount Name
  826. * @return int : -1 fail
  827. >=0 USB Version
  828. typedef enum {
  829. USB_11 = 0,
  830. USB_20,
  831. USB_30,
  832. }USB_Version;
  833. *
  834. ******************************************************************************/
  835. int AL_Multimedia_FileSystem_GetUsbVersionbyName(int index);
  836. /******************************************************************************/
  837. /**
  838. * @brief Use to get Partition Type
  839. * @param int index : Device Index
  840. * @return FileSystem_Format_t : Partition Type
  841. *
  842. ******************************************************************************/
  843. FileSystem_Format_t AL_Multimedia_FileSystem_GetPartitionType(int index);
  844. /******************************************************************************/
  845. /**
  846. * @brief Use to get the USB Device Name
  847. * @param UINT8 devIndex : Device Index
  848. UINT8 *pDevName : Device Name Pointer, the array size need set to
  849. #define VOLUME_ID_LABEL_SIZE 64
  850. INT32 DevNameSize : pDevName Array Size
  851. * @return int : Get USB Device Name Status
  852. *
  853. ******************************************************************************/
  854. int AL_Multimedia_FileSystem_GetUsbDeviceName(UINT16 devIndex, char *pDevName, INT32 DevNameSize);
  855. AL_FS_t AL_Multimedia_FileSystem_Get_LongName(char* const File_Name);
  856. AL_FS_t AL_Multimedia_FileSystem_Get_ShortName(char* const File_Name);
  857. #endif
  858. /*!
  859. @} end of addtogroup AL_Multimeidia_FileSystem */