Mercurial > vba-linux
view src/win32/7zip/7z/CPP/7zip/Archive/Rar/RarItem.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line source
1 // RarItem.h3 #ifndef __ARCHIVE_RAR_ITEM_H4 #define __ARCHIVE_RAR_ITEM_H6 #include "Common/Types.h"7 #include "Common/MyString.h"9 #include "RarHeader.h"11 namespace NArchive{12 namespace NRar{14 struct CRarTime15 {16 UInt32 DosTime;17 Byte LowSecond;18 Byte SubTime[3];19 };21 struct CItem22 {23 UInt64 Size;24 UInt64 PackSize;26 CRarTime CTime;27 CRarTime ATime;28 CRarTime MTime;30 UInt32 FileCRC;31 UInt32 Attrib;33 UInt16 Flags;34 Byte HostOS;35 Byte UnPackVersion;36 Byte Method;38 bool CTimeDefined;39 bool ATimeDefined;41 AString Name;42 UString UnicodeName;44 Byte Salt[8];46 bool IsEncrypted() const { return (Flags & NHeader::NFile::kEncrypted) != 0; }47 bool IsSolid() const { return (Flags & NHeader::NFile::kSolid) != 0; }48 bool IsCommented() const { return (Flags & NHeader::NFile::kComment) != 0; }49 bool IsSplitBefore() const { return (Flags & NHeader::NFile::kSplitBefore) != 0; }50 bool IsSplitAfter() const { return (Flags & NHeader::NFile::kSplitAfter) != 0; }51 bool HasSalt() const { return (Flags & NHeader::NFile::kSalt) != 0; }52 bool HasExtTime() const { return (Flags & NHeader::NFile::kExtTime) != 0; }53 bool HasUnicodeName()const { return (Flags & NHeader::NFile::kUnicodeName) != 0; }54 bool IsOldVersion() const { return (Flags & NHeader::NFile::kOldVersion) != 0; }56 UInt32 GetDictSize() const { return (Flags >> NHeader::NFile::kDictBitStart) & NHeader::NFile::kDictMask; }57 bool IsDir() const;58 bool IgnoreItem() const;59 UInt32 GetWinAttributes() const;61 CItem(): CTimeDefined(false), ATimeDefined(false) {}62 };64 class CItemEx: public CItem65 {66 public:67 UInt64 Position;68 UInt16 MainPartSize;69 UInt16 CommentSize;70 UInt16 AlignSize;71 UInt64 GetFullSize() const { return MainPartSize + CommentSize + AlignSize + PackSize; };72 // DWORD GetHeaderWithCommentSize() const { return MainPartSize + CommentSize; };73 UInt64 GetCommentPosition() const { return Position + MainPartSize; };74 UInt64 GetDataPosition() const { return GetCommentPosition() + CommentSize + AlignSize; };75 };77 }}79 #endif