Biswapriyo Nath : include: Add Windows.Storage.Streams.Buffer runtimeclass declaration.

Alexandre Julliard julliard at winehq.org
Thu Apr 28 16:15:32 CDT 2022


Module: wine
Branch: master
Commit: 842115bbb874f7a2d3c8e8db2430fa3b1b8f16a1
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=842115bbb874f7a2d3c8e8db2430fa3b1b8f16a1

Author: Biswapriyo Nath <nathbappai at gmail.com>
Date:   Thu Apr 28 14:20:35 2022 +0200

include: Add Windows.Storage.Streams.Buffer runtimeclass declaration.

Signed-off-by: Biswapriyo Nath <nathbappai at gmail.com>
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/windows.storage.streams.idl | 51 +++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/include/windows.storage.streams.idl b/include/windows.storage.streams.idl
index ba58e74687d..bb107b25976 100644
--- a/include/windows.storage.streams.idl
+++ b/include/windows.storage.streams.idl
@@ -25,11 +25,50 @@ import "eventtoken.idl";
 import "windows.foundation.idl";
 
 namespace Windows.Storage.Streams {
+    interface IBuffer;
+    interface IBufferFactory;
+    interface IBufferStatics;
     interface IContentTypeProvider;
     interface IInputStream;
     interface IOutputStream;
     interface IRandomAccessStream;
     interface IRandomAccessStreamWithContentType;
+    runtimeclass Buffer;
+
+    [
+        contract(Windows.Foundation.UniversalApiContract, 1.0),
+        uuid(905a0fe0-bc53-11df-8c49-001e4fc686da)
+    ]
+    interface IBuffer : IInspectable
+    {
+        [propget] HRESULT Capacity([out, retval] UINT32 *value);
+        [propget] HRESULT Length([out, retval] UINT32 *value);
+        [propput] HRESULT Length([in] UINT32 value);
+    }
+
+    [
+        contract(Windows.Foundation.UniversalApiContract, 1.0),
+        exclusiveto(Windows.Storage.Streams.Buffer),
+        uuid(71af914d-c10f-484b-bc50-14bc623b3a27)
+    ]
+    interface IBufferFactory : IInspectable
+    {
+        HRESULT Create([in, range(0x00000000, 0x7fffffff)] UINT32 capacity,
+                       [out, retval] Windows.Storage.Streams.Buffer **value);
+    }
+
+    [
+        contract(Windows.Foundation.UniversalApiContract, 1.0),
+        exclusiveto(Windows.Storage.Streams.Buffer),
+        uuid(e901e65b-d716-475a-a90a-af7229b1e741)
+    ]
+    interface IBufferStatics : IInspectable
+    {
+        HRESULT CreateCopyFromMemoryBuffer([in] Windows.Foundation.IMemoryBuffer *input,
+                                           [out, retval] Windows.Storage.Streams.Buffer **value);
+        HRESULT CreateMemoryBufferOverIBuffer([in] Windows.Storage.Streams.IBuffer *input,
+                                              [out, retval] Windows.Foundation.MemoryBuffer **value);
+    }
 
     [
         uuid(cc254827-4b3d-438f-9232-10c76bc7e038),
@@ -43,4 +82,16 @@ namespace Windows.Storage.Streams {
             Windows.Storage.Streams.IContentTypeProvider
     {
     }
+
+    [
+        activatable(Windows.Storage.Streams.IBufferFactory, Windows.Foundation.UniversalApiContract, 1.0),
+        contract(Windows.Foundation.UniversalApiContract, 1.0),
+        marshaling_behavior(agile),
+        static(Windows.Storage.Streams.IBufferStatics, Windows.Foundation.UniversalApiContract, 1.0),
+        threading(both)
+    ]
+    runtimeclass Buffer
+    {
+        [default] interface Windows.Storage.Streams.IBuffer;
+    }
 }




More information about the wine-cvs mailing list