windows.storage.streams.idl 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * Copyright 2021 Jactry Zeng for CodeWeavers
  3. *
  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.
  8. *
  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.
  13. *
  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
  17. */
  18. #ifdef __WIDL__
  19. #pragma winrt ns_prefix
  20. #endif
  21. import "inspectable.idl";
  22. import "eventtoken.idl";
  23. import "windows.foundation.idl";
  24. namespace Windows.Storage.Streams {
  25. interface IBuffer;
  26. interface IBufferFactory;
  27. interface IBufferStatics;
  28. interface IContentTypeProvider;
  29. interface IInputStream;
  30. interface IOutputStream;
  31. interface IRandomAccessStream;
  32. interface IRandomAccessStreamWithContentType;
  33. runtimeclass Buffer;
  34. [
  35. contract(Windows.Foundation.UniversalApiContract, 1.0),
  36. uuid(905a0fe0-bc53-11df-8c49-001e4fc686da)
  37. ]
  38. interface IBuffer : IInspectable
  39. {
  40. [propget] HRESULT Capacity([out, retval] UINT32 *value);
  41. [propget] HRESULT Length([out, retval] UINT32 *value);
  42. [propput] HRESULT Length([in] UINT32 value);
  43. }
  44. [
  45. contract(Windows.Foundation.UniversalApiContract, 1.0),
  46. exclusiveto(Windows.Storage.Streams.Buffer),
  47. uuid(71af914d-c10f-484b-bc50-14bc623b3a27)
  48. ]
  49. interface IBufferFactory : IInspectable
  50. {
  51. HRESULT Create([in, range(0x00000000, 0x7fffffff)] UINT32 capacity,
  52. [out, retval] Windows.Storage.Streams.Buffer **value);
  53. }
  54. [
  55. contract(Windows.Foundation.UniversalApiContract, 1.0),
  56. exclusiveto(Windows.Storage.Streams.Buffer),
  57. uuid(e901e65b-d716-475a-a90a-af7229b1e741)
  58. ]
  59. interface IBufferStatics : IInspectable
  60. {
  61. HRESULT CreateCopyFromMemoryBuffer([in] Windows.Foundation.IMemoryBuffer *input,
  62. [out, retval] Windows.Storage.Streams.Buffer **value);
  63. HRESULT CreateMemoryBufferOverIBuffer([in] Windows.Storage.Streams.IBuffer *input,
  64. [out, retval] Windows.Foundation.MemoryBuffer **value);
  65. }
  66. [
  67. uuid(cc254827-4b3d-438f-9232-10c76bc7e038),
  68. ]
  69. interface IRandomAccessStreamWithContentType : IInspectable
  70. requires
  71. Windows.Storage.Streams.IRandomAccessStream,
  72. Windows.Foundation.IClosable,
  73. Windows.Storage.Streams.IInputStream,
  74. Windows.Storage.Streams.IOutputStream,
  75. Windows.Storage.Streams.IContentTypeProvider
  76. {
  77. }
  78. [
  79. activatable(Windows.Storage.Streams.IBufferFactory, Windows.Foundation.UniversalApiContract, 1.0),
  80. contract(Windows.Foundation.UniversalApiContract, 1.0),
  81. marshaling_behavior(agile),
  82. static(Windows.Storage.Streams.IBufferStatics, Windows.Foundation.UniversalApiContract, 1.0),
  83. threading(both)
  84. ]
  85. runtimeclass Buffer
  86. {
  87. [default] interface Windows.Storage.Streams.IBuffer;
  88. }
  89. }