1 // ExtractCallbackConsole.h
3 #ifndef __EXTRACTCALLBACKCONSOLE_H
4 #define __EXTRACTCALLBACKCONSOLE_H
6 #include "Common/MyString.h"
7 #include "Common/StdOutStream.h"
8 #include "../../Common/FileStreams.h"
9 #include "../../IPassword.h"
10 #include "../../Archive/IArchive.h"
11 #include "../Common/ArchiveExtractCallback.h"
13 class CExtractCallbackConsole:
14 public IExtractCallbackUI,
15 public ICryptoGetTextPassword,
19 MY_UNKNOWN_IMP2(IFolderArchiveExtractCallback, ICryptoGetTextPassword)
21 STDMETHOD(SetTotal)(UInt64 total);
22 STDMETHOD(SetCompleted)(const UInt64 *completeValue);
24 // IFolderArchiveExtractCallback
25 STDMETHOD(AskOverwrite)(
26 const wchar_t *existName, const FILETIME *existTime, const UInt64 *existSize,
27 const wchar_t *newName, const FILETIME *newTime, const UInt64 *newSize,
29 STDMETHOD (PrepareOperation)(const wchar_t *name, bool isFolder, Int32 askExtractMode, const UInt64 *position);
31 STDMETHOD(MessageError)(const wchar_t *message);
32 STDMETHOD(SetOperationResult)(Int32 operationResult, bool encrypted);
34 // ICryptoGetTextPassword
35 STDMETHOD(CryptoGetTextPassword)(BSTR *password);
37 HRESULT BeforeOpen(const wchar_t *name);
38 HRESULT OpenResult(const wchar_t *name, HRESULT result, bool encrypted);
39 HRESULT ThereAreNoFiles();
40 HRESULT ExtractResult(HRESULT result);
42 HRESULT SetPassword(const UString &password);
45 bool PasswordIsDefined;
49 UInt64 NumArchiveErrors;
51 UInt64 NumFileErrorsInCurrentArchive;
53 CStdOutStream *OutStream;
60 NumFileErrorsInCurrentArchive = 0;