-
Notifications
You must be signed in to change notification settings - Fork 0
/
InMemoryExtractCallback.h
32 lines (28 loc) · 1.05 KB
/
InMemoryExtractCallback.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include <7zip/Archive/IArchive.h>
#include <7zip/IPassword.h>
#include <Common/MyCom.h>
#include<optional>
#include<string>
#include <vector>
class InMemoryArchiveExtractCallback Z7_final :
public IArchiveExtractCallback,
public ICryptoGetTextPassword,
public CMyUnknownImp
{
Z7_IFACES_IMP_UNK_2(IArchiveExtractCallback, ICryptoGetTextPassword)
Z7_IFACE_COM7_IMP(IProgress)
public:
InMemoryArchiveExtractCallback();
explicit InMemoryArchiveExtractCallback(std::u8string Password);
virtual ~InMemoryArchiveExtractCallback();
InMemoryArchiveExtractCallback(const InMemoryArchiveExtractCallback& Other) = delete;
InMemoryArchiveExtractCallback(InMemoryArchiveExtractCallback&& Other) noexcept = delete;
InMemoryArchiveExtractCallback& operator=(const InMemoryArchiveExtractCallback& Other) = delete;
InMemoryArchiveExtractCallback& operator=(InMemoryArchiveExtractCallback&& Other) noexcept = delete;
private:
std::optional<std::u8string> Password;
CMyComPtr<ISequentialOutStream> OutStream;
std::vector<std::byte> Buffer;
UInt32 Index;
};