~ubuntu-branches/ubuntu/lucid/unrar-nonfree/lucid

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
#ifndef _RAR_RAWREAD_
#define _RAR_RAWREAD_

class RawRead
{
  private:
    Array<byte> Data;
    File *SrcFile;
    size_t DataSize;
    size_t ReadPos;
#ifndef SHELL_EXT
    CryptData *Crypt;
#endif
  public:
    RawRead(File *SrcFile);
    void Read(size_t Size);
    void Read(byte *SrcData,size_t Size);
    void Get(byte &Field);
    void Get(ushort &Field);
    void Get(uint &Field);
    void Get8(int64 &Field);
    void Get(byte *Field,size_t Size);
    void Get(wchar *Field,size_t Size);
    uint GetCRC(bool ProcessedOnly);
    size_t Size() {return DataSize;}
    size_t PaddedSize() {return Data.Size()-DataSize;}
#ifndef SHELL_EXT
    void SetCrypt(CryptData *Crypt) {RawRead::Crypt=Crypt;}
#endif
};

#endif