X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8fc574b40c0c7dfbe4b19263d1ef178b51a45488..624697a4482633ad6ab28ae98f7796bd75381e24:/include/wx/zipstrm.h diff --git a/include/wx/zipstrm.h b/include/wx/zipstrm.h index 37abe860c1..5d3d67530d 100644 --- a/include/wx/zipstrm.h +++ b/include/wx/zipstrm.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: zipstrm.h +// Name: wx/zipstrm.h // Purpose: Streams for Zip files // Author: Mike Wetherell // RCS-ID: $Id$ @@ -12,10 +12,9 @@ #include "wx/defs.h" -#if wxUSE_ZLIB && wxUSE_STREAMS && wxUSE_ZIPSTREAM +#if wxUSE_ZIPSTREAM #include "wx/archive.h" -#include "wx/hashmap.h" #include "wx/filename.h" // some methods from wxZipInputStream and wxZipOutputStream stream do not get @@ -26,7 +25,7 @@ || !defined __GNUC_MINOR__ \ || !defined __GNUC_PATCHLEVEL__ \ || __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ < 30402) -#define WXZIPFIX WXDLLIMPEXP_BASE +#define WXZIPFIX WXDLLIMPEXP_BASE #else #define WXZIPFIX #endif @@ -53,7 +52,7 @@ enum wxZipMethod }; // Originating File-System. -// +// // These are Pkware's values. Note that Info-zip disagree on some of them, // most notably NTFS. // @@ -113,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; ///////////////////////////////////////////////////////////////////////////// @@ -268,7 +267,7 @@ private: ///////////////////////////////////////////////////////////////////////////// -// wxZipOutputStream +// wxZipOutputStream WX_DECLARE_LIST_WITH_DECL(wxZipEntry, wxZipEntryList_, class WXDLLIMPEXP_BASE); @@ -303,7 +302,7 @@ public: int GetLevel() const { return m_level; } void WXZIPFIX SetLevel(int level); - + protected: virtual size_t WXZIPFIX OnSysWrite(const void *buffer, size_t size); virtual wxFileOffset OnSysTell() const { return m_entrySize; } @@ -347,13 +346,14 @@ private: int m_level; wxFileOffset m_offsetAdjustment; wxString m_Comment; + bool m_endrecWritten; DECLARE_NO_COPY_CLASS(wxZipOutputStream) }; ///////////////////////////////////////////////////////////////////////////// -// wxZipInputStream +// wxZipInputStream class WXDLLIMPEXP_BASE wxZipInputStream : public wxArchiveInputStream { @@ -384,7 +384,7 @@ protected: size_t WXZIPFIX OnSysRead(void *buffer, size_t size); wxFileOffset OnSysTell() const { return m_decomp ? m_decomp->TellI() : 0; } -#if WXWIN_COMPATIBILITY_2_6 && wxUSE_FFILE +#if WXWIN_COMPATIBILITY_2_6 wxFileOffset WXZIPFIX OnSysSeek(wxFileOffset seek, wxSeekMode mode); #endif @@ -409,7 +409,7 @@ private: wxUint32 ReadSignature(); bool FindEndRecord(); bool LoadEndRecord(); - + bool AtHeader() const { return m_headerSize == 0; } bool AfterHeader() const { return m_headerSize > 0 && !m_decomp; } bool IsOpened() const { return m_decomp != NULL; } @@ -441,9 +441,9 @@ private: friend bool wxZipOutputStream::CopyArchiveMetaData( wxZipInputStream& inputStream); -#if WXWIN_COMPATIBILITY_2_6 && wxUSE_FFILE +#if WXWIN_COMPATIBILITY_2_6 bool m_allowSeeking; - friend class wxZipFSInputStream; + friend class wxArchiveFSHandler; #endif DECLARE_NO_COPY_CLASS(wxZipInputStream) @@ -570,6 +570,6 @@ inline void wxZipEntry::SetName(const wxString& name, } -#endif // wxUSE_ZLIB && wxUSE_STREAMS && wxUSE_ZIPSTREAM +#endif // wxUSE_ZIPSTREAM #endif // _WX_WXZIPSTREAM_H__