Atmel Software Framework

nav_filterflat.c File Reference
#include "conf_explorer.h"
#include "navigation.h"
#include "nav_filterlist.h"
#include "file.h"
#include <LIB_CTRLACCESS>

Functions

bool nav_filterflat_cd (void)
 This function enters in the selected directory. More...
 
bool nav_filterflat_findname (const FS_STRING sz_name, bool b_match_case)
 This function searches a file name in file list filtered. More...
 
uint16_t nav_filterflat_get (void)
 This function returns the position of selected file in filtered file list. More...
 
bool nav_filterflat_goto (uint16_t u16_newpos)
 This function goes to a position in filtered file list. More...
 
bool nav_filterflat_gotoparent (void)
 This function goes to at the parent directory. More...
 
bool nav_filterflat_mount (void)
 This function mounts the selected partition. More...
 
uint16_t nav_filterflat_nb (void)
 This function computes the number of files and directories in filtered file list. More...
 
bool nav_filterflat_next (void)
 This function goes to the next position in the filtered file list. More...
 
bool nav_filterflat_previous (void)
 This function goes to the previous position in filtered file list. More...
 
bool nav_filterflat_reset (void)
 This function resets the pointer of selection, so "no file selected" in filtered file list. More...
 
bool nav_filterflat_root (void)
 This function initializes the file filtered list on the root directory. More...
 

bool nav_filterflat_cd ( void  )

This function enters in the selected directory.

Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

References fs_g_nav, nav_dir_cd(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

Referenced by ai_usb_ms_nav_dir_cd().

bool nav_filterflat_findname ( const FS_STRING  sz_name,
bool  b_match_case 
)

This function searches a file name in file list filtered.

@param     sz_name        name to search (UNICODE or ASCII) <br>
                          The name must end with NULL or '*' value
@param     b_match_case   false to ignore the case

@return    false in case of error, see global value "fs_g_status" for more detail
@return    true otherwise
//! This function starts a search at the next position of the current in filtered file list
//! 

References FS_NAME_CHECK, nav_file_name(), and nav_filterflat_next().

uint16_t nav_filterflat_get ( void  )

This function returns the position of selected file in filtered file list.

Returns
position of selected file in directory (0 is the first position)
FS_NO_SEL, in case of no file selected

References fs_g_nav, nav_filterlist_get(), and Fs_management::u16_flat_pos_offset.

Referenced by ai_usb_ms_nav_file_pos(), nav_filterflat_goto(), and nav_filterflat_nb().

bool nav_filterflat_goto ( uint16_t  u16_newpos)

This function goes to a position in filtered file list.

Parameters
u16_newposnew position to select (0 is the first position)
Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

References FS_NO_SEL, nav_filterflat_get(), nav_filterflat_next(), nav_filterflat_previous(), and nav_filterflat_reset().

Referenced by ai_usb_ms_nav_file_goto(), and nav_filterflat_nb().

bool nav_filterflat_gotoparent ( void  )

This function goes to at the parent directory.

@return  false in case of error, see global value "fs_g_status" for more detail
@return  true otherwise
//! After the selected file is the first entry
//! 

References _MEM_TYPE_SLOW_, fs_g_nav, index, nav_dir_gotoparent(), nav_filterflat_next(), nav_filterlist_reset(), nav_getindex(), nav_gotoindex(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

Referenced by ai_usb_ms_nav_dir_gotoparent().

bool nav_filterflat_mount ( void  )

This function mounts the selected partition.

@return  false in case of error, see global value "fs_g_status" for more detail
@return  true otherwise
//! If the FS_MULTI_PARTITION option is disabled
//! then the mount routine selects the first partition supported by file system. <br>
//! After mount, the file list contains files and directories of ROOT directory
//! 

References fs_g_nav, nav_filterlist_mount(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

uint16_t nav_filterflat_nb ( void  )

This function computes the number of files and directories in filtered file list.

Returns
number of files and directories present in filtered file list

References nav_filterflat_get(), nav_filterflat_goto(), nav_filterflat_next(), and nav_filterflat_reset().

Referenced by ai_usb_ms_nav_file_nb().

bool nav_filterflat_next ( void  )

This function goes to the next position in the filtered file list.

Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

References fs_g_nav, nav_dir_cd(), nav_file_isdir(), nav_filterlist_get(), nav_filterlist_gotoparent(), nav_filterlist_next(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

Referenced by nav_filterflat_findname(), nav_filterflat_goto(), nav_filterflat_gotoparent(), and nav_filterflat_nb().

bool nav_filterflat_previous ( void  )

This function goes to the previous position in filtered file list.

Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

References fs_g_nav, nav_dir_cd(), nav_file_isdir(), nav_filterlist_get(), nav_filterlist_gotoparent(), nav_filterlist_next(), nav_filterlist_previous(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

Referenced by nav_filterflat_goto().

bool nav_filterflat_reset ( void  )

This function resets the pointer of selection, so "no file selected" in filtered file list.

Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

References fs_g_nav, nav_dir_gotoparent(), nav_filterlist_reset(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.

Referenced by nav_filterflat_goto(), and nav_filterflat_nb().

bool nav_filterflat_root ( void  )

This function initializes the file filtered list on the root directory.

Returns
false in case of error, see global value "fs_g_status" for more detail
true otherwise

References fs_g_nav, nav_filterlist_root(), Fs_management::u16_flat_pos_offset, and Fs_management::u8_flat_dir_level.