unrarsrc  6.1.7
About: unrar extracts, views and tests the contents of archives created with the RAR archiver.
  Fossies Dox: unrarsrc-6.1.7.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

rdwrfn.hpp
Go to the documentation of this file.
1#ifndef _RAR_DATAIO_
2#define _RAR_DATAIO_
3
4class Archive;
5class CmdAdd;
6class Unpack;
7class ArcFileSearch;
8
9#if 0
10// We use external i/o calls for Benchmark command.
11#define COMPRDATAIO_EXTIO
12#endif
13
15{
16 private:
17 void ShowUnpRead(int64 ArcPos,int64 ArcSize);
18 void ShowUnpWrite();
19
20
24
28
29 size_t UnpWrSize;
30 byte *UnpWrAddr;
31
34
39
42
43 CmdAdd *Command;
44
47
48#ifndef RAR_NOCRYPT
51#endif
52
53
55
57
58 public:
61 void Init();
62 int UnpRead(byte *Addr,size_t Count);
63 void UnpWrite(byte *Addr,size_t Count);
64 void EnableShowProgress(bool Show) {ShowProgress=Show;}
65 void GetUnpackedData(byte **Data,size_t *Size);
67 void SetTestMode(bool Mode) {TestMode=Mode;}
68 void SetSkipUnpCRC(bool Skip) {SkipUnpCRC=Skip;}
69 void SetNoFileHeader(bool Mode) {NoFileHeader=Mode;}
71 void SetCommand(CmdAdd *Cmd) {Command=Cmd;}
73 void SetEncryption(bool Encrypt,CRYPT_METHOD Method,SecPassword *Password,
74 const byte *Salt,const byte *InitV,uint Lg2Cnt,byte *HashKey,byte *PswCheck);
75 void SetAV15Encryption();
76 void SetCmt13Encryption();
77 void SetUnpackToMemory(byte *Addr,uint Size);
79 void AdjustTotalArcSize(Archive *Arc);
80
81
86
87
88 // Size of already processed archives.
89 // Used to calculate the total operation progress.
91
92 // Last extracted archive size up to QO or RR block.
94
96
97 DataHash PackedDataHash; // Packed write and unpack read hash.
98 DataHash PackHash; // Pack read hash.
99 DataHash UnpHash; // Unpack write hash.
100
103};
104
105#endif
DataHash PackHash
Definition: rdwrfn.hpp:98
bool NextVolumeMissing
Definition: rdwrfn.hpp:84
int64 LastArcSize
Definition: rdwrfn.hpp:93
void SetCommand(CmdAdd *Cmd)
Definition: rdwrfn.hpp:71
int64 UnpPackedLeft
Definition: rdwrfn.hpp:33
bool Encryption
Definition: rdwrfn.hpp:101
int64 CurUnpWrite
Definition: rdwrfn.hpp:85
void SetCmt13Encryption()
Definition: rdwrfn.cpp:272
void UnpWrite(byte *Addr, size_t Count)
Definition: rdwrfn.cpp:154
bool SkipUnpCRC
Definition: rdwrfn.hpp:37
void SetCurrentCommand(wchar Cmd)
Definition: rdwrfn.hpp:78
int64 UnpPackedSize
Definition: rdwrfn.hpp:32
byte * UnpWrAddr
Definition: rdwrfn.hpp:30
CmdAdd * Command
Definition: rdwrfn.hpp:43
int LastPercent
Definition: rdwrfn.hpp:54
int64 ProcessedArcSize
Definition: rdwrfn.hpp:90
int64 TotalArcSize
Definition: rdwrfn.hpp:95
bool PackVolume
Definition: rdwrfn.hpp:82
DataHash UnpHash
Definition: rdwrfn.hpp:99
File * SrcFile
Definition: rdwrfn.hpp:40
void SetSkipUnpCRC(bool Skip)
Definition: rdwrfn.hpp:68
bool Decryption
Definition: rdwrfn.hpp:102
bool TestMode
Definition: rdwrfn.hpp:36
wchar CurrentCommand
Definition: rdwrfn.hpp:56
byte * UnpackToMemoryAddr
Definition: rdwrfn.hpp:27
void SetEncryption(bool Encrypt, CRYPT_METHOD Method, SecPassword *Password, const byte *Salt, const byte *InitV, uint Lg2Cnt, byte *HashKey, byte *PswCheck)
Definition: rdwrfn.cpp:249
int UnpRead(byte *Addr, size_t Count)
Definition: rdwrfn.cpp:56
size_t UnpackToMemorySize
Definition: rdwrfn.hpp:26
bool UnpackFromMemory
Definition: rdwrfn.hpp:21
void GetUnpackedData(byte **Data, size_t *Size)
Definition: rdwrfn.cpp:242
void SetNoFileHeader(bool Mode)
Definition: rdwrfn.hpp:69
void AdjustTotalArcSize(Archive *Arc)
Definition: rdwrfn.cpp:296
CryptData * Decrypt
Definition: rdwrfn.hpp:50
int64 CurPackWrite
Definition: rdwrfn.hpp:85
void SetPackedSizeToRead(int64 Size)
Definition: rdwrfn.hpp:66
void Init()
Definition: rdwrfn.cpp:14
bool UnpVolume
Definition: rdwrfn.hpp:83
byte * UnpackFromMemoryAddr
Definition: rdwrfn.hpp:23
void SetFiles(File *SrcFile, File *DestFile)
Definition: rdwrfn.cpp:232
void EnableShowProgress(bool Show)
Definition: rdwrfn.hpp:64
bool UnpackToMemory
Definition: rdwrfn.hpp:25
CryptData * Crypt
Definition: rdwrfn.hpp:49
FileHeader * SubHead
Definition: rdwrfn.hpp:45
int64 * SubHeadPos
Definition: rdwrfn.hpp:46
void ShowUnpWrite()
Definition: rdwrfn.cpp:219
bool NoFileHeader
Definition: rdwrfn.hpp:38
void SetTestMode(bool Mode)
Definition: rdwrfn.hpp:67
ComprDataIO()
Definition: rdwrfn.cpp:3
int64 CurUnpRead
Definition: rdwrfn.hpp:85
size_t UnpackFromMemorySize
Definition: rdwrfn.hpp:22
DataHash PackedDataHash
Definition: rdwrfn.hpp:97
void SetSubHeader(FileHeader *hd, int64 *Pos)
Definition: rdwrfn.hpp:72
~ComprDataIO()
Definition: rdwrfn.cpp:45
int64 CurPackRead
Definition: rdwrfn.hpp:85
size_t UnpWrSize
Definition: rdwrfn.hpp:29
void SetAV15Encryption()
Definition: rdwrfn.cpp:263
bool ShowProgress
Definition: rdwrfn.hpp:35
void SetUnpackToMemory(byte *Addr, uint Size)
Definition: rdwrfn.cpp:282
void ShowUnpRead(int64 ArcPos, int64 ArcSize)
Definition: rdwrfn.cpp:199
File * DestFile
Definition: rdwrfn.hpp:41
Definition: file.hpp:57
CRYPT_METHOD
Definition: crypt.hpp:5
wchar_t wchar
Definition: rartypes.hpp:13
int64_t int64
Definition: rartypes.hpp:12
unsigned int uint
Definition: rartypes.hpp:8