~ubuntu-branches/ubuntu/precise/p7zip/precise-updates

« back to all changes in this revision

Viewing changes to CPP/7zip/Archive/Zip/ZipIn.h

  • Committer: Bazaar Package Importer
  • Author(s): Mohammed Adnène Trojette
  • Date: 2009-02-14 20:12:27 UTC
  • mfrom: (1.1.11 upstream) (2.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090214201227-go63qxm9ozfdma60
Tags: 4.65~dfsg.1-1
* New upstream release.
* Remove wx2.8 Build-Depends added by mistakes (7zG is not yet
  intended to be built).
* Use dh_clean without -k.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    kMultiVolumeArchiveAreNotSupported,
26
26
    kReadStreamError,
27
27
    kSeekStreamError
28
 
  } 
 
28
  }
29
29
  Cause;
30
30
  CInArchiveException(ECauseType cause): Cause(cause) {}
31
31
};
37
37
  UInt64 StartPosition;
38
38
  CByteBuffer Comment;
39
39
  CInArchiveInfo(): Base(0), StartPosition(0) {}
40
 
  void Clear() 
41
 
  { 
 
40
  void Clear()
 
41
  {
42
42
    Base = 0;
43
43
    StartPosition = 0;
44
 
    Comment.SetCapacity(0); 
 
44
    Comment.SetCapacity(0);
45
45
  }
46
46
};
47
47
 
48
48
class CProgressVirt
49
49
{
50
50
public:
51
 
  STDMETHOD(SetCompleted)(const UInt64 *numFiles) PURE;
 
51
  STDMETHOD(SetTotal)(UInt64 numFiles) PURE;
 
52
  STDMETHOD(SetCompleted)(UInt64 numFiles) PURE;
52
53
};
53
54
 
54
55
struct CCdInfo
68
69
  
69
70
  HRESULT Seek(UInt64 offset);
70
71
 
71
 
  bool FindAndReadMarker(const UInt64 *searchHeaderSizeLimit);
 
72
  HRESULT FindAndReadMarker(IInStream *stream, const UInt64 *searchHeaderSizeLimit);
72
73
  bool ReadUInt32(UInt32 &signature);
73
74
  AString ReadFileName(UInt32 nameSize);
74
75
  
83
84
  
84
85
  void IncreaseRealPosition(UInt64 addValue);
85
86
 
86
 
  void ReadExtra(UInt32 extraSize, CExtraBlock &extraBlock, 
 
87
  void ReadExtra(UInt32 extraSize, CExtraBlock &extraBlock,
87
88
      UInt64 &unpackSize, UInt64 &packSize, UInt64 &localHeaderOffset, UInt32 &diskStartNumber);
88
89
  HRESULT ReadLocalItem(CItemEx &item);
89
90
  HRESULT ReadLocalItemDescriptor(CItemEx &item);
90
91
  HRESULT ReadCdItem(CItemEx &item);
91
92
  HRESULT TryEcd64(UInt64 offset, CCdInfo &cdInfo);
92
93
  HRESULT FindCd(CCdInfo &cdInfo);
93
 
  HRESULT TryReadCd(CObjectVector<CItemEx> &items, UInt64 cdOffset, UInt64 cdSize);
94
 
  HRESULT ReadCd(CObjectVector<CItemEx> &items, UInt64 &cdOffset, UInt64 &cdSize);
 
94
  HRESULT TryReadCd(CObjectVector<CItemEx> &items, UInt64 cdOffset, UInt64 cdSize, CProgressVirt *progress);
 
95
  HRESULT ReadCd(CObjectVector<CItemEx> &items, UInt64 &cdOffset, UInt64 &cdSize, CProgressVirt *progress);
95
96
  HRESULT ReadLocalsAndCd(CObjectVector<CItemEx> &items, CProgressVirt *progress, UInt64 &cdOffset);
96
97
public:
97
98
  CInArchiveInfo m_ArchiveInfo;
100
101
  HRESULT ReadHeaders(CObjectVector<CItemEx> &items, CProgressVirt *progress);
101
102
  HRESULT ReadLocalItemAfterCdItem(CItemEx &item);
102
103
  HRESULT ReadLocalItemAfterCdItemFull(CItemEx &item);
103
 
  bool Open(IInStream *inStream, const UInt64 *searchHeaderSizeLimit);
 
104
  HRESULT Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit);
104
105
  void Close();
105
106
  void GetArchiveInfo(CInArchiveInfo &archiveInfo) const;
106
107
  bool SeekInArchive(UInt64 position);
107
108
  ISequentialInStream *CreateLimitedStream(UInt64 position, UInt64 size);
108
109
  IInStream* CreateStream();
 
110
 
 
111
  bool IsOpen() const { return m_Stream != NULL; }
109
112
};
110
113
  
111
114
}}