X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/291324e3768779329001b8e5ddf9ac2409d949c4..03773e400b6ff2692f2a9ba045d652c3b7b7109d:/include/wx/tarstrm.h?ds=sidebyside diff --git a/include/wx/tarstrm.h b/include/wx/tarstrm.h index 58c6d9a48b..44087ccabd 100644 --- a/include/wx/tarstrm.h +++ b/include/wx/tarstrm.h @@ -22,7 +22,8 @@ // Constants // TypeFlag values -enum { +enum wxTarType +{ wxTAR_REGTYPE = '0', // regular file wxTAR_LNKTYPE = '1', // hard link wxTAR_SYMTYPE = '2', // symbolic link @@ -118,11 +119,11 @@ public: void SetNotifier(wxTarNotifier& WXUNUSED(notifier)) { } -protected: +private: void SetOffset(wxFileOffset offset) { m_Offset = offset; } + virtual wxArchiveEntry* DoClone() const { return Clone(); } -private: wxString m_Name; int m_Mode; bool m_IsModeSet; @@ -161,7 +162,6 @@ public: virtual ~wxTarInputStream(); bool OpenEntry(wxTarEntry& entry); - bool OpenEntry(wxArchiveEntry& entry); bool CloseEntry(); wxTarEntry *GetNextEntry(); @@ -174,11 +174,11 @@ protected: wxFileOffset OnSysTell() const { return m_pos; } wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode); - wxArchiveEntry *DoGetNextEntry() { return GetNextEntry(); } - private: void Init(); + wxArchiveEntry *DoGetNextEntry() { return GetNextEntry(); } + bool OpenEntry(wxArchiveEntry& entry); bool IsOpened() const { return m_pos != wxInvalidOffset; } wxStreamError ReadHeaders(); @@ -200,7 +200,7 @@ private: wxTarHeaderRecords *m_HeaderRecs; wxTarHeaderRecords *m_GlobalHeaderRecs; - DECLARE_NO_COPY_CLASS(wxTarInputStream) + wxDECLARE_NO_COPY_CLASS(wxTarInputStream); }; @@ -219,7 +219,6 @@ public: virtual ~wxTarOutputStream(); bool PutNextEntry(wxTarEntry *entry); - bool PutNextEntry(wxArchiveEntry *entry); bool PutNextEntry(const wxString& name, const wxDateTime& dt = wxDateTime::Now(), @@ -229,9 +228,7 @@ public: const wxDateTime& dt = wxDateTime::Now()); bool CopyEntry(wxTarEntry *entry, wxTarInputStream& inputStream); - bool CopyEntry(wxArchiveEntry *entry, wxArchiveInputStream& stream); bool CopyArchiveMetaData(wxTarInputStream& WXUNUSED(s)) { return true; } - bool CopyArchiveMetaData(wxArchiveInputStream& WXUNUSED(s)) { return true; } void Sync(); bool CloseEntry(); @@ -250,6 +247,9 @@ protected: private: void Init(wxTarFormat format); + bool PutNextEntry(wxArchiveEntry *entry); + bool CopyEntry(wxArchiveEntry *entry, wxArchiveInputStream& stream); + bool CopyArchiveMetaData(wxArchiveInputStream& WXUNUSED(s)) { return true; } bool IsOpened() const { return m_pos != wxInvalidOffset; } bool WriteHeaders(wxTarEntry& entry); @@ -281,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); };