2002-04-27 23:31:23 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
2008-05-05 10:32:46 +00:00
|
|
|
* Copyright (C) 2007 by Kévin Ferrare
|
2002-04-27 23:31:23 +00:00
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-04-27 23:31:23 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
2007-07-20 17:06:55 +00:00
|
|
|
|
2002-04-27 23:31:23 +00:00
|
|
|
#ifndef _DIR_H_
|
|
|
|
#define _DIR_H_
|
|
|
|
|
2007-07-21 14:21:11 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2008-03-11 19:39:26 +00:00
|
|
|
#ifdef HAVE_MULTIVOLUME
|
|
|
|
|
|
|
|
/* how to name volumes, first char must be outside of legal file names,
|
|
|
|
a number gets appended to enumerate, if applicable */
|
|
|
|
#ifdef HAVE_MMC
|
|
|
|
#define VOL_NAMES "<MMC%d>"
|
|
|
|
#define VOL_ENUM_POS 4 /* position of %d, to avoid runtime calculation */
|
|
|
|
#elif defined(HAVE_HOTSWAP)
|
|
|
|
#define VOL_NAMES "<microSD%d>"
|
|
|
|
#define VOL_ENUM_POS 8 /* position of %d, to avoid runtime calculation */
|
|
|
|
#else
|
|
|
|
#define VOL_NAMES "<HD%d>"
|
|
|
|
#define VOL_ENUM_POS 3
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2007-07-20 17:06:55 +00:00
|
|
|
#ifdef HAVE_DIRCACHE
|
|
|
|
# include "dircache.h"
|
|
|
|
# define DIR DIR_CACHED
|
|
|
|
# define dirent dircache_entry
|
|
|
|
# define opendir opendir_cached
|
|
|
|
# define closedir closedir_cached
|
|
|
|
# define readdir readdir_cached
|
|
|
|
# define closedir closedir_cached
|
|
|
|
# define mkdir mkdir_cached
|
|
|
|
# define rmdir rmdir_cached
|
2005-02-22 12:19:12 +00:00
|
|
|
#else
|
2007-07-20 17:06:55 +00:00
|
|
|
#include "dir_uncached.h"
|
|
|
|
# define DIR DIR_UNCACHED
|
|
|
|
# define dirent dirent_uncached
|
2007-07-21 14:21:45 +00:00
|
|
|
# define opendir opendir_uncached
|
2007-07-20 17:06:55 +00:00
|
|
|
# define closedir closedir_uncached
|
|
|
|
# define readdir readdir_uncached
|
|
|
|
# define closedir closedir_uncached
|
|
|
|
# define mkdir mkdir_uncached
|
|
|
|
# define rmdir rmdir_uncached
|
2007-06-30 02:08:27 +00:00
|
|
|
#endif
|
|
|
|
|
2002-04-27 23:31:23 +00:00
|
|
|
#endif
|