libcdio  0.90
read.h
Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2005, 2006, 2007, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
00003 
00004     This program is free software: you can redistribute it and/or modify
00005     it under the terms of the GNU General Public License as published by
00006     the Free Software Foundation, either version 3 of the License, or
00007     (at your option) any later version.
00008 
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU General Public License for more details.
00013 
00014     You should have received a copy of the GNU General Public License
00015     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 */
00017 
00024 #ifndef CDIO_READ_H_
00025 #define CDIO_READ_H_
00026 
00027 #include <cdio/types.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif /* __cplusplus */
00032 
00034   typedef enum {
00035     CDIO_READ_MODE_AUDIO,  
00036     CDIO_READ_MODE_M1F1,   
00037     CDIO_READ_MODE_M1F2,   
00038     CDIO_READ_MODE_M2F1,   
00039     CDIO_READ_MODE_M2F2    
00040   } cdio_read_mode_t;
00041   
00053   off_t cdio_lseek(const CdIo_t *p_cdio, off_t offset, int whence);
00054     
00067   ssize_t cdio_read(const CdIo_t *p_cdio, void *p_buf, size_t i_size);
00068     
00078   driver_return_code_t cdio_read_audio_sector (const CdIo_t *p_cdio, 
00079                                                void *p_buf, lsn_t i_lsn);
00080 
00091   driver_return_code_t cdio_read_audio_sectors (const CdIo_t *p_cdio, 
00092                                                 void *p_buf, lsn_t i_lsn,
00093                                                 uint32_t i_blocks);
00094 
00112   driver_return_code_t cdio_read_data_sectors ( const CdIo_t *p_cdio, 
00113                                                 void *p_buf, lsn_t i_lsn,
00114                                                 uint16_t i_blocksize,
00115                                                 uint32_t i_blocks );
00125   driver_return_code_t cdio_read_mode1_sector (const CdIo_t *p_cdio, 
00126                                                void *p_buf, lsn_t i_lsn, 
00127                                                bool b_form2);
00138   driver_return_code_t cdio_read_mode1_sectors (const CdIo_t *p_cdio, 
00139                                                 void *p_buf, lsn_t i_lsn, 
00140                                                 bool b_form2, 
00141                                                 uint32_t i_blocks);
00156   driver_return_code_t cdio_read_mode2_sector (const CdIo_t *p_cdio, 
00157                                                void *p_buf, lsn_t i_lsn, 
00158                                                bool b_form2);
00159   
00163   driver_return_code_t cdio_read_sector(const CdIo_t *p_cdio, void *p_buf, 
00164                                         lsn_t i_lsn, 
00165                                         cdio_read_mode_t read_mode);
00181   driver_return_code_t cdio_read_mode2_sectors (const CdIo_t *p_cdio, 
00182                                                 void *p_buf, lsn_t i_lsn, 
00183                                                 bool b_form2, 
00184                                                 uint32_t i_blocks);
00185   
00215   driver_return_code_t cdio_read_sectors(const CdIo_t *p_cdio, void *p_buf, 
00216                                          lsn_t i_lsn, 
00217                                          cdio_read_mode_t read_mode,
00218                                          uint32_t i_blocks);
00219 
00220 #ifdef __cplusplus
00221 }
00222 #endif /* __cplusplus */
00223 
00224 #endif /* CDIO_READ_H_ */