From: Biswapriyo Nath nathbappai@gmail.com
--- include/windows.storage.idl | 162 ++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+)
diff --git a/include/windows.storage.idl b/include/windows.storage.idl index 717460a0817..debd0f2a03a 100644 --- a/include/windows.storage.idl +++ b/include/windows.storage.idl @@ -35,10 +35,19 @@ namespace Windows.Storage { typedef enum CreationCollisionOption CreationCollisionOption; typedef enum FileAccessMode FileAccessMode; typedef enum FileAttributes FileAttributes; + typedef enum KnownFolderId KnownFolderId; + typedef enum KnownFoldersAccessStatus KnownFoldersAccessStatus; typedef enum NameCollisionOption NameCollisionOption; typedef enum StorageDeleteOption StorageDeleteOption; typedef enum StorageItemTypes StorageItemTypes;
+ interface IKnownFoldersCameraRollStatics; + interface IKnownFoldersPlaylistsStatics; + interface IKnownFoldersSavedPicturesStatics; + interface IKnownFoldersStatics; + interface IKnownFoldersStatics2; + interface IKnownFoldersStatics3; + interface IKnownFoldersStatics4; interface IStorageFolder; interface IStorageFolderStatics; interface IStorageFolderStatics2; @@ -46,6 +55,7 @@ namespace Windows.Storage { interface IStorageFileStatics2; interface IStorageItem;
+ runtimeclass KnownFolders; runtimeclass StorageFolder; runtimeclass StorageFile; runtimeclass StorageStreamTransaction; @@ -57,6 +67,7 @@ namespace Windows.Storage { interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IVectorView<Windows.Storage.IStorageItem *> *>; interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFile *> *>; interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFolder *> *>; + interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.KnownFoldersAccessStatus>; interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.IStorageItem *>; interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.StorageFile *>; interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.StorageFolder *>; @@ -64,6 +75,7 @@ namespace Windows.Storage { interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.IStorageItem *> *>; interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFile *> *>; interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFolder *> *>; + interface Windows.Foundation.IAsyncOperation<Windows.Storage.KnownFoldersAccessStatus>; interface Windows.Foundation.IAsyncOperation<Windows.Storage.IStorageItem *>; interface Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *>; interface Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFolder *>; @@ -105,6 +117,47 @@ namespace Windows.Storage { LocallyIncomplete = 0x200, };
+ [ + contract(Windows.Foundation.UniversalApiContract, 2.0) + ] + enum KnownFolderId + { + AppCaptures = 0, + CameraRoll = 1, + DocumentsLibrary = 2, + HomeGroup = 3, + MediaServerDevices = 4, + MusicLibrary = 5, + Objects3D = 6, + PicturesLibrary = 7, + Playlists = 8, + RecordedCalls = 9, + RemovableDevices = 10, + SavedPictures = 11, + Screenshots = 12, + VideosLibrary = 13, + [contract(Windows.Foundation.UniversalApiContract, 4.0)] + AllAppMods = 14, + [contract(Windows.Foundation.UniversalApiContract, 4.0)] + CurrentAppMods = 15, + [contract(Windows.Foundation.UniversalApiContract, 11.0)] + DownloadsFolder = 16, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 10.0) + ] + enum KnownFoldersAccessStatus + { + DeniedBySystem = 0, + NotDeclaredByApp = 1, + DeniedByUser = 2, + UserPromptRequired = 3, + Allowed = 4, + [contract(Windows.Foundation.UniversalApiContract, 11.0)] + AllowedPerAppFolder = 5, + }; + [ contract(Windows.Foundation.UniversalApiContract, 1.0) ] @@ -135,6 +188,100 @@ namespace Windows.Storage { Folder = 0x2, };
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Storage.KnownFolders), + uuid(5d115e66-27e8-492f-b8e5-2f90896cd4cd) + ] + interface IKnownFoldersCameraRollStatics : IInspectable + { + [propget] HRESULT CameraRoll([out, retval] Windows.Storage.StorageFolder **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Storage.KnownFolders), + uuid(dad5ecd6-306f-4d6a-b496-46ba8eb106ce) + ] + interface IKnownFoldersPlaylistsStatics : IInspectable + { + [propget] HRESULT Playlists([out, retval] Windows.Storage.StorageFolder **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Storage.KnownFolders), + uuid(055c93ea-253d-467c-b6ca-a97da1e9a18d) + ] + interface IKnownFoldersSavedPicturesStatics : IInspectable + { + [propget] HRESULT SavedPictures([out, retval] Windows.Storage.StorageFolder **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Storage.KnownFolders), + uuid(5a2a7520-4802-452d-9ad9-4351ada7ec35) + ] + interface IKnownFoldersStatics : IInspectable + { + [propget] HRESULT MusicLibrary([out, retval] Windows.Storage.StorageFolder **value); + [propget] HRESULT PicturesLibrary([out, retval] Windows.Storage.StorageFolder **value); + [propget] HRESULT VideosLibrary([out, retval] Windows.Storage.StorageFolder **value); + [propget] HRESULT DocumentsLibrary([out, retval] Windows.Storage.StorageFolder **value); + [propget] HRESULT HomeGroup([out, retval] Windows.Storage.StorageFolder **value); + [propget] HRESULT RemovableDevices([out, retval] Windows.Storage.StorageFolder **value); + [propget] HRESULT MediaServerDevices([out, retval] Windows.Storage.StorageFolder **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Storage.KnownFolders), + uuid(194bd0cd-cf6e-4d07-9d53-e9163a2536e9) + ] + interface IKnownFoldersStatics2 : IInspectable + { + [propget] HRESULT Objects3D([out, retval] Windows.Storage.StorageFolder **value); + [propget] HRESULT AppCaptures([out, retval] Windows.Storage.StorageFolder **value); + [propget] HRESULT RecordedCalls([out, retval] Windows.Storage.StorageFolder **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + exclusiveto(Windows.Storage.KnownFolders), + uuid(c5194341-9742-4ed5-823d-fc1401148764) + ] + interface IKnownFoldersStatics3 : IInspectable + { + HRESULT GetFolderForUserAsync( + [in] Windows.System.User *user, + [in] Windows.Storage.KnownFolderId folder_id, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFolder *> **operation + ); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 10.0), + exclusiveto(Windows.Storage.KnownFolders), + uuid(1722e6bf-9ff9-4b21-bed5-90ecb13a192e) + ] + interface IKnownFoldersStatics4 : IInspectable + { + HRESULT RequestAccessAsync( + [in] Windows.Storage.KnownFolderId folder_id, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.KnownFoldersAccessStatus> **operation + ); + HRESULT RequestAccessForUserAsync( + [in] Windows.System.User *user, + [in] Windows.Storage.KnownFolderId folder_id, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.KnownFoldersAccessStatus> **operation + ); + HRESULT GetFolderAsync( + [in] Windows.Storage.KnownFolderId folder_id, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFolder *> **operation + ); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), uuid(fa3f6186-4214-428c-a64c-14c9ac7315ea) @@ -266,6 +413,21 @@ namespace Windows.Storage { HRESULT CommitAsync([out, retval] Windows.Foundation.IAsyncAction **operation); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + static(Windows.Storage.IKnownFoldersCameraRollStatics, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.Storage.IKnownFoldersPlaylistsStatics, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.Storage.IKnownFoldersSavedPicturesStatics, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.Storage.IKnownFoldersStatics, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.Storage.IKnownFoldersStatics2, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.Storage.IKnownFoldersStatics3, Windows.Foundation.UniversalApiContract, 2.0), + static(Windows.Storage.IKnownFoldersStatics4, Windows.Foundation.UniversalApiContract, 10.0) + ] + runtimeclass KnownFolders + { + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), static(Windows.Storage.IStorageFileStatics, Windows.Foundation.UniversalApiContract, 1.0),