libcdio 0.83

paranoia.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 
00003     Rocky Bernstein <rocky@gnu.org>
00004     Copyright (C) 1998 Monty xiphmont@mit.edu
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 
00027 #ifndef _CDIO_PARANOIA_H_
00028 #define _CDIO_PARANOIA_H_
00029 
00030 #include <cdio/cdda.h>
00031 
00036 #define CD_FRAMEWORDS (CDIO_CD_FRAMESIZE_RAW/2)
00037 
00047 typedef enum  {
00048   PARANOIA_MODE_DISABLE   =  0x00, 
00049   PARANOIA_MODE_VERIFY    =  0x01, 
00050   PARANOIA_MODE_FRAGMENT  =  0x02, 
00051   PARANOIA_MODE_OVERLAP   =  0x04, 
00052   PARANOIA_MODE_SCRATCH   =  0x08, 
00053   PARANOIA_MODE_REPAIR    =  0x10, 
00054   PARANOIA_MODE_NEVERSKIP =  0x20, 
00056   PARANOIA_MODE_FULL      =  0xff, 
00058 } paranoia_mode_t;
00059   
00060 
00069 typedef enum  {
00070   PARANOIA_CB_READ,           
00071   PARANOIA_CB_VERIFY,         
00072   PARANOIA_CB_FIXUP_EDGE,     
00073   PARANOIA_CB_FIXUP_ATOM,     
00074   PARANOIA_CB_SCRATCH,        
00075   PARANOIA_CB_REPAIR,         
00076   PARANOIA_CB_SKIP,           
00077   PARANOIA_CB_DRIFT,          
00078   PARANOIA_CB_BACKOFF,        
00079   PARANOIA_CB_OVERLAP,        
00080   PARANOIA_CB_FIXUP_DROPPED,  
00081   PARANOIA_CB_FIXUP_DUPED,    
00082   PARANOIA_CB_READERR         
00083 } paranoia_cb_mode_t;
00084 
00085   extern const char *paranoia_cb_mode2str[];
00086   
00087 #ifdef __cplusplus
00088 extern "C" {
00089 #endif
00090 
00098   extern cdrom_paranoia_t *cdio_paranoia_init(cdrom_drive_t *d);
00099   
00107   extern void cdio_paranoia_free(cdrom_paranoia_t *p);
00108 
00118   extern void cdio_paranoia_modeset(cdrom_paranoia_t *p, int mode_flags);
00119 
00128   extern lsn_t cdio_paranoia_seek(cdrom_paranoia_t *p, int32_t seek, 
00129                                   int whence);
00130 
00144   extern int16_t *cdio_paranoia_read(cdrom_paranoia_t *p,
00145                                      void(*callback)(long int, 
00146                                                      paranoia_cb_mode_t));
00147 
00164   extern int16_t *cdio_paranoia_read_limited(cdrom_paranoia_t *p,
00165                                              void(*callback)(long int, 
00166                                                            paranoia_cb_mode_t),
00167                                              int max_retries);
00168 
00169 
00171   extern void cdio_paranoia_overlapset(cdrom_paranoia_t *p,long overlap);
00172 
00173   extern void cdio_paranoia_set_range(cdrom_paranoia_t *p, long int start, 
00174                                       long int end);
00175 
00176 #ifndef DO_NOT_WANT_PARANOIA_COMPATIBILITY
00177 
00178 #define cdrom_paranoia        cdrom_paranoia_t
00179 #define paranoia_init         cdio_paranoia_init
00180 #define paranoia_free         cdio_paranoia_free
00181 #define paranoia_modeset      cdio_paranoia_modeset
00182 #define paranoia_seek         cdio_paranoia_seek
00183 #define paranoia_read         cdio_paranoia_read
00184 #define paranoia_read_limited cdio_paranoia_read_limited
00185 #define paranoia_overlapset   cdio_paranoia_overlapset
00186 #define paranoia_set_range    cdio_paranoia_set_range
00187 #endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/
00188 
00189 #ifdef __cplusplus
00190 }
00191 #endif
00192 
00199 extern paranoia_mode_t    debug_paranoia_mode;
00200 extern paranoia_cb_mode_t debug_paranoia_cb_mode;
00201 
00202 #endif /*_CDIO_PARANOIA_H_*/

Generated for libcdio by doxygen 1.7.3