File: UpdateCallback100.h

package info (click to toggle)
p7zip 9.20.1~dfsg.1-4.1%2Bdeb8u3
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 13,368 kB
  • sloc: cpp: 104,670; ansic: 12,930; makefile: 1,899; sh: 1,031; asm: 159
file content (54 lines) | stat: -rw-r--r-- 1,240 bytes parent folder | download | duplicates (3)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// UpdateCallback100.h

#ifndef __UPDATE_CALLBACK100_H
#define __UPDATE_CALLBACK100_H

#include "Common/MyCom.h"

#include "../../IPassword.h"

#include "../Agent/IFolderArchive.h"

#include "ProgressDialog2.h"

class CUpdateCallback100Imp:
  public IFolderArchiveUpdateCallback,
  public ICryptoGetTextPassword2,
  public ICryptoGetTextPassword,
  public IArchiveOpenCallback,
  public ICompressProgressInfo,
  public CMyUnknownImp
{
  bool _passwordIsDefined;
  UString _password;
  UInt64 _numFiles;
public:
  CProgressDialog *ProgressDialog;

  CUpdateCallback100Imp(): ProgressDialog(0) {}

  MY_UNKNOWN_IMP5(
    IFolderArchiveUpdateCallback,
    ICryptoGetTextPassword2,
    ICryptoGetTextPassword,
    IArchiveOpenCallback,
    ICompressProgressInfo)

  INTERFACE_IProgress(;)
  INTERFACE_IArchiveOpenCallback(;)
  INTERFACE_IFolderArchiveUpdateCallback(;)

  STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);

  STDMETHOD(CryptoGetTextPassword)(BSTR *password);
  STDMETHOD(CryptoGetTextPassword2)(Int32 *passwordIsDefined, BSTR *password);

  void Init(bool passwordIsDefined, const UString &password)
  {
    _passwordIsDefined = passwordIsDefined;
    _password = password;
    _numFiles = 0;
  }
};

#endif