/////////////////////////////////////////////////////////////////////////////
-// Name: tarstrm.h
+// Name: wx/tarstrm.h
// Purpose: Streams for Tar files
// Author: Mike Wetherell
// RCS-ID: $Id$
#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
wxDateTime m_ModifyTime;
wxDateTime m_AccessTime;
wxDateTime m_CreateTime;
- wxChar m_TypeFlag;
+ int m_TypeFlag;
wxString m_LinkName;
wxString m_UserName;
wxString m_GroupName;
/////////////////////////////////////////////////////////////////////////////
// wxTarInputStream
+WX_DECLARE_STRING_HASH_MAP(wxString, wxTarHeaderRecords);
+
class WXDLLIMPEXP_BASE wxTarInputStream : public wxArchiveInputStream
{
public:
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;
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)
};
char *m_extendedHdr;
size_t m_extendedSize;
wxString m_badfit;
+ bool m_endrecWritten;
DECLARE_NO_COPY_CLASS(wxTarOutputStream)
};