libcdio  0.82
paranoia.h
Go to the documentation of this file.
00001 /*
00002     $Id: paranoia.h,v 1.15 2008/03/25 15:59:09 karl Exp $
00003 
00004     Copyright (C) 2004, 2005, 2006, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
00005     Copyright (C) 1998 Monty xiphmont@mit.edu
00006   
00007     This program is free software: you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation, either version 3 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019 */
00020 
00028 #ifndef _CDIO_PARANOIA_H_
00029 #define _CDIO_PARANOIA_H_
00030 
00031 #include <cdio/cdda.h>
00032 
00037 #define CD_FRAMEWORDS (CDIO_CD_FRAMESIZE_RAW/2)
00038 
00048 typedef enum  {
00049   PARANOIA_MODE_DISABLE   =  0x00, 
00050   PARANOIA_MODE_VERIFY    =  0x01, 
00051   PARANOIA_MODE_FRAGMENT  =  0x02, 
00052   PARANOIA_MODE_OVERLAP   =  0x04, 
00053   PARANOIA_MODE_SCRATCH   =  0x08, 
00054   PARANOIA_MODE_REPAIR    =  0x10, 
00055   PARANOIA_MODE_NEVERSKIP =  0x20, 
00057   PARANOIA_MODE_FULL      =  0xff, 
00059 } paranoia_mode_t;
00060   
00061 
00070 typedef enum  {
00071   PARANOIA_CB_READ,           
00072   PARANOIA_CB_VERIFY,         
00073   PARANOIA_CB_FIXUP_EDGE,     
00074   PARANOIA_CB_FIXUP_ATOM,     
00075   PARANOIA_CB_SCRATCH,        
00076   PARANOIA_CB_REPAIR,         
00077   PARANOIA_CB_SKIP,           
00078   PARANOIA_CB_DRIFT,          
00079   PARANOIA_CB_BACKOFF,        
00080   PARANOIA_CB_OVERLAP,        
00081   PARANOIA_CB_FIXUP_DROPPED,  
00082   PARANOIA_CB_FIXUP_DUPED,    
00083   PARANOIA_CB_READERR         
00084 } paranoia_cb_mode_t;
00085 
00086   extern const char *paranoia_cb_mode2str[];
00087   
00088 #ifdef __cplusplus
00089 extern "C" {
00090 #endif
00091 
00099   extern cdrom_paranoia_t *cdio_paranoia_init(cdrom_drive_t *d);
00100   
00108   extern void cdio_paranoia_free(cdrom_paranoia_t *p);
00109 
00119   extern void cdio_paranoia_modeset(cdrom_paranoia_t *p, int mode_flags);
00120 
00129   extern lsn_t cdio_paranoia_seek(cdrom_paranoia_t *p, off_t seek, 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.6.1