misc/libphysfs/lzma/CPP/7zip/UI/Common/Extract.h
branchui-scaling
changeset 15283 c4fd2813b127
parent 13390 0135e64c6c66
parent 15279 7ab5cf405686
child 15663 d92eeb468dad
equal deleted inserted replaced
13390:0135e64c6c66 15283:c4fd2813b127
     1 // Extract.h
       
     2 
       
     3 #ifndef __EXTRACT_H
       
     4 #define __EXTRACT_H
       
     5 
       
     6 #include "Common/Wildcard.h"
       
     7 #include "Windows/FileFind.h"
       
     8 
       
     9 #include "../../Archive/IArchive.h"
       
    10 
       
    11 #include "ArchiveExtractCallback.h"
       
    12 #include "ArchiveOpenCallback.h"
       
    13 #include "ExtractMode.h"
       
    14 #include "Property.h"
       
    15 
       
    16 #include "../Common/LoadCodecs.h"
       
    17 
       
    18 class CExtractOptions
       
    19 {
       
    20 public:
       
    21   bool StdOutMode;
       
    22   bool TestMode;
       
    23   NExtract::NPathMode::EEnum PathMode;
       
    24 
       
    25   UString OutputDir;
       
    26   bool YesToAll;
       
    27   UString DefaultItemName;
       
    28   NWindows::NFile::NFind::CFileInfoW ArchiveFileInfo;
       
    29   
       
    30   // bool ShowDialog;
       
    31   // bool PasswordEnabled;
       
    32   // UString Password;
       
    33   #ifdef COMPRESS_MT
       
    34   CObjectVector<CProperty> Properties;
       
    35   #endif
       
    36 
       
    37   NExtract::NOverwriteMode::EEnum OverwriteMode;
       
    38 
       
    39   #ifdef EXTERNAL_CODECS
       
    40   CCodecs *Codecs;
       
    41   #endif
       
    42 
       
    43   CExtractOptions(): 
       
    44       StdOutMode(false), 
       
    45       YesToAll(false), 
       
    46       TestMode(false),
       
    47       PathMode(NExtract::NPathMode::kFullPathnames),
       
    48       OverwriteMode(NExtract::NOverwriteMode::kAskBefore)
       
    49       {}
       
    50 
       
    51   /*
       
    52     bool FullPathMode() const { return (ExtractMode == NExtractMode::kTest) || 
       
    53     (ExtractMode == NExtractMode::kFullPath); }
       
    54   */
       
    55 };
       
    56 
       
    57 struct CDecompressStat
       
    58 {
       
    59   UInt64 NumArchives;
       
    60   UInt64 UnpackSize;
       
    61   UInt64 PackSize;
       
    62   UInt64 NumFolders;
       
    63   UInt64 NumFiles;
       
    64   void Clear() { NumArchives = PackSize = UnpackSize = NumFolders = NumFiles = 0; }
       
    65 };
       
    66 
       
    67 HRESULT DecompressArchives(
       
    68     CCodecs *codecs,
       
    69     UStringVector &archivePaths, UStringVector &archivePathsFull,
       
    70     const NWildcard::CCensorNode &wildcardCensor,
       
    71     const CExtractOptions &options,
       
    72     IOpenCallbackUI *openCallback,
       
    73     IExtractCallbackUI *extractCallback,
       
    74     UString &errorMessage, 
       
    75     CDecompressStat &stat);
       
    76 
       
    77 #endif