1 /* EasyTAG - tag editor for audio files 2 * Copyright (C) 2014,2015 David King <amigadave@amigadave.com> 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU General Public License as published by the Free 6 * Software Foundation; either version 2 of the License, or (at your option) 7 * any later version. 8 * 9 * This program is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 * 14 * You should have received a copy of the GNU General Public License along with 15 * this program; if not, write to the Free Software Foundation, Inc., 51 16 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef ET_FILE_TAG_H_ 20 #define ET_FILE_TAG_H_ 21 22 #include <glib.h> 23 24 G_BEGIN_DECLS 25 26 #include "picture.h" 27 28 /* 29 * File_Tag: 30 * @key: incremented value 31 * @saved: %TRUE if the tag has been saved, %FALSE otherwise 32 * @title: track name 33 * @artist: track artist 34 * @album_artist: artist for the album of which this track is part 35 * @album: album name 36 * @disc_number: disc number within a set (as a string) 37 * @disc_total: total number of discs in the set (as a string) 38 * @year: year (as a string) 39 * @track: track number (as a string) 40 * @track_total: total number of tracks (as a string) 41 * @genre: text genre 42 * @comment: comment 43 * @composer: composer 44 * @orig_artist: original artist 45 * @copyright: copyright 46 * @url: URL 47 * @encoded_by: encoded by (strictly, a person, but often the encoding 48 * application) 49 * @picture: #EtPicture, which may have several other linked instances 50 * @other: a list of other tags, used for Vorbis comments 51 * Description of each item of the TagList list 52 */ 53 typedef struct 54 { 55 guint key; 56 gboolean saved; 57 58 gchar *title; 59 gchar *artist; 60 gchar *album_artist; 61 gchar *album; 62 gchar *disc_number; 63 gchar *disc_total; 64 gchar *year; 65 gchar *track; 66 gchar *track_total; 67 gchar *genre; 68 gchar *comment; 69 gchar *composer; 70 gchar *orig_artist; 71 gchar *copyright; 72 gchar *url; 73 gchar *encoded_by; 74 EtPicture *picture; 75 GList *other; 76 } File_Tag; 77 78 File_Tag * et_file_tag_new (void); 79 void et_file_tag_free (File_Tag *file_tag); 80 81 void et_file_tag_set_title (File_Tag *file_tag, const gchar *title); 82 void et_file_tag_set_artist (File_Tag *file_tag, const gchar *artist); 83 void et_file_tag_set_album_artist (File_Tag *file_tag, const gchar *album_artist); 84 void et_file_tag_set_album (File_Tag *file_tag, const gchar *album); 85 void et_file_tag_set_disc_number (File_Tag *file_tag, const gchar *disc_number); 86 void et_file_tag_set_disc_total (File_Tag *file_tag, const gchar *disc_total); 87 void et_file_tag_set_year (File_Tag *file_tag, const gchar *year); 88 void et_file_tag_set_track_number (File_Tag *file_tag, const gchar *track_number); 89 void et_file_tag_set_track_total (File_Tag *file_tag, const gchar *track_total); 90 void et_file_tag_set_genre (File_Tag *file_tag, const gchar *genre); 91 void et_file_tag_set_comment (File_Tag *file_tag, const gchar *comment); 92 void et_file_tag_set_composer (File_Tag *file_tag, const gchar *composer); 93 void et_file_tag_set_orig_artist (File_Tag *file_tag, const gchar *orig_artist); 94 void et_file_tag_set_copyright (File_Tag *file_tag, const gchar *copyright); 95 void et_file_tag_set_url (File_Tag *file_tag, const gchar *url); 96 void et_file_tag_set_encoded_by (File_Tag *file_tag, const gchar *encoded_by); 97 void et_file_tag_set_picture (File_Tag *file_tag, const EtPicture *pic); 98 99 void et_file_tag_copy_into (File_Tag *destination, const File_Tag *source); 100 void et_file_tag_copy_other_into (File_Tag *destination, const File_Tag *source); 101 102 gboolean et_file_tag_detect_difference (const File_Tag *FileTag1, const File_Tag *FileTag2); 103 104 G_END_DECLS 105 106 #endif /* !ET_FILE_TAG_H_ */ 107