1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: ZIP file system
4 // Author: Vaclav Slavik
5 // Copyright: (c) 1999 Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
13 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
14 #pragma interface "fs_zip.h"
19 #if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS
21 #include "wx/filesys.h"
22 #include "wx/hashmap.h"
25 WX_DECLARE_STRING_HASH_MAP(int, wxZipFilenameHashMap
);
28 //---------------------------------------------------------------------------
30 //---------------------------------------------------------------------------
32 class WXDLLIMPEXP_BASE wxZipFSHandler
: public wxFileSystemHandler
36 virtual bool CanOpen(const wxString
& location
);
37 virtual wxFSFile
* OpenFile(wxFileSystem
& fs
, const wxString
& location
);
38 virtual wxString
FindFirst(const wxString
& spec
, int flags
= 0);
39 virtual wxString
FindNext();
43 // these vars are used by FindFirst/Next:
44 class wxZipInputStream
*m_Archive
;
45 wxString m_Pattern
, m_BaseDir
, m_ZipFile
;
46 bool m_AllowDirs
, m_AllowFiles
;
47 wxZipFilenameHashMap
*m_DirsFound
;
51 DECLARE_NO_COPY_CLASS(wxZipFSHandler
)
56 // wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS
58 #endif // _WX_FS_ZIP_H_