X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/291324e3768779329001b8e5ddf9ac2409d949c4..80cc5fc7ad102221a1ce9e160eac3c29a0586664:/include/wx/zipstrm.h diff --git a/include/wx/zipstrm.h b/include/wx/zipstrm.h index c12688c0cc..5d3d67530d 100644 --- a/include/wx/zipstrm.h +++ b/include/wx/zipstrm.h @@ -112,8 +112,8 @@ enum wxZipFlags // Forward decls // -class WXDLLIMPEXP_BASE wxZipEntry; -class WXDLLIMPEXP_BASE wxZipInputStream; +class WXDLLIMPEXP_FWD_BASE wxZipEntry; +class WXDLLIMPEXP_FWD_BASE wxZipInputStream; ///////////////////////////////////////////////////////////////////////////// @@ -221,9 +221,9 @@ protected: void Notify(); +private: wxArchiveEntry* DoClone() const { return ZipClone(); } -private: size_t ReadLocal(wxInputStream& stream, wxMBConv& conv); size_t WriteLocal(wxOutputStream& stream, wxMBConv& conv) const; @@ -283,7 +283,6 @@ public: virtual WXZIPFIX ~wxZipOutputStream(); bool PutNextEntry(wxZipEntry *entry) { return DoCreate(entry); } - bool WXZIPFIX PutNextEntry(wxArchiveEntry *entry); bool WXZIPFIX PutNextEntry(const wxString& name, const wxDateTime& dt = wxDateTime::Now(), @@ -293,9 +292,7 @@ public: const wxDateTime& dt = wxDateTime::Now()); bool WXZIPFIX CopyEntry(wxZipEntry *entry, wxZipInputStream& inputStream); - bool WXZIPFIX CopyEntry(wxArchiveEntry *entry, wxArchiveInputStream& stream); bool WXZIPFIX CopyArchiveMetaData(wxZipInputStream& inputStream); - bool WXZIPFIX CopyArchiveMetaData(wxArchiveInputStream& stream); void WXZIPFIX Sync(); bool WXZIPFIX CloseEntry(); @@ -323,6 +320,10 @@ protected: private: void Init(int level); + bool WXZIPFIX PutNextEntry(wxArchiveEntry *entry); + bool WXZIPFIX CopyEntry(wxArchiveEntry *entry, wxArchiveInputStream& stream); + bool WXZIPFIX CopyArchiveMetaData(wxArchiveInputStream& stream); + bool IsOpened() const { return m_comp || m_pending; } bool DoCreate(wxZipEntry *entry, bool raw = false); @@ -345,6 +346,7 @@ private: int m_level; wxFileOffset m_offsetAdjustment; wxString m_Comment; + bool m_endrecWritten; DECLARE_NO_COPY_CLASS(wxZipOutputStream) }; @@ -369,7 +371,6 @@ public: virtual WXZIPFIX ~wxZipInputStream(); bool OpenEntry(wxZipEntry& entry) { return DoOpen(&entry); } - bool WXZIPFIX OpenEntry(wxArchiveEntry& entry); bool WXZIPFIX CloseEntry(); wxZipEntry *GetNextEntry(); @@ -391,8 +392,6 @@ protected: virtual wxInputStream* WXZIPFIX OpenDecompressor(wxInputStream& stream); virtual bool WXZIPFIX CloseDecompressor(wxInputStream *decomp); - wxArchiveEntry *DoGetNextEntry() { return GetNextEntry(); } - private: void Init(); void Init(const wxString& file); @@ -400,6 +399,10 @@ private: static wxInputStream *OpenFile(const wxString& archive); #endif + wxArchiveEntry *DoGetNextEntry() { return GetNextEntry(); } + + bool WXZIPFIX OpenEntry(wxArchiveEntry& entry); + wxStreamError ReadLocal(bool readEndRec = false); wxStreamError ReadCentral();