2 * Copyright 2004-2005 Timo Hirvonen
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * 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
26 struct keyval
*comments
;
33 #define TI_MATCH_ARTIST (1 << 0)
34 #define TI_MATCH_ALBUM (1 << 1)
35 #define TI_MATCH_TITLE (1 << 2)
37 /* initializes only filename and ref */
38 extern struct track_info
*track_info_new(const char *filename
);
40 extern void track_info_ref(struct track_info
*ti
);
41 extern void track_info_unref(struct track_info
*ti
);
44 * returns: 1 if @ti has any of the following tags: artist, album, title
47 extern int track_info_has_tag(const struct track_info
*ti
);
52 * returns: 1 if all words in @text are found to match defined fields (@flags) in @ti
55 extern int track_info_matches(struct track_info
*ti
, const char *text
, unsigned int flags
);