1370b324cSopenharmony_ci// PropID.h 2370b324cSopenharmony_ci 3370b324cSopenharmony_ci#ifndef ZIP7_INC_7ZIP_PROP_ID_H 4370b324cSopenharmony_ci#define ZIP7_INC_7ZIP_PROP_ID_H 5370b324cSopenharmony_ci 6370b324cSopenharmony_ci#include "../Common/MyTypes.h" 7370b324cSopenharmony_ci 8370b324cSopenharmony_cienum 9370b324cSopenharmony_ci{ 10370b324cSopenharmony_ci kpidNoProperty = 0, 11370b324cSopenharmony_ci kpidMainSubfile, 12370b324cSopenharmony_ci kpidHandlerItemIndex, 13370b324cSopenharmony_ci kpidPath, 14370b324cSopenharmony_ci kpidName, 15370b324cSopenharmony_ci kpidExtension, 16370b324cSopenharmony_ci kpidIsDir, 17370b324cSopenharmony_ci kpidSize, 18370b324cSopenharmony_ci kpidPackSize, 19370b324cSopenharmony_ci kpidAttrib, 20370b324cSopenharmony_ci kpidCTime, 21370b324cSopenharmony_ci kpidATime, 22370b324cSopenharmony_ci kpidMTime, 23370b324cSopenharmony_ci kpidSolid, 24370b324cSopenharmony_ci kpidCommented, 25370b324cSopenharmony_ci kpidEncrypted, 26370b324cSopenharmony_ci kpidSplitBefore, 27370b324cSopenharmony_ci kpidSplitAfter, 28370b324cSopenharmony_ci kpidDictionarySize, 29370b324cSopenharmony_ci kpidCRC, 30370b324cSopenharmony_ci kpidType, 31370b324cSopenharmony_ci kpidIsAnti, 32370b324cSopenharmony_ci kpidMethod, 33370b324cSopenharmony_ci kpidHostOS, 34370b324cSopenharmony_ci kpidFileSystem, 35370b324cSopenharmony_ci kpidUser, 36370b324cSopenharmony_ci kpidGroup, 37370b324cSopenharmony_ci kpidBlock, 38370b324cSopenharmony_ci kpidComment, 39370b324cSopenharmony_ci kpidPosition, 40370b324cSopenharmony_ci kpidPrefix, 41370b324cSopenharmony_ci kpidNumSubDirs, 42370b324cSopenharmony_ci kpidNumSubFiles, 43370b324cSopenharmony_ci kpidUnpackVer, 44370b324cSopenharmony_ci kpidVolume, 45370b324cSopenharmony_ci kpidIsVolume, 46370b324cSopenharmony_ci kpidOffset, 47370b324cSopenharmony_ci kpidLinks, 48370b324cSopenharmony_ci kpidNumBlocks, 49370b324cSopenharmony_ci kpidNumVolumes, 50370b324cSopenharmony_ci kpidTimeType, 51370b324cSopenharmony_ci kpidBit64, 52370b324cSopenharmony_ci kpidBigEndian, 53370b324cSopenharmony_ci kpidCpu, 54370b324cSopenharmony_ci kpidPhySize, 55370b324cSopenharmony_ci kpidHeadersSize, 56370b324cSopenharmony_ci kpidChecksum, 57370b324cSopenharmony_ci kpidCharacts, 58370b324cSopenharmony_ci kpidVa, 59370b324cSopenharmony_ci kpidId, 60370b324cSopenharmony_ci kpidShortName, 61370b324cSopenharmony_ci kpidCreatorApp, 62370b324cSopenharmony_ci kpidSectorSize, 63370b324cSopenharmony_ci kpidPosixAttrib, 64370b324cSopenharmony_ci kpidSymLink, 65370b324cSopenharmony_ci kpidError, 66370b324cSopenharmony_ci kpidTotalSize, 67370b324cSopenharmony_ci kpidFreeSpace, 68370b324cSopenharmony_ci kpidClusterSize, 69370b324cSopenharmony_ci kpidVolumeName, 70370b324cSopenharmony_ci kpidLocalName, 71370b324cSopenharmony_ci kpidProvider, 72370b324cSopenharmony_ci kpidNtSecure, 73370b324cSopenharmony_ci kpidIsAltStream, 74370b324cSopenharmony_ci kpidIsAux, 75370b324cSopenharmony_ci kpidIsDeleted, 76370b324cSopenharmony_ci kpidIsTree, 77370b324cSopenharmony_ci kpidSha1, 78370b324cSopenharmony_ci kpidSha256, 79370b324cSopenharmony_ci kpidErrorType, 80370b324cSopenharmony_ci kpidNumErrors, 81370b324cSopenharmony_ci kpidErrorFlags, 82370b324cSopenharmony_ci kpidWarningFlags, 83370b324cSopenharmony_ci kpidWarning, 84370b324cSopenharmony_ci kpidNumStreams, 85370b324cSopenharmony_ci kpidNumAltStreams, 86370b324cSopenharmony_ci kpidAltStreamsSize, 87370b324cSopenharmony_ci kpidVirtualSize, 88370b324cSopenharmony_ci kpidUnpackSize, 89370b324cSopenharmony_ci kpidTotalPhySize, 90370b324cSopenharmony_ci kpidVolumeIndex, 91370b324cSopenharmony_ci kpidSubType, 92370b324cSopenharmony_ci kpidShortComment, 93370b324cSopenharmony_ci kpidCodePage, 94370b324cSopenharmony_ci kpidIsNotArcType, 95370b324cSopenharmony_ci kpidPhySizeCantBeDetected, 96370b324cSopenharmony_ci kpidZerosTailIsAllowed, 97370b324cSopenharmony_ci kpidTailSize, 98370b324cSopenharmony_ci kpidEmbeddedStubSize, 99370b324cSopenharmony_ci kpidNtReparse, 100370b324cSopenharmony_ci kpidHardLink, 101370b324cSopenharmony_ci kpidINode, 102370b324cSopenharmony_ci kpidStreamId, 103370b324cSopenharmony_ci kpidReadOnly, 104370b324cSopenharmony_ci kpidOutName, 105370b324cSopenharmony_ci kpidCopyLink, 106370b324cSopenharmony_ci kpidArcFileName, 107370b324cSopenharmony_ci kpidIsHash, 108370b324cSopenharmony_ci kpidChangeTime, 109370b324cSopenharmony_ci kpidUserId, 110370b324cSopenharmony_ci kpidGroupId, 111370b324cSopenharmony_ci kpidDeviceMajor, 112370b324cSopenharmony_ci kpidDeviceMinor, 113370b324cSopenharmony_ci kpidDevMajor, 114370b324cSopenharmony_ci kpidDevMinor, 115370b324cSopenharmony_ci 116370b324cSopenharmony_ci kpid_NUM_DEFINED, 117370b324cSopenharmony_ci 118370b324cSopenharmony_ci kpidUserDefined = 0x10000 119370b324cSopenharmony_ci}; 120370b324cSopenharmony_ci 121370b324cSopenharmony_ciextern const Byte k7z_PROPID_To_VARTYPE[kpid_NUM_DEFINED]; // VARTYPE 122370b324cSopenharmony_ci 123370b324cSopenharmony_ciconst UInt32 kpv_ErrorFlags_IsNotArc = 1 << 0; 124370b324cSopenharmony_ciconst UInt32 kpv_ErrorFlags_HeadersError = 1 << 1; 125370b324cSopenharmony_ciconst UInt32 kpv_ErrorFlags_EncryptedHeadersError = 1 << 2; 126370b324cSopenharmony_ciconst UInt32 kpv_ErrorFlags_UnavailableStart = 1 << 3; 127370b324cSopenharmony_ciconst UInt32 kpv_ErrorFlags_UnconfirmedStart = 1 << 4; 128370b324cSopenharmony_ciconst UInt32 kpv_ErrorFlags_UnexpectedEnd = 1 << 5; 129370b324cSopenharmony_ciconst UInt32 kpv_ErrorFlags_DataAfterEnd = 1 << 6; 130370b324cSopenharmony_ciconst UInt32 kpv_ErrorFlags_UnsupportedMethod = 1 << 7; 131370b324cSopenharmony_ciconst UInt32 kpv_ErrorFlags_UnsupportedFeature = 1 << 8; 132370b324cSopenharmony_ciconst UInt32 kpv_ErrorFlags_DataError = 1 << 9; 133370b324cSopenharmony_ciconst UInt32 kpv_ErrorFlags_CrcError = 1 << 10; 134370b324cSopenharmony_ci// const UInt32 kpv_ErrorFlags_Unsupported = 1 << 11; 135370b324cSopenharmony_ci 136370b324cSopenharmony_ci/* 137370b324cSopenharmony_cilinux ctime : 138370b324cSopenharmony_ci file metadata was last changed. 139370b324cSopenharmony_ci changing the file modification time 140370b324cSopenharmony_ci counts as a metadata change, so will also have the side effect of updating the ctime. 141370b324cSopenharmony_ci 142370b324cSopenharmony_ciPROPVARIANT for timestamps in 7-Zip: 143370b324cSopenharmony_ci{ 144370b324cSopenharmony_ci vt = VT_FILETIME 145370b324cSopenharmony_ci wReserved1: set precision level 146370b324cSopenharmony_ci 0 : base value (backward compatibility value) 147370b324cSopenharmony_ci only filetime is used (7 digits precision). 148370b324cSopenharmony_ci wReserved2 and wReserved3 can contain random data 149370b324cSopenharmony_ci 1 : Unix (1 sec) 150370b324cSopenharmony_ci 2 : DOS (2 sec) 151370b324cSopenharmony_ci 3 : High Precision (1 ns) 152370b324cSopenharmony_ci 16 - 3 : (reserved) = 1 day 153370b324cSopenharmony_ci 16 - 2 : (reserved) = 1 hour 154370b324cSopenharmony_ci 16 - 1 : (reserved) = 1 minute 155370b324cSopenharmony_ci 16 + 0 : 1 sec (0 digits after point) 156370b324cSopenharmony_ci 16 + (1,2,3,4,5,6,7,8,9) : set subsecond precision level : 157370b324cSopenharmony_ci (number of decimal digits after point) 158370b324cSopenharmony_ci 16 + 9 : 1 ns (9 digits after point) 159370b324cSopenharmony_ci wReserved2 = ns % 100 : if (8 or 9 digits pecision) 160370b324cSopenharmony_ci = 0 : if not (8 or 9 digits pecision) 161370b324cSopenharmony_ci wReserved3 = 0; 162370b324cSopenharmony_ci filetime 163370b324cSopenharmony_ci} 164370b324cSopenharmony_ci 165370b324cSopenharmony_ciNOTE: TAR-PAX archives created by GNU TAR don't keep 166370b324cSopenharmony_ci whole information about original level of precision, 167370b324cSopenharmony_ci and timestamp are stored in reduced form, where tail zero 168370b324cSopenharmony_ci digits after point are removed. 169370b324cSopenharmony_ci So 7-Zip can return different precision levels for different items for such TAR archives. 170370b324cSopenharmony_ci*/ 171370b324cSopenharmony_ci 172370b324cSopenharmony_ci/* 173370b324cSopenharmony_ciTimePrec returned by IOutArchive::GetFileTimeType() 174370b324cSopenharmony_ciis used only for updating, when we compare MTime timestamp 175370b324cSopenharmony_cifrom archive with timestamp from directory. 176370b324cSopenharmony_ci*/ 177370b324cSopenharmony_ci 178370b324cSopenharmony_ci#endif 179