windows.storage.idl 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifdef __WIDL__
  7. #pragma winrt ns_prefix
  8. #endif
  9. import "inspectable.idl";
  10. import "eventtoken.idl";
  11. import "windows.foundation.idl";
  12. namespace Windows {
  13. namespace Foundation {
  14. interface IAsyncAction;
  15. //struct EventRegistrationToken;
  16. namespace Collections {
  17. interface IPropertySet;
  18. }
  19. }
  20. namespace Storage {
  21. interface IStorageItem;
  22. interface IStorageFolder;
  23. interface IApplicationData;
  24. interface IApplicationDataStatics;
  25. interface IApplicationDataSetVersionHandler;
  26. interface ApplicationDataContainer;
  27. // delegate ApplicationDataSetVersionHandler;
  28. interface ISetVersionRequest;
  29. interface ISetVersionDeferral;
  30. typedef enum StorageDeleteOption StorageDeleteOption;
  31. typedef enum NameCollisionOption NameCollisionOption;
  32. typedef enum StorageItemTypes StorageItemTypes;
  33. typedef enum ApplicationDataLocality ApplicationDataLocality;
  34. typedef enum ApplicationDataCreateDisposition ApplicationDataCreateDisposition;
  35. typedef enum FileAttributes FileAttributes;
  36. typedef enum CreationCollisionOption CreationCollisionOption;
  37. }
  38. }
  39. namespace Windows {
  40. namespace Storage {
  41. enum NameCollisionOption {
  42. GenerateUniqueName,
  43. ReplaceExisting,
  44. FailIfExists
  45. };
  46. enum StorageDeleteOption {
  47. Default,
  48. PermanentDelete
  49. };
  50. enum StorageItemTypes {
  51. None,
  52. File,
  53. Folder
  54. };
  55. enum ApplicationDataCreateDisposition {
  56. Always,
  57. Existing
  58. };
  59. enum ApplicationDataLocality {
  60. Local,
  61. Roaming,
  62. Temporary
  63. };
  64. enum FileAttributes {
  65. Normal,
  66. ReadOnly,
  67. Directory,
  68. Archive,
  69. Temporary
  70. };
  71. enum CreationCollisionOption {
  72. GenerateUniqueName,
  73. ReplaceExisting,
  74. FailIfExists,
  75. OpenIfExists
  76. };
  77. [uuid(4207A996-CA2F-42F7-BDE8-8B10457A7F30)]
  78. interface IStorageItem : IInspectable
  79. {
  80. HRESULT RenameAsyncOverloadDefaultOptions(HSTRING desiredName, /*IAsyncAction*/ IInspectable** action);
  81. HRESULT RenameAsync(HSTRING desiredName, NameCollisionOption option, /*IAsyncAction*/ IInspectable** action);
  82. HRESULT DeleteAsyncOverloadDefaultOptions(/*IAsyncAction*/ IInspectable** action);
  83. HRESULT DeleteAsync(StorageDeleteOption option, /*IAsyncAction*/ IInspectable** action);
  84. HRESULT GetBasicPropertiesAsync(/*IAsyncOperation<Windows.Storage.FileProperties.BasicProperties*>*/ IInspectable** action);
  85. [propget] HRESULT Name(HSTRING *value);
  86. [propget] HRESULT Path(HSTRING *value);
  87. [propget] HRESULT Attributes(FileAttributes* value);
  88. [propget] HRESULT DateCreated(Windows.Foundation.DateTime* value);
  89. HRESULT IsOfType(StorageItemTypes itemType, boolean* value);
  90. }
  91. [uuid(5A2A7520-4802-452D-9AD9-4351ADA7EC35)]
  92. interface IKnownFoldersStatics : IInspectable
  93. {
  94. [propget] HRESULT MusicLibrary(IStorageFolder** value);
  95. [propget] HRESULT PicturesLibrary(IStorageFolder** value);
  96. [propget] HRESULT VideosLibrary(IStorageFolder** value);
  97. [propget] HRESULT DocumentsLibrary(IStorageFolder** value);
  98. [propget] HRESULT HomeGroup(IStorageFolder** value);
  99. [propget] HRESULT RemovableDevices(IStorageFolder** value);
  100. [propget] HRESULT MediaServerDevices(IStorageFolder** value);
  101. }
  102. [uuid(72D1CB78-B3EF-4F75-A80B-6FD9DAE2944B)]
  103. interface IStorageFolder : IInspectable
  104. {
  105. HRESULT CreateFileAsyncOverloadDefaultOptions(HSTRING desiredName, /*IAsyncOperation<IStorageFile*>*/IInspectable** operation);
  106. HRESULT CreateFileAsync(HSTRING desiredName, CreationCollisionOption options, /*IAsyncOperation<IStorageFile*>*/IInspectable** operation);
  107. HRESULT CreateFolderAsyncOverloadDefaultOptions(HSTRING desiredName, /*IAsyncOperation<IStorageFolder*>*/IInspectable** operation);
  108. HRESULT CreateFolderAsync(HSTRING desiredName, CreationCollisionOption options, /*IAsyncOperation<StorageFolder*>*/IInspectable** operation);
  109. HRESULT GetFileAsync(HSTRING name, /*IAsyncOperation<StorageFile*>*/IInspectable** operation);
  110. HRESULT GetFolderAsync(HSTRING name, /*IAsyncOperation<StorageFolder*>*/IInspectable** operation);
  111. HRESULT GetItemAsync(HSTRING name, /*IAsyncOperation<StorageItem*>*/IInspectable** operation);
  112. HRESULT GetFilesAsyncOverloadDefaultOptionsStartAndCount(/*IAsyncOperation<IVectorView<StorageFile*>*>*/IInspectable** operation);
  113. HRESULT GetFoldersAsyncOverloadDefaultOptionsStartAndCount(/*IAsyncOperation<IVectorView<StorageFolder*>*>*/IInspectable** operation);
  114. HRESULT GetItemsAsyncOverloadDefaultStartAndCount(/*IAsyncOperation<IVectorView<StorageItem*>*>*/IInspectable** operation);
  115. }
  116. [uuid(C5AEFD1E-F467-40BA-8566-AB640A441E1D)]
  117. interface IApplicationDataContainer : IInspectable {
  118. [propget] HRESULT Name(HSTRING* value);
  119. [propget] HRESULT Locality(ApplicationDataLocality* value);
  120. [propget] HRESULT Values(/*IPropertySet*/IInspectable** value);
  121. [propget] HRESULT Containers(/*IMapView<HSTRING, ApplicationDataContainer*>*/IInspectable** value);
  122. HRESULT CreateContainer(HSTRING name, ApplicationDataCreateDisposition disposition, IApplicationDataContainer** container);
  123. HRESULT DeleteContainer([in] HSTRING name);
  124. }
  125. [uuid(C3DA6FB7-B744-4B45-B0B8-223A0938D0DC)]
  126. interface IApplicationData : IInspectable {
  127. [propget] HRESULT Version(int* value);
  128. HRESULT SetVersionAsync(int desiredVersion, IApplicationDataSetVersionHandler* handler, /*IAsyncAction*/ IInspectable** setVersionOperation);
  129. HRESULT ClearAllAsync(/*IAsyncAction*/ IInspectable** clearOperation);
  130. HRESULT ClearAsync(ApplicationDataLocality locality, /*IAsyncAction*/ IInspectable** clearOperation);
  131. [propget] HRESULT LocalSettings(IApplicationDataContainer** value);
  132. [propget] HRESULT RoamingSettings(IApplicationDataContainer** value);
  133. [propget] HRESULT LocalFolder(IStorageFolder** value);
  134. [propget] HRESULT RoamingFolder(IStorageFolder** value);
  135. [propget] HRESULT TemporaryFolder(IStorageFolder** value);
  136. // [eventadd] HRESULT DataChanged(/*TypedEventHandler<ApplicationData*, IInspectable*>*/IInspectable* handler, EventRegistrationToken* token);
  137. /* [eventremove] */ HRESULT DataChanged(Windows.Foundation.EventRegistrationToken token);
  138. HRESULT SignalDataChanged();
  139. HRESULT RoamingStorageQuota(UINT64* value);
  140. }
  141. [uuid(9E65CD69-0BA3-4E32-BE29-B02DE6607638)]
  142. interface IApplicationData2 : IInspectable {
  143. [propget] HRESULT LocalCacheFolder(IStorageFolder** value);
  144. }
  145. [uuid(5612147B-E843-45E3-94D8-06169E3C8E17)]
  146. interface IApplicationDataStatics : IInspectable {
  147. [propget] HRESULT Current(IApplicationData** data);
  148. }
  149. [uuid(A05791E6-CC9F-4687-ACAB-A364FD785463)]
  150. interface IApplicationDataSetVersionHandler : IUnknown {
  151. HRESULT Invoke(ISetVersionRequest* setVersionRequest);
  152. }
  153. [uuid(B9C76B9B-1056-4E69-8330-162619956F9B)]
  154. interface ISetVersionRequest : IInspectable {
  155. [propget] HRESULT CurrentVersion(UINT32* currentVersion);
  156. [propget] HRESULT DesiredVersion(UINT32* desiredVersion);
  157. HRESULT GetDeferral(ISetVersionDeferral** deferral);
  158. }
  159. [uuid(033508A2-781A-437A-B078-3F32BADCFE47)]
  160. interface ISetVersionDeferral : IInspectable {
  161. HRESULT Complete();
  162. }
  163. }
  164. }