xa.h

Go to the documentation of this file.
00001 /*
00002     $Id: xa.h,v 1.16 2005/08/27 14:25:58 rocky Exp $
00003 
00004     Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
00005     Copyright (C) 2003, 2004, 2005 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 extern enum cdio_xa_enums {
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   
00076 } cdio_xa_enums;
00077 
00078   
00079 extern const char ISO_XA_MARKER_STRING[sizeof("CD-XA001")-1];
00080 
00081 #define ISO_XA_MARKER_STRING    "CD-XA001"
00082 #define ISO_XA_MARKER_OFFSET    1024
00083 
00085 #define XA_PERM_RSYS          0x0001   
00086 #define XA_PERM_XSYS          0x0004   
00088 #define XA_PERM_RUSR          0x0010   
00089 #define XA_PERM_XUSR          0x0040   
00091 #define XA_PERM_RGRP          0x0100   
00092 #define XA_PERM_XGRP          0x0400   
00094 #define XA_PERM_ROTH          0x1000   
00095 #define XA_PERM_XOTH          0x4000   
00097 #define XA_ATTR_MODE2FORM1     (1 << 11)
00098 #define XA_ATTR_MODE2FORM2     (1 << 12)
00099 #define XA_ATTR_INTERLEAVED    (1 << 13)
00100 #define XA_ATTR_CDDA           (1 << 14)
00101 #define XA_ATTR_DIRECTORY      (1 << 15)
00102 
00103 /* some aggregations */
00104 #define XA_PERM_ALL_READ       (XA_PERM_RUSR | XA_PERM_RSYS | XA_PERM_RGRP)
00105 #define XA_PERM_ALL_EXEC       (XA_PERM_XUSR | XA_PERM_XSYS | XA_PERM_XGRP)
00106 #define XA_PERM_ALL_ALL        (XA_PERM_ALL_READ | XA_PERM_ALL_EXEC)
00107 
00108 #define XA_FORM1_DIR    (XA_ATTR_DIRECTORY | XA_ATTR_MODE2FORM1 | XA_PERM_ALL_ALL)
00109 #define XA_FORM1_FILE   (XA_ATTR_MODE2FORM1 | XA_PERM_ALL_ALL)
00110 #define XA_FORM2_FILE   (XA_ATTR_MODE2FORM2 | XA_PERM_ALL_ALL)
00111 
00134 typedef struct iso9660_xa_s
00135 {
00136   uint16_t group_id;      
00137   uint16_t user_id;       
00138   uint16_t attributes;    
00139   char     signature[2];  
00140   uint8_t  filenum;       
00141   uint8_t  reserved[5];   
00142 } GNUC_PACKED iso9660_xa_t;
00143 
00144 
00173 const char *
00174 iso9660_get_xa_attr_str (uint16_t xa_attr);
00175   
00182 iso9660_xa_t *
00183 iso9660_xa_init (iso9660_xa_t *_xa, uint16_t uid, uint16_t gid, uint16_t attr, 
00184                  uint8_t filenum);
00185 
00186 #ifdef __cplusplus
00187 }
00188 #endif /* __cplusplus */
00189 
00190 #endif /* __CDIO_XA_H__ */
00191 
00192 /* 
00193  * Local variables:
00194  *  c-file-style: "gnu"
00195  *  tab-width: 8
00196  *  indent-tabs-mode: nil
00197  * End:
00198  */

Generated on Sun Sep 23 08:22:07 2007 for libcdio by  doxygen 1.4.7