1 //=========================================================================
2 // FILENAME : taguilts.h
3 // DESCRIPTION : Header for tagutils.c
4 //=========================================================================
5 // Copyright (c) 2008- NETGEAR, Inc. All Rights Reserved.
6 //=========================================================================
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 * This file is derived from mt-daap project.
31 #include <sys/types.h>
39 #define ROLE_TRACKARTIST 2
40 #define ROLE_ALBUMARTIST 3
42 #define ROLE_CONDUCTOR 5
43 #define ROLE_COMPOSER 6
47 struct song_metadata
{
51 char *basename
; // basename is part of path
55 uint8_t *image
; // coverart
61 char *comment
; // COMM
63 char *contributor
[N_ROLE
]; // TPE1 (artist)
67 char *contributor_sort
[N_ROLE
];
70 char *grouping
; // TIT1
73 int total_tracks
; // TRCK
75 int total_discs
; // TPOS
77 char compilation
; // YTCP
84 int song_length
; // TLEN
91 char *mime
; // MIME type
92 char *dlna_pn
; // DLNA Profile Name
96 unsigned long album_id
;
97 unsigned long track_id
;
98 unsigned long genre_id
;
99 unsigned long contributor_id
[N_ROLE
];
101 char *musicbrainz_albumid
;
102 char *musicbrainz_trackid
;
103 char *musicbrainz_artistid
;
104 char *musicbrainz_albumartistid
;
115 extern int scan_init(char *path
);
116 extern void make_composite_tags(struct song_metadata
*psong
);
117 extern int readtags(char *path
, struct song_metadata
*psong
, struct stat
*stat
, char *lang
, char *type
);
118 extern void freetags(struct song_metadata
*psong
);
120 extern int start_plist(const char *path
, struct song_metadata
*psong
, struct stat
*stat
, char *lang
, char *type
);
121 extern int next_plist_track(struct song_metadata
*psong
, struct stat
*stat
, char *lang
, char *type
);