Björn Stenberg | 0e2a5a6 | 2002-04-27 23:31:23 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id$ |
| 9 | * |
Nicolas Pennequin | 357ffb3 | 2008-05-05 10:32:46 +0000 | [diff] [blame] | 10 | * Copyright (C) 2007 by Kévin Ferrare |
Björn Stenberg | 0e2a5a6 | 2002-04-27 23:31:23 +0000 | [diff] [blame] | 11 | * |
Daniel Stenberg | 2acc0ac | 2008-06-28 18:10:04 +0000 | [diff] [blame^] | 12 | * 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 Stenberg | 0e2a5a6 | 2002-04-27 23:31:23 +0000 | [diff] [blame] | 16 | * |
| 17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 18 | * KIND, either express or implied. |
| 19 | * |
| 20 | ****************************************************************************/ |
Kevin Ferrare | 011a325 | 2007-07-20 17:06:55 +0000 | [diff] [blame] | 21 | |
Björn Stenberg | 0e2a5a6 | 2002-04-27 23:31:23 +0000 | [diff] [blame] | 22 | #ifndef _DIR_H_ |
| 23 | #define _DIR_H_ |
| 24 | |
Kevin Ferrare | 5633dc6 | 2007-07-21 14:21:11 +0000 | [diff] [blame] | 25 | #include "config.h" |
| 26 | |
Miika Pekkarinen | 52d827a | 2008-03-11 19:39:26 +0000 | [diff] [blame] | 27 | #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 Ferrare | 011a325 | 2007-07-20 17:06:55 +0000 | [diff] [blame] | 44 | #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 Stenberg | 22b7701 | 2005-02-22 12:19:12 +0000 | [diff] [blame] | 54 | #else |
Kevin Ferrare | 011a325 | 2007-07-20 17:06:55 +0000 | [diff] [blame] | 55 | #include "dir_uncached.h" |
| 56 | # define DIR DIR_UNCACHED |
| 57 | # define dirent dirent_uncached |
Kevin Ferrare | 0843a07 | 2007-07-21 14:21:45 +0000 | [diff] [blame] | 58 | # define opendir opendir_uncached |
Kevin Ferrare | 011a325 | 2007-07-20 17:06:55 +0000 | [diff] [blame] | 59 | # 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 Stenberg | 22b7701 | 2005-02-22 12:19:12 +0000 | [diff] [blame] | 64 | #endif |
Daniel Stenberg | dd67452 | 2002-05-07 11:36:32 +0000 | [diff] [blame] | 65 | |
Björn Stenberg | 0e2a5a6 | 2002-04-27 23:31:23 +0000 | [diff] [blame] | 66 | #endif |