misc/libphysfs/lzma/CPP/7zip/Archive/7z/7zFolderOutStream.h
changeset 13881 99b265e0d1d0
parent 13880 5f819b90d479
child 13882 b172a5d40eee
equal deleted inserted replaced
13880:5f819b90d479 13881:99b265e0d1d0
     1 // 7zFolderOutStream.h
       
     2 
       
     3 #ifndef __7Z_FOLDEROUTSTREAM_H
       
     4 #define __7Z_FOLDEROUTSTREAM_H
       
     5 
       
     6 #include "7zIn.h"
       
     7 
       
     8 #include "../../IStream.h"
       
     9 #include "../IArchive.h"
       
    10 #include "../Common/OutStreamWithCRC.h"
       
    11 
       
    12 namespace NArchive {
       
    13 namespace N7z {
       
    14 
       
    15 class CFolderOutStream: 
       
    16   public ISequentialOutStream,
       
    17   public CMyUnknownImp
       
    18 {
       
    19 public:
       
    20   MY_UNKNOWN_IMP
       
    21   
       
    22   CFolderOutStream();
       
    23 
       
    24   STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
       
    25 private:
       
    26 
       
    27   COutStreamWithCRC *_outStreamWithHashSpec;
       
    28   CMyComPtr<ISequentialOutStream> _outStreamWithHash;
       
    29   const CArchiveDatabaseEx *_archiveDatabase;
       
    30   const CBoolVector *_extractStatuses;
       
    31   UInt32 _startIndex;
       
    32   UInt32 _ref2Offset;
       
    33   int _currentIndex;
       
    34   // UInt64 _currentDataPos;
       
    35   CMyComPtr<IArchiveExtractCallback> _extractCallback;
       
    36   bool _testMode;
       
    37 
       
    38   bool _fileIsOpen;
       
    39 
       
    40   bool _checkCrc;
       
    41   UInt64 _filePos;
       
    42 
       
    43   HRESULT OpenFile();
       
    44   HRESULT WriteEmptyFiles();
       
    45 public:
       
    46   HRESULT Init(
       
    47       const CArchiveDatabaseEx *archiveDatabase,
       
    48       UInt32 ref2Offset,
       
    49       UInt32 startIndex,
       
    50       const CBoolVector *extractStatuses, 
       
    51       IArchiveExtractCallback *extractCallback,
       
    52       bool testMode,
       
    53       bool checkCrc);
       
    54   HRESULT FlushCorrupted(Int32 resultEOperationResult);
       
    55   HRESULT WasWritingFinished();
       
    56 };
       
    57 
       
    58 }}
       
    59 
       
    60 #endif