• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // PropID.h
2 
3 #ifndef ZIP7_INC_7ZIP_PROP_ID_H
4 #define ZIP7_INC_7ZIP_PROP_ID_H
5 
6 #include "../Common/MyTypes.h"
7 
8 enum
9 {
10   kpidNoProperty = 0,
11   kpidMainSubfile,
12   kpidHandlerItemIndex,
13   kpidPath,
14   kpidName,
15   kpidExtension,
16   kpidIsDir,
17   kpidSize,
18   kpidPackSize,
19   kpidAttrib,
20   kpidCTime,
21   kpidATime,
22   kpidMTime,
23   kpidSolid,
24   kpidCommented,
25   kpidEncrypted,
26   kpidSplitBefore,
27   kpidSplitAfter,
28   kpidDictionarySize,
29   kpidCRC,
30   kpidType,
31   kpidIsAnti,
32   kpidMethod,
33   kpidHostOS,
34   kpidFileSystem,
35   kpidUser,
36   kpidGroup,
37   kpidBlock,
38   kpidComment,
39   kpidPosition,
40   kpidPrefix,
41   kpidNumSubDirs,
42   kpidNumSubFiles,
43   kpidUnpackVer,
44   kpidVolume,
45   kpidIsVolume,
46   kpidOffset,
47   kpidLinks,
48   kpidNumBlocks,
49   kpidNumVolumes,
50   kpidTimeType,
51   kpidBit64,
52   kpidBigEndian,
53   kpidCpu,
54   kpidPhySize,
55   kpidHeadersSize,
56   kpidChecksum,
57   kpidCharacts,
58   kpidVa,
59   kpidId,
60   kpidShortName,
61   kpidCreatorApp,
62   kpidSectorSize,
63   kpidPosixAttrib,
64   kpidSymLink,
65   kpidError,
66   kpidTotalSize,
67   kpidFreeSpace,
68   kpidClusterSize,
69   kpidVolumeName,
70   kpidLocalName,
71   kpidProvider,
72   kpidNtSecure,
73   kpidIsAltStream,
74   kpidIsAux,
75   kpidIsDeleted,
76   kpidIsTree,
77   kpidSha1,
78   kpidSha256,
79   kpidErrorType,
80   kpidNumErrors,
81   kpidErrorFlags,
82   kpidWarningFlags,
83   kpidWarning,
84   kpidNumStreams,
85   kpidNumAltStreams,
86   kpidAltStreamsSize,
87   kpidVirtualSize,
88   kpidUnpackSize,
89   kpidTotalPhySize,
90   kpidVolumeIndex,
91   kpidSubType,
92   kpidShortComment,
93   kpidCodePage,
94   kpidIsNotArcType,
95   kpidPhySizeCantBeDetected,
96   kpidZerosTailIsAllowed,
97   kpidTailSize,
98   kpidEmbeddedStubSize,
99   kpidNtReparse,
100   kpidHardLink,
101   kpidINode,
102   kpidStreamId,
103   kpidReadOnly,
104   kpidOutName,
105   kpidCopyLink,
106   kpidArcFileName,
107   kpidIsHash,
108   kpidChangeTime,
109   kpidUserId,
110   kpidGroupId,
111   kpidDeviceMajor,
112   kpidDeviceMinor,
113   kpidDevMajor,
114   kpidDevMinor,
115 
116   kpid_NUM_DEFINED,
117 
118   kpidUserDefined = 0x10000
119 };
120 
121 extern const Byte k7z_PROPID_To_VARTYPE[kpid_NUM_DEFINED]; // VARTYPE
122 
123 const UInt32 kpv_ErrorFlags_IsNotArc              = 1 << 0;
124 const UInt32 kpv_ErrorFlags_HeadersError          = 1 << 1;
125 const UInt32 kpv_ErrorFlags_EncryptedHeadersError = 1 << 2;
126 const UInt32 kpv_ErrorFlags_UnavailableStart      = 1 << 3;
127 const UInt32 kpv_ErrorFlags_UnconfirmedStart      = 1 << 4;
128 const UInt32 kpv_ErrorFlags_UnexpectedEnd         = 1 << 5;
129 const UInt32 kpv_ErrorFlags_DataAfterEnd          = 1 << 6;
130 const UInt32 kpv_ErrorFlags_UnsupportedMethod     = 1 << 7;
131 const UInt32 kpv_ErrorFlags_UnsupportedFeature    = 1 << 8;
132 const UInt32 kpv_ErrorFlags_DataError             = 1 << 9;
133 const UInt32 kpv_ErrorFlags_CrcError              = 1 << 10;
134 // const UInt32 kpv_ErrorFlags_Unsupported           = 1 << 11;
135 
136 /*
137 linux ctime :
138    file metadata was last changed.
139    changing the file modification time
140    counts as a metadata change, so will also have the side effect of updating the ctime.
141 
142 PROPVARIANT for timestamps in 7-Zip:
143 {
144   vt = VT_FILETIME
145   wReserved1: set precision level
146     0      : base value (backward compatibility value)
147              only filetime is used (7 digits precision).
148              wReserved2 and wReserved3 can contain random data
149     1      : Unix (1 sec)
150     2      : DOS  (2 sec)
151     3      : High Precision (1 ns)
152     16 - 3 : (reserved) = 1 day
153     16 - 2 : (reserved) = 1 hour
154     16 - 1 : (reserved) = 1 minute
155     16 + 0 : 1 sec (0 digits after point)
156     16 + (1,2,3,4,5,6,7,8,9) : set subsecond precision level :
157          (number of decimal digits after point)
158     16 + 9 : 1 ns  (9 digits after point)
159   wReserved2 = ns % 100 : if     (8 or 9 digits pecision)
160              = 0        : if not (8 or 9 digits pecision)
161   wReserved3 = 0;
162   filetime
163 }
164 
165 NOTE: TAR-PAX archives created by GNU TAR don't keep
166   whole information about original level of precision,
167   and timestamp are stored in reduced form, where tail zero
168   digits after point are removed.
169   So 7-Zip can return different precision levels for different items for such TAR archives.
170 */
171 
172 /*
173 TimePrec returned by IOutArchive::GetFileTimeType()
174 is used only for updating, when we compare MTime timestamp
175 from archive with timestamp from directory.
176 */
177 
178 #endif
179