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>
37 #define ROLE_TRACKARTIST 2
38 #define ROLE_ALBUMARTIST 3
40 #define ROLE_CONDUCTOR 5
41 #define ROLE_COMPOSER 6
45 struct song_metadata
{
49 char *basename
; // basename is part of path
53 char *image
; // coverart
59 char *comment
; // COMM
61 char *contributor
[N_ROLE
]; // TPE1 (artist)
65 char *contributor_sort
[N_ROLE
];
68 char *grouping
; // TIT1
71 int total_tracks
; // TRCK
73 int total_discs
; // TPOS
75 char compilation
; // YTCP
82 int song_length
; // TLEN
89 char *mime
; // MIME type
90 char *dlna_pn
; // DLNA Profile Name
94 unsigned long album_id
;
95 unsigned long track_id
;
96 unsigned long genre_id
;
97 unsigned long contributor_id
[N_ROLE
];
99 char *musicbrainz_albumid
;
100 char *musicbrainz_trackid
;
101 char *musicbrainz_artistid
;
102 char *musicbrainz_albumartistid
;
113 extern int scan_init(char *path
);
114 extern void make_composite_tags(struct song_metadata
*psong
);
115 extern int readtags(char *path
, struct song_metadata
*psong
, struct stat
*stat
, char *lang
, char *type
);
116 extern void freetags(struct song_metadata
*psong
);
118 extern int start_plist(const char *path
, struct song_metadata
*psong
, struct stat
*stat
, char *lang
, char *type
);
119 extern int next_plist_track(struct song_metadata
*psong
, struct stat
*stat
, char *lang
, char *type
);