]> git.saurik.com Git - wxWidgets.git/blob - include/wx/fs_zip.h
Fixed size problem due to wxMac window implementation difference
[wxWidgets.git] / include / wx / fs_zip.h
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 #ifndef _WX_FS_ZIP_H_
11 #define _WX_FS_ZIP_H_
12
13 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
14 #pragma interface "fs_zip.h"
15 #endif
16
17 #include "wx/wxprec.h"
18
19 #ifdef __BORLANDC__
20 #pragma hdrstop
21 #endif
22
23 #if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS
24
25 #include "wx/filesys.h"
26 #include "wx/hashmap.h"
27
28 WX_DECLARE_HASH_MAP_WITH_DECL( long, long, wxIntegerHash, wxIntegerEqual,
29 wxLongToLongHashMap, class WXDLLIMPEXP_BASE );
30
31 //---------------------------------------------------------------------------
32 // wxZipFSHandler
33 //---------------------------------------------------------------------------
34
35 class WXDLLIMPEXP_BASE wxZipFSHandler : public wxFileSystemHandler
36 {
37 public:
38 wxZipFSHandler();
39 virtual bool CanOpen(const wxString& location);
40 virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
41 virtual wxString FindFirst(const wxString& spec, int flags = 0);
42 virtual wxString FindNext();
43 ~wxZipFSHandler();
44
45 private:
46 // these vars are used by FindFirst/Next:
47 void *m_Archive;
48 wxString m_Pattern, m_BaseDir, m_ZipFile;
49 bool m_AllowDirs, m_AllowFiles;
50 wxLongToLongHashMap *m_DirsFound;
51
52 wxString DoFind();
53
54 DECLARE_NO_COPY_CLASS(wxZipFSHandler)
55 };
56
57
58 #endif
59 // wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS
60
61 #endif // _WX_FS_ZIP_H_
62