1 // IFileExtractCallback.h
2 
3 #ifndef __IFILEEXTRACTCALLBACK_H
4 #define __IFILEEXTRACTCALLBACK_H
5 
6 #include "Common/MyString.h"
7 #include "../../IDecl.h"
8 
9 namespace NOverwriteAnswer
10 {
11   enum EEnum
12   {
13     kYes,
14     kYesToAll,
15     kNo,
16     kNoToAll,
17     kAutoRename,
18     kCancel
19   };
20 }
21 
22 DECL_INTERFACE_SUB(IFolderArchiveExtractCallback, IProgress, 0x01, 0x07)
23 {
24 public:
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,
28       Int32 *answer) PURE;
29   STDMETHOD(PrepareOperation)(const wchar_t *name, bool isFolder, Int32 askExtractMode, const UInt64 *position) PURE;
30   STDMETHOD(MessageError)(const wchar_t *message) PURE;
31   STDMETHOD(SetOperationResult)(Int32 operationResult, bool encrypted) PURE;
32 };
33 
34 struct IExtractCallbackUI: IFolderArchiveExtractCallback
35 {
36   virtual HRESULT BeforeOpen(const wchar_t *name) = 0;
37   virtual HRESULT OpenResult(const wchar_t *name, HRESULT result, bool encrypted) = 0;
38   virtual HRESULT ThereAreNoFiles() = 0;
39   virtual HRESULT ExtractResult(HRESULT result) = 0;
40 
41   #ifndef _NO_CRYPTO
42   virtual HRESULT SetPassword(const UString &password) = 0;
43   #endif
44 };
45 
46 #endif
47