// Constants
// TypeFlag values
-enum {
+enum wxTarType
+{
wxTAR_REGTYPE = '0', // regular file
wxTAR_LNKTYPE = '1', // hard link
wxTAR_SYMTYPE = '2', // symbolic link
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;
virtual ~wxTarInputStream();
bool OpenEntry(wxTarEntry& entry);
- bool OpenEntry(wxArchiveEntry& entry);
bool CloseEntry();
wxTarEntry *GetNextEntry();
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();
virtual ~wxTarOutputStream();
bool PutNextEntry(wxTarEntry *entry);
- bool PutNextEntry(wxArchiveEntry *entry);
bool PutNextEntry(const wxString& name,
const wxDateTime& dt = wxDateTime::Now(),
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();
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);
char *m_extendedHdr;
size_t m_extendedSize;
wxString m_badfit;
+ bool m_endrecWritten;
DECLARE_NO_COPY_CLASS(wxTarOutputStream)
};