Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: third_party/lzma/v4_65/files/CPP/7zip/Archive/Common/MultiStream.h

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // MultiStream.h
2
3 #ifndef __MULTISTREAM_H
4 #define __MULTISTREAM_H
5
6 #include "../../../Common/MyCom.h"
7 #include "../../../Common/MyVector.h"
8 #include "../../Archive/IArchive.h"
9
10 class CMultiStream:
11 public IInStream,
12 public CMyUnknownImp
13 {
14 int _streamIndex;
15 UInt64 _pos;
16 UInt64 _seekPos;
17 UInt64 _totalLength;
18 public:
19 struct CSubStreamInfo
20 {
21 CMyComPtr<IInStream> Stream;
22 UInt64 Pos;
23 UInt64 Size;
24 };
25 CObjectVector<CSubStreamInfo> Streams;
26 void Init()
27 {
28 _streamIndex = 0;
29 _pos = 0;
30 _seekPos = 0;
31 _totalLength = 0;
32 for (int i = 0; i < Streams.Size(); i++)
33 _totalLength += Streams[i].Size;
34 }
35
36 MY_UNKNOWN_IMP1(IInStream)
37
38 STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
39 STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
40 };
41
42 /*
43 class COutMultiStream:
44 public IOutStream,
45 public CMyUnknownImp
46 {
47 int _streamIndex; // required stream
48 UInt64 _offsetPos; // offset from start of _streamIndex index
49 UInt64 _absPos;
50 UInt64 _length;
51
52 struct CSubStreamInfo
53 {
54 CMyComPtr<ISequentialOutStream> Stream;
55 UInt64 Size;
56 UInt64 Pos;
57 };
58 CObjectVector<CSubStreamInfo> Streams;
59 public:
60 CMyComPtr<IArchiveUpdateCallback2> VolumeCallback;
61 void Init()
62 {
63 _streamIndex = 0;
64 _offsetPos = 0;
65 _absPos = 0;
66 _length = 0;
67 }
68
69 MY_UNKNOWN_IMP1(IOutStream)
70
71 STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
72 STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
73 };
74 */
75
76 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698