2004-05-21 20:08:24 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* 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>
|
|
|
|
|
2005-09-02 16:50:51 +00:00
|
|
|
int filetype_get_attr(const char*);
|
2004-05-21 20:08:24 +00:00
|
|
|
#ifdef HAVE_LCD_BITMAP
|
2004-07-19 21:46:37 +00:00
|
|
|
const char* filetype_get_icon(int);
|
2004-05-21 20:08:24 +00:00
|
|
|
#else
|
|
|
|
int filetype_get_icon(int);
|
|
|
|
#endif
|
2004-08-18 01:09:31 +00:00
|
|
|
char* filetype_get_plugin(const struct entry*);
|
2004-05-21 20:08:24 +00:00
|
|
|
void filetype_init(void);
|
|
|
|
bool filetype_supported(int);
|
2005-03-06 18:26:34 +00:00
|
|
|
int filetype_load_menu(struct menu_item*, int);
|
2004-08-18 01:09:31 +00:00
|
|
|
int filetype_load_plugin(const char*, char*);
|
2004-05-21 20:08:24 +00:00
|
|
|
|
|
|
|
struct file_type {
|
|
|
|
#ifdef HAVE_LCD_BITMAP
|
2004-07-19 21:46:37 +00:00
|
|
|
const unsigned char* icon; /* the icon which shall be used for it, NULL if unknown */
|
2004-05-21 20:08:24 +00:00
|
|
|
#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
|