xa.h

Go to the documentation of this file.
00001 /*
00002     $Id: xa_8h-source.html,v 1.19 2006/10/27 11:16:42 rocky Exp $
00003 
00004     Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
00005     Copyright (C) 2003, 2004, 2005, 2006 Rocky Bernstein <rocky@panix.com>
00006 
00007     See also iso9660.h by Eric Youngdale (1993) and in cdrtools. These
00008     are 
00009 
00010     Copyright 1993 Yggdrasil Computing, Incorporated
00011     Copyright (c) 1999,2000 J. Schilling
00012 
00013     This program is free software; you can redistribute it and/or modify
00014     it under the terms of the GNU General Public License as published by
00015     the Free Software Foundation; either version 2 of the License, or
00016     (at your option) any later version.
00017 
00018     This program is distributed in the hope that it will be useful,
00019     but WITHOUT ANY WARRANTY; without even the implied warranty of
00020     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021     GNU General Public License for more details.
00022 
00023     You should have received a copy of the GNU General Public License
00024     along with this program; if not, write to the Free Software
00025     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026 */
00035 
00036 #ifndef __CDIO_XA_H__
00037 #define __CDIO_XA_H__
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif /* __cplusplus */
00042 
00048   typedef enum {
00049     ISO_XA_MARKER_OFFSET =   1024,
00050     XA_PERM_RSYS =         0x0001,  
00051     XA_PERM_XSYS =         0x0004,  
00053     XA_PERM_RUSR =         0x0010,  
00054     XA_PERM_XUSR =         0x0040,  
00056     XA_PERM_RGRP =         0x0100,  
00057     XA_PERM_XGRP =         0x0400,  
00059     XA_PERM_ROTH =         0x1000,  
00060     XA_PERM_XOTH =         0x4000,  
00062     XA_ATTR_MODE2FORM1  =   (1 << 11),
00063     XA_ATTR_MODE2FORM2  =   (1 << 12),
00064     XA_ATTR_INTERLEAVED =   (1 << 13),
00065     XA_ATTR_CDDA        =   (1 << 14),
00066     XA_ATTR_DIRECTORY   =   (1 << 15),
00067     
00068     XA_PERM_ALL_READ    =   (XA_PERM_RUSR | XA_PERM_RSYS | XA_PERM_RGRP),
00069     XA_PERM_ALL_EXEC    =   (XA_PERM_XUSR | XA_PERM_XSYS | XA_PERM_XGRP),
00070     XA_PERM_ALL_ALL     =   (XA_PERM_ALL_READ | XA_PERM_ALL_EXEC),
00071     
00072     XA_FORM1_DIR  = (XA_ATTR_DIRECTORY | XA_ATTR_MODE2FORM1 | XA_PERM_ALL_ALL),
00073     XA_FORM1_FILE =  (XA_ATTR_MODE2FORM1 | XA_PERM_ALL_ALL),
00074     XA_FORM2_FILE =  (XA_ATTR_MODE2FORM2 | XA_PERM_ALL_ALL)
00075   } xa_misc_enum_t;
00076   
00077 extern const char ISO_XA_MARKER_STRING[sizeof("CD-XA001")-1];
00078 
00079 #define ISO_XA_MARKER_STRING    "CD-XA001"
00080 
00103 typedef struct iso9660_xa_s
00104 {
00105   uint16_t group_id;      
00106   uint16_t user_id;       
00107   uint16_t attributes;    
00108   char     signature[2];  
00109   uint8_t  filenum;       
00110   uint8_t  reserved[5];   
00111 } GNUC_PACKED iso9660_xa_t;
00112   
00113   
00117   posix_mode_t iso9660_get_posix_filemode_from_xa(uint16_t i_perms);
00118 
00147 const char *
00148 iso9660_get_xa_attr_str (uint16_t xa_attr);
00149   
00156 iso9660_xa_t *
00157 iso9660_xa_init (iso9660_xa_t *_xa, uint16_t uid, uint16_t gid, uint16_t attr, 
00158                  uint8_t filenum);
00159 
00160 #ifdef __cplusplus
00161 }
00162 
00168 extern xa_misc_enum_t debugger_xa_misc_enum;
00169 
00170   
00171 #endif /* __cplusplus */
00172 
00173 #endif /* __CDIO_XA_H__ */
00174 
00175 /* 
00176  * Local variables:
00177  *  c-file-style: "gnu"
00178  *  tab-width: 8
00179  *  indent-tabs-mode: nil
00180  * End:
00181  */

Generated on Fri Oct 27 06:38:08 2006 for libcdio by  doxygen 1.4.6