1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Archive file system
4 // Author: Vaclav Slavik, Mike Wetherell
5 // Copyright: (c) 1999 Vaclav Slavik, (c) 2006 Mike Wetherell
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
16 #include "wx/filesys.h"
17 #include "wx/hashmap.h"
19 WX_DECLARE_STRING_HASH_MAP(int, wxArchiveFilenameHashMap
);
21 //---------------------------------------------------------------------------
23 //---------------------------------------------------------------------------
25 class WXDLLIMPEXP_BASE wxArchiveFSHandler
: public wxFileSystemHandler
29 virtual bool CanOpen(const wxString
& location
);
30 virtual wxFSFile
* OpenFile(wxFileSystem
& fs
, const wxString
& location
);
31 virtual wxString
FindFirst(const wxString
& spec
, int flags
= 0);
32 virtual wxString
FindNext();
34 virtual ~wxArchiveFSHandler();
37 class wxArchiveFSCache
*m_cache
;
40 // these vars are used by FindFirst/Next:
41 class wxArchiveFSCacheData
*m_Archive
;
42 struct wxArchiveFSEntry
*m_FindEntry
;
43 wxString m_Pattern
, m_BaseDir
, m_ZipFile
;
44 bool m_AllowDirs
, m_AllowFiles
;
45 wxArchiveFilenameHashMap
*m_DirsFound
;
49 wxDECLARE_NO_COPY_CLASS(wxArchiveFSHandler
);
50 DECLARE_DYNAMIC_CLASS(wxArchiveFSHandler
)
53 #endif // wxUSE_FS_ARCHIVE
55 #endif // _WX_FS_ARC_H_