Main Page | Data Structures | Directories | File List | Data Fields | Globals

paranoia.h

Go to the documentation of this file.
00001 /*
00002   $Id: paranoia.h,v 1.9 2005/09/21 01:41:32 rocky Exp $
00003 
00004   Copyright (C) 2004, 2005 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 
00042 #define PARANOIA_MODE_FULL        0xff
00043 #define PARANOIA_MODE_DISABLE     0
00044 
00045 #define PARANOIA_MODE_VERIFY      1
00046 #define PARANOIA_MODE_FRAGMENT    2
00047 #define PARANOIA_MODE_OVERLAP     4
00048 #define PARANOIA_MODE_SCRATCH     8
00049 #define PARANOIA_MODE_REPAIR      16
00050 #define PARANOIA_MODE_NEVERSKIP   32
00051 
00052 typedef enum  {
00053   PARANOIA_CB_READ,
00054   PARANOIA_CB_VERIFY,
00055   PARANOIA_CB_FIXUP_EDGE,
00056   PARANOIA_CB_FIXUP_ATOM,
00057   PARANOIA_CB_SCRATCH,
00058   PARANOIA_CB_REPAIR,
00059   PARANOIA_CB_SKIP,
00060   PARANOIA_CB_DRIFT,
00061   PARANOIA_CB_BACKOFF,
00062   PARANOIA_CB_OVERLAP,
00063   PARANOIA_CB_FIXUP_DROPPED,
00064   PARANOIA_CB_FIXUP_DUPED,
00065   PARANOIA_CB_READERR
00066 } paranoia_cb_mode_t;
00067 
00068   extern const char *paranoia_cb_mode2str[];
00069   
00070 #ifdef __cplusplus
00071 extern "C" {
00072 #endif
00073 
00081 extern cdrom_paranoia_t *cdio_paranoia_init(cdrom_drive_t *d);
00082 
00088 extern void cdio_paranoia_free(cdrom_paranoia_t *p);
00089 
00094 extern void cdio_paranoia_modeset(cdrom_paranoia_t *p, int mode);
00095 
00104 extern lsn_t cdio_paranoia_seek(cdrom_paranoia_t *p, off_t seek, int whence);
00105 
00110 extern int16_t *cdio_paranoia_read(cdrom_paranoia_t *p,
00111                               void(*callback)(long int, paranoia_cb_mode_t));
00112 
00130 extern int16_t *cdio_paranoia_read_limited(cdrom_paranoia_t *p,
00131                                            void(*callback)(long int, 
00132                                                            paranoia_cb_mode_t),
00133                                            int maxretries);
00134 
00135 
00136 extern void cdio_paranoia_overlapset(cdrom_paranoia_t *p,long overlap);
00137 
00138 extern void cdio_paranoia_set_range(cdrom_paranoia_t *p, long int start, 
00139                                     long int end);
00140 
00141 #ifndef DO_NOT_WANT_PARANOIA_COMPATIBILITY
00142 
00143 #define paranoia_init         cdio_paranoia_init
00144 #define paranoia_free         cdio_paranoia_free
00145 #define paranoia_modeset      cdio_paranoia_modeset
00146 #define paranoia_seek         cdio_paranoia_seek
00147 #define paranoia_read         cdio_paranoia_read
00148 #define paranoia_read_limited cdio_paranoia_read_limited
00149 #define paranoia_overlapset   cdio_paranoia_overlapset
00150 #define paranoia_set_range    cdio_paranoia_read_overlapset
00151 #endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/
00152 
00153 #ifdef __cplusplus
00154 }
00155 #endif
00156 
00157 #endif /*_CDIO_PARANOIA_H_*/

Generated on Mon Sep 26 08:17:40 2005 for libcdio by  doxygen 1.4.4