The Pedigree Project  0.1
iso9660.h
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef ISO9660_H
21 #define ISO9660_H
22 
23 #include "pedigree/kernel/processor/types.h"
24 #include "pedigree/kernel/utilities/PointerGuard.h"
25 
29 {
30  uint8_t Year[4];
31  uint8_t Month[2];
32  uint8_t Day[2];
33  uint8_t Hour[2];
34  uint8_t Minute[2];
35  uint8_t Second[2];
36  uint8_t CentiSeconds[2];
37  uint8_t Offset;
38 } __attribute__((packed));
39 
41 {
42  uint8_t Year;
43  uint8_t Month;
44  uint8_t Day;
45  uint8_t Hour;
46  uint8_t Minute;
47  uint8_t Second;
48  uint8_t Offset;
49 } __attribute__((packed));
50 
52 {
53  uint8_t Type;
54  uint8_t Ident[5];
55  uint8_t Version;
56 } __attribute__((packed));
57 
59 {
61 
62  uint8_t Unused1;
63 
64  uint8_t SysIdent[32];
65  uint8_t VolIdent[32];
66 
67  uint8_t Unused2[8];
68 
69  uint32_t VolSpaceSize_LE; // little-endian
70  uint32_t VolSpaceSize_BE; // big-endian
71 
72  uint8_t
73  Unused3_EscSequences[32]; // Supplementary descriptors use this field
74 
75  uint16_t VolSetSize_LE;
76  uint16_t VolSetSize_BE;
77 
78  uint16_t VolSeqNum_LE;
79  uint16_t VolSeqNum_BE;
80 
81  uint16_t LogicalBlockSize_LE;
82  uint16_t LogicalBlockSize_BE;
83 
84  uint32_t PathTableSize_LE;
85  uint32_t PathTableSize_BE;
86 
87  uint32_t TypeLPathTableOccurence;
88  uint32_t TypeLPathTableOptionOccurence;
89  uint32_t TypeMPathTableOccurence;
90  uint32_t TypeMPathTableOptionOccurence;
91 
92  uint8_t RootDirRecord[34];
93 
94  uint8_t VolSetIdent[128];
95  uint8_t PublisherIdent[128];
96  uint8_t DataPreparerIdent[128];
97  uint8_t ApplicationIdent[128];
98  uint8_t CopyrightFileIdent[37];
99  uint8_t AbstractFileIdent[37];
100  uint8_t BiblioFileIdent[37];
101 
102  Iso9660Timestamp VolumeCreationTime;
103  Iso9660Timestamp VolumeModificationTime;
104  Iso9660Timestamp VolumeExpiryTime;
105  Iso9660Timestamp VolumeEffectiveTime;
106 
107  uint8_t FileStructVersion;
108 
109  uint8_t Rsvd1;
110 
111  uint8_t ApplicationUse[512];
112 
113  uint8_t Rsvd2[653];
114 } __attribute__((packed));
115 
117 {
118  uint8_t RecLen;
119 
120  uint8_t ExtAttrRecordLen;
121 
122  uint32_t ExtentLocation_LE;
123  uint32_t ExtentLocation_BE;
124 
125  uint32_t DataLen_LE;
126  uint32_t DataLen_BE;
127 
129 
130  uint8_t FileFlags;
131  uint8_t FileUnitSize;
132  uint8_t InterleaveGapSize;
133 
134  uint16_t VolSeqNum_LE;
135  uint16_t VolSeqNum_BE;
136 
137  uint8_t FileIdentLen;
138 } __attribute__((packed));
139 
141 #define PRIM_VOL_DESC 1
142 #define SUPP_VOL_DESC 2
143 #define TERM_VOL_DESC 255
144 
146 String WideToMultiByteStr(uint8_t *in, size_t inLen, size_t maxLen);
147 
148 #endif
Definition: String.h:49
Definition: Stopwatch.h:25