Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Archive/Rar/RarItem.h')
-rw-r--r--[-rwxr-xr-x]CPP/7zip/Archive/Rar/RarItem.h40
1 files changed, 28 insertions, 12 deletions
diff --git a/CPP/7zip/Archive/Rar/RarItem.h b/CPP/7zip/Archive/Rar/RarItem.h
index 4aa4d866..56d25f2c 100755..100644
--- a/CPP/7zip/Archive/Rar/RarItem.h
+++ b/CPP/7zip/Archive/Rar/RarItem.h
@@ -3,13 +3,12 @@
#ifndef __ARCHIVE_RAR_ITEM_H
#define __ARCHIVE_RAR_ITEM_H
-#include "Common/Types.h"
-#include "Common/MyString.h"
+#include "../../../Common/StringConvert.h"
#include "RarHeader.h"
-namespace NArchive{
-namespace NRar{
+namespace NArchive {
+namespace NRar {
struct CRarTime
{
@@ -56,18 +55,35 @@ struct CItem
UInt32 GetDictSize() const { return (Flags >> NHeader::NFile::kDictBitStart) & NHeader::NFile::kDictMask; }
bool IsDir() const;
bool IgnoreItem() const;
- UInt32 GetWinAttributes() const;
-
- CItem(): CTimeDefined(false), ATimeDefined(false) {}
-};
+ UInt32 GetWinAttrib() const;
-class CItemEx: public CItem
-{
-public:
UInt64 Position;
- UInt16 MainPartSize;
+ unsigned MainPartSize;
UInt16 CommentSize;
UInt16 AlignSize;
+
+ // int BaseFileIndex;
+ // bool IsAltStream;
+
+ UString GetName() const
+ {
+ if (( /* IsAltStream || */ HasUnicodeName()) && !UnicodeName.IsEmpty())
+ return UnicodeName;
+ return MultiByteToUnicodeString(Name, CP_OEMCP);
+ }
+
+ void Clear()
+ {
+ CTimeDefined = false;
+ ATimeDefined = false;
+ Name.Empty();
+ UnicodeName.Empty();
+ // IsAltStream = false;
+ // BaseFileIndex = -1;
+ }
+
+ CItem() { Clear(); }
+
UInt64 GetFullSize() const { return MainPartSize + CommentSize + AlignSize + PackSize; };
// DWORD GetHeaderWithCommentSize() const { return MainPartSize + CommentSize; };
UInt64 GetCommentPosition() const { return Position + MainPartSize; };