]>
Commit | Line | Data |
---|---|---|
5526e819 VS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: fs_zip.h | |
3 | // Purpose: ZIP file system | |
4 | // Author: Vaclav Slavik | |
5 | // Copyright: (c) 1999 Vaclav Slavik | |
de0702d0 | 6 | // CVS-ID: $Id$ |
65571936 | 7 | // Licence: wxWindows licence |
5526e819 VS |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
4e8e18e2 VZ |
10 | #ifndef _WX_FS_ZIP_H_ |
11 | #define _WX_FS_ZIP_H_ | |
5526e819 | 12 | |
12028905 | 13 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
c3f4609e | 14 | #pragma interface "fs_zip.h" |
5526e819 VS |
15 | #endif |
16 | ||
ed58dbea | 17 | #include "wx/wxprec.h" |
5526e819 | 18 | |
2b5f62a0 | 19 | #ifdef __BORLANDC__ |
5526e819 VS |
20 | #pragma hdrstop |
21 | #endif | |
22 | ||
24528b0c | 23 | #if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS |
8a4df159 | 24 | |
ed58dbea | 25 | #include "wx/filesys.h" |
bdcade0a | 26 | #include "wx/hashmap.h" |
5526e819 | 27 | |
bdcade0a | 28 | //--------------------------------------------------------------------------- |
5526e819 | 29 | // wxZipFSHandler |
bdcade0a | 30 | //--------------------------------------------------------------------------- |
5526e819 | 31 | |
bddd7a8d | 32 | class WXDLLIMPEXP_BASE wxZipFSHandler : public wxFileSystemHandler |
5526e819 VS |
33 | { |
34 | public: | |
aaa66113 | 35 | wxZipFSHandler(); |
5526e819 VS |
36 | virtual bool CanOpen(const wxString& location); |
37 | virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); | |
aaa66113 VS |
38 | virtual wxString FindFirst(const wxString& spec, int flags = 0); |
39 | virtual wxString FindNext(); | |
5526e819 | 40 | ~wxZipFSHandler(); |
04dbb646 | 41 | |
aaa66113 VS |
42 | private: |
43 | // these vars are used by FindFirst/Next: | |
44 | void *m_Archive; | |
45 | wxString m_Pattern, m_BaseDir, m_ZipFile; | |
46 | bool m_AllowDirs, m_AllowFiles; | |
ba8c1601 | 47 | wxLongToLongHashMap *m_DirsFound; |
04dbb646 | 48 | |
aaa66113 | 49 | wxString DoFind(); |
22f3361e VZ |
50 | |
51 | DECLARE_NO_COPY_CLASS(wxZipFSHandler) | |
5526e819 VS |
52 | }; |
53 | ||
54 | ||
8a4df159 | 55 | #endif |
24528b0c | 56 | // wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS |
5526e819 | 57 | |
4e8e18e2 VZ |
58 | #endif // _WX_FS_ZIP_H_ |
59 |