From: Ignacy Kuchciński <ignacykuchcinski@gmail.com> --- include/windows.storage.idl | 75 ++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/include/windows.storage.idl b/include/windows.storage.idl index 6f4aa6d803b..12af2350860 100644 --- a/include/windows.storage.idl +++ b/include/windows.storage.idl @@ -49,6 +49,7 @@ namespace Windows.Storage { typedef enum NameCollisionOption NameCollisionOption; typedef enum StorageDeleteOption StorageDeleteOption; typedef enum StorageItemTypes StorageItemTypes; + typedef enum StreamedFileFailureMode StreamedFileFailureMode; interface IApplicationData; interface IApplicationData2; @@ -71,12 +72,14 @@ namespace Windows.Storage { interface IStorageFolderStatics; interface IStorageFolderStatics2; interface IStorageItem; + interface IStreamedFileDataRequest; runtimeclass ApplicationData; runtimeclass ApplicationDataContainer; runtimeclass KnownFolders; runtimeclass SetVersionDeferral; runtimeclass SetVersionRequest; + runtimeclass StreamedFileDataRequest; runtimeclass StorageFolder; runtimeclass StorageFile; runtimeclass StorageStreamTransaction; @@ -242,6 +245,16 @@ namespace Windows.Storage { File = 0x1, Folder = 0x2, }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum StreamedFileFailureMode + { + Failed = 0, + CurrentlyUnavailable = 1, + Incomplete = 2 + }; #endif [ @@ -250,6 +263,12 @@ namespace Windows.Storage { ] delegate HRESULT ApplicationDataSetVersionHandler([in] Windows.Storage.SetVersionRequest *version); + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(fef6a824-2fe1-4d07-a35b-b77c50b5f4cc) + ] + delegate HRESULT StreamedFileDataRequestedHandler([in] Windows.Storage.StreamedFileDataRequest *stream); + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Storage.ApplicationData), @@ -474,6 +493,15 @@ namespace Windows.Storage { HRESULT GetDeferral([out, retval] Windows.Storage.SetVersionDeferral **deferral); } + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(1673fcce-dabd-4d50-beee-180b8a8191b6) + ] + interface IStreamedFileDataRequest : IInspectable + { + HRESULT FailAndClose([in] Windows.Storage.StreamedFileFailureMode failureMode); + } + #ifndef _WINDOWS_APPLICATIONDATA [ contract(Windows.Foundation.UniversalApiContract, 1.0), @@ -526,6 +554,41 @@ namespace Windows.Storage { HRESULT MoveAndReplaceAsync([in] Windows.Storage.IStorageFile *file, [out, retval] Windows.Foundation.IAsyncAction **operation); } + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Storage.StorageFile), + uuid(5984c710-daf2-43c8-8bb4-a4d3eacfd03f) + ] + interface IStorageFileStatics : IInspectable + { + HRESULT GetFileFromPathAsync( + [in] HSTRING path, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *> **operation); + HRESULT GetFileFromApplicationUriAsync( + [in] Windows.Foundation.Uri *uri, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *> **operation); + HRESULT CreateStreamedFileAsync( + [in] HSTRING display_name_with_extensions, + [in] Windows.Storage.StreamedFileDataRequestedHandler *data_requested, + [in] Windows.Storage.Streams.IRandomAccessStreamReference *thumbnail, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *> **operation); + HRESULT ReplaceWithStreamedFileAsync( + [in] Windows.Storage.IStorageFile *file_to_replace, + [in] Windows.Storage.StreamedFileDataRequestedHandler *data_requested, + [in] Windows.Storage.Streams.IRandomAccessStreamReference *thumbnail, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *> **operation); + HRESULT CreateStreamedFileFromUriAsync( + [in] HSTRING display_name_with_extension, + [in] Windows.Foundation.Uri *uri, + [in] Windows.Storage.Streams.IRandomAccessStreamReference *thumbnail, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *> **operation); + HRESULT ReplaceWithStreamedFileFromUriAsync( + [in] Windows.Storage.IStorageFile *file_to_replace, + [in] Windows.Foundation.Uri *uri, + [in] Windows.Storage.Streams.IRandomAccessStreamReference *thumbnail, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *> **operation); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), uuid(72d1cb78-b3ef-4f75-a80b-6fd9dae2944b) @@ -668,7 +731,17 @@ namespace Windows.Storage { [ contract(Windows.Foundation.UniversalApiContract, 1.0), - /* static(Windows.Storage.IStorageFileStatics, Windows.Foundation.UniversalApiContract, 1.0), */ + ] + runtimeclass StreamedFileDataRequest + { + [default] interface Windows.Storage.Streams.IOutputStream; + interface Windows.Foundation.IClosable; + interface Windows.Storage.IStreamedFileDataRequest; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.Storage.IStorageFileStatics, Windows.Foundation.UniversalApiContract, 1.0), /* static(Windows.Storage.IStorageFileStatics2, Windows.Foundation.UniversalApiContract, 10.0) */ ] runtimeclass StorageFile -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8394