1 /* EasyTAG - tag editor for audio files
2  * Copyright (C) 2014  David King <amigadave@amigadave.com>
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the Free
6  * Software Foundation; either version 2 of the License, or (at your option)
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc., 51
16  * Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  */
18 
19 #ifndef ET_FILE_DESCRIPTION_H_
20 #define ET_FILE_DESCRIPTION_H_
21 
22 #include <glib.h>
23 
24 G_BEGIN_DECLS
25 
26 #include "core_types.h"
27 
28 /*
29  * Structure for descripting supported files
30  */
31 typedef struct
32 {
33     ET_File_Type FileType;    /* Type of file (ex: MP3) */
34     const gchar *Extension; /* Extension (ex: ".mp3") */
35     ET_Tag_Type  TagType;     /* Type of tag (ex: ID3) */
36 } ET_File_Description;
37 
38 /*
39  * Description of supported files
40  */
41 extern const ET_File_Description ETFileDescription[];
42 
43 /* Calculate the last index of the previous tab */
44 extern const gsize ET_FILE_DESCRIPTION_SIZE;
45 
46 const gchar * ET_Get_File_Extension (const gchar *filename);
47 const ET_File_Description * ET_Get_File_Description (const gchar *filename);
48 gboolean et_file_is_supported (const gchar *filename);
49 
50 G_END_DECLS
51 
52 #endif /* !ET_FILE_DESCRIPTION_H_ */
53