X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd1462c3f99bbb5adef3a4b6cfd7e9e5edaca3f7..86ac84b8ce086e6bbda58f422d41f84268606e35:/include/wx/tarstrm.h diff --git a/include/wx/tarstrm.h b/include/wx/tarstrm.h index 8a5baf6675..44087ccabd 100644 --- a/include/wx/tarstrm.h +++ b/include/wx/tarstrm.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: tarstrm.h +// Name: wx/tarstrm.h // Purpose: Streams for Tar files // Author: Mike Wetherell // RCS-ID: $Id$ @@ -15,13 +15,15 @@ #if wxUSE_TARSTREAM #include "wx/archive.h" +#include "wx/hashmap.h" ///////////////////////////////////////////////////////////////////////////// // Constants // TypeFlag values -enum { +enum wxTarType +{ wxTAR_REGTYPE = '0', // regular file wxTAR_LNKTYPE = '1', // hard link wxTAR_SYMTYPE = '2', // symbolic link @@ -43,7 +45,7 @@ enum wxTarFormat ///////////////////////////////////////////////////////////////////////////// // wxTarNotifier -class wxTarNotifier +class WXDLLIMPEXP_BASE wxTarNotifier { public: virtual ~wxTarNotifier() { } @@ -55,7 +57,7 @@ public: ///////////////////////////////////////////////////////////////////////////// // Tar Entry - hold the meta data for a file in the tar -class wxTarEntry : public wxArchiveEntry +class WXDLLIMPEXP_BASE wxTarEntry : public wxArchiveEntry { public: wxTarEntry(const wxString& name = wxEmptyString, @@ -132,7 +134,7 @@ private: wxDateTime m_ModifyTime; wxDateTime m_AccessTime; wxDateTime m_CreateTime; - wxChar m_TypeFlag; + int m_TypeFlag; wxString m_LinkName; wxString m_UserName; wxString m_GroupName; @@ -148,7 +150,9 @@ private: ///////////////////////////////////////////////////////////////////////////// // wxTarInputStream -class wxTarInputStream : public wxArchiveInputStream +WX_DECLARE_STRING_HASH_MAP(wxString, wxTarHeaderRecords); + +class WXDLLIMPEXP_BASE wxTarInputStream : public wxArchiveInputStream { public: typedef wxTarEntry entry_type; @@ -178,7 +182,7 @@ private: bool IsOpened() const { return m_pos != wxInvalidOffset; } wxStreamError ReadHeaders(); - bool ReadExtendedHeader(class wxTarHeaderRecords*& recs); + bool ReadExtendedHeader(wxTarHeaderRecords*& recs); wxString GetExtendedHeader(const wxString& key) const; wxString GetHeaderPath() const; @@ -193,17 +197,17 @@ private: int m_sumType; int m_tarType; class wxTarHeaderBlock *m_hdr; - class wxTarHeaderRecords *m_HeaderRecs; - class wxTarHeaderRecords *m_GlobalHeaderRecs; + wxTarHeaderRecords *m_HeaderRecs; + wxTarHeaderRecords *m_GlobalHeaderRecs; - DECLARE_NO_COPY_CLASS(wxTarInputStream) + wxDECLARE_NO_COPY_CLASS(wxTarInputStream); }; ///////////////////////////////////////////////////////////////////////////// // wxTarOutputStream -class wxTarOutputStream : public wxArchiveOutputStream +class WXDLLIMPEXP_BASE wxTarOutputStream : public wxArchiveOutputStream { public: wxTarOutputStream(wxOutputStream& stream, @@ -277,8 +281,9 @@ private: char *m_extendedHdr; size_t m_extendedSize; wxString m_badfit; + bool m_endrecWritten; - DECLARE_NO_COPY_CLASS(wxTarOutputStream) + wxDECLARE_NO_COPY_CLASS(wxTarOutputStream); }; @@ -295,7 +300,7 @@ typedef wxArchiveIterator