1baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// 7z/Handler.h
2baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
3baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifndef __7Z_HANDLER_H
4baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define __7Z_HANDLER_H
5baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
6baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "../../ICoder.h"
7baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "../IArchive.h"
8baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
9baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "../../Common/CreateCoder.h"
10baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
11baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifndef EXTRACT_ONLY
12baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "../Common/HandlerOut.h"
13baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif
14baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
15baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "7zCompressionMode.h"
16baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "7zIn.h"
17baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
18baa3858d3f5d128a5c8466b700098109edcad5f2repo syncnamespace NArchive {
19baa3858d3f5d128a5c8466b700098109edcad5f2repo syncnamespace N7z {
20baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
21baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifndef __7Z_SET_PROPERTIES
22baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
23baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifdef EXTRACT_ONLY
24baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#if !defined(_7ZIP_ST) && !defined(_SFX)
25baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define __7Z_SET_PROPERTIES
26baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif
27baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#else
28baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define __7Z_SET_PROPERTIES
29baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif
30baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
31baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif
32baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
33baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
34baa3858d3f5d128a5c8466b700098109edcad5f2repo syncclass CHandler:
35baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #ifndef EXTRACT_ONLY
36baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  public NArchive::COutHandler,
37baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #endif
38baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  public IInArchive,
39baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #ifdef __7Z_SET_PROPERTIES
40baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  public ISetProperties,
41baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #endif
42baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #ifndef EXTRACT_ONLY
43baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  public IOutArchive,
44baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #endif
45baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  PUBLIC_ISetCompressCodecsInfo
46baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  public CMyUnknownImp
47baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{
48baa3858d3f5d128a5c8466b700098109edcad5f2repo syncpublic:
49baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  MY_QUERYINTERFACE_BEGIN2(IInArchive)
50baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #ifdef __7Z_SET_PROPERTIES
51baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  MY_QUERYINTERFACE_ENTRY(ISetProperties)
52baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #endif
53baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #ifndef EXTRACT_ONLY
54baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  MY_QUERYINTERFACE_ENTRY(IOutArchive)
55baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #endif
56baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  QUERY_ENTRY_ISetCompressCodecsInfo
57baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  MY_QUERYINTERFACE_END
58baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  MY_ADDREF_RELEASE
59baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
60baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  INTERFACE_IInArchive(;)
61baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
62baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #ifdef __7Z_SET_PROPERTIES
63baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  STDMETHOD(SetProperties)(const wchar_t **names, const PROPVARIANT *values, Int32 numProperties);
64baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #endif
65baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
66baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #ifndef EXTRACT_ONLY
67baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  INTERFACE_IOutArchive(;)
68baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #endif
69baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
70baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  DECL_ISetCompressCodecsInfo
71baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
72baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CHandler();
73baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
74baa3858d3f5d128a5c8466b700098109edcad5f2repo syncprivate:
75baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CMyComPtr<IInStream> _inStream;
76baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  NArchive::N7z::CArchiveDatabaseEx _db;
77baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #ifndef _NO_CRYPTO
78baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  bool _passwordIsDefined;
79baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #endif
80baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
81baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #ifdef EXTRACT_ONLY
82baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
83baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #ifdef __7Z_SET_PROPERTIES
84baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt32 _numThreads;
85baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #endif
86baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
87baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt32 _crcSize;
88baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
89baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #else
90baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
91baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CRecordVector<CBind> _binds;
92baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
93baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  HRESULT SetCompressionMethod(CCompressionMethodMode &method,
94baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CObjectVector<COneMethodInfo> &methodsInfo
95baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      #ifndef _7ZIP_ST
96baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      , UInt32 numThreads
97baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      #endif
98baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      );
99baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
100baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  HRESULT SetCompressionMethod(
101baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CCompressionMethodMode &method,
102baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CCompressionMethodMode &headerMethod);
103baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
104baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #endif
105baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
106baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  bool IsEncrypted(UInt32 index2) const;
107baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #ifndef _SFX
108baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
109baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CRecordVector<UInt64> _fileInfoPopIDs;
110baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void FillPopIDs();
111baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
112baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  #endif
113baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
114baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  DECL_EXTERNAL_CODECS_VARS
115baa3858d3f5d128a5c8466b700098109edcad5f2repo sync};
116baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
117baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}}
118baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
119baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif
120