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