Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: third_party/lzma/v4_65/files/CPP/7zip/UI/Common/ArchiveExtractCallback.h

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // ArchiveExtractCallback.h
2
3 #ifndef __ARCHIVEEXTRACTCALLBACK_H
4 #define __ARCHIVEEXTRACTCALLBACK_H
5
6 #include "../../Archive/IArchive.h"
7 #include "IFileExtractCallback.h"
8
9 #include "Common/MyString.h"
10 #include "Common/MyCom.h"
11
12 #include "../../Common/FileStreams.h"
13 #include "../../Common/ProgressUtils.h"
14 #include "../../IPassword.h"
15
16 #include "ExtractMode.h"
17
18 class CArchiveExtractCallback:
19 public IArchiveExtractCallback,
20 // public IArchiveVolumeExtractCallback,
21 public ICryptoGetTextPassword,
22 public ICompressProgressInfo,
23 public CMyUnknownImp
24 {
25 public:
26 MY_UNKNOWN_IMP2(ICryptoGetTextPassword, ICompressProgressInfo)
27 // COM_INTERFACE_ENTRY(IArchiveVolumeExtractCallback)
28
29 INTERFACE_IArchiveExtractCallback(;)
30
31 STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
32
33 // IArchiveVolumeExtractCallback
34 // STDMETHOD(GetInStream)(const wchar_t *name, ISequentialInStream **inStream) ;
35
36 // ICryptoGetTextPassword
37 STDMETHOD(CryptoGetTextPassword)(BSTR *aPassword);
38
39 private:
40 CMyComPtr<IInArchive> _archiveHandler;
41 CMyComPtr<IFolderArchiveExtractCallback> _extractCallback2;
42 CMyComPtr<ICompressProgressInfo> _compressProgress;
43 CMyComPtr<ICryptoGetTextPassword> _cryptoGetTextPassword;
44 UString _directoryPath;
45 NExtract::NPathMode::EEnum _pathMode;
46 NExtract::NOverwriteMode::EEnum _overwriteMode;
47
48 UString _filePath;
49 UInt64 _position;
50 bool _isSplit;
51
52 UString _diskFilePath;
53
54 bool _extractMode;
55
56 bool WriteCTime;
57 bool WriteATime;
58 bool WriteMTime;
59
60 bool _encrypted;
61
62 struct CProcessedFileInfo
63 {
64 FILETIME CTime;
65 FILETIME ATime;
66 FILETIME MTime;
67 UInt32 Attributes;
68
69 bool CTimeDefined;
70 bool ATimeDefined;
71 bool MTimeDefined;
72
73 bool IsDir;
74 bool AttributesAreDefined;
75 } _processedFileInfo;
76
77 UInt64 _curSize;
78 COutFileStream *_outFileStreamSpec;
79 CMyComPtr<ISequentialOutStream> _outFileStream;
80 UStringVector _removePathParts;
81
82 UString _itemDefaultName;
83 FILETIME _utcMTimeDefault;
84 UInt32 _attributesDefault;
85 bool _stdOutMode;
86
87 void CreateComplexDirectory(const UStringVector &dirPathParts, UString &fullPa th);
88 HRESULT GetTime(int index, PROPID propID, FILETIME &filetime, bool &filetimeIs Defined);
89 public:
90 CArchiveExtractCallback():
91 WriteCTime(true),
92 WriteATime(true),
93 WriteMTime(true),
94 _multiArchives(false)
95 {
96 LocalProgressSpec = new CLocalProgress();
97 _localProgress = LocalProgressSpec;
98 }
99
100 CLocalProgress *LocalProgressSpec;
101 CMyComPtr<ICompressProgressInfo> _localProgress;
102 UInt64 _packTotal;
103 UInt64 _unpTotal;
104
105 bool _multiArchives;
106 UInt64 NumFolders;
107 UInt64 NumFiles;
108 UInt64 UnpackSize;
109
110 void InitForMulti(bool multiArchives,
111 NExtract::NPathMode::EEnum pathMode,
112 NExtract::NOverwriteMode::EEnum overwriteMode)
113 {
114 _multiArchives = multiArchives; NumFolders = NumFiles = UnpackSize = 0;
115 _pathMode = pathMode;
116 _overwriteMode = overwriteMode;
117 }
118
119 void Init(
120 IInArchive *archiveHandler,
121 IFolderArchiveExtractCallback *extractCallback2,
122 bool stdOutMode,
123 const UString &directoryPath,
124 const UStringVector &removePathParts,
125 const UString &itemDefaultName,
126 const FILETIME &utcMTimeDefault,
127 UInt32 attributesDefault,
128 UInt64 packSize);
129
130 UInt64 _numErrors;
131 };
132
133 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698