|
1 // OpenCallbackGUI.cpp |
|
2 |
|
3 #include "StdAfx.h" |
|
4 |
|
5 #include "OpenCallbackGUI.h" |
|
6 |
|
7 #include "Common/StdOutStream.h" |
|
8 #include "Common/StdInStream.h" |
|
9 #include "Common/StringConvert.h" |
|
10 |
|
11 #ifndef _NO_CRYPTO |
|
12 #include "../../FileManager/Resource/PasswordDialog/PasswordDialog.h" |
|
13 #endif |
|
14 |
|
15 HRESULT COpenCallbackGUI::CheckBreak() |
|
16 { |
|
17 return S_OK; |
|
18 } |
|
19 |
|
20 HRESULT COpenCallbackGUI::SetTotal(const UInt64 *files, const UInt64 *bytes) |
|
21 { |
|
22 return S_OK; |
|
23 } |
|
24 |
|
25 HRESULT COpenCallbackGUI::SetCompleted(const UInt64 *files, const UInt64 *bytes) |
|
26 { |
|
27 return S_OK; |
|
28 } |
|
29 |
|
30 #ifndef _NO_CRYPTO |
|
31 HRESULT COpenCallbackGUI::CryptoGetTextPassword(BSTR *password) |
|
32 { |
|
33 if (!PasswordIsDefined) |
|
34 { |
|
35 CPasswordDialog dialog; |
|
36 if (dialog.Create(ParentWindow) == IDCANCEL) |
|
37 return E_ABORT; |
|
38 Password = dialog.Password; |
|
39 PasswordIsDefined = true; |
|
40 } |
|
41 CMyComBSTR tempName(Password); |
|
42 *password = tempName.Detach(); |
|
43 return S_OK; |
|
44 } |
|
45 |
|
46 HRESULT COpenCallbackGUI::GetPasswordIfAny(UString &password) |
|
47 { |
|
48 if (PasswordIsDefined) |
|
49 password = Password; |
|
50 return S_OK; |
|
51 } |
|
52 #endif |
|
53 |