cdtext.h

Go to the documentation of this file.
00001 /*
00002     $Id: cdtext_8h-source.html,v 1.10 2006/10/27 11:16:41 rocky Exp $
00003 
00004     Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
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 2 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, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 */
00029 
00030 #ifndef __CDIO_CDTEXT_H__
00031 #define __CDIO_CDTEXT_H__
00032 
00033 #include <cdio/cdio.h>
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif /* __cplusplus */
00038 
00039 #define MAX_CDTEXT_FIELDS 13
00040 #define MIN_CDTEXT_FIELD  0
00041   
00046   struct cdtext {
00047     char *field[MAX_CDTEXT_FIELDS];
00048   };
00049   
00053   typedef enum {
00054     CDTEXT_ARRANGER   =  0,   
00055     CDTEXT_COMPOSER   =  1,   
00056     CDTEXT_DISCID     =  2,   
00057     CDTEXT_GENRE      =  3,   
00058     CDTEXT_MESSAGE    =  4,   
00059     CDTEXT_ISRC       =  5,   
00060     CDTEXT_PERFORMER  =  6,   
00061     CDTEXT_SIZE_INFO  =  7,   
00062     CDTEXT_SONGWRITER =  8,   
00063     CDTEXT_TITLE      =  9,   
00064     CDTEXT_TOC_INFO   = 10,   
00065     CDTEXT_TOC_INFO2  = 11,   
00066     CDTEXT_UPC_EAN    = 12,
00067     CDTEXT_INVALID    = MAX_CDTEXT_FIELDS
00068   } cdtext_field_t;
00069 
00071   const char *cdtext_field2str (cdtext_field_t i);
00072   
00077   void cdtext_init (cdtext_t *cdtext);
00078   
00080   void cdtext_destroy (cdtext_t *cdtext);
00081   
00090   char *cdtext_get (cdtext_field_t key, const cdtext_t *cdtext);
00091 
00101   const char *cdtext_get_const (cdtext_field_t key, const cdtext_t *cdtext);
00102   
00107   cdtext_field_t cdtext_is_keyword (const char *key);
00108   
00112   void cdtext_set (cdtext_field_t key, const char *value, cdtext_t *cdtext);
00113   
00114 #ifdef __cplusplus
00115 }
00116 #endif /* __cplusplus */
00117 
00118 #endif /* __CDIO_CDTEXT_H__ */
00119 
00120 /* 
00121  * Local variables:
00122  *  c-file-style: "gnu"
00123  *  tab-width: 8
00124  *  indent-tabs-mode: nil
00125  * End:
00126  */

Generated on Fri Oct 27 06:38:08 2006 for libcdio by  doxygen 1.4.6