libcdio  0.90
xa.h
Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2003, 2004, 2005, 2006, 2008, 2012
00003     Rocky Bernstein <rocky@gnu.org>
00004     Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
00005 
00006     See also iso9660.h by Eric Youngdale (1993) and in cdrtools. These are 
00007 
00008     Copyright 1993 Yggdrasil Computing, Incorporated
00009     Copyright (c) 1999,2000 J. Schilling
00010 
00011     This program is free software: you can redistribute it and/or modify
00012     it under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     This program is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019     GNU General Public License for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00023 */
00032 
00033 #ifndef CDIO_XA_H_
00034 #define CDIO_XA_H_
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif /* __cplusplus */
00039 
00045   typedef enum {
00046     ISO_XA_MARKER_OFFSET =   1024,
00047     XA_PERM_RSYS =         0x0001,  
00048     XA_PERM_XSYS =         0x0004,  
00050     XA_PERM_RUSR =         0x0010,  
00051     XA_PERM_XUSR =         0x0040,  
00053     XA_PERM_RGRP =         0x0100,  
00054     XA_PERM_XGRP =         0x0400,  
00056     XA_PERM_ROTH =         0x1000,  
00057     XA_PERM_XOTH =         0x4000,  
00059     XA_ATTR_MODE2FORM1  =   (1 << 11),
00060     XA_ATTR_MODE2FORM2  =   (1 << 12),
00061     XA_ATTR_INTERLEAVED =   (1 << 13),
00062     XA_ATTR_CDDA        =   (1 << 14),
00063     XA_ATTR_DIRECTORY   =   (1 << 15),
00064     
00065     XA_PERM_ALL_READ    =   (XA_PERM_RUSR | XA_PERM_RSYS | XA_PERM_RGRP),
00066     XA_PERM_ALL_EXEC    =   (XA_PERM_XUSR | XA_PERM_XSYS | XA_PERM_XGRP),
00067     XA_PERM_ALL_ALL     =   (XA_PERM_ALL_READ | XA_PERM_ALL_EXEC),
00068     
00069     XA_FORM1_DIR  = (XA_ATTR_DIRECTORY | XA_ATTR_MODE2FORM1 | XA_PERM_ALL_ALL),
00070     XA_FORM1_FILE =  (XA_ATTR_MODE2FORM1 | XA_PERM_ALL_ALL),
00071     XA_FORM2_FILE =  (XA_ATTR_MODE2FORM2 | XA_PERM_ALL_ALL)
00072   } xa_misc_enum_t;
00073   
00074 extern const char ISO_XA_MARKER_STRING[sizeof("CD-XA001")-1];
00075 
00076 #define ISO_XA_MARKER_STRING    "CD-XA001"
00077 
00100 typedef struct iso9660_xa_s
00101 {
00102   uint16_t group_id;      
00103   uint16_t user_id;       
00104   uint16_t attributes;    
00105   char     signature[2];  
00106   uint8_t  filenum;       
00107   uint8_t  reserved[5];   
00108 } GNUC_PACKED iso9660_xa_t;
00109   
00110   
00114   posix_mode_t iso9660_get_posix_filemode_from_xa(uint16_t i_perms);
00115 
00144 const char *
00145 iso9660_get_xa_attr_str (uint16_t xa_attr);
00146   
00153 iso9660_xa_t *
00154 iso9660_xa_init (iso9660_xa_t *_xa, uint16_t uid, uint16_t gid, uint16_t attr, 
00155                  uint8_t filenum);
00156 
00157 #ifdef __cplusplus
00158 }
00159 
00165 extern xa_misc_enum_t debugger_xa_misc_enum;
00166 
00167   
00168 #endif /* __cplusplus */
00169 
00170 #endif /* CDIO_XA_H_ */
00171 
00172 /* 
00173  * Local variables:
00174  *  c-file-style: "gnu"
00175  *  tab-width: 8
00176  *  indent-tabs-mode: nil
00177  * End:
00178  */