1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Archive file system
4 // Author: Vaclav Slavik, Mike Wetherell
5 // Copyright: (c) 1999 Vaclav Slavik, (c) 2006 Mike Wetherell
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
17 #include "wx/filesys.h"
18 #include "wx/hashmap.h"
20 WX_DECLARE_STRING_HASH_MAP(int, wxArchiveFilenameHashMap
);
22 //---------------------------------------------------------------------------
24 //---------------------------------------------------------------------------
26 class WXDLLIMPEXP_BASE wxArchiveFSHandler
: public wxFileSystemHandler
30 virtual bool CanOpen(const wxString
& location
);
31 virtual wxFSFile
* OpenFile(wxFileSystem
& fs
, const wxString
& location
);
32 virtual wxString
FindFirst(const wxString
& spec
, int flags
= 0);
33 virtual wxString
FindNext();
35 virtual ~wxArchiveFSHandler();
38 class wxArchiveFSCache
*m_cache
;
41 // these vars are used by FindFirst/Next:
42 class wxArchiveFSCacheData
*m_Archive
;
43 struct wxArchiveFSEntry
*m_FindEntry
;
44 wxString m_Pattern
, m_BaseDir
, m_ZipFile
;
45 bool m_AllowDirs
, m_AllowFiles
;
46 wxArchiveFilenameHashMap
*m_DirsFound
;
50 DECLARE_NO_COPY_CLASS(wxArchiveFSHandler
)
51 DECLARE_DYNAMIC_CLASS(wxArchiveFSHandler
)
54 #endif // wxUSE_FS_ARCHIVE
56 #endif // _WX_FS_ARC_H_