From 3287be67b3bec8cf40649c808987c8c97272a855 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Mon, 22 Feb 2016 02:51:56 +0900 Subject: [PATCH] merge ISomeInterface2 into ISomeInterface --- winrt/winrt-uwp.d.ts | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/winrt/winrt-uwp.d.ts b/winrt/winrt-uwp.d.ts index 41dc1b0e1..85303eb2b 100644 --- a/winrt/winrt-uwp.d.ts +++ b/winrt/winrt-uwp.d.ts @@ -2509,6 +2509,8 @@ declare namespace Windows { name: string; /** Gets the identifier of a registered background task. */ taskId: string; + /** Gets the trigger associated with the background task. */ + trigger: Windows.ApplicationModel.Background.IBackgroundTrigger; } /** Represents a method that handles completion events for a background task. */ type BackgroundTaskCompletedEventHandler = (ev: Windows.ApplicationModel.Background.BackgroundTaskCompletedEventArgs & WinRTEvent) => void; @@ -2533,6 +2535,12 @@ declare namespace Windows { task: Windows.ApplicationModel.Background.BackgroundTaskRegistration; /** Gets additional information associated with a background task instance. */ triggerDetails: any; + /** + * Retrieves the number of times the background task has been suspended for using too many resources. + * @param counter Indicates the type of resource to include in the throttle count: network, CPU, or both. + * @return This method returns the number of times the background task has been suspended for exceeding its quota of the indicated resource type. + */ + getThrottleCount(counter: Windows.ApplicationModel.Background.BackgroundTaskThrottleCounter): number; } } /** Controls multiple aspects of how an application on the phone behaves, including lock-screen interaction, the phone call history, and various telephony options and information. */ @@ -53466,6 +53474,17 @@ declare namespace Windows { name: string; /** Gets the full file-system path of the item, if the item has a path. */ path: string; + /** + * Gets the parent folder of the current storage item. + * @return When this method completes, it returns the parent folder as a StorageFolder . + */ + getParentAsync(): Windows.Foundation.IPromiseWithIAsyncOperation; + /** + * Indicates whether the current item is the same as the specified item. + * @param item The IStorageItem object that represents a storage item to compare against. + * @return Returns true if the current storage item is the same as the specified storage item; otherwise false. + */ + isEqual(item: Windows.Storage.IStorageItem): boolean; } /** Represents a file. Provides information about the file and its contents, and ways to manipulate them. */ interface IStorageFile extends Windows.Storage.IStorageItem, Windows.Storage.Streams.IRandomAccessStreamReference, Windows.Storage.Streams.IInputStreamReference { @@ -53529,11 +53548,24 @@ declare namespace Windows { * @return When this method completes, it returns the random-access stream (type IRandomAccessStream ). */ openAsync(accessMode: Windows.Storage.FileAccessMode): Windows.Foundation.IPromiseWithIAsyncOperation; + /** + * Opens a random-access stream over the file. + * @param accessMode One of the enumeration values that specifies the type of access to allow. + * @param options A bitwise combination of the enumeration values that specify options for opening the stream. + * @return When this method completes, it returns an IRandomAccessStream that contains the requested random-access stream. + */ + openAsync(accessMode: Windows.Storage.FileAccessMode, options: Windows.Storage.StorageOpenOptions): Windows.Foundation.IPromiseWithIAsyncOperation; /** * Opens a transacted, random-access stream for writing to the file. * @return When this method completes, it returns a StorageStreamTransaction that contains the random-access stream and methods that can be used to complete transactions. */ openTransactedWriteAsync(): Windows.Foundation.IPromiseWithIAsyncOperation; + /** + * Opens a random-access stream to the file that can be used for transacted-write operations with the specified options. + * @param options A bitwise combination of the enumeration values that specify options for opening the stream. + * @return When this method completes, it returns a StorageStreamTransaction that contains the random-access stream and methods that can be used to complete transactions. + */ + openTransactedWriteAsync(options: Windows.Storage.StorageOpenOptions): Windows.Foundation.IPromiseWithIAsyncOperation; /** Gets the MIME type of the contents of the file. */ contentType: string; /** Gets the type (file name extension) of the file. */ @@ -53600,6 +53632,12 @@ declare namespace Windows { * @return When this method completes successfully, it returns a list of the files and folders (type IVectorView ). The files and folders in the list are represented by objects of type IStorageItem . */ getItemsAsync(): Windows.Foundation.IPromiseWithIAsyncOperation>; + /** + * Try to get a single file or sub-folder from the current folder by using the name of the item. + * @param name The name (or path relative to the current folder) of the file or sub-folder to try to retrieve. + * @return When this method completes successfully, it returns the file or folder (type IStorageItem ). + */ + tryGetItemAsync(name: string): Windows.Foundation.IPromiseWithIAsyncOperation; } /** Represents a method that handles the request to set the version of the application data in the application data store. */ type ApplicationDataSetVersionHandler = (setVersionRequest: Windows.Storage.SetVersionRequest) => void;