1 /* plugin_common - Routines common to several plugins
2 * Copyright (C) 2002,2003,2004 Josh Coalson
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.
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.
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.
19 #ifndef FLAC__PLUGIN_COMMON__ID3V2_H
20 #define FLAC__PLUGIN_COMMON__ID3V2_H
22 #include "FLAC/ordinals.h"
25 * This is a simple structure that holds pointers to field values (in ASCII)
26 * for fields we care about.
36 char *tracks_in_album;
39 } FLAC_Plugin__Id3v2_Tag;
41 /* Fills up an existing FLAC_Plugin__Id3v2_Tag. All pointers must be NULL on
42 * entry or the function will return false. For any field for which there is
43 * no corresponding ID3 frame, it's pointer will be NULL.
45 * If loading fails, all pointers will be cleared and the function will return
48 * If the function returns true, be sure to call FLAC_plugin__id3v2_tag_clear()
49 * when you are done with 'tag'.
51 FLAC__bool FLAC_plugin__id3v2_tag_get(const char *filename, FLAC_Plugin__Id3v2_Tag *tag);
53 /* free()s any non-NULL pointers in 'tag'. Does NOT free(tag).
55 void FLAC_plugin__id3v2_tag_clear(FLAC_Plugin__Id3v2_Tag *tag);