]> git.saurik.com Git - wxWidgets.git/blame - include/wx/fs_arc.h
Increase interoperability between wxPoint and wxRealPoint introducing constructors...
[wxWidgets.git] / include / wx / fs_arc.h
CommitLineData
be38a31d 1/////////////////////////////////////////////////////////////////////////////
ce7208d4 2// Name: wx/fs_arc.h
f068697b
MW
3// Purpose: Archive file system
4// Author: Vaclav Slavik, Mike Wetherell
5// Copyright: (c) 1999 Vaclav Slavik, (c) 2006 Mike Wetherell
be38a31d
MW
6// CVS-ID: $Id$
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
f068697b
MW
10#ifndef _WX_FS_ARC_H_
11#define _WX_FS_ARC_H_
be38a31d
MW
12
13#include "wx/defs.h"
14
f068697b 15#if wxUSE_FS_ARCHIVE
be38a31d
MW
16
17#include "wx/filesys.h"
18#include "wx/hashmap.h"
19
f068697b 20WX_DECLARE_STRING_HASH_MAP(int, wxArchiveFilenameHashMap);
be38a31d
MW
21
22//---------------------------------------------------------------------------
f068697b 23// wxArchiveFSHandler
be38a31d
MW
24//---------------------------------------------------------------------------
25
f068697b 26class WXDLLIMPEXP_BASE wxArchiveFSHandler : public wxFileSystemHandler
be38a31d 27{
f068697b
MW
28public:
29 wxArchiveFSHandler();
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();
34 void Cleanup();
35 virtual ~wxArchiveFSHandler();
36
37private:
38 class wxArchiveFSCache *m_cache;
39 wxFileSystem m_fs;
40
41 // these vars are used by FindFirst/Next:
42 class wxArchiveFSCacheData *m_Archive;
e7fbaf0e 43 struct wxArchiveFSEntry *m_FindEntry;
f068697b
MW
44 wxString m_Pattern, m_BaseDir, m_ZipFile;
45 bool m_AllowDirs, m_AllowFiles;
46 wxArchiveFilenameHashMap *m_DirsFound;
47
48 wxString DoFind();
49
c0c133e1 50 wxDECLARE_NO_COPY_CLASS(wxArchiveFSHandler);
f068697b 51 DECLARE_DYNAMIC_CLASS(wxArchiveFSHandler)
be38a31d
MW
52};
53
f068697b 54#endif // wxUSE_FS_ARCHIVE
be38a31d 55
f068697b 56#endif // _WX_FS_ARC_H_