diff options
author | Kevin Ferrare <kevin@rockbox.org> | 2007-07-20 17:06:55 +0000 |
---|---|---|
committer | Kevin Ferrare <kevin@rockbox.org> | 2007-07-20 17:06:55 +0000 |
commit | 011a325e32c05f6e4817dcdc555615e6b7b6c102 (patch) | |
tree | ab22ab91b99524dba823cda861b17520db030911 /apps/plugin.h | |
parent | 930278bcc0fd944ec50f30074b53b4c7cf0e3ccf (diff) | |
download | rockbox-011a325e32c05f6e4817dcdc555615e6b7b6c102.tar.gz rockbox-011a325e32c05f6e4817dcdc555615e6b7b6c102.zip |
Makes apps and plugins interract with directories using a posix-like api instead of calling dircache / simulator functions (no additionnal layer added, only a cosmetic change)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13943 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
-rw-r--r-- | apps/plugin.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index 920d804ab5..ac6988152a 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -37,9 +37,6 @@ | |||
37 | #include "config.h" | 37 | #include "config.h" |
38 | #include "system.h" | 38 | #include "system.h" |
39 | #include "dir.h" | 39 | #include "dir.h" |
40 | #ifndef SIMULATOR | ||
41 | #include "dircache.h" | ||
42 | #endif | ||
43 | #include "kernel.h" | 40 | #include "kernel.h" |
44 | #include "thread.h" | 41 | #include "thread.h" |
45 | #include "button.h" | 42 | #include "button.h" |
@@ -115,12 +112,12 @@ | |||
115 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 112 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
116 | 113 | ||
117 | /* increase this every time the api struct changes */ | 114 | /* increase this every time the api struct changes */ |
118 | #define PLUGIN_API_VERSION 62 | 115 | #define PLUGIN_API_VERSION 63 |
119 | 116 | ||
120 | /* update this to latest version if a change to the api struct breaks | 117 | /* update this to latest version if a change to the api struct breaks |
121 | backwards compatibility (and please take the opportunity to sort in any | 118 | backwards compatibility (and please take the opportunity to sort in any |
122 | new function which are "waiting" at the end of the function table) */ | 119 | new function which are "waiting" at the end of the function table) */ |
123 | #define PLUGIN_MIN_API_VERSION 62 | 120 | #define PLUGIN_MIN_API_VERSION 63 |
124 | 121 | ||
125 | /* plugin return codes */ | 122 | /* plugin return codes */ |
126 | enum plugin_status { | 123 | enum plugin_status { |
@@ -316,17 +313,11 @@ struct plugin_api { | |||
316 | int numberlen IF_CNFN_NUM_(, int *num)); | 313 | int numberlen IF_CNFN_NUM_(, int *num)); |
317 | 314 | ||
318 | /* dir */ | 315 | /* dir */ |
319 | DIR* (*PREFIX(opendir))(const char* name); | 316 | DIR* (*opendir)(const char* name); |
320 | int (*PREFIX(closedir))(DIR* dir); | 317 | int (*closedir)(DIR* dir); |
321 | struct dirent* (*PREFIX(readdir))(DIR* dir); | 318 | struct dirent* (*readdir)(DIR* dir); |
322 | int (*PREFIX(mkdir))(const char *name); | 319 | int (*mkdir)(const char *name); |
323 | int (*PREFIX(rmdir))(const char *name); | 320 | int (*rmdir)(const char *name); |
324 | /* dir, cached */ | ||
325 | #ifdef HAVE_DIRCACHE | ||
326 | DIRCACHED* (*opendir_cached)(const char* name); | ||
327 | struct dircache_entry* (*readdir_cached)(DIRCACHED* dir); | ||
328 | int (*closedir_cached)(DIRCACHED* dir); | ||
329 | #endif | ||
330 | 321 | ||
331 | /* kernel/ system */ | 322 | /* kernel/ system */ |
332 | void (*PREFIX(sleep))(int ticks); | 323 | void (*PREFIX(sleep))(int ticks); |