diff options
Diffstat (limited to '3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h')
-rw-r--r-- | 3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h | 74 |
1 files changed, 57 insertions, 17 deletions
diff --git a/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h b/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h index 805db54e9d3..6447b25ca74 100644 --- a/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +++ b/3rdparty/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h @@ -1,12 +1,13 @@ // 7zFolderInStream.h -#ifndef __7Z_FOLDER_IN_STREAM_H -#define __7Z_FOLDER_IN_STREAM_H +#ifndef ZIP7_INC_7Z_FOLDER_IN_STREAM_H +#define ZIP7_INC_7Z_FOLDER_IN_STREAM_H #include "../../../../C/7zCrc.h" #include "../../../Common/MyCom.h" #include "../../../Common/MyVector.h" +// #include "../Common/InStreamWithCRC.h" #include "../../ICoder.h" #include "../IArchive.h" @@ -14,39 +15,67 @@ namespace NArchive { namespace N7z { -class CFolderInStream: - public ISequentialInStream, - public ICompressGetSubStreamSize, - public CMyUnknownImp -{ +Z7_CLASS_IMP_COM_2( + CFolderInStream + , ISequentialInStream + , ICompressGetSubStreamSize +) + /* + Z7_COM7F_IMP(GetNextStream(UInt64 *streamIndex)) + Z7_IFACE_COM7_IMP(ICompressInSubStreams) + */ + CMyComPtr<ISequentialInStream> _stream; + UInt64 _totalSize_for_Coder; UInt64 _pos; UInt32 _crc; bool _size_Defined; + bool _times_Defined; UInt64 _size; + FILETIME _mTime; + FILETIME _cTime; + FILETIME _aTime; + UInt32 _attrib; - const UInt32 *_indexes; unsigned _numFiles; - unsigned _index; + const UInt32 *_indexes; CMyComPtr<IArchiveUpdateCallback> _updateCallback; + void ClearFileInfo(); HRESULT OpenStream(); - void AddFileInfo(bool isProcessed); - + HRESULT AddFileInfo(bool isProcessed); + // HRESULT CloseCrcStream(); public: + bool Need_MTime; + bool Need_CTime; + bool Need_ATime; + bool Need_Attrib; + // bool Need_Crc; + // bool Need_FolderCrc; + // unsigned AlignLog; + CRecordVector<bool> Processed; - CRecordVector<UInt32> CRCs; CRecordVector<UInt64> Sizes; - - MY_UNKNOWN_IMP2(ISequentialInStream, ICompressGetSubStreamSize) - STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); - STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value); + CRecordVector<UInt32> CRCs; + CRecordVector<UInt32> Attribs; + CRecordVector<bool> TimesDefined; + CRecordVector<UInt64> MTimes; + CRecordVector<UInt64> CTimes; + CRecordVector<UInt64> ATimes; + // UInt32 FolderCrc; + + // UInt32 GetFolderCrc() const { return CRC_GET_DIGEST(FolderCrc); } + // CSequentialInStreamWithCRC *_crcStream_Spec; + // CMyComPtr<ISequentialInStream> _crcStream; + // CMyComPtr<IArchiveUpdateCallbackArcProp> _reportArcProp; void Init(IArchiveUpdateCallback *updateCallback, const UInt32 *indexes, unsigned numFiles); - bool WasFinished() const { return _index == _numFiles; } + bool WasFinished() const { return Processed.Size() == _numFiles; } + UInt64 Get_TotalSize_for_Coder() const { return _totalSize_for_Coder; } + /* UInt64 GetFullSize() const { UInt64 size = 0; @@ -54,6 +83,17 @@ public: size += Sizes[i]; return size; } + */ + + CFolderInStream(): + Need_MTime(false), + Need_CTime(false), + Need_ATime(false), + Need_Attrib(false) + // , Need_Crc(true) + // , Need_FolderCrc(false) + // , AlignLog(0) + {} }; }} |