1999-07-07 22:04:58 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: fs_zip.h
|
|
|
|
// Purpose: ZIP file system
|
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Copyright: (c) 1999 Vaclav Slavik
|
|
|
|
// Licence: wxWindows Licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
1999-08-20 22:52:21 +00:00
|
|
|
#include "wx/wxprec.h"
|
1999-07-07 22:04:58 +00:00
|
|
|
|
|
|
|
#ifdef __BORDLANDC__
|
|
|
|
#pragma hdrstop
|
|
|
|
#endif
|
|
|
|
|
2000-02-27 21:06:17 +00:00
|
|
|
#if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS
|
1999-07-29 19:52:37 +00:00
|
|
|
|
|
|
|
|
1999-07-07 22:04:58 +00:00
|
|
|
#ifndef WXPRECOMP
|
1999-08-20 22:52:21 +00:00
|
|
|
#include "wx/wx.h"
|
1999-07-07 22:04:58 +00:00
|
|
|
#endif
|
|
|
|
|
1999-08-20 22:52:21 +00:00
|
|
|
#include "wx/filesys.h"
|
1999-07-07 22:04:58 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------
|
|
|
|
// wxZipFSHandler
|
|
|
|
//--------------------------------------------------------------------------------
|
|
|
|
|
1999-08-03 23:56:34 +00:00
|
|
|
class WXDLLEXPORT wxZipFSHandler : public wxFileSystemHandler
|
1999-07-07 22:04:58 +00:00
|
|
|
{
|
|
|
|
public:
|
1999-10-31 22:05:10 +00:00
|
|
|
wxZipFSHandler();
|
1999-07-07 22:04:58 +00:00
|
|
|
virtual bool CanOpen(const wxString& location);
|
|
|
|
virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
|
1999-10-31 22:05:10 +00:00
|
|
|
virtual wxString FindFirst(const wxString& spec, int flags = 0);
|
|
|
|
virtual wxString FindNext();
|
1999-07-07 22:04:58 +00:00
|
|
|
~wxZipFSHandler();
|
1999-10-31 22:05:10 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
// these vars are used by FindFirst/Next:
|
|
|
|
void *m_Archive;
|
|
|
|
wxString m_Pattern, m_BaseDir, m_ZipFile;
|
|
|
|
bool m_AllowDirs, m_AllowFiles;
|
|
|
|
|
|
|
|
wxString DoFind();
|
1999-07-07 22:04:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-07-29 19:52:37 +00:00
|
|
|
#endif
|
2000-02-27 21:06:17 +00:00
|
|
|
// wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS
|
1999-07-07 22:04:58 +00:00
|
|
|
|