libcdio
0.82
|
00001 /* 00002 $Id: read.h,v 1.15 2008/03/25 15:59:09 karl Exp $ 00003 00004 Copyright (C) 2005, 2006, 2007, 2008 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 3 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, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00026 #ifndef __CDIO_READ_H__ 00027 #define __CDIO_READ_H__ 00028 00029 #ifndef EXTERNAL_LIBCDIO_CONFIG_H 00030 #define EXTERNAL_LIBCDIO_CONFIG_H 00031 /* Need for HAVE_SYS_TYPES_H */ 00032 #include <cdio/cdio_config.h> 00033 #endif 00034 00035 #ifdef HAVE_SYS_TYPES_H 00036 /* Some systems need this for off_t and ssize. */ 00037 #include <sys/types.h> 00038 #endif 00039 00040 #ifdef __cplusplus 00041 extern "C" { 00042 #endif /* __cplusplus */ 00043 00045 typedef enum { 00046 CDIO_READ_MODE_AUDIO, 00047 CDIO_READ_MODE_M1F1, 00048 CDIO_READ_MODE_M1F2, 00049 CDIO_READ_MODE_M2F1, 00050 CDIO_READ_MODE_M2F2 00051 } cdio_read_mode_t; 00052 00064 off_t cdio_lseek(const CdIo_t *p_cdio, off_t offset, int whence); 00065 00078 ssize_t cdio_read(const CdIo_t *p_cdio, void *p_buf, size_t i_size); 00079 00089 driver_return_code_t cdio_read_audio_sector (const CdIo_t *p_cdio, 00090 void *p_buf, lsn_t i_lsn); 00091 00102 driver_return_code_t cdio_read_audio_sectors (const CdIo_t *p_cdio, 00103 void *p_buf, lsn_t i_lsn, 00104 uint32_t i_blocks); 00105 00123 driver_return_code_t cdio_read_data_sectors ( const CdIo_t *p_cdio, 00124 void *p_buf, lsn_t i_lsn, 00125 uint16_t i_blocksize, 00126 uint32_t i_blocks ); 00136 driver_return_code_t cdio_read_mode1_sector (const CdIo_t *p_cdio, 00137 void *p_buf, lsn_t i_lsn, 00138 bool b_form2); 00149 driver_return_code_t cdio_read_mode1_sectors (const CdIo_t *p_cdio, 00150 void *p_buf, lsn_t i_lsn, 00151 bool b_form2, 00152 uint32_t i_blocks); 00167 driver_return_code_t cdio_read_mode2_sector (const CdIo_t *p_cdio, 00168 void *p_buf, lsn_t i_lsn, 00169 bool b_form2); 00170 00174 driver_return_code_t cdio_read_sector(const CdIo_t *p_cdio, void *p_buf, 00175 lsn_t i_lsn, 00176 cdio_read_mode_t read_mode); 00192 driver_return_code_t cdio_read_mode2_sectors (const CdIo_t *p_cdio, 00193 void *p_buf, lsn_t i_lsn, 00194 bool b_form2, 00195 uint32_t i_blocks); 00196 00226 driver_return_code_t cdio_read_sectors(const CdIo_t *p_cdio, void *p_buf, 00227 lsn_t i_lsn, 00228 cdio_read_mode_t read_mode, 00229 uint32_t i_blocks); 00230 00231 #ifdef __cplusplus 00232 } 00233 #endif /* __cplusplus */ 00234 00235 #endif /* __CDIO_TRACK_H__ */