libcdio
0.82
|
00001 /* 00002 $Id: cdtext.h,v 1.14 2008/03/25 15:59:08 karl Exp $ 00003 00004 Copyright (C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org> 00005 adapted from cuetools 00006 Copyright (C) 2003 Svend Sanjay Sorensen <ssorensen@fastmail.fm> 00007 00008 This program is free software: you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation, either version 3 of the License, or 00011 (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00028 00029 #ifndef __CDIO_CDTEXT_H__ 00030 #define __CDIO_CDTEXT_H__ 00031 00032 #include <cdio/cdio.h> 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif /* __cplusplus */ 00037 00038 #define MAX_CDTEXT_FIELDS 13 00039 #define MIN_CDTEXT_FIELD 0 00040 00045 struct cdtext { 00046 char *field[MAX_CDTEXT_FIELDS]; 00047 }; 00048 00052 typedef enum { 00053 CDTEXT_ARRANGER = 0, 00054 CDTEXT_COMPOSER = 1, 00055 CDTEXT_DISCID = 2, 00056 CDTEXT_GENRE = 3, 00057 CDTEXT_MESSAGE = 4, 00058 CDTEXT_ISRC = 5, 00059 CDTEXT_PERFORMER = 6, 00060 CDTEXT_SIZE_INFO = 7, 00061 CDTEXT_SONGWRITER = 8, 00062 CDTEXT_TITLE = 9, 00063 CDTEXT_TOC_INFO = 10, 00064 CDTEXT_TOC_INFO2 = 11, 00065 CDTEXT_UPC_EAN = 12, 00066 CDTEXT_INVALID = MAX_CDTEXT_FIELDS 00067 } cdtext_field_t; 00068 00070 const char *cdtext_field2str (cdtext_field_t i); 00071 00076 void cdtext_init (cdtext_t *cdtext); 00077 00079 void cdtext_destroy (cdtext_t *cdtext); 00080 00089 char *cdtext_get (cdtext_field_t key, const cdtext_t *cdtext); 00090 00100 const char *cdtext_get_const (cdtext_field_t key, const cdtext_t *cdtext); 00101 00106 cdtext_field_t cdtext_is_keyword (const char *key); 00107 00111 void cdtext_set (cdtext_field_t key, const char *value, cdtext_t *cdtext); 00112 00113 #ifdef __cplusplus 00114 } 00115 #endif /* __cplusplus */ 00116 00117 #endif /* __CDIO_CDTEXT_H__ */ 00118 00119 /* 00120 * Local variables: 00121 * c-file-style: "gnu" 00122 * tab-width: 8 00123 * indent-tabs-mode: nil 00124 * End: 00125 */