Mercurial > vba-linux
view src/win32/7zip/7zip.h @ 8:08a8e09ca414
add files required by automake
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:54:39 -0600 |
parents | f9f4f1b99eed |
children |
line wrap: on
line source
1 #ifndef _7ZIP_DEC_HEADER2 #define _7ZIP_DEC_HEADER4 // 7zip file extraction5 // 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 instead8 void InitDecoder();9 void CleanupDecoder();10 const char* GetSupportedFormatsFilter();12 // simplest way of extracting a file after calling InitDecoder():13 // int size = ArchiveFile(filename).ExtractItem(0, buf, sizeof(buf));15 struct ArchiveFile16 {17 ArchiveFile(const char* filename, const char* displayFilename=0);18 virtual ~ArchiveFile();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 failed24 int ExtractItem(int item, const char* outFilename) const;26 bool IsCompressed();27 const char* GetArchiveTypeName();28 const char* GetArchiveFileName() { return m_displayFilename ? m_displayFilename : m_filename; }30 bool m_userMadeSelection;32 protected:33 struct ArchiveItem34 {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 };45 #endif