Main Page | Data Structures | Directories | File List | Data Fields | Globals

cdtext.h

Go to the documentation of this file.
00001 /*
00002     $Id: cdtext.h,v 1.11 2005/04/25 23:06:21 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   
00045   struct cdtext {
00046     char *field[MAX_CDTEXT_FIELDS];
00047   };
00048   
00050   typedef enum {
00051     CDTEXT_ARRANGER   =  0,   
00052     CDTEXT_COMPOSER   =  1,   
00053     CDTEXT_DISCID     =  2,   
00054     CDTEXT_GENRE      =  3,   
00055     CDTEXT_MESSAGE    =  4,   
00056     CDTEXT_ISRC       =  5,   
00057     CDTEXT_PERFORMER  =  6,   
00058     CDTEXT_SIZE_INFO  =  7,   
00059     CDTEXT_SONGWRITER =  8,   
00060     CDTEXT_TITLE      =  9,   
00061     CDTEXT_TOC_INFO   = 10,   
00062     CDTEXT_TOC_INFO2  = 11,   
00063     CDTEXT_UPC_EAN    = 12,
00064     CDTEXT_INVALID    = MAX_CDTEXT_FIELDS
00065   } cdtext_field_t;
00066 
00068   const char *cdtext_field2str (cdtext_field_t i);
00069   
00074   void cdtext_init (cdtext_t *cdtext);
00075   
00077   void cdtext_destroy (cdtext_t *cdtext);
00078   
00087   char *cdtext_get (cdtext_field_t key, const cdtext_t *cdtext);
00088 
00098   const char *cdtext_get_const (cdtext_field_t key, const cdtext_t *cdtext);
00099   
00104   cdtext_field_t cdtext_is_keyword (const char *key);
00105   
00109   void cdtext_set (cdtext_field_t key, const char *value, cdtext_t *cdtext);
00110   
00111 #ifdef __cplusplus
00112 }
00113 #endif /* __cplusplus */
00114 
00115 #endif /* __CDIO_CDTEXT_H__ */
00116 
00117 /* 
00118  * Local variables:
00119  *  c-file-style: "gnu"
00120  *  tab-width: 8
00121  *  indent-tabs-mode: nil
00122  * End:
00123  */

Generated on Mon Sep 26 07:49:52 2005 for libcdio by  doxygen 1.4.4