/////////////////////////////////////////////////////////////////////////////
// wxZipOutputStream
-WX_DECLARE_LIST_WITH_DECL(wxZipEntry, _wxZipEntryList, class WXDLLIMPEXP_BASE);
+WX_DECLARE_LIST_WITH_DECL(wxZipEntry, wx__ZipEntryList, class WXDLLIMPEXP_BASE);
class WXDLLIMPEXP_BASE wxZipOutputStream : public wxArchiveOutputStream
{
class wxStoredOutputStream *m_store;
class wxZlibOutputStream2 *m_deflate;
class wxZipStreamLink *m_backlink;
- _wxZipEntryList m_entries;
+ wx__ZipEntryList m_entries;
char *m_initialData;
size_t m_initialSize;
wxZipEntry *m_pending;
typedef wxZipEntry entry_type;
wxZipInputStream(wxInputStream& stream, wxMBConv& conv = wxConvLocal);
+
+#if 1 //WXWIN_COMPATIBILITY_2_6
wxZipInputStream(const wxString& archive, const wxString& file);
+#endif
+
virtual ~wxZipInputStream();
bool OpenEntry(wxZipEntry& entry) { return DoOpen(&entry); }
protected:
size_t OnSysRead(void *buffer, size_t size);
wxFileOffset OnSysTell() const { return m_decomp ? m_decomp->TellI() : 0; }
+
+#if 1 //WXWIN_COMPATIBILITY_2_6
wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode);
+#endif
+ // this protected interface isn't yet finalised
virtual wxInputStream *OpenDecompressor(wxInputStream& stream);
virtual bool CloseDecompressor(wxInputStream *decomp);
friend bool wxZipOutputStream::CopyArchiveMetaData(
wxZipInputStream& inputStream);
+#if 1 //WXWIN_COMPATIBILITY_2_6
+ bool m_allowSeeking;
+ friend class wxZipFSInputStream;
+#endif
+
DECLARE_NO_COPY_CLASS(wxZipInputStream)
};
+/////////////////////////////////////////////////////////////////////////////
+// Iterators
+
+#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
+typedef wxArchiveIterator<wxZipInputStream> wxZipIter;
+typedef wxArchiveIterator<wxZipInputStream,
+ std::pair<wxString, wxZipEntry*> > wxZipPairIter;
+#endif
+
+
/////////////////////////////////////////////////////////////////////////////
// wxZipClassFactory
class WXDLLIMPEXP_BASE wxZipClassFactory : public wxArchiveClassFactory
{
public:
+ typedef wxZipEntry entry_type;
+ typedef wxZipInputStream instream_type;
+ typedef wxZipOutputStream outstream_type;
+ typedef wxZipNotifier notifier_type;
+#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
+ typedef wxZipIter iter_type;
+ typedef wxZipPairIter pairiter_type;
+#endif
+
wxZipEntry *NewEntry() const
{ return new wxZipEntry; }
wxZipInputStream *NewStream(wxInputStream& stream) const
};
-/////////////////////////////////////////////////////////////////////////////
-// Iterators
-
-#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
-typedef wxArchiveIterator<wxZipInputStream> wxZipIter;
-typedef wxArchiveIterator<wxZipInputStream,
- std::pair<wxString, wxZipEntry*> > wxZipPairIter;
-#endif
-
-
/////////////////////////////////////////////////////////////////////////////
// wxZipEntry inlines
-bool wxZipEntry::IsText() const
+inline bool wxZipEntry::IsText() const
{
return (m_InternalAttributes & TEXT_ATTR) != 0;
}
-bool wxZipEntry::IsDir() const
+inline bool wxZipEntry::IsDir() const
{
return (m_ExternalAttributes & wxZIP_A_SUBDIR) != 0;
}
-bool wxZipEntry::IsReadOnly() const
+inline bool wxZipEntry::IsReadOnly() const
{
return (m_ExternalAttributes & wxZIP_A_RDONLY) != 0;
}
-bool wxZipEntry::IsMadeByUnix() const
+inline bool wxZipEntry::IsMadeByUnix() const
{
const int pattern =
(1 << wxZIP_SYSTEM_OPENVMS) |
|| ((pattern >> m_SystemMadeBy) & 1);
}
-void wxZipEntry::SetIsText(bool isText)
+inline void wxZipEntry::SetIsText(bool isText)
{
if (isText)
m_InternalAttributes |= TEXT_ATTR;
m_InternalAttributes &= ~TEXT_ATTR;
}
-void wxZipEntry::SetIsReadOnly(bool isReadOnly)
+inline void wxZipEntry::SetIsReadOnly(bool isReadOnly)
{
if (isReadOnly)
SetMode(GetMode() & ~0222);
SetMode(GetMode() | 0200);
}
-void wxZipEntry::SetName(const wxString& name,
- wxPathFormat format /*=wxPATH_NATIVE*/)
+inline void wxZipEntry::SetName(const wxString& name,
+ wxPathFormat format /*=wxPATH_NATIVE*/)
{
bool isDir;
m_Name = GetInternalName(name, format, &isDir);