libcdio-paranoia  10.2+0.90
paranoia.h
Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011, 2012
00003     Rocky Bernstein <rocky@gnu.org>
00004     Copyright (C) 1998 Monty xiphmont@mit.edu
00005     CopyPolicy: GNU Lesser General Public License 2.1 applies
00006 */
00007 
00015 #ifndef CDIO__PARANOIA__PARANOIA_H_
00016 #define CDIO__PARANOIA__PARANOIA_H_
00017 
00018 #include <cdio/paranoia/cdda.h>
00019 
00024 #define CD_FRAMEWORDS (CDIO_CD_FRAMESIZE_RAW/2)
00025 
00035 typedef enum  {
00036   PARANOIA_MODE_DISABLE   =  0x00, 
00037   PARANOIA_MODE_VERIFY    =  0x01, 
00038   PARANOIA_MODE_FRAGMENT  =  0x02, 
00039   PARANOIA_MODE_OVERLAP   =  0x04, 
00040   PARANOIA_MODE_SCRATCH   =  0x08, 
00041   PARANOIA_MODE_REPAIR    =  0x10, 
00042   PARANOIA_MODE_NEVERSKIP =  0x20, 
00044   PARANOIA_MODE_FULL      =  0xff, 
00046 } paranoia_mode_t;
00047   
00048 
00057 typedef enum  {
00058   PARANOIA_CB_READ,           
00059   PARANOIA_CB_VERIFY,         
00060   PARANOIA_CB_FIXUP_EDGE,     
00061   PARANOIA_CB_FIXUP_ATOM,     
00062   PARANOIA_CB_SCRATCH,        
00063   PARANOIA_CB_REPAIR,         
00064   PARANOIA_CB_SKIP,           
00065   PARANOIA_CB_DRIFT,          
00066   PARANOIA_CB_BACKOFF,        
00067   PARANOIA_CB_OVERLAP,        
00068   PARANOIA_CB_FIXUP_DROPPED,  
00069   PARANOIA_CB_FIXUP_DUPED,    
00070   PARANOIA_CB_READERR         
00071 } paranoia_cb_mode_t;
00072 
00073   extern const char *paranoia_cb_mode2str[];
00074   
00075 #ifdef __cplusplus
00076 extern "C" {
00077 #endif
00078 
00086   extern cdrom_paranoia_t *cdio_paranoia_init(cdrom_drive_t *d);
00087   
00095   extern void cdio_paranoia_free(cdrom_paranoia_t *p);
00096 
00106   extern void cdio_paranoia_modeset(cdrom_paranoia_t *p, int mode_flags);
00107 
00116   extern lsn_t cdio_paranoia_seek(cdrom_paranoia_t *p, int32_t seek, 
00117                                   int whence);
00118 
00132   extern int16_t *cdio_paranoia_read(cdrom_paranoia_t *p,
00133                                      void(*callback)(long int, 
00134                                                      paranoia_cb_mode_t));
00135 
00152   extern int16_t *cdio_paranoia_read_limited(cdrom_paranoia_t *p,
00153                                              void(*callback)(long int, 
00154                                                            paranoia_cb_mode_t),
00155                                              int max_retries);
00156 
00157 
00159   extern void cdio_paranoia_overlapset(cdrom_paranoia_t *p,long overlap);
00160 
00161   extern void cdio_paranoia_set_range(cdrom_paranoia_t *p, long int start, 
00162                                       long int end);
00163 
00164 #ifndef DO_NOT_WANT_PARANOIA_COMPATIBILITY
00165 
00166 #define cdrom_paranoia        cdrom_paranoia_t
00167 #define paranoia_init         cdio_paranoia_init
00168 #define paranoia_free         cdio_paranoia_free
00169 #define paranoia_modeset      cdio_paranoia_modeset
00170 #define paranoia_seek         cdio_paranoia_seek
00171 #define paranoia_read         cdio_paranoia_read
00172 #define paranoia_read_limited cdio_paranoia_read_limited
00173 #define paranoia_overlapset   cdio_paranoia_overlapset
00174 #define paranoia_set_range    cdio_paranoia_set_range
00175 #endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/
00176 
00177 #ifdef __cplusplus
00178 }
00179 #endif
00180 
00187 extern paranoia_mode_t    debug_paranoia_mode;
00188 extern paranoia_cb_mode_t debug_paranoia_cb_mode;
00189 
00190 #endif /*CDIO__PARANOIA__PARANOIA_H_*/