blob: 69403a7572165afb0ab90275bcedc880aee4534d [file] [log] [blame]
Björn Stenberg0e2a5a62002-04-27 23:31:23 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
Nicolas Pennequin357ffb32008-05-05 10:32:46 +000010 * Copyright (C) 2007 by Kévin Ferrare
Björn Stenberg0e2a5a62002-04-27 23:31:23 +000011 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
Björn Stenberg0e2a5a62002-04-27 23:31:23 +000016 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
Kevin Ferrare011a3252007-07-20 17:06:55 +000021
Björn Stenberg0e2a5a62002-04-27 23:31:23 +000022#ifndef _DIR_H_
23#define _DIR_H_
24
Kevin Ferrare5633dc62007-07-21 14:21:11 +000025#include "config.h"
26
Miika Pekkarinen52d827a2008-03-11 19:39:26 +000027#ifdef HAVE_MULTIVOLUME
28
29/* how to name volumes, first char must be outside of legal file names,
30 a number gets appended to enumerate, if applicable */
31#ifdef HAVE_MMC
32#define VOL_NAMES "<MMC%d>"
33#define VOL_ENUM_POS 4 /* position of %d, to avoid runtime calculation */
34#elif defined(HAVE_HOTSWAP)
35#define VOL_NAMES "<microSD%d>"
36#define VOL_ENUM_POS 8 /* position of %d, to avoid runtime calculation */
37#else
38#define VOL_NAMES "<HD%d>"
39#define VOL_ENUM_POS 3
40#endif
41
42#endif
43
Kevin Ferrare011a3252007-07-20 17:06:55 +000044#ifdef HAVE_DIRCACHE
45# include "dircache.h"
46# define DIR DIR_CACHED
47# define dirent dircache_entry
48# define opendir opendir_cached
49# define closedir closedir_cached
50# define readdir readdir_cached
51# define closedir closedir_cached
52# define mkdir mkdir_cached
53# define rmdir rmdir_cached
Daniel Stenberg22b77012005-02-22 12:19:12 +000054#else
Kevin Ferrare011a3252007-07-20 17:06:55 +000055#include "dir_uncached.h"
56# define DIR DIR_UNCACHED
57# define dirent dirent_uncached
Kevin Ferrare0843a072007-07-21 14:21:45 +000058# define opendir opendir_uncached
Kevin Ferrare011a3252007-07-20 17:06:55 +000059# define closedir closedir_uncached
60# define readdir readdir_uncached
61# define closedir closedir_uncached
62# define mkdir mkdir_uncached
63# define rmdir rmdir_uncached
Daniel Stenberg22b77012005-02-22 12:19:12 +000064#endif
Daniel Stenbergdd674522002-05-07 11:36:32 +000065
Björn Stenberg0e2a5a62002-04-27 23:31:23 +000066#endif