Files
haiku-beta6/src/bin/unrar/rdwrfn.hpp
T
Axel Dörfler 2c3cd1b95d Added unrar 3.6.7 to the repository. Most changes to the original versions done
by Ioan Molnar - thanks!
Looks like our mbstowcs() function is broken, BTW - it needs to be disabled when
used under Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-20 18:53:55 +00:00

84 lines
1.8 KiB
C++

#ifndef _RAR_DATAIO_
#define _RAR_DATAIO_
class CmdAdd;
class Unpack;
class ComprDataIO
{
private:
void ShowUnpRead(Int64 ArcPos,Int64 ArcSize);
void ShowUnpWrite();
bool UnpackFromMemory;
uint UnpackFromMemorySize;
byte *UnpackFromMemoryAddr;
bool UnpackToMemory;
uint UnpackToMemorySize;
byte *UnpackToMemoryAddr;
uint UnpWrSize;
byte *UnpWrAddr;
Int64 UnpPackedSize;
bool ShowProgress;
bool TestMode;
bool SkipUnpCRC;
File *SrcFile;
File *DestFile;
CmdAdd *Command;
FileHeader *SubHead;
Int64 *SubHeadPos;
#ifndef NOCRYPT
CryptData Crypt;
CryptData Decrypt;
#endif
int LastPercent;
char CurrentCommand;
public:
ComprDataIO();
void Init();
int UnpRead(byte *Addr,uint Count);
void UnpWrite(byte *Addr,uint Count);
void EnableShowProgress(bool Show) {ShowProgress=Show;}
void GetUnpackedData(byte **Data,uint *Size);
void SetPackedSizeToRead(Int64 Size) {UnpPackedSize=Size;}
void SetTestMode(bool Mode) {TestMode=Mode;}
void SetSkipUnpCRC(bool Skip) {SkipUnpCRC=Skip;}
void SetFiles(File *SrcFile,File *DestFile);
void SetCommand(CmdAdd *Cmd) {Command=Cmd;}
void SetSubHeader(FileHeader *hd,Int64 *Pos) {SubHead=hd;SubHeadPos=Pos;}
void SetEncryption(int Method,char *Password,byte *Salt,bool Encrypt,bool HandsOffHash);
void SetAV15Encryption();
void SetCmt13Encryption();
void SetUnpackToMemory(byte *Addr,uint Size);
void SetCurrentCommand(char Cmd) {CurrentCommand=Cmd;}
bool PackVolume;
bool UnpVolume;
bool NextVolumeMissing;
Int64 TotalPackRead;
Int64 UnpArcSize;
Int64 CurPackRead,CurPackWrite,CurUnpRead,CurUnpWrite;
Int64 ProcessedArcSize,TotalArcSize;
uint PackFileCRC,UnpFileCRC,PackedCRC;
int Encryption;
int Decryption;
};
#endif