[PATCH] include: Add Windows.Storage.Streams.Buffer runtimeclass declaration.

Biswapriyo Nath nathbappai at gmail.com
Mon Apr 25 23:05:07 CDT 2022


-------------- next part --------------
From 65a91ebaa376565318d3d4168c16ef24161cedc9 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbappai at gmail.com>
Date: Tue, 26 Apr 2022 09:34:12 +0530
Subject: [PATCH] include: Add Windows.Storage.Streams.Buffer runtimeclass declaration.

Signed-off-by: Biswapriyo Nath <nathbappai at gmail.com>
---
 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 59b1576..5e92ce9 100644
--- a/include/windows.storage.streams.idl
+++ b/include/windows.storage.streams.idl
@@ -38,11 +38,15 @@ namespace Windows
     {
         namespace Streams
         {
+            interface IBuffer;
+            interface IBufferFactory;
+            interface IBufferStatics;
             interface IContentTypeProvider;
             interface IInputStream;
             interface IOutputStream;
             interface IRandomAccessStream;
             interface IRandomAccessStreamWithContentType;
+            runtimeclass Buffer;
         }
     }
 }
@@ -53,6 +57,41 @@ namespace Windows
     {
         namespace Streams
         {
+            [
+                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),
             ]
@@ -65,6 +104,18 @@ namespace Windows
                     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;
+            }
         }
     }
 }
-- 
2.35.3



More information about the wine-devel mailing list