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)  

recvol.hpp
Go to the documentation of this file.
1#ifndef _RAR_RECVOL_
2#define _RAR_RECVOL_
3
4#define REV5_SIGN "Rar!\x1aRev"
5#define REV5_SIGN_SIZE 8
6
8{
9 private:
12
13#ifdef RAR_SMP
14 ThreadPool *RSThreadPool;
15#endif
16 public:
17 RecVolumes3(RAROptions *Cmd,bool TestOnly);
19 void Make(RAROptions *Cmd,wchar *ArcName);
20 bool Restore(RAROptions *Cmd,const wchar *Name,bool Silent);
21 void Test(RAROptions *Cmd,const wchar *Name);
22};
23
24
26{
31 bool New; // Newly created RAR volume.
32 bool Valid; // If existing RAR volume is valid.
33};
34
35
36class RecVolumes5;
38{
41 bool Encode;
43 const byte *Data;
44 size_t StartPos;
45 size_t Size;
46};
47
49{
50 private:
51 void ProcessRS(RAROptions *Cmd,uint DataNum,const byte *Data,uint MaxRead,bool Encode);
52 void ProcessRS(RAROptions *Cmd,uint MaxRead,bool Encode);
53 uint ReadHeader(File *RecFile,bool FirstRev);
54
56
57 byte *RealReadBuffer; // Real pointer returned by 'new'.
58 byte *ReadBuffer; // Pointer aligned for SSE instructions.
59
60 byte *RealBuf; // Real pointer returned by 'new'.
61 byte *Buf; // Store ECC or recovered data here, aligned for SSE.
62 size_t RecBufferSize; // Buffer area allocated for single volume.
63
64 uint DataCount; // Number of archives.
65 uint RecCount; // Number of recovery volumes.
66 uint TotalCount; // Total number of archives and recovery volumes.
67
68 bool *ValidFlags; // Volume validity flags for recovering.
69 uint MissingVolumes; // Number of missing or bad RAR volumes.
70
71#ifdef RAR_SMP
72 ThreadPool *RecThreadPool;
73#endif
74 uint MaxUserThreads; // Maximum number of threads defined by user.
75 RecRSThreadData *ThreadData; // Array to store thread parameters.
76 public: // 'public' only because called from thread functions.
78 public:
79 RecVolumes5(RAROptions *Cmd,bool TestOnly);
81 bool Restore(RAROptions *Cmd,const wchar *Name,bool Silent);
82 void Test(RAROptions *Cmd,const wchar *Name);
83};
84
85bool RecVolumesRestore(RAROptions *Cmd,const wchar *Name,bool Silent);
86void RecVolumesTest(RAROptions *Cmd,Archive *Arc,const wchar *Name);
87
88#endif
Definition: file.hpp:57
File * SrcFile[256]
Definition: recvol.hpp:10
Array< byte > Buf
Definition: recvol.hpp:11
void Make(RAROptions *Cmd, wchar *ArcName)
bool Restore(RAROptions *Cmd, const wchar *Name, bool Silent)
Definition: recvol3.cpp:102
~RecVolumes3()
Definition: recvol3.cpp:59
void Test(RAROptions *Cmd, const wchar *Name)
Definition: recvol3.cpp:500
RecVolumes3(RAROptions *Cmd, bool TestOnly)
Definition: recvol3.cpp:39
byte * Buf
Definition: recvol.hpp:61
Array< RecVolItem > RecItems
Definition: recvol.hpp:55
uint MissingVolumes
Definition: recvol.hpp:69
uint DataCount
Definition: recvol.hpp:64
uint MaxUserThreads
Definition: recvol.hpp:74
byte * RealReadBuffer
Definition: recvol.hpp:57
uint TotalCount
Definition: recvol.hpp:66
RecVolumes5(RAROptions *Cmd, bool TestOnly)
Definition: recvol5.cpp:7
void ProcessAreaRS(RecRSThreadData *td)
Definition: recvol5.cpp:134
byte * ReadBuffer
Definition: recvol.hpp:58
size_t RecBufferSize
Definition: recvol.hpp:62
void ProcessRS(RAROptions *Cmd, uint MaxRead, bool Encode)
uint ReadHeader(File *RecFile, bool FirstRev)
Definition: recvol5.cpp:444
RecRSThreadData * ThreadData
Definition: recvol.hpp:75
void Test(RAROptions *Cmd, const wchar *Name)
Definition: recvol5.cpp:497
~RecVolumes5()
Definition: recvol5.cpp:47
void ProcessRS(RAROptions *Cmd, uint DataNum, const byte *Data, uint MaxRead, bool Encode)
Definition: recvol5.cpp:73
byte * RealBuf
Definition: recvol.hpp:60
uint RecCount
Definition: recvol.hpp:65
bool * ValidFlags
Definition: recvol.hpp:68
bool Restore(RAROptions *Cmd, const wchar *Name, bool Silent)
Definition: recvol5.cpp:144
wchar_t wchar
Definition: rartypes.hpp:13
unsigned int uint
Definition: rartypes.hpp:8
uint64_t uint64
Definition: rartypes.hpp:11
bool RecVolumesRestore(RAROptions *Cmd, const wchar *Name, bool Silent)
Definition: recvol.cpp:8
void RecVolumesTest(RAROptions *Cmd, Archive *Arc, const wchar *Name)
Definition: recvol.cpp:45
const byte * Data
Definition: recvol.hpp:43
RSCoder16 * RS
Definition: recvol.hpp:40
size_t Size
Definition: recvol.hpp:45
RecVolumes5 * RecRSPtr
Definition: recvol.hpp:39
size_t StartPos
Definition: recvol.hpp:44
wchar Name[NM]
Definition: recvol.hpp:28
uint64 FileSize
Definition: recvol.hpp:30
File * f
Definition: recvol.hpp:27
uint CRC
Definition: recvol.hpp:29
bool New
Definition: recvol.hpp:31
bool Valid
Definition: recvol.hpp:32