read.h

Go to the documentation of this file.
00001 /* -*- c -*-
00002     $Id: read.h,v 1.14 2007/04/15 16:23:58 rocky Exp $
00003 
00004     Copyright (C) 2005, 2006, 2007 Rocky Bernstein <rocky@gnu.org>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program 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
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 */
00020 
00027 #ifndef __CDIO_READ_H__
00028 #define __CDIO_READ_H__
00029 
00030 #ifndef EXTERNAL_LIBCDIO_CONFIG_H
00031 #define EXTERNAL_LIBCDIO_CONFIG_H
00032 /* Need for HAVE_SYS_TYPES_H */
00033 #include <cdio/cdio_config.h>
00034 #endif
00035 
00036 #ifdef HAVE_SYS_TYPES_H
00037 /* Some systems need this for off_t and ssize. */
00038 #include <sys/types.h>
00039 #endif
00040 
00041 #ifdef __cplusplus
00042 extern "C" {
00043 #endif /* __cplusplus */
00044 
00046   typedef enum {
00047     CDIO_READ_MODE_AUDIO,  
00048     CDIO_READ_MODE_M1F1,   
00049     CDIO_READ_MODE_M1F2,   
00050     CDIO_READ_MODE_M2F1,   
00051     CDIO_READ_MODE_M2F2    
00052   } cdio_read_mode_t;
00053   
00065   off_t cdio_lseek(const CdIo_t *p_cdio, off_t offset, int whence);
00066     
00079   ssize_t cdio_read(const CdIo_t *p_cdio, void *p_buf, size_t i_size);
00080     
00090   driver_return_code_t cdio_read_audio_sector (const CdIo_t *p_cdio, 
00091                                                void *p_buf, lsn_t i_lsn);
00092 
00103   driver_return_code_t cdio_read_audio_sectors (const CdIo_t *p_cdio, 
00104                                                 void *p_buf, lsn_t i_lsn,
00105                                                 uint32_t i_blocks);
00106 
00124   driver_return_code_t cdio_read_data_sectors ( const CdIo_t *p_cdio, 
00125                                                 void *p_buf, lsn_t i_lsn,
00126                                                 uint16_t i_blocksize,
00127                                                 uint32_t i_blocks );
00137   driver_return_code_t cdio_read_mode1_sector (const CdIo_t *p_cdio, 
00138                                                void *p_buf, lsn_t i_lsn, 
00139                                                bool b_form2);
00150   driver_return_code_t cdio_read_mode1_sectors (const CdIo_t *p_cdio, 
00151                                                 void *p_buf, lsn_t i_lsn, 
00152                                                 bool b_form2, 
00153                                                 uint32_t i_blocks);
00168   driver_return_code_t cdio_read_mode2_sector (const CdIo_t *p_cdio, 
00169                                                void *p_buf, lsn_t i_lsn, 
00170                                                bool b_form2);
00171   
00175   driver_return_code_t cdio_read_sector(const CdIo_t *p_cdio, void *p_buf, 
00176                                         lsn_t i_lsn, 
00177                                         cdio_read_mode_t read_mode);
00193   driver_return_code_t cdio_read_mode2_sectors (const CdIo_t *p_cdio, 
00194                                                 void *p_buf, lsn_t i_lsn, 
00195                                                 bool b_form2, 
00196                                                 uint32_t i_blocks);
00197   
00227   driver_return_code_t cdio_read_sectors(const CdIo_t *p_cdio, void *p_buf, 
00228                                          lsn_t i_lsn, 
00229                                          cdio_read_mode_t read_mode,
00230                                          uint32_t i_blocks);
00231 
00232 #ifdef __cplusplus
00233 }
00234 #endif /* __cplusplus */
00235 
00236 #endif /* __CDIO_TRACK_H__ */

Generated for libcdio by doxygen 1.5.4