Debian Codegraph @

mingw-w64-headers/include/windows.storage.idl

raw
1 /*
2 * Copyright 2023 Hans Leidekker 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
19 #ifdef __WIDL__
20 #pragma makedep header install winmd
21 #pragma winrt ns_prefix
22 #endif
23
24 #ifndef DO_NO_IMPORTS
25 import "inspectable.idl";
26 import "asyncinfo.idl";
27 import "eventtoken.idl";
28 import "windowscontracts.idl";
29 import "windows.foundation.idl";
30 import "windows.storage.fileproperties.idl";
31 /* import "windows.storage.provider.idl"; */
32 import "windows.storage.search.idl";
33 import "windows.storage.streams.idl";
34 import "windows.system.idl";
35 #endif
36
37 namespace Windows.System {
38 runtimeclass User;
39 }
40
41 namespace Windows.Storage {
42 typedef enum ApplicationDataCreateDisposition ApplicationDataCreateDisposition;
43 typedef enum ApplicationDataLocality ApplicationDataLocality;
44 typedef enum CreationCollisionOption CreationCollisionOption;
45 typedef enum FileAccessMode FileAccessMode;
46 typedef enum FileAttributes FileAttributes;
47 typedef enum KnownFolderId KnownFolderId;
48 typedef enum KnownFoldersAccessStatus KnownFoldersAccessStatus;
49 typedef enum NameCollisionOption NameCollisionOption;
50 typedef enum StorageDeleteOption StorageDeleteOption;
51 typedef enum StorageItemTypes StorageItemTypes;
52
53 interface IApplicationData;
54 interface IApplicationData2;
55 interface IApplicationData3;
56 interface IApplicationDataContainer;
57 interface IApplicationDataStatics;
58 interface IApplicationDataStatics2;
59 interface IKnownFoldersCameraRollStatics;
60 interface IKnownFoldersPlaylistsStatics;
61 interface IKnownFoldersSavedPicturesStatics;
62 interface IKnownFoldersStatics;
63 interface IKnownFoldersStatics2;
64 interface IKnownFoldersStatics3;
65 interface IKnownFoldersStatics4;
66 interface ISetVersionDeferral;
67 interface ISetVersionRequest;
68 interface IStorageFileStatics;
69 interface IStorageFileStatics2;
70 interface IStorageFolder;
71 interface IStorageFolderStatics;
72 interface IStorageFolderStatics2;
73 interface IStorageItem;
74
75 runtimeclass ApplicationData;
76 runtimeclass ApplicationDataContainer;
77 runtimeclass KnownFolders;
78 runtimeclass SetVersionDeferral;
79 runtimeclass SetVersionRequest;
80 runtimeclass StorageFolder;
81 runtimeclass StorageFile;
82 runtimeclass StorageStreamTransaction;
83
84 declare {
85 interface Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Storage.ApplicationDataContainer *>;
86 interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Storage.ApplicationDataContainer *> *>;
87 interface Windows.Foundation.Collections.IIterator<Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Storage.ApplicationDataContainer *> *>;
88 interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Storage.ApplicationDataContainer *>;
89 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.ApplicationData *>;
90 interface Windows.Foundation.IAsyncOperation<Windows.Storage.ApplicationData *>;
91 interface Windows.Foundation.TypedEventHandler<Windows.Storage.ApplicationData *, IInspectable *>;
92 #ifndef _WINDOWS_APPLICATIONDATA
93 interface Windows.Foundation.Collections.IIterable<Windows.Storage.IStorageItem *>;
94 interface Windows.Foundation.Collections.IIterator<Windows.Storage.IStorageItem *>;
95 interface Windows.Foundation.Collections.IVectorView<Windows.Storage.IStorageItem *>;
96 interface Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFile *>;
97 interface Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFolder *>;
98 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IVectorView<Windows.Storage.IStorageItem *> *>;
99 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFile *> *>;
100 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFolder *> *>;
101 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.KnownFoldersAccessStatus>;
102 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.IStorageItem *>;
103 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.StorageFile *>;
104 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.StorageFolder *>;
105 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.StorageStreamTransaction *>;
106 interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.IStorageItem *> *>;
107 interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFile *> *>;
108 interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFolder *> *>;
109 interface Windows.Foundation.IAsyncOperation<Windows.Storage.KnownFoldersAccessStatus>;
110 interface Windows.Foundation.IAsyncOperation<Windows.Storage.IStorageItem *>;
111 interface Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *>;
112 interface Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFolder *>;
113 interface Windows.Foundation.IAsyncOperation<Windows.Storage.StorageStreamTransaction *>;
114 #endif
115 }
116
117 [
118 contract(Windows.Foundation.UniversalApiContract, 1.0)
119 ]
120 enum ApplicationDataCreateDisposition
121 {
122 Always = 0,
123 Existing = 1,
124 };
125
126 [
127 contract(Windows.Foundation.UniversalApiContract, 1.0)
128 ]
129 enum ApplicationDataLocality
130 {
131 Local = 0,
132 Roaming = 1,
133 Temporary = 2,
134 LocalCache = 3,
135 [contract(Windows.Foundation.UniversalApiContract, 12.0)]
136 SharedLocal = 4,
137 };
138
139 #ifndef _WINDOWS_APPLICATIONDATA
140 [
141 contract(Windows.Foundation.UniversalApiContract, 1.0)
142 ]
143 enum CreationCollisionOption
144 {
145 GenerateUniqueName = 0,
146 ReplaceExisting = 1,
147 FailIfExists = 2,
148 OpenIfExists = 3,
149 };
150
151 [
152 contract(Windows.Foundation.UniversalApiContract, 1.0)
153 ]
154 enum FileAccessMode
155 {
156 Read = 0,
157 ReadWrite = 1,
158 };
159
160 [
161 contract(Windows.Foundation.UniversalApiContract, 1.0),
162 flags
163 ]
164 enum FileAttributes
165 {
166 Normal = 0x0,
167 ReadOnly = 0x1,
168 Directory = 0x10,
169 Archive = 0x20,
170 Temporary = 0x100,
171 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
172 LocallyIncomplete = 0x200,
173 };
174
175 [
176 contract(Windows.Foundation.UniversalApiContract, 2.0)
177 ]
178 enum KnownFolderId
179 {
180 AppCaptures = 0,
181 CameraRoll = 1,
182 DocumentsLibrary = 2,
183 HomeGroup = 3,
184 MediaServerDevices = 4,
185 MusicLibrary = 5,
186 Objects3D = 6,
187 PicturesLibrary = 7,
188 Playlists = 8,
189 RecordedCalls = 9,
190 RemovableDevices = 10,
191 SavedPictures = 11,
192 Screenshots = 12,
193 VideosLibrary = 13,
194 [contract(Windows.Foundation.UniversalApiContract, 4.0)]
195 AllAppMods = 14,
196 [contract(Windows.Foundation.UniversalApiContract, 4.0)]
197 CurrentAppMods = 15,
198 [contract(Windows.Foundation.UniversalApiContract, 11.0)]
199 DownloadsFolder = 16,
200 };
201
202 [
203 contract(Windows.Foundation.UniversalApiContract, 10.0)
204 ]
205 enum KnownFoldersAccessStatus
206 {
207 DeniedBySystem = 0,
208 NotDeclaredByApp = 1,
209 DeniedByUser = 2,
210 UserPromptRequired = 3,
211 Allowed = 4,
212 [contract(Windows.Foundation.UniversalApiContract, 11.0)]
213 AllowedPerAppFolder = 5,
214 };
215
216 [
217 contract(Windows.Foundation.UniversalApiContract, 1.0)
218 ]
219 enum NameCollisionOption
220 {
221 GenerateUniqueName = 0,
222 ReplaceExisting = 1,
223 FailIfExists = 2,
224 };
225
226 [
227 contract(Windows.Foundation.UniversalApiContract, 1.0)
228 ]
229 enum StorageDeleteOption
230 {
231 Default = 0,
232 PermanentDelete = 1,
233 };
234
235 [
236 contract(Windows.Foundation.UniversalApiContract, 1.0),
237 flags
238 ]
239 enum StorageItemTypes
240 {
241 None = 0x0,
242 File = 0x1,
243 Folder = 0x2,
244 };
245 #endif
246
247 [
248 contract(Windows.Foundation.UniversalApiContract, 1.0),
249 uuid(a05791e6-cc9f-4687-acab-a364fd785463)
250 ]
251 delegate HRESULT ApplicationDataSetVersionHandler([in] Windows.Storage.SetVersionRequest *version);
252
253 [
254 contract(Windows.Foundation.UniversalApiContract, 1.0),
255 exclusiveto(Windows.Storage.ApplicationData),
256 uuid(c3da6fb7-b744-4b45-b0b8-223a0938d0dc)
257 ]
258 interface IApplicationData : IInspectable
259 {
260 [propget] HRESULT Version([out, retval] UINT32 *value);
261 HRESULT SetVersionAsync(
262 [in] UINT32 version,
263 [in] Windows.Storage.ApplicationDataSetVersionHandler *handler,
264 [out, retval] Windows.Foundation.IAsyncAction **operation
265 );
266 [overload("ClearAsync")]
267 HRESULT ClearAllAsync(
268 [out, retval] Windows.Foundation.IAsyncAction **operation
269 );
270 [overload("ClearAsync")]
271 HRESULT ClearAsync(
272 [in] Windows.Storage.ApplicationDataLocality locality,
273 [out, retval] Windows.Foundation.IAsyncAction **operation
274 );
275 [propget] HRESULT LocalSettings([out, retval] Windows.Storage.ApplicationDataContainer **value);
276 [propget] HRESULT RoamingSettings([out, retval] Windows.Storage.ApplicationDataContainer **value);
277 [propget] HRESULT LocalFolder([out, retval] Windows.Storage.StorageFolder **value);
278 [propget] HRESULT RoamingFolder([out, retval] Windows.Storage.StorageFolder **value);
279 [propget] HRESULT TemporaryFolder([out, retval] Windows.Storage.StorageFolder **value);
280 [eventadd] HRESULT DataChanged(
281 [in] Windows.Foundation.TypedEventHandler<Windows.Storage.ApplicationData *, IInspectable *> *handler,
282 [out, retval] EventRegistrationToken *token
283 );
284 [eventremove] HRESULT DataChanged([in] EventRegistrationToken token);
285 HRESULT SignalDataChanged();
286 [propget] HRESULT RoamingStorageQuota([out, retval] UINT64 *value);
287 }
288
289 [
290 contract(Windows.Foundation.UniversalApiContract, 1.0),
291 exclusiveto(Windows.Storage.ApplicationData),
292 uuid(9e65cd69-0ba3-4e32-be29-b02de6607638)
293 ]
294 interface IApplicationData2 : IInspectable
295 {
296 [propget] HRESULT LocalCacheFolder([out, retval] Windows.Storage.StorageFolder **value);
297 }
298
299 [
300 contract(Windows.Foundation.UniversalApiContract, 1.0),
301 exclusiveto(Windows.Storage.ApplicationData),
302 uuid(dc222cf4-2772-4c1d-aa2c-c9f743ade8d1)
303 ]
304 interface IApplicationData3 : IInspectable
305 {
306 HRESULT GetPublisherCacheFolder(
307 [in] HSTRING folder_name,
308 [out, retval] Windows.Storage.StorageFolder **value
309 );
310 HRESULT ClearPublisherCacheFolderAsync(
311 [in] HSTRING folder_name,
312 [out, retval] Windows.Foundation.IAsyncAction **operation
313 );
314 [propget] HRESULT SharedLocalFolder([out, retval] Windows.Storage.StorageFolder **value);
315 }
316
317 [
318 contract(Windows.Foundation.UniversalApiContract, 1.0),
319 exclusiveto(Windows.Storage.ApplicationDataContainer),
320 uuid(c5aefd1e-f467-40ba-8566-ab640a441e1d)
321 ]
322 interface IApplicationDataContainer : IInspectable
323 {
324 [propget] HRESULT Name([out, retval] HSTRING *value);
325 [propget] HRESULT Locality([out, retval] Windows.Storage.ApplicationDataLocality *value);
326 [propget] HRESULT Values([out, retval] Windows.Foundation.Collections.IPropertySet **value);
327 [propget] HRESULT Containers([out, retval] Windows.Foundation.Collections.IMapView<HSTRING, Windows.Storage.ApplicationDataContainer *> **value);
328 HRESULT CreateContainer(
329 [in] HSTRING name,
330 [in] Windows.Storage.ApplicationDataCreateDisposition disposition,
331 [out, retval] Windows.Storage.ApplicationDataContainer **container
332 );
333 HRESULT DeleteContainer([in] HSTRING name);
334 }
335
336 [
337 contract(Windows.Foundation.UniversalApiContract, 1.0),
338 exclusiveto(Windows.Storage.ApplicationData),
339 uuid(5612147b-e843-45e3-94d8-06169e3c8e17)
340 ]
341 interface IApplicationDataStatics : IInspectable
342 {
343 [propget] HRESULT Current([out, retval] Windows.Storage.ApplicationData **value);
344 }
345
346 [
347 contract(Windows.Foundation.UniversalApiContract, 1.0),
348 exclusiveto(Windows.Storage.ApplicationData),
349 uuid(cd606211-cf49-40a4-a47c-c7f0dbba8107)
350 ]
351 interface IApplicationDataStatics2 : IInspectable
352 {
353 HRESULT GetForUserAsync(
354 [in] Windows.System.User *user,
355 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.ApplicationData *> **operation
356 );
357 }
358
359 #ifndef _WINDOWS_APPLICATIONDATA
360 [
361 contract(Windows.Foundation.UniversalApiContract, 1.0),
362 exclusiveto(Windows.Storage.KnownFolders),
363 uuid(5d115e66-27e8-492f-b8e5-2f90896cd4cd)
364 ]
365 interface IKnownFoldersCameraRollStatics : IInspectable
366 {
367 [propget] HRESULT CameraRoll([out, retval] Windows.Storage.StorageFolder **value);
368 }
369
370 [
371 contract(Windows.Foundation.UniversalApiContract, 1.0),
372 exclusiveto(Windows.Storage.KnownFolders),
373 uuid(dad5ecd6-306f-4d6a-b496-46ba8eb106ce)
374 ]
375 interface IKnownFoldersPlaylistsStatics : IInspectable
376 {
377 [propget] HRESULT Playlists([out, retval] Windows.Storage.StorageFolder **value);
378 }
379
380 [
381 contract(Windows.Foundation.UniversalApiContract, 1.0),
382 exclusiveto(Windows.Storage.KnownFolders),
383 uuid(055c93ea-253d-467c-b6ca-a97da1e9a18d)
384 ]
385 interface IKnownFoldersSavedPicturesStatics : IInspectable
386 {
387 [propget] HRESULT SavedPictures([out, retval] Windows.Storage.StorageFolder **value);
388 }
389
390 [
391 contract(Windows.Foundation.UniversalApiContract, 1.0),
392 exclusiveto(Windows.Storage.KnownFolders),
393 uuid(5a2a7520-4802-452d-9ad9-4351ada7ec35)
394 ]
395 interface IKnownFoldersStatics : IInspectable
396 {
397 [propget] HRESULT MusicLibrary([out, retval] Windows.Storage.StorageFolder **value);
398 [propget] HRESULT PicturesLibrary([out, retval] Windows.Storage.StorageFolder **value);
399 [propget] HRESULT VideosLibrary([out, retval] Windows.Storage.StorageFolder **value);
400 [propget] HRESULT DocumentsLibrary([out, retval] Windows.Storage.StorageFolder **value);
401 [propget] HRESULT HomeGroup([out, retval] Windows.Storage.StorageFolder **value);
402 [propget] HRESULT RemovableDevices([out, retval] Windows.Storage.StorageFolder **value);
403 [propget] HRESULT MediaServerDevices([out, retval] Windows.Storage.StorageFolder **value);
404 }
405
406 [
407 contract(Windows.Foundation.UniversalApiContract, 1.0),
408 exclusiveto(Windows.Storage.KnownFolders),
409 uuid(194bd0cd-cf6e-4d07-9d53-e9163a2536e9)
410 ]
411 interface IKnownFoldersStatics2 : IInspectable
412 {
413 [propget] HRESULT Objects3D([out, retval] Windows.Storage.StorageFolder **value);
414 [propget] HRESULT AppCaptures([out, retval] Windows.Storage.StorageFolder **value);
415 [propget] HRESULT RecordedCalls([out, retval] Windows.Storage.StorageFolder **value);
416 }
417
418 [
419 contract(Windows.Foundation.UniversalApiContract, 2.0),
420 exclusiveto(Windows.Storage.KnownFolders),
421 uuid(c5194341-9742-4ed5-823d-fc1401148764)
422 ]
423 interface IKnownFoldersStatics3 : IInspectable
424 {
425 HRESULT GetFolderForUserAsync(
426 [in] Windows.System.User *user,
427 [in] Windows.Storage.KnownFolderId folder_id,
428 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFolder *> **operation
429 );
430 }
431
432 [
433 contract(Windows.Foundation.UniversalApiContract, 10.0),
434 exclusiveto(Windows.Storage.KnownFolders),
435 uuid(1722e6bf-9ff9-4b21-bed5-90ecb13a192e)
436 ]
437 interface IKnownFoldersStatics4 : IInspectable
438 {
439 HRESULT RequestAccessAsync(
440 [in] Windows.Storage.KnownFolderId folder_id,
441 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.KnownFoldersAccessStatus> **operation
442 );
443 HRESULT RequestAccessForUserAsync(
444 [in] Windows.System.User *user,
445 [in] Windows.Storage.KnownFolderId folder_id,
446 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.KnownFoldersAccessStatus> **operation
447 );
448 HRESULT GetFolderAsync(
449 [in] Windows.Storage.KnownFolderId folder_id,
450 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFolder *> **operation
451 );
452 }
453 #endif
454
455 [
456 contract(Windows.Foundation.UniversalApiContract, 1.0),
457 exclusiveto(Windows.Storage.SetVersionDeferral),
458 uuid(033508a2-781a-437a-b078-3f32badcfe47)
459 ]
460 interface ISetVersionDeferral : IInspectable
461 {
462 HRESULT Complete();
463 }
464
465 [
466 contract(Windows.Foundation.UniversalApiContract, 1.0),
467 exclusiveto(Windows.Storage.SetVersionRequest),
468 uuid(b9c76b9b-1056-4e69-8330-162619956f9b)
469 ]
470 interface ISetVersionRequest : IInspectable
471 {
472 [propget] HRESULT CurrentVersion([out, retval] UINT32 *version);
473 [propget] HRESULT DesiredVersion([out, retval] UINT32 *version);
474 HRESULT GetDeferral([out, retval] Windows.Storage.SetVersionDeferral **deferral);
475 }
476
477 #ifndef _WINDOWS_APPLICATIONDATA
478 [
479 contract(Windows.Foundation.UniversalApiContract, 1.0),
480 uuid(fa3f6186-4214-428c-a64c-14c9ac7315ea)
481 ]
482 interface IStorageFile : IInspectable
483 requires Windows.Storage.IStorageItem,
484 Windows.Storage.Streams.IRandomAccessStreamReference,
485 Windows.Storage.Streams.IInputStreamReference
486 {
487 [propget] HRESULT FileType([out, retval] HSTRING *value);
488 [propget] HRESULT ContentType([out, retval] HSTRING *value);
489 HRESULT OpenAsync(
490 [in] Windows.Storage.FileAccessMode mode,
491 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream *> **operation
492 );
493 HRESULT OpenTransactedWriteAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageStreamTransaction *> **operation);
494 [overload("CopyAsync")]
495 HRESULT CopyOverloadDefaultNameAndOptions(
496 [in] Windows.Storage.IStorageFolder *folder,
497 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *> **operation
498 );
499 [overload("CopyAsync")]
500 HRESULT CopyOverloadDefaultOptions(
501 [in] Windows.Storage.IStorageFolder *folder,
502 [in] HSTRING name,
503 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *> **operation);
504 [overload("CopyAsync")]
505 HRESULT CopyOverload(
506 [in] Windows.Storage.IStorageFolder *folder,
507 [in] HSTRING name,
508 [in] Windows.Storage.NameCollisionOption option,
509 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *> **operation
510 );
511 HRESULT CopyAndReplaceAsync([in] Windows.Storage.IStorageFile *file, [out, retval] Windows.Foundation.IAsyncAction **operation);
512 [overload("MoveAsync")]
513 HRESULT MoveOverloadDefaultNameAndOptions([in] Windows.Storage.IStorageFolder *folder, [out, retval] Windows.Foundation.IAsyncAction **operation);
514 [overload("MoveAsync")]
515 HRESULT MoveOverloadDefaultOptions(
516 [in] Windows.Storage.IStorageFolder *folder,
517 [in] HSTRING name,
518 [out, retval] Windows.Foundation.IAsyncAction **operation
519 );
520 [overload("MoveAsync")]
521 HRESULT MoveOverload(
522 [in] Windows.Storage.IStorageFolder *folder,
523 [in] HSTRING name,
524 [in] Windows.Storage.NameCollisionOption option,
525 [out, retval] Windows.Foundation.IAsyncAction **operation);
526 HRESULT MoveAndReplaceAsync([in] Windows.Storage.IStorageFile *file, [out, retval] Windows.Foundation.IAsyncAction **operation);
527 }
528
529 [
530 contract(Windows.Foundation.UniversalApiContract, 1.0),
531 uuid(72d1cb78-b3ef-4f75-a80b-6fd9dae2944b)
532 ]
533 interface IStorageFolder : IInspectable
534 requires Windows.Storage.IStorageItem
535 {
536 [overload("CreateFileAsync")]
537 HRESULT CreateFileAsyncOverloadDefaultOptions(
538 [in] HSTRING name,
539 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *> **operation
540 );
541 [overload("CreateFileAsync")]
542 HRESULT CreateFileAsync(
543 [in] HSTRING name,
544 [in] Windows.Storage.CreationCollisionOption options,
545 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *> **operation
546 );
547 [overload("CreateFolderAsync")]
548 HRESULT CreateFolderAsyncOverloadDefaultOptions(
549 [in] HSTRING name,
550 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFolder *> **operation
551 );
552 [overload("CreateFolderAsync")]
553 HRESULT CreateFolderAsync(
554 [in] HSTRING name,
555 [in] Windows.Storage.CreationCollisionOption options,
556 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFolder *> **operation
557 );
558 HRESULT GetFileAsync([in] HSTRING name, [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile *> **operation);
559 HRESULT GetFolderAsync([in] HSTRING name, [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFolder *> **operation);
560 HRESULT GetItemAsync([in] HSTRING name, [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.IStorageItem *> **operation);
561 [overload("GetFilesAsync")]
562 HRESULT GetFilesAsyncOverloadDefaultOptionsStartAndCount(
563 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFile *> *> **operation
564 );
565 [overload("GetFoldersAsync")]
566 HRESULT GetFoldersAsyncOverloadDefaultOptionsStartAndCount(
567 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFolder *> *> **operation
568 );
569 [overload("GetItemsAsync")]
570 HRESULT GetItemsAsyncOverloadDefaultStartAndCount(
571 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Storage.IStorageItem *> *> **operation
572 );
573 }
574
575 [
576 contract(Windows.Foundation.UniversalApiContract, 1.0),
577 uuid(4207a996-ca2f-42f7-bde8-8b10457a7f30)
578 ]
579 interface IStorageItem : IInspectable
580 {
581 [overload("RenameAsync")]
582 HRESULT RenameAsyncOverloadDefaultOptions([in] HSTRING name, [out, retval] Windows.Foundation.IAsyncAction **operation);
583 [overload("RenameAsync")]
584 HRESULT RenameAsync([in] HSTRING name, [in] Windows.Storage.NameCollisionOption option, [out, retval] Windows.Foundation.IAsyncAction **operation);
585 [overload("DeleteAsync")]
586 HRESULT DeleteAsyncOverloadDefaultOptions([out, retval] Windows.Foundation.IAsyncAction **operation);
587 [overload("DeleteAsync")]
588 HRESULT DeleteAsync([in] Windows.Storage.StorageDeleteOption option, [out, retval] Windows.Foundation.IAsyncAction **operation);
589 HRESULT GetBasicPropertiesAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.FileProperties.BasicProperties *> **operation);
590 [propget] HRESULT Name([out, retval] HSTRING *value);
591 [propget] HRESULT Path([out, retval] HSTRING *value);
592 [propget] HRESULT Attributes([out, retval] Windows.Storage.FileAttributes *value);
593 [propget] HRESULT DateCreated([out, retval] Windows.Foundation.DateTime *value);
594 HRESULT IsOfType([in] Windows.Storage.StorageItemTypes type, [out, retval] boolean *value);
595 }
596
597 [
598 contract(Windows.Foundation.UniversalApiContract, 1.0),
599 exclusiveto(Windows.Storage.StorageStreamTransaction),
600 uuid(f67cf363-a53d-4d94-ae2c-67232d93acdd)
601 ]
602 interface IStorageStreamTransaction : IInspectable
603 requires Windows.Foundation.IClosable
604 {
605 [propget] HRESULT Stream([out, retval] Windows.Storage.Streams.IRandomAccessStream **value);
606 HRESULT CommitAsync([out, retval] Windows.Foundation.IAsyncAction **operation);
607 }
608 #endif
609
610 [
611 contract(Windows.Foundation.UniversalApiContract, 1.0),
612 marshaling_behavior(agile),
613 static(Windows.Storage.IApplicationDataStatics, Windows.Foundation.UniversalApiContract, 1.0),
614 static(Windows.Storage.IApplicationDataStatics2, Windows.Foundation.UniversalApiContract, 1.0),
615 threading(mta)
616 ]
617 runtimeclass ApplicationData
618 {
619 [default] interface Windows.Storage.IApplicationData;
620 [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Storage.IApplicationData2;
621 [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Storage.IApplicationData3;
622 [contract(Windows.Foundation.UniversalApiContract, 12.0)] interface Windows.Foundation.IClosable;
623 }
624
625 [
626 contract(Windows.Foundation.UniversalApiContract, 1.0),
627 marshaling_behavior(agile)
628 ]
629 runtimeclass ApplicationDataContainer
630 {
631 [default] interface Windows.Storage.IApplicationDataContainer;
632 [contract(Windows.Foundation.UniversalApiContract, 12.0)] interface Windows.Foundation.IClosable;
633 }
634
635 #ifndef _WINDOWS_APPLICATIONDATA
636 [
637 contract(Windows.Foundation.UniversalApiContract, 1.0),
638 marshaling_behavior(agile),
639 static(Windows.Storage.IKnownFoldersCameraRollStatics, Windows.Foundation.UniversalApiContract, 1.0),
640 static(Windows.Storage.IKnownFoldersPlaylistsStatics, Windows.Foundation.UniversalApiContract, 1.0),
641 static(Windows.Storage.IKnownFoldersSavedPicturesStatics, Windows.Foundation.UniversalApiContract, 1.0),
642 static(Windows.Storage.IKnownFoldersStatics, Windows.Foundation.UniversalApiContract, 1.0),
643 static(Windows.Storage.IKnownFoldersStatics2, Windows.Foundation.UniversalApiContract, 1.0),
644 static(Windows.Storage.IKnownFoldersStatics3, Windows.Foundation.UniversalApiContract, 2.0),
645 static(Windows.Storage.IKnownFoldersStatics4, Windows.Foundation.UniversalApiContract, 10.0)
646 ]
647 runtimeclass KnownFolders
648 {
649 }
650
651 [
652 contract(Windows.Foundation.UniversalApiContract, 1.0),
653 marshaling_behavior(agile)
654 ]
655 runtimeclass SetVersionDeferral
656 {
657 [default] interface Windows.Storage.ISetVersionDeferral;
658 }
659
660 [
661 contract(Windows.Foundation.UniversalApiContract, 1.0),
662 marshaling_behavior(agile)
663 ]
664 runtimeclass SetVersionRequest
665 {
666 [default] interface Windows.Storage.ISetVersionRequest;
667 }
668
669 [
670 contract(Windows.Foundation.UniversalApiContract, 1.0),
671 /* static(Windows.Storage.IStorageFileStatics, Windows.Foundation.UniversalApiContract, 1.0), */
672 /* static(Windows.Storage.IStorageFileStatics2, Windows.Foundation.UniversalApiContract, 10.0) */
673 ]
674 runtimeclass StorageFile
675 {
676 [default] interface Windows.Storage.IStorageFile;
677 interface Windows.Storage.Streams.IInputStreamReference;
678 interface Windows.Storage.Streams.IRandomAccessStreamReference;
679 interface Windows.Storage.IStorageItem;
680 /* interface Windows.Storage.IStorageItemProperties; */
681 /* [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Storage.IStorageItemProperties2; */
682 /* [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Storage.IStorageItem2; */
683 /* [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Storage.IStorageItemPropertiesWithProvider; */
684 /* [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Storage.IStorageFilePropertiesWithAvailability; */
685 /* [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Storage.IStorageFile2; */
686 }
687
688 [
689 contract(Windows.Foundation.UniversalApiContract, 1.0),
690 /* static(Windows.Storage.IStorageFolderStatics, Windows.Foundation.UniversalApiContract, 1.0), */
691 /* static(Windows.Storage.IStorageFolderStatics2, Windows.Foundation.UniversalApiContract, 10.0) */
692 ]
693 runtimeclass StorageFolder
694 {
695 [default] interface Windows.Storage.IStorageFolder;
696 interface Windows.Storage.IStorageItem;
697 /* interface Windows.Storage.Search.IStorageFolderQueryOperations; */
698 /* interface Windows.Storage.IStorageItemProperties; */
699 /* [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Storage.IStorageItemProperties2; */
700 /* [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Storage.IStorageItem2; */
701 /* [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Storage.IStorageFolder2; */
702 /* [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Storage.IStorageItemPropertiesWithProvider; */
703 /* [contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.Storage.IStorageFolder3; */
704 }
705
706 [
707 contract(Windows.Foundation.UniversalApiContract, 1.0)
708 ]
709 runtimeclass StorageStreamTransaction
710 {
711 [default] interface Windows.Storage.IStorageStreamTransaction;
712 interface Windows.Foundation.IClosable;
713 }
714 #endif
715 }