Annotation of elwix/tools/oldlzma/SRC/7zip/IStream.h, revision 1.1.1.1
1.1 misho 1: // IStream.h
2:
3: #ifndef __ISTREAMS_H
4: #define __ISTREAMS_H
5:
6: #include "../Common/MyUnknown.h"
7: #include "../Common/Types.h"
8:
9: // {23170F69-40C1-278A-0000-000000010000}
10: DEFINE_GUID(IID_ISequentialInStream,
11: 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00);
12: MIDL_INTERFACE("23170F69-40C1-278A-0000-000000010000")
13: ISequentialInStream : public IUnknown
14: {
15: public:
16: STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize) = 0;
17: STDMETHOD(ReadPart)(void *data, UInt32 size, UInt32 *processedSize) = 0;
18:
19: // For both functions Out: if (*processedSize == 0) then
20: // there are no more bytes in stream.
21: // Read function always tries to read "size" bytes from stream. It
22: // can read less only if it reaches end of stream.
23: // ReadPart function can read X bytes: (0<=X<="size") and X can
24: // be less than number of remaining bytes in stream.
25: };
26:
27: // {23170F69-40C1-278A-0000-000000020000}
28: DEFINE_GUID(IID_ISequentialOutStream,
29: 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00);
30: MIDL_INTERFACE("23170F69-40C1-278A-0000-000000020000")
31: ISequentialOutStream : public IUnknown
32: {
33: public:
34: STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize) = 0;
35: STDMETHOD(WritePart)(const void *data, UInt32 size, UInt32 *processedSize) = 0;
36: };
37:
38: // {23170F69-40C1-278A-0000-000000030000}
39: DEFINE_GUID(IID_IInStream,
40: 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00);
41: MIDL_INTERFACE("23170F69-40C1-278A-0000-000000030000")
42: IInStream : public ISequentialInStream
43: {
44: public:
45: STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) = 0;
46: };
47:
48: // {23170F69-40C1-278A-0000-000000040000}
49: DEFINE_GUID(IID_IOutStream,
50: 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00);
51: MIDL_INTERFACE("23170F69-40C1-278A-0000-000000040000")
52: IOutStream : public ISequentialOutStream
53: {
54: public:
55: STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) = 0;
56: STDMETHOD(SetSize)(Int64 newSize) = 0;
57: };
58:
59: // {23170F69-40C1-278A-0000-000000060000}
60: DEFINE_GUID(IID_IStreamGetSize,
61: 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00);
62: MIDL_INTERFACE("23170F69-40C1-278A-0000-000000060000")
63: IStreamGetSize : public IUnknown
64: {
65: public:
66: STDMETHOD(GetSize)(UInt64 *size) = 0;
67: };
68:
69: // {23170F69-40C1-278A-0000-000000070000}
70: DEFINE_GUID(IID_IOutStreamFlush,
71: 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00);
72: MIDL_INTERFACE("23170F69-40C1-278A-0000-000000070000")
73: IOutStreamFlush : public IUnknown
74: {
75: public:
76: STDMETHOD(Flush)() = 0;
77: };
78:
79: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>