]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: fs_zip.h | |
3 | // Purpose: ZIP file system | |
4 | // Author: Vaclav Slavik | |
5 | // Copyright: (c) 1999 Vaclav Slavik | |
6 | // CVS-ID: $Id$ | |
7 | // Licence: wxWindows Licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | ||
11 | #ifdef __GNUG__ | |
12 | #pragma implementation | |
13 | #endif | |
14 | ||
15 | #include "wx/wxprec.h" | |
16 | ||
17 | #ifdef __BORDLANDC__ | |
18 | #pragma hdrstop | |
19 | #endif | |
20 | ||
21 | #if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS | |
22 | ||
23 | ||
24 | #ifndef WXPRECOMP | |
25 | #include "wx/wx.h" | |
26 | #endif | |
27 | ||
28 | #include "wx/filesys.h" | |
29 | ||
30 | class WXDLLEXPORT wxHashTableLong; | |
31 | ||
32 | //-------------------------------------------------------------------------------- | |
33 | // wxZipFSHandler | |
34 | //-------------------------------------------------------------------------------- | |
35 | ||
36 | class WXDLLEXPORT wxZipFSHandler : public wxFileSystemHandler | |
37 | { | |
38 | public: | |
39 | wxZipFSHandler(); | |
40 | virtual bool CanOpen(const wxString& location); | |
41 | virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); | |
42 | virtual wxString FindFirst(const wxString& spec, int flags = 0); | |
43 | virtual wxString FindNext(); | |
44 | ~wxZipFSHandler(); | |
45 | ||
46 | private: | |
47 | // these vars are used by FindFirst/Next: | |
48 | void *m_Archive; | |
49 | wxString m_Pattern, m_BaseDir, m_ZipFile; | |
50 | bool m_AllowDirs, m_AllowFiles; | |
51 | wxHashTableLong *m_DirsFound; | |
52 | ||
53 | wxString DoFind(); | |
54 | }; | |
55 | ||
56 | ||
57 | #endif | |
58 | // wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS | |
59 |