Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp')
-rwxr-xr-xCPP/7zip/UI/Agent/UpdateCallbackAgent.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp b/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp
index 0d57307c..e00d837a 100755
--- a/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp
+++ b/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp
@@ -3,11 +3,28 @@
#include "StdAfx.h"
#include "Windows/Error.h"
+#include "Common/IntToString.h"
#include "UpdateCallbackAgent.h"
using namespace NWindows;
+void CUpdateCallbackAgent::SetCallback(IFolderArchiveUpdateCallback *callback)
+{
+ Callback = callback;
+ _compressProgress.Release();
+ if (Callback)
+ Callback.QueryInterface(IID_ICompressProgressInfo, &_compressProgress);
+}
+
+HRESULT CUpdateCallbackAgent::SetNumFiles(UInt64 numFiles)
+{
+ if (Callback)
+ return Callback->SetNumFiles(numFiles);
+ return S_OK;
+}
+
+
HRESULT CUpdateCallbackAgent::SetTotal(UINT64 size)
{
if (Callback)
@@ -22,6 +39,13 @@ HRESULT CUpdateCallbackAgent::SetCompleted(const UINT64 *completeValue)
return S_OK;
}
+HRESULT CUpdateCallbackAgent::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize)
+{
+ if (_compressProgress)
+ return _compressProgress->SetRatioInfo(inSize, outSize);
+ return S_OK;
+}
+
HRESULT CUpdateCallbackAgent::CheckBreak()
{
return S_OK;
@@ -57,14 +81,14 @@ HRESULT CUpdateCallbackAgent::GetStream(const wchar_t *name, bool /* isAnti */)
return S_OK;
}
-HRESULT CUpdateCallbackAgent::SetOperationResult(INT32 operationResult)
+HRESULT CUpdateCallbackAgent::SetOperationResult(Int32 operationResult)
{
if (Callback)
return Callback->OperationResult(operationResult);
return S_OK;
}
-HRESULT CUpdateCallbackAgent::CryptoGetTextPassword2(INT32 *passwordIsDefined, BSTR *password)
+HRESULT CUpdateCallbackAgent::CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password)
{
*passwordIsDefined = BoolToInt(false);
if (!_cryptoGetTextPassword)