X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/291324e3768779329001b8e5ddf9ac2409d949c4..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/zipstrm.h diff --git a/include/wx/zipstrm.h b/include/wx/zipstrm.h index c12688c0cc..9cd7631944 100644 --- a/include/wx/zipstrm.h +++ b/include/wx/zipstrm.h @@ -2,7 +2,6 @@ // Name: wx/zipstrm.h // Purpose: Streams for Zip files // Author: Mike Wetherell -// RCS-ID: $Id$ // Copyright: (c) Mike Wetherell // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -112,8 +111,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 +220,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 +282,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 +291,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 +319,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,8 +345,9 @@ private: int m_level; wxFileOffset m_offsetAdjustment; wxString m_Comment; + bool m_endrecWritten; - DECLARE_NO_COPY_CLASS(wxZipOutputStream) + wxDECLARE_NO_COPY_CLASS(wxZipOutputStream); }; @@ -369,7 +370,6 @@ public: virtual WXZIPFIX ~wxZipInputStream(); bool OpenEntry(wxZipEntry& entry) { return DoOpen(&entry); } - bool WXZIPFIX OpenEntry(wxArchiveEntry& entry); bool WXZIPFIX CloseEntry(); wxZipEntry *GetNextEntry(); @@ -391,8 +391,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 +398,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(); @@ -443,7 +445,7 @@ private: friend class wxArchiveFSHandler; #endif - DECLARE_NO_COPY_CLASS(wxZipInputStream) + wxDECLARE_NO_COPY_CLASS(wxZipInputStream); };