1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 Daniel Stenberg
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
23 #include <applimits.h>
27 short attr
; /* FAT attributes + file type flags */
28 unsigned long time_write
; /* Last write time */
33 /* browser context for file or db */
35 /* The directory we are browsing */
36 char currdir
[MAX_PATH
];
37 /* the number of directories we have crossed from / */
39 /* The currently selected file/id3dbitem index (old dircursor+dirfile) */
41 /* The selected item in each directory crossed
42 * (used when we want to return back to a previouws directory)*/
43 int selected_item_history
[MAX_DIR_LEVELS
];
45 int firstpos
; /* which dir entry is on first
46 position in dir buffer */
47 int pos_history
[MAX_DIR_LEVELS
];
49 int *dirfilter
; /* file use */
50 int filesindir
; /* The number of files in the dircache */
51 int dirsindir
; /* file use */
52 int dirlength
; /* total number of entries in dir, incl. those not loaded */
54 int table_history
[MAX_DIR_LEVELS
]; /* db use */
55 int extra_history
[MAX_DIR_LEVELS
]; /* db use */
56 int currtable
; /* db use */
57 int currextra
; /* db use */
59 /* A big buffer with plenty of entry structs,
60 * contains all files and dirs in the current
61 * dir (with filters applied) */
70 void tree_mem_init(void);
71 void tree_gui_init(void);
72 void get_current_file(char* buffer
, int buffer_len
);
73 void set_dirfilter(int l_dirfilter
);
74 void set_current_file(char *path
);
75 int rockbox_browse(const char *root
, int dirfilter
);
76 bool create_playlist(void);
77 void resume_directory(const char *dir
);
78 char *getcwd(char *buf
, int size
);
79 void reload_directory(void);
80 bool check_rockboxdir(void);
81 struct tree_context
* tree_get_context(void);
82 void tree_flush(void);
83 void tree_restore(void);
85 bool bookmark_play(char* resume_file
, int index
, int offset
, int seed
,
88 extern struct gui_synclist tree_lists
;
89 extern struct gui_syncstatusbar statusbars
;