~ubuntu-dev/wxwidgets2.6/upstream-debian

« back to all changes in this revision

Viewing changes to include/wx/fs_zip.h

  • Committer: Daniel T Chen
  • Date: 2006-06-26 10:15:11 UTC
  • Revision ID: crimsun@ubuntu.com-20060626101511-a4436cec4c6d9b35
ImportĀ DebianĀ 2.6.3.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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: fs_zip.h,v 1.27.2.2 2006/01/18 16:32:38 JS Exp $
 
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/defs.h"
 
18
 
 
19
#if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_STREAMS
 
20
 
 
21
#include "wx/filesys.h"
 
22
#include "wx/hashmap.h"
 
23
 
 
24
 
 
25
WX_DECLARE_STRING_HASH_MAP(int, wxZipFilenameHashMap);
 
26
 
 
27
 
 
28
//---------------------------------------------------------------------------
 
29
// wxZipFSHandler
 
30
//---------------------------------------------------------------------------
 
31
 
 
32
class WXDLLIMPEXP_BASE wxZipFSHandler : public wxFileSystemHandler
 
33
{
 
34
    public:
 
35
        wxZipFSHandler();
 
36
        virtual bool CanOpen(const wxString& location);
 
37
        virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
 
38
        virtual wxString FindFirst(const wxString& spec, int flags = 0);
 
39
        virtual wxString FindNext();
 
40
#if wxABI_VERSION >= 20602 /* 2.6.2+ only */
 
41
        void Cleanup();
 
42
#endif
 
43
        ~wxZipFSHandler();
 
44
 
 
45
    private:
 
46
        // these vars are used by FindFirst/Next:
 
47
        class wxZipInputStream *m_Archive;
 
48
        wxString m_Pattern, m_BaseDir, m_ZipFile;
 
49
        bool m_AllowDirs, m_AllowFiles;
 
50
        wxZipFilenameHashMap *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