00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
00033 #include <cdio/cdio_config.h>
00034 #endif
00035
00036 #ifdef HAVE_SYS_TYPES_H
00037
00038 #include <sys/types.h>
00039 #endif
00040
00041 #ifdef __cplusplus
00042 extern "C" {
00043 #endif
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
00235
00236 #endif