summaryrefslogtreecommitdiff
path: root/apps/filetypes.h
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-03-29 06:16:00 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-03-29 06:16:00 +0000
commit21165a3f3db3c777f8522b14f16e570107b0405b (patch)
treea3e2766c1424ded8a2de37ba28f0a709ee3d4ded /apps/filetypes.h
parentd71b531c25ad0e02f4124e6e8cb851f59e4bbc65 (diff)
downloadrockbox-21165a3f3db3c777f8522b14f16e570107b0405b.tar.gz
rockbox-21165a3f3db3c777f8522b14f16e570107b0405b.zip
Recode filetypes.c to remove its need for a static string buffer.
Functional changes: - filetypes.c handles the open with menu now instead of onplay.c - automatic plugin registration no longer works (did anyone know about you could do this?) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12959 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/filetypes.h')
-rw-r--r--apps/filetypes.h40
1 files changed, 16 insertions, 24 deletions
diff --git a/apps/filetypes.h b/apps/filetypes.h
index 7416c93b00..d2556c1d95 100644
--- a/apps/filetypes.h
+++ b/apps/filetypes.h
@@ -22,32 +22,24 @@
22#include <stdbool.h> 22#include <stdbool.h>
23#include <tree.h> 23#include <tree.h>
24#include <menu.h> 24#include <menu.h>
25 25/* init the filetypes structs.
26int filetype_get_attr(const char*); 26 uses audio buffer for storage, so call early in init... */
27#ifdef HAVE_LCD_BITMAP
28const unsigned char* filetype_get_icon(int);
29#else
30int filetype_get_icon(int);
31#endif
32char* filetype_get_plugin(const struct entry*);
33void filetype_init(void); 27void filetype_init(void);
34bool filetype_supported(int);
35int filetype_load_menu(struct menu_item*, int);
36int filetype_load_plugin(const char*, char*);
37 28
38struct file_type { 29/* Return the attribute (TREE_ATTR_*) of the file */
39#ifdef HAVE_LCD_BITMAP 30int filetype_get_attr(const char* file);
40 const unsigned char* icon; /* the icon which shall be used for it, NULL if unknown */ 31ICON filetype_get_icon(int attr);
41#else 32/* return the plugin filename associated with the file */
42 int icon; /* the icon which shall be used for it, -1 if unknown */ 33char* filetype_get_plugin(const struct entry* file);
43#endif 34
44 char* plugin; /* Which plugin to use, NULL if unknown */ 35/* returns true if the attr is supported */
45 bool no_extension; 36bool filetype_supported(int attr);
46}; 37
38/* List avialable viewers */
39int filetype_list_viewers(const char* current_file);
40
41/* start a plugin with file as the argument (called from onplay.c) */
42int filetype_load_plugin(const char* plugin, char* file);
47 43
48struct ext_type {
49 char* extension; /* extension for which the file type is recognized */
50 struct file_type* type;
51};
52 44
53#endif 45#endif