paranoia.h

Go to the documentation of this file.
00001 /*
00002   $Id: paranoia_8h-source.html,v 1.9 2006/10/27 11:16:41 rocky Exp $
00003 
00004   Copyright (C) 2004, 2005, 2006 Rocky Bernstein <rocky@panix.com>
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 2 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, write to the Free Software
00019   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 */
00021 
00029 #ifndef _CDIO_PARANOIA_H_
00030 #define _CDIO_PARANOIA_H_
00031 
00032 #include <cdio/cdda.h>
00033 
00038 #define CD_FRAMEWORDS (CDIO_CD_FRAMESIZE_RAW/2)
00039 
00049 typedef enum  {
00050   PARANOIA_MODE_DISABLE   =  0x00, 
00051   PARANOIA_MODE_VERIFY    =  0x01, 
00052   PARANOIA_MODE_FRAGMENT  =  0x02, 
00053   PARANOIA_MODE_OVERLAP   =  0x04, 
00054   PARANOIA_MODE_SCRATCH   =  0x08, 
00055   PARANOIA_MODE_REPAIR    =  0x10, 
00056   PARANOIA_MODE_NEVERSKIP =  0x20, 
00058   PARANOIA_MODE_FULL      =  0xff, 
00060 } paranoia_mode_t;
00061   
00062 
00071 typedef enum  {
00072   PARANOIA_CB_READ,           
00073   PARANOIA_CB_VERIFY,         
00074   PARANOIA_CB_FIXUP_EDGE,     
00075   PARANOIA_CB_FIXUP_ATOM,     
00076   PARANOIA_CB_SCRATCH,        
00077   PARANOIA_CB_REPAIR,         
00078   PARANOIA_CB_SKIP,           
00079   PARANOIA_CB_DRIFT,          
00080   PARANOIA_CB_BACKOFF,        
00081   PARANOIA_CB_OVERLAP,        
00082   PARANOIA_CB_FIXUP_DROPPED,  
00083   PARANOIA_CB_FIXUP_DUPED,    
00084   PARANOIA_CB_READERR         
00085 } paranoia_cb_mode_t;
00086 
00087   extern const char *paranoia_cb_mode2str[];
00088   
00089 #ifdef __cplusplus
00090 extern "C" {
00091 #endif
00092 
00100   extern cdrom_paranoia_t *cdio_paranoia_init(cdrom_drive_t *d);
00101   
00109   extern void cdio_paranoia_free(cdrom_paranoia_t *p);
00110 
00120   extern void cdio_paranoia_modeset(cdrom_paranoia_t *p, int mode_flags);
00121 
00130   extern lsn_t cdio_paranoia_seek(cdrom_paranoia_t *p, off_t seek, int whence);
00131 
00145   extern int16_t *cdio_paranoia_read(cdrom_paranoia_t *p,
00146                                      void(*callback)(long int, 
00147                                                      paranoia_cb_mode_t));
00148 
00165   extern int16_t *cdio_paranoia_read_limited(cdrom_paranoia_t *p,
00166                                              void(*callback)(long int, 
00167                                                            paranoia_cb_mode_t),
00168                                              int max_retries);
00169 
00170 
00172   extern void cdio_paranoia_overlapset(cdrom_paranoia_t *p,long overlap);
00173 
00174   extern void cdio_paranoia_set_range(cdrom_paranoia_t *p, long int start, 
00175                                       long int end);
00176 
00177 #ifndef DO_NOT_WANT_PARANOIA_COMPATIBILITY
00178 
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_read_overlapset
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 on Fri Oct 27 06:38:08 2006 for libcdio by  doxygen 1.4.6