This commit is contained in:
Igor Pavlov
2003-12-11 00:00:00 +00:00
committed by Kornel Lesiński
commit 8c1b5c7b7e
982 changed files with 118799 additions and 0 deletions

65
7zip/FileManager/OpenCallback.h Executable file
View File

@@ -0,0 +1,65 @@
// OpenCallback.h
#pragma once
#ifndef __OPENCALLBACK_H
#define __OPENCALLBACK_H
#include "Common/String.h"
#include "Common/MyCom.h"
#include "Windows/FileFind.h"
#include "../IPassword.h"
#include "../Archive/IArchive.h"
class COpenArchiveCallback:
public IArchiveOpenCallback,
public IArchiveOpenVolumeCallback,
public IProgress,
public ICryptoGetTextPassword,
public CMyUnknownImp
{
UString _folderPrefix;
NWindows::NFile::NFind::CFileInfoW _fileInfo;
public:
bool _passwordIsDefined;
UString _password;
HWND _parentWindow;
public:
MY_UNKNOWN_IMP4(
IArchiveOpenCallback,
IArchiveOpenVolumeCallback,
IProgress,
ICryptoGetTextPassword)
// IProgress
STDMETHOD(SetTotal)(UINT64 total);
STDMETHOD(SetCompleted)(const UINT64 *completeValue);
// IArchiveOpenCallback
STDMETHOD(SetTotal)(const UINT64 *numFiles, const UINT64 *numBytes);
STDMETHOD(SetCompleted)(const UINT64 *numFiles, const UINT64 *numBytes);
// IArchiveOpenVolumeCallback
STDMETHOD(GetProperty)(PROPID propID, PROPVARIANT *value);
STDMETHOD(GetStream)(const wchar_t *name, IInStream **inStream);
// ICryptoGetTextPassword
STDMETHOD(CryptoGetTextPassword)(BSTR *password);
void Init()
{
_passwordIsDefined = false;
}
void LoadFileInfo(const UString &folderPrefix, const UString &fileName)
{
_folderPrefix = folderPrefix;
if (!NWindows::NFile::NFind::FindFile(_folderPrefix + fileName, _fileInfo))
throw 1;
}
void ShowMessage(const UINT64 *completed);
};
#endif