summaryrefslogtreecommitdiffstats
path: root/apps/filetypes.h
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2004-05-21 20:08:24 +0000
committerBjörn Stenberg <bjorn@haxx.se>2004-05-21 20:08:24 +0000
commitfb00c2190bab443812581473032156eb1e804c30 (patch)
tree7ac8b3964e7ebf284b1eae3a384a036e928f568d /apps/filetypes.h
parent087a085790b2f9099e9b7c9184374a30520f408e (diff)
downloadrockbox-fb00c2190bab443812581473032156eb1e804c30.tar.gz
rockbox-fb00c2190bab443812581473032156eb1e804c30.tar.bz2
rockbox-fb00c2190bab443812581473032156eb1e804c30.zip
Plugin/file type association system. Patch #879411 by Henrik Backe
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4677 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/filetypes.h')
-rw-r--r--apps/filetypes.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/apps/filetypes.h b/apps/filetypes.h
new file mode 100644
index 0000000000..30bb71a38e
--- /dev/null
+++ b/apps/filetypes.h
@@ -0,0 +1,53 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id:
+ *
+ * Copyright (C) 2002 Henrik Backe
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+#ifndef _FILEHANDLE_H_
+#define _FILEHANDLE_H_
+
+#include <stdbool.h>
+#include <tree.h>
+#include <menu.h>
+
+int filetype_get_attr(char*);
+#ifdef HAVE_LCD_BITMAP
+char* filetype_get_icon(int);
+#else
+int filetype_get_icon(int);
+#endif
+char* filetype_get_plugin(struct entry*);
+void filetype_init(void);
+bool filetype_supported(int);
+int filetype_load_menu(struct menu_item*, int);
+void filetype_load_plugin(char*,char*);
+
+struct file_type {
+#ifdef HAVE_LCD_BITMAP
+ unsigned char* icon; /* the icon which shall be used for it, NULL if unknown */
+#else
+ int icon; /* the icon which shall be used for it, -1 if unknown */
+#endif
+ char* plugin; /* Which plugin to use, NULL if unknown */
+ bool no_extension;
+};
+
+struct ext_type {
+ char* extension; /* extension for which the file type is recognized */
+ struct file_type* type;
+};
+
+#endif