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