Main Page | Class List | Directories | File List | Class Members | File Members

cddb_track.h

Go to the documentation of this file.
00001 /*
00002     $Id: cddb_track.h,v 1.18 2005/03/11 21:29:29 airborne Exp $
00003 
00004     Copyright (C) 2003, 2004, 2005 Kris Verbeeck <airborne@advalvas.be>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public
00017     License along with this library; if not, write to the
00018     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019     Boston, MA  02111-1307, USA.
00020 */
00021 
00022 #ifndef CDDB_TRACK_H
00023 #define CDDB_TRACK_H 1
00024 
00025 #ifdef __cplusplus
00026     extern "C" {
00027 #endif
00028 
00029 
00030 /* Forward declaration of the disc structure. */
00031 struct cddb_disc_c;
00032 
00038 typedef struct cddb_track_s
00039 {
00040     int num;                    
00041     int frame_offset;           
00042     int length;                 
00043     char *title;                
00044     char *artist;               
00045     char *ext_data;             
00046     struct cddb_track_s *prev;  
00047     struct cddb_track_s *next;  
00048     struct cddb_disc_s *disc;   
00049 } cddb_track_t;
00050 
00051 
00052 /* --- construction / destruction */
00053 
00054 
00060 cddb_track_t *cddb_track_new(void);
00061 
00070 void cddb_track_destroy(cddb_track_t *track);
00071 
00077 cddb_track_t *cddb_track_clone(cddb_track_t *track);
00078 
00079 
00080 /* --- getters & setters --- */
00081 
00082 
00090 #define cddb_track_get_number(track) (track)->num
00091 
00098 #define cddb_track_get_frame_offset(track) (track)->frame_offset
00099 
00107 #define cddb_track_set_frame_offset(track, offset) (track)->frame_offset = offset
00108 
00121 int cddb_track_get_length(cddb_track_t *track);
00122 
00131 void cddb_track_set_length(cddb_track_t *track, int length);
00132 
00140 #define cddb_track_get_title(track) (track)->title
00141 
00151 void cddb_track_set_title(cddb_track_t *track, const char *title);
00152 
00161 void cddb_track_append_title(cddb_track_t *track, const char *title);
00162 
00170 const char *cddb_track_get_artist(cddb_track_t *track);
00171 
00181 void cddb_track_set_artist(cddb_track_t *track, const char *artist);
00182 
00191 void cddb_track_append_artist(cddb_track_t *track, const char *artist);
00192 
00200 #define cddb_track_get_ext_data(track) (track)->ext_data
00201 
00212 void cddb_track_set_ext_data(cddb_track_t *track, const char *ext_data);
00213 
00223 void cddb_track_append_ext_data(cddb_track_t *track, const char *ext_data);
00224 
00225 
00226 /* --- miscellaneous */
00227 
00228 
00240 void cddb_track_copy(cddb_track_t *dst, cddb_track_t *src);
00241 
00249 void cddb_track_print(cddb_track_t *track);
00250 
00251 
00252 #ifdef __cplusplus
00253     }
00254 #endif
00255 
00256 #endif /* CDDB_TRACK_H */

Generated on Thu Apr 21 21:02:15 2005 for libcddb by  doxygen 1.3.9.1