2 * Copyright 2021 Jactry Zeng for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #pragma winrt ns_prefix
23 import
"inspectable.idl";
24 import
"eventtoken.idl";
25 import
"windows.foundation.idl";
27 namespace Windows.Storage.Streams
{
29 interface IBufferFactory
;
30 interface IBufferStatics
;
31 interface IContentTypeProvider
;
32 interface IInputStream
;
33 interface IInputStreamReference
;
34 interface IOutputStream
;
35 interface IRandomAccessStream
;
36 interface IRandomAccessStreamReference
;
37 interface IRandomAccessStreamReferenceStatics
;
38 interface IRandomAccessStreamStatics
;
39 interface IRandomAccessStreamWithContentType
;
41 runtimeclass RandomAccessStream
;
42 runtimeclass RandomAccessStreamReference
;
45 interface Windows.Foundation.Collections.IIterable
<Windows.Storage.Streams.IRandomAccessStream
*>;
46 interface Windows.Foundation.Collections.IIterator
<Windows.Storage.Streams.IRandomAccessStream
*>;
47 interface Windows.Foundation.Collections.IVectorView
<Windows.Storage.Streams.IRandomAccessStream
*>;
48 interface Windows.Foundation.Collections.IVector
<Windows.Storage.Streams.IRandomAccessStream
*>;
49 interface Windows.Foundation.AsyncOperationCompletedHandler
<Windows.Storage.Streams.IBuffer
*>;
50 interface Windows.Foundation.AsyncOperationCompletedHandler
<Windows.Storage.Streams.IRandomAccessStream
*>;
51 interface Windows.Foundation.IAsyncOperation
<Windows.Storage.Streams.IBuffer
*>;
52 interface Windows.Foundation.IAsyncOperation
<Windows.Storage.Streams.IRandomAccessStream
*>;
56 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
57 uuid(905a0fe0
-bc53
-11df
-8c49
-001e4fc686da
)
59 interface IBuffer
: IInspectable
61 [propget] HRESULT Capacity
([out, retval] UINT32
*value
);
62 [propget] HRESULT Length
([out, retval] UINT32
*value
);
63 [propput] HRESULT Length
([in] UINT32 value
);
67 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
68 exclusiveto
(Windows.Storage.Streams.Buffer
),
69 uuid(71af914d
-c10f
-484b
-bc50
-14bc623b3a27
)
71 interface IBufferFactory
: IInspectable
73 HRESULT Create
([in, range(0x00000000, 0x7fffffff)] UINT32 capacity
,
74 [out, retval] Windows.Storage.Streams.Buffer
**value
);
78 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
79 exclusiveto
(Windows.Storage.Streams.Buffer
),
80 uuid(e901e65b
-d716
-475a
-a90a
-af7229b1e741
)
82 interface IBufferStatics
: IInspectable
84 HRESULT CreateCopyFromMemoryBuffer
([in] Windows.Foundation.IMemoryBuffer
*input
,
85 [out, retval] Windows.Storage.Streams.Buffer
**value
);
86 HRESULT CreateMemoryBufferOverIBuffer
([in] Windows.Storage.Streams.IBuffer
*input
,
87 [out, retval] Windows.Foundation.MemoryBuffer
**value
);
91 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
92 uuid(905a0fe1
-bc53
-11df
-8c49
-001e4fc686da
),
94 interface IRandomAccessStream
: IInspectable
95 requires Windows.Foundation.IClosable
,
96 Windows.Storage.Streams.IInputStream
,
97 Windows.Storage.Streams.IOutputStream
99 [propget] HRESULT Size
([out, retval] UINT64
*value
);
100 [propput] HRESULT Size
([in] UINT64 value
);
101 HRESULT GetInputStreamAt
([in] UINT64 position
, [out, retval] Windows.Storage.Streams.IInputStream
**stream
);
102 HRESULT GetOutputStreamAt
([in] UINT64 position
, [out, retval] Windows.Storage.Streams.IOutputStream
**stream
);
103 [propget] HRESULT Position
([out, retval] UINT64
*value
);
104 HRESULT Seek
([in] UINT64 position
);
105 HRESULT CloneStream
([out, retval] Windows.Storage.Streams.IRandomAccessStream
**stream
);
106 [propget] HRESULT CanRead
([out, retval] boolean *value
);
107 [propget] HRESULT CanWrite
([out, retval] boolean *value
);
111 uuid(cc254827
-4b3d
-438f
-9232-10c76bc7e038
),
113 interface IRandomAccessStreamWithContentType
: IInspectable
115 Windows.Storage.Streams.IRandomAccessStream
,
116 Windows.Foundation.IClosable
,
117 Windows.Storage.Streams.IInputStream
,
118 Windows.Storage.Streams.IOutputStream
,
119 Windows.Storage.Streams.IContentTypeProvider
124 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
125 marshaling_behavior
(agile
),
126 static
(Windows.Storage.Streams.IRandomAccessStreamStatics
, Windows.Foundation.UniversalApiContract
, 1.0)
128 runtimeclass RandomAccessStream
133 activatable
(Windows.Storage.Streams.IBufferFactory
, Windows.Foundation.UniversalApiContract
, 1.0),
134 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
135 marshaling_behavior
(agile
),
136 static
(Windows.Storage.Streams.IBufferStatics
, Windows.Foundation.UniversalApiContract
, 1.0),
141 [default] interface Windows.Storage.Streams.IBuffer
;
145 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
146 marshaling_behavior
(agile
),
147 static
(Windows.Storage.Streams.IRandomAccessStreamReferenceStatics
, Windows.Foundation.UniversalApiContract
, 1.0)
149 runtimeclass RandomAccessStreamReference
151 [default] interface Windows.Storage.Streams.IRandomAccessStreamReference
;