#include config.h
[platform/upstream/flac.git] / src / plugin_common / id3v1.h
1 /* plugin_common - Routines common to several plugins
2  * Copyright (C) 2002  Josh Coalson
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17  */
18
19 #ifndef FLAC__PLUGIN_COMMON__ID3V1_H
20 #define FLAC__PLUGIN_COMMON__ID3V1_H
21
22 #include <string.h>
23
24 #include "FLAC/ordinals.h"
25
26 typedef struct {
27         char tag[3];
28         char title[30];
29         char artist[30];
30         char album[30];
31         char year[4];
32         union {
33                 struct {
34                         char comment[30];
35                 } v1_0;
36                 struct {
37                         char comment[28];
38                         char zero;
39                         unsigned char track;
40                 } v1_1;
41         } comment;
42         unsigned char genre;
43 } FLAC_Plugin__Id3v1_Tag;
44
45 FLAC__bool FLAC_plugin__id3v1_tag_get(const char *filename, FLAC_Plugin__Id3v1_Tag *tag);
46
47
48 #define FLAC_PLUGIN__ID3V1_TAG_INVALID_GENRE 255
49
50 const char *FLAC_plugin__id3v1_tag_get_genre_as_string(unsigned char genre_code);
51 unsigned FLAC_plugin__id3v1_tag_genre_table_max();
52
53 #endif