aboutsummaryrefslogtreecommitdiff
path: root/CPP/7zip/Archive/7z/7zFolderInStream.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CPP/7zip/Archive/7z/7zFolderInStream.h63
1 files changed, 40 insertions, 23 deletions
diff --git a/CPP/7zip/Archive/7z/7zFolderInStream.h b/CPP/7zip/Archive/7z/7zFolderInStream.h
index f054e68..6447b25 100644
--- a/CPP/7zip/Archive/7z/7zFolderInStream.h
+++ b/CPP/7zip/Archive/7z/7zFolderInStream.h
@@ -1,12 +1,13 @@
1// 7zFolderInStream.h 1// 7zFolderInStream.h
2 2
3#ifndef __7Z_FOLDER_IN_STREAM_H 3#ifndef ZIP7_INC_7Z_FOLDER_IN_STREAM_H
4#define __7Z_FOLDER_IN_STREAM_H 4#define ZIP7_INC_7Z_FOLDER_IN_STREAM_H
5 5
6#include "../../../../C/7zCrc.h" 6#include "../../../../C/7zCrc.h"
7 7
8#include "../../../Common/MyCom.h" 8#include "../../../Common/MyCom.h"
9#include "../../../Common/MyVector.h" 9#include "../../../Common/MyVector.h"
10// #include "../Common/InStreamWithCRC.h"
10 11
11#include "../../ICoder.h" 12#include "../../ICoder.h"
12#include "../IArchive.h" 13#include "../IArchive.h"
@@ -14,20 +15,26 @@
14namespace NArchive { 15namespace NArchive {
15namespace N7z { 16namespace N7z {
16 17
17class CFolderInStream: 18Z7_CLASS_IMP_COM_2(
18 public ISequentialInStream, 19 CFolderInStream
19 public ICompressGetSubStreamSize, 20 , ISequentialInStream
20 public CMyUnknownImp 21 , ICompressGetSubStreamSize
21{ 22)
23 /*
24 Z7_COM7F_IMP(GetNextStream(UInt64 *streamIndex))
25 Z7_IFACE_COM7_IMP(ICompressInSubStreams)
26 */
27
22 CMyComPtr<ISequentialInStream> _stream; 28 CMyComPtr<ISequentialInStream> _stream;
29 UInt64 _totalSize_for_Coder;
23 UInt64 _pos; 30 UInt64 _pos;
24 UInt32 _crc; 31 UInt32 _crc;
25 bool _size_Defined; 32 bool _size_Defined;
26 bool _times_Defined; 33 bool _times_Defined;
27 UInt64 _size; 34 UInt64 _size;
35 FILETIME _mTime;
28 FILETIME _cTime; 36 FILETIME _cTime;
29 FILETIME _aTime; 37 FILETIME _aTime;
30 FILETIME _mTime;
31 UInt32 _attrib; 38 UInt32 _attrib;
32 39
33 unsigned _numFiles; 40 unsigned _numFiles;
@@ -35,34 +42,40 @@ class CFolderInStream:
35 42
36 CMyComPtr<IArchiveUpdateCallback> _updateCallback; 43 CMyComPtr<IArchiveUpdateCallback> _updateCallback;
37 44
45 void ClearFileInfo();
38 HRESULT OpenStream(); 46 HRESULT OpenStream();
39 HRESULT AddFileInfo(bool isProcessed); 47 HRESULT AddFileInfo(bool isProcessed);
40 48 // HRESULT CloseCrcStream();
41public: 49public:
50 bool Need_MTime;
51 bool Need_CTime;
52 bool Need_ATime;
53 bool Need_Attrib;
54 // bool Need_Crc;
55 // bool Need_FolderCrc;
56 // unsigned AlignLog;
57
42 CRecordVector<bool> Processed; 58 CRecordVector<bool> Processed;
43 CRecordVector<UInt32> CRCs;
44 CRecordVector<UInt64> Sizes; 59 CRecordVector<UInt64> Sizes;
45 CRecordVector<UInt64> CTimes; 60 CRecordVector<UInt32> CRCs;
46 CRecordVector<UInt64> ATimes;
47 CRecordVector<UInt64> MTimes;
48 CRecordVector<UInt32> Attribs; 61 CRecordVector<UInt32> Attribs;
49 CRecordVector<bool> TimesDefined; 62 CRecordVector<bool> TimesDefined;
63 CRecordVector<UInt64> MTimes;
64 CRecordVector<UInt64> CTimes;
65 CRecordVector<UInt64> ATimes;
66 // UInt32 FolderCrc;
50 67
51 bool Need_CTime; 68 // UInt32 GetFolderCrc() const { return CRC_GET_DIGEST(FolderCrc); }
52 bool Need_ATime; 69 // CSequentialInStreamWithCRC *_crcStream_Spec;
53 bool Need_MTime; 70 // CMyComPtr<ISequentialInStream> _crcStream;
54 bool Need_Attrib;
55
56 // CMyComPtr<IArchiveUpdateCallbackArcProp> _reportArcProp; 71 // CMyComPtr<IArchiveUpdateCallbackArcProp> _reportArcProp;
57 72
58 MY_UNKNOWN_IMP2(ISequentialInStream, ICompressGetSubStreamSize)
59 STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
60 STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value);
61
62 void Init(IArchiveUpdateCallback *updateCallback, const UInt32 *indexes, unsigned numFiles); 73 void Init(IArchiveUpdateCallback *updateCallback, const UInt32 *indexes, unsigned numFiles);
63 74
64 bool WasFinished() const { return Processed.Size() == _numFiles; } 75 bool WasFinished() const { return Processed.Size() == _numFiles; }
65 76
77 UInt64 Get_TotalSize_for_Coder() const { return _totalSize_for_Coder; }
78 /*
66 UInt64 GetFullSize() const 79 UInt64 GetFullSize() const
67 { 80 {
68 UInt64 size = 0; 81 UInt64 size = 0;
@@ -70,12 +83,16 @@ public:
70 size += Sizes[i]; 83 size += Sizes[i];
71 return size; 84 return size;
72 } 85 }
86 */
73 87
74 CFolderInStream(): 88 CFolderInStream():
89 Need_MTime(false),
75 Need_CTime(false), 90 Need_CTime(false),
76 Need_ATime(false), 91 Need_ATime(false),
77 Need_MTime(false),
78 Need_Attrib(false) 92 Need_Attrib(false)
93 // , Need_Crc(true)
94 // , Need_FolderCrc(false)
95 // , AlignLog(0)
79 {} 96 {}
80}; 97};
81 98