Mercurial > audlegacy
comparison src/libaudtag/audtag.c @ 4887:0ddbd0025174 default tip
added libaudtag. (not used yet.)
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Wed, 05 May 2010 18:26:06 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4886:54b4f7aaca24 | 4887:0ddbd0025174 |
---|---|
1 /* | |
2 * Copyright 2009 Paula Stanciu | |
3 * | |
4 * This file is part of Audacious. | |
5 * | |
6 * Audacious is free software: you can redistribute it and/or modify it under | |
7 * the terms of the GNU General Public License as published by the Free Software | |
8 * Foundation, version 3 of the License. | |
9 * | |
10 * Audacious is distributed in the hope that it will be useful, but WITHOUT ANY | |
11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | |
12 * A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License along with | |
15 * Audacious. If not, see <http://www.gnu.org/licenses/>. | |
16 * | |
17 * The Audacious team does not consider modular code linking to Audacious or | |
18 * using our public API to be a derived work. | |
19 */ | |
20 | |
21 #include "audlegacy/tuple.h" | |
22 #include "audtag.h" | |
23 #include "tag_module.h" | |
24 #include "util.h" | |
25 | |
26 void tag_init(void) | |
27 { | |
28 init_tag_modules(); | |
29 } | |
30 | |
31 /* The tuple's file-related attributes are already set */ | |
32 | |
33 gboolean tag_tuple_read (Tuple * tuple, VFSFile * fd) | |
34 { | |
35 tag_module_t *mod = find_tag_module(fd); | |
36 | |
37 if (mod == NULL) | |
38 return FALSE; | |
39 | |
40 AUDDBG("Tag module %s has accepted %s\n", mod->name, fd->uri); | |
41 return mod->populate_tuple_from_file (tuple, fd) != NULL; | |
42 } | |
43 | |
44 gboolean tag_tuple_write_to_file(Tuple * tuple, VFSFile * fd) | |
45 { | |
46 tag_module_t *mod = find_tag_module(fd); | |
47 | |
48 if (mod == NULL) | |
49 return FALSE; | |
50 | |
51 return mod->write_tuple_to_file(tuple, fd); | |
52 } |