When setting a cache path also enable the cache implicitly.
[Rockbox.git] / firmware / include / dir.h
blobd4ead2df1017506f3b6c64e1a61ace6f2c56dcfc
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Kévin Ferrare
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 ****************************************************************************/
20 #ifndef _DIR_H_
21 #define _DIR_H_
23 #include "config.h"
25 #ifdef HAVE_MULTIVOLUME
27 /* how to name volumes, first char must be outside of legal file names,
28 a number gets appended to enumerate, if applicable */
29 #ifdef HAVE_MMC
30 #define VOL_NAMES "<MMC%d>"
31 #define VOL_ENUM_POS 4 /* position of %d, to avoid runtime calculation */
32 #elif defined(HAVE_HOTSWAP)
33 #define VOL_NAMES "<microSD%d>"
34 #define VOL_ENUM_POS 8 /* position of %d, to avoid runtime calculation */
35 #else
36 #define VOL_NAMES "<HD%d>"
37 #define VOL_ENUM_POS 3
38 #endif
40 #endif
42 #ifdef HAVE_DIRCACHE
43 # include "dircache.h"
44 # define DIR DIR_CACHED
45 # define dirent dircache_entry
46 # define opendir opendir_cached
47 # define closedir closedir_cached
48 # define readdir readdir_cached
49 # define closedir closedir_cached
50 # define mkdir mkdir_cached
51 # define rmdir rmdir_cached
52 #else
53 #include "dir_uncached.h"
54 # define DIR DIR_UNCACHED
55 # define dirent dirent_uncached
56 # define opendir opendir_uncached
57 # define closedir closedir_uncached
58 # define readdir readdir_uncached
59 # define closedir closedir_uncached
60 # define mkdir mkdir_uncached
61 # define rmdir rmdir_uncached
62 #endif
64 #endif