Mercurial > vba-clojure
comparison src/win32/7zip/7zip.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:8ced16adf2e1 | 1:f9f4f1b99eed |
---|---|
1 #ifndef _7ZIP_DEC_HEADER | |
2 #define _7ZIP_DEC_HEADER | |
3 | |
4 // 7zip file extraction | |
5 // NOTE: if you want to add support for opening files within archives to something, | |
6 // consider using the higher-level interface provided by OpenArchive.h instead | |
7 | |
8 void InitDecoder(); | |
9 void CleanupDecoder(); | |
10 const char* GetSupportedFormatsFilter(); | |
11 | |
12 // simplest way of extracting a file after calling InitDecoder(): | |
13 // int size = ArchiveFile(filename).ExtractItem(0, buf, sizeof(buf)); | |
14 | |
15 struct ArchiveFile | |
16 { | |
17 ArchiveFile(const char* filename, const char* displayFilename=0); | |
18 virtual ~ArchiveFile(); | |
19 | |
20 int GetNumItems(); | |
21 int GetItemSize(int item); | |
22 const char* GetItemName(int item); | |
23 int ExtractItem(int item, unsigned char* outBuffer, int bufSize) const; // returns size, or 0 if failed | |
24 int ExtractItem(int item, const char* outFilename) const; | |
25 | |
26 bool IsCompressed(); | |
27 const char* GetArchiveTypeName(); | |
28 const char* GetArchiveFileName() { return m_displayFilename ? m_displayFilename : m_filename; } | |
29 | |
30 bool m_userMadeSelection; | |
31 | |
32 protected: | |
33 struct ArchiveItem | |
34 { | |
35 int size; | |
36 char* name; | |
37 }; | |
38 ArchiveItem* m_items; | |
39 int m_numItems; | |
40 int m_typeIndex; | |
41 char* m_filename; | |
42 char* m_displayFilename; | |
43 }; | |
44 | |
45 #endif |