diff options
author | tjenssen <tim.jenssen@nokia.com> | 2012-03-13 13:24:26 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@nokia.com> | 2012-03-13 17:35:25 +0100 |
commit | ac25995f5c24000a73b4da2d52eac8f3e6ae65d9 (patch) | |
tree | 3c1d0824af7fd89067a1600864abe91ca9d5f2e6 /installerbuilder/libinstaller/3rdparty/7zip/unix/CPP/7zip/Archive/Cab/CabItem.h | |
parent | fea754a77e599328c0a7d0801792ae1b5bc155fc (diff) |
added new 7zip version 9.20 files(only the needed ones)
Change-Id: Ife071365d6dc240e6524069874f31ba7b9e8debd
Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
Diffstat (limited to 'installerbuilder/libinstaller/3rdparty/7zip/unix/CPP/7zip/Archive/Cab/CabItem.h')
-rw-r--r-- | installerbuilder/libinstaller/3rdparty/7zip/unix/CPP/7zip/Archive/Cab/CabItem.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/installerbuilder/libinstaller/3rdparty/7zip/unix/CPP/7zip/Archive/Cab/CabItem.h b/installerbuilder/libinstaller/3rdparty/7zip/unix/CPP/7zip/Archive/Cab/CabItem.h new file mode 100644 index 000000000..63a1e856c --- /dev/null +++ b/installerbuilder/libinstaller/3rdparty/7zip/unix/CPP/7zip/Archive/Cab/CabItem.h @@ -0,0 +1,63 @@ +// Archive/CabItem.h + +#ifndef __ARCHIVE_CAB_ITEM_H +#define __ARCHIVE_CAB_ITEM_H + +#include "Common/Types.h" +#include "Common/MyString.h" +#include "CabHeader.h" + +namespace NArchive { +namespace NCab { + +struct CFolder +{ + UInt32 DataStart; // offset of the first CFDATA block in this folder + UInt16 NumDataBlocks; // number of CFDATA blocks in this folder + Byte CompressionTypeMajor; + Byte CompressionTypeMinor; + Byte GetCompressionMethod() const { return (Byte)(CompressionTypeMajor & 0xF); } +}; + +struct CItem +{ + AString Name; + UInt32 Offset; + UInt32 Size; + UInt32 Time; + UInt16 FolderIndex; + UInt16 Flags; + UInt16 Attributes; + + UInt64 GetEndOffset() const { return (UInt64)Offset + Size; } + UInt32 GetWinAttributes() const { return (Attributes & ~NHeader::kFileNameIsUTFAttributeMask); } + bool IsNameUTF() const { return (Attributes & NHeader::kFileNameIsUTFAttributeMask) != 0; } + bool IsDir() const { return (Attributes & FILE_ATTRIBUTE_DIRECTORY) != 0; } + + bool ContinuedFromPrev() const + { + return + (FolderIndex == NHeader::NFolderIndex::kContinuedFromPrev) || + (FolderIndex == NHeader::NFolderIndex::kContinuedPrevAndNext); + } + + bool ContinuedToNext() const + { + return + (FolderIndex == NHeader::NFolderIndex::kContinuedToNext) || + (FolderIndex == NHeader::NFolderIndex::kContinuedPrevAndNext); + } + + int GetFolderIndex(int numFolders) const + { + if (ContinuedFromPrev()) + return 0; + if (ContinuedToNext()) + return (numFolders - 1); + return FolderIndex; + } +}; + +}} + +#endif |