diff options
Diffstat (limited to 'firmware/include/dir_uncached.h')
-rw-r--r-- | firmware/include/dir_uncached.h | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/firmware/include/dir_uncached.h b/firmware/include/dir_uncached.h deleted file mode 100644 index 6443d5ba97..0000000000 --- a/firmware/include/dir_uncached.h +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id: dir.h 13741 2007-06-30 02:08:27Z jethead71 $ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Björn Stenberg | ||
11 | * | ||
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. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef _DIR_UNCACHED_H_ | ||
22 | #define _DIR_UNCACHED_H_ | ||
23 | |||
24 | #include "config.h" | ||
25 | |||
26 | struct dirinfo { | ||
27 | int attribute; | ||
28 | long size; | ||
29 | unsigned short wrtdate; | ||
30 | unsigned short wrttime; | ||
31 | }; | ||
32 | |||
33 | #include <stdbool.h> | ||
34 | #include "file.h" | ||
35 | |||
36 | #if defined(SIMULATOR) || defined(__PCTOOL__) | ||
37 | # define dirent_uncached sim_dirent | ||
38 | # define DIR_UNCACHED SIM_DIR | ||
39 | # define opendir_uncached sim_opendir | ||
40 | # define readdir_uncached sim_readdir | ||
41 | # define closedir_uncached sim_closedir | ||
42 | # define mkdir_uncached sim_mkdir | ||
43 | # define rmdir_uncached sim_rmdir | ||
44 | #elif defined(APPLICATION) | ||
45 | # include "rbpaths.h" | ||
46 | # define DIRENT_DEFINED | ||
47 | # define DIR_DEFINED | ||
48 | # define dirent_uncached dirent | ||
49 | # define DIR_UNCACHED DIR | ||
50 | # define opendir_uncached app_opendir | ||
51 | # define readdir_uncached app_readdir | ||
52 | # define closedir_uncached app_closedir | ||
53 | # define mkdir_uncached app_mkdir | ||
54 | # define rmdir_uncached app_rmdir | ||
55 | #endif | ||
56 | |||
57 | |||
58 | #ifndef DIRENT_DEFINED | ||
59 | struct dirent_uncached { | ||
60 | unsigned char d_name[MAX_PATH]; | ||
61 | struct dirinfo info; | ||
62 | long startcluster; | ||
63 | }; | ||
64 | #endif | ||
65 | |||
66 | #include "fat.h" | ||
67 | |||
68 | #ifndef DIR_DEFINED | ||
69 | typedef struct { | ||
70 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | ||
71 | struct fat_dir fatdir CACHEALIGN_ATTR; | ||
72 | bool busy; | ||
73 | long startcluster; | ||
74 | struct dirent_uncached theent; | ||
75 | #ifdef HAVE_MULTIVOLUME | ||
76 | int volumecounter; /* running counter for faked volume entries */ | ||
77 | #endif | ||
78 | #else | ||
79 | /* simulator/application: */ | ||
80 | void *dir; /* actually a DIR* dir */ | ||
81 | char *name; | ||
82 | #endif | ||
83 | } DIR_UNCACHED CACHEALIGN_ATTR; | ||
84 | #endif | ||
85 | |||
86 | #ifdef HAVE_HOTSWAP | ||
87 | char *get_volume_name(int volume); | ||
88 | #endif | ||
89 | |||
90 | #ifdef HAVE_MULTIVOLUME | ||
91 | int strip_volume(const char*, char*); | ||
92 | #endif | ||
93 | |||
94 | #ifndef DIRFUNCTIONS_DEFINED | ||
95 | |||
96 | extern DIR_UNCACHED* opendir_uncached(const char* name); | ||
97 | extern int closedir_uncached(DIR_UNCACHED* dir); | ||
98 | extern int mkdir_uncached(const char* name); | ||
99 | extern int rmdir_uncached(const char* name); | ||
100 | |||
101 | extern struct dirent_uncached* readdir_uncached(DIR_UNCACHED* dir); | ||
102 | |||
103 | extern int release_dirs(int volume); | ||
104 | |||
105 | #endif /* DIRFUNCTIONS_DEFINED */ | ||
106 | |||
107 | #endif | ||