diff options
author | kh1 <karsten.heimrich@nokia.com> | 2012-03-15 14:53:47 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@nokia.com> | 2012-03-19 16:14:04 +0100 |
commit | be3b47d0d504a3409ce66bd77bb8c0acff87c4f5 (patch) | |
tree | 09dfb02d484a4f395991972b828da71400fb761a /src/libs/7zip/unix/CPP/7zip/Compress/ArjDecoder2.h | |
parent | 9fd62353cf7f973d78cd2093328ac15b5c4980b6 (diff) |
Reorganize the tree, have better ifw.pri. Shadow build support.
Change-Id: I01fb12537f863ed0744979973c7e4153889cc5cb
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'src/libs/7zip/unix/CPP/7zip/Compress/ArjDecoder2.h')
-rw-r--r-- | src/libs/7zip/unix/CPP/7zip/Compress/ArjDecoder2.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/libs/7zip/unix/CPP/7zip/Compress/ArjDecoder2.h b/src/libs/7zip/unix/CPP/7zip/Compress/ArjDecoder2.h new file mode 100644 index 000000000..cf00975da --- /dev/null +++ b/src/libs/7zip/unix/CPP/7zip/Compress/ArjDecoder2.h @@ -0,0 +1,59 @@ +// ArjDecoder2.h + +#ifndef __COMPRESS_ARJ_DECODER2_H +#define __COMPRESS_ARJ_DECODER2_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +#include "../Common/InBuffer.h" + +#include "BitmDecoder.h" +#include "LzOutWindow.h" + +namespace NCompress { +namespace NArj { +namespace NDecoder2 { + +class CCoder : + public ICompressCoder, + public CMyUnknownImp +{ + CLzOutWindow m_OutWindowStream; + NBitm::CDecoder<CInBuffer> m_InBitStream; + + void ReleaseStreams() + { + m_OutWindowStream.ReleaseStream(); + m_InBitStream.ReleaseStream(); + } + + class CCoderReleaser + { + CCoder *m_Coder; + public: + bool NeedFlush; + CCoderReleaser(CCoder *coder): m_Coder(coder), NeedFlush(true) {} + ~CCoderReleaser() + { + if (NeedFlush) + m_Coder->m_OutWindowStream.Flush(); + m_Coder->ReleaseStreams(); + } + }; + friend class CCoderReleaser; + + HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); +public: + MY_UNKNOWN_IMP + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + +}; + +}}} + +#endif |