1 // OpenCallback.h 2 3 #ifndef ZIP7_INC_OPEN_CALLBACK_H 4 #define ZIP7_INC_OPEN_CALLBACK_H 5 6 #include "../Common/ArchiveOpenCallback.h" 7 8 #ifdef Z7_SFX 9 #include "ProgressDialog.h" 10 #else 11 #include "ProgressDialog2.h" 12 #endif 13 14 /* we can use IArchiveOpenCallback or IOpenCallbackUI here */ 15 16 class COpenArchiveCallback Z7_final: 17 /* 18 public IArchiveOpenCallback, 19 public IProgress, 20 public ICryptoGetTextPassword, 21 public CMyUnknownImp 22 */ 23 public IOpenCallbackUI 24 { 25 // NWindows::NSynchronization::CCriticalSection _criticalSection; 26 public: 27 bool PasswordIsDefined; 28 bool PasswordWasAsked; 29 UString Password; 30 HWND ParentWindow; 31 CProgressDialog ProgressDialog; 32 33 /* 34 Z7_COM_UNKNOWN_IMP_3( 35 IArchiveOpenVolumeCallback, 36 IProgress 37 ICryptoGetTextPassword 38 ) 39 40 Z7_IFACE_COM7_IMP(IProgress) 41 Z7_IFACE_COM7_IMP(IArchiveOpenCallback) 42 // ICryptoGetTextPassword 43 Z7_COM7F_IMP(CryptoGetTextPassword(BSTR *password)) 44 */ 45 46 Z7_IFACE_IMP(IOpenCallbackUI) 47 COpenArchiveCallback()48 COpenArchiveCallback(): 49 ParentWindow(NULL) 50 { 51 // _subArchiveMode = false; 52 PasswordIsDefined = false; 53 PasswordWasAsked = false; 54 } 55 /* 56 void Init() 57 { 58 PasswordIsDefined = false; 59 _subArchiveMode = false; 60 } 61 */ 62 StartProgressDialog(const UString & title,NWindows::CThread & thread)63 INT_PTR StartProgressDialog(const UString &title, NWindows::CThread &thread) 64 { 65 return ProgressDialog.Create(title, thread, ParentWindow); 66 } 67 }; 68 69 #endif 70